All of lore.kernel.org
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] rtl8180: normalize quality measurment for 100-point scale
Date: Wed, 8 Oct 2008 14:33:23 -0400	[thread overview]
Message-ID: <20081008183323.GA32472@tuxdriver.com> (raw)
In-Reply-To: <1223407914-23971-1-git-send-email-linville@tuxdriver.com>

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.

      reply	other threads:[~2008-10-08 18:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081008183323.GA32472@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.