summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLarry.Finger@lwfinger.net <Larry.Finger@lwfinger.net>2008-06-30 17:39:49 +0200
committerJohn W. Linville <linville@tuxdriver.com>2008-07-02 21:48:34 +0200
commit18d7260527ce7c0d0a177afdf92d8f868f50b067 (patch)
tree290bbb499b871df1a227c10a40af814b076c6d74 /drivers
parentmac80211: rework debug settings and make debugging safer (diff)
downloadlinux-18d7260527ce7c0d0a177afdf92d8f868f50b067.tar.xz
linux-18d7260527ce7c0d0a177afdf92d8f868f50b067.zip
p54: Add quality output to iwlist and iwconfig
The p54 driver family reports a quality of 0 in iwconfig and iwlist output. This patch calculates a quality number as a percentage of the rssi to the maximum signal of 127 reported as the maximum signal. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/p54/p54common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c
index 9f7224de6fd1..ffaf7a6b6810 100644
--- a/drivers/net/wireless/p54/p54common.c
+++ b/drivers/net/wireless/p54/p54common.c
@@ -357,6 +357,7 @@ static void p54_rx_data(struct ieee80211_hw *dev, struct sk_buff *skb)
rx_status.signal = hdr->rssi;
/* XX correct? */
+ rx_status.qual = (100 * hdr->rssi) / 127;
rx_status.rate_idx = hdr->rate & 0xf;
rx_status.freq = freq;
rx_status.band = IEEE80211_BAND_2GHZ;