Commit 18d72605 authored by Larry.Finger@lwfinger.net's avatar Larry.Finger@lwfinger.net Committed by John W. Linville

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: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f4ea83dd
...@@ -357,6 +357,7 @@ static void p54_rx_data(struct ieee80211_hw *dev, struct sk_buff *skb) ...@@ -357,6 +357,7 @@ static void p54_rx_data(struct ieee80211_hw *dev, struct sk_buff *skb)
rx_status.signal = hdr->rssi; rx_status.signal = hdr->rssi;
/* XX correct? */ /* XX correct? */
rx_status.qual = (100 * hdr->rssi) / 127;
rx_status.rate_idx = hdr->rate & 0xf; rx_status.rate_idx = hdr->rate & 0xf;
rx_status.freq = freq; rx_status.freq = freq;
rx_status.band = IEEE80211_BAND_2GHZ; rx_status.band = IEEE80211_BAND_2GHZ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment