* [PATCH] rtl8180: normalize quality measurment for 100-point scale
@ 2008-10-07 19:31 John W. Linville
2008-10-08 18:33 ` John W. Linville
0 siblings, 1 reply; 2+ messages in thread
From: John W. Linville @ 2008-10-07 19:31 UTC (permalink / raw)
To: linux-wireless; +Cc: John W. Linville
Otherwise, we get values like "133/100" for quality output from
iwconfig. :-(
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
This is currently untested, but it seems reasonable to me...any takers? :-)
drivers/net/wireless/rtl8180_dev.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/rtl8180_dev.c b/drivers/net/wireless/rtl8180_dev.c
index b7172a1..e9edcaa 100644
--- a/drivers/net/wireless/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl8180_dev.c
@@ -132,7 +132,7 @@ static void rtl8180_handle_rx(struct ieee80211_hw *dev)
rx_status.antenna = (flags2 >> 15) & 1;
/* TODO: improve signal/rssi reporting */
- rx_status.qual = flags2 & 0xFF;
+ rx_status.qual = ((flags2 & 0xFF) * 100) / 256;
rx_status.signal = (flags2 >> 8) & 0x7F;
/* XXX: is this correct? */
rx_status.rate_idx = (flags >> 20) & 0xF;
--
1.5.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtl8180: normalize quality measurment for 100-point scale
2008-10-07 19:31 [PATCH] rtl8180: normalize quality measurment for 100-point scale John W. Linville
@ 2008-10-08 18:33 ` John W. Linville
0 siblings, 0 replies; 2+ messages in thread
From: John W. Linville @ 2008-10-08 18:33 UTC (permalink / raw)
To: linux-wireless
On Tue, Oct 07, 2008 at 03:31:54PM -0400, John W. Linville wrote:
> Otherwise, we get values like "133/100" for quality output from
> iwconfig. :-(
>
> Signed-off-by: John W. Linville <linville@tuxdriver.com>
> ---
> This is currently untested, but it seems reasonable to me...any takers? :-)
This doesn't seem quite right either...only now all the numbers I
get are ultra-low, nothing bigger than 7 so far. Also I'm not sure,
but it seemed like the quality value was moving inversely to how it
should be moving...
I noticed that the rtl8187 guys did some work on the quality value
for rtl8187b -- maybe I should persuade them to look at this one as
well... :-)
John
> drivers/net/wireless/rtl8180_dev.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/rtl8180_dev.c b/drivers/net/wireless/rtl8180_dev.c
> index b7172a1..e9edcaa 100644
> --- a/drivers/net/wireless/rtl8180_dev.c
> +++ b/drivers/net/wireless/rtl8180_dev.c
> @@ -132,7 +132,7 @@ static void rtl8180_handle_rx(struct ieee80211_hw *dev)
>
> rx_status.antenna = (flags2 >> 15) & 1;
> /* TODO: improve signal/rssi reporting */
> - rx_status.qual = flags2 & 0xFF;
> + rx_status.qual = ((flags2 & 0xFF) * 100) / 256;
> rx_status.signal = (flags2 >> 8) & 0x7F;
> /* XXX: is this correct? */
> rx_status.rate_idx = (flags >> 20) & 0xF;
> --
> 1.5.4.3
>
>
--
John W. Linville Linux should be at the core
linville@tuxdriver.com of your literate lifestyle.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-08 18:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-07 19:31 [PATCH] rtl8180: normalize quality measurment for 100-point scale John W. Linville
2008-10-08 18:33 ` John W. Linville
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).