Search Linux Wireless

Re: [PATCH] rtl8180: normalize quality measurment for 100-point scale

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
> ---
> 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@xxxxxxxxxxxxx			of your literate lifestyle.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux