All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Lamparter <chunkeey@googlemail.com>
To: Hiroaki KAWAI <hiroaki.kawai@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] carl9170: fix bad rssi reading
Date: Thu, 10 Sep 2015 15:07:26 +0200	[thread overview]
Message-ID: <1738409.B3jGDQ6NWL@debian64> (raw)
In-Reply-To: <1441908285-606-1-git-send-email-hiroaki.kawai@gmail.com>

On Thursday, September 10, 2015 06:04:45 PM Hiroaki KAWAI wrote:
> Fix rssi calculation error which was introduced in otus to ar9170
> porting.
> 
> Signed-off-by: Hiroaki KAWAI <hiroaki.kawai@gmail.com>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>

For reference: Here's the line in the original otus code:
<http://lxr.free-electrons.com/source/drivers/staging/otus/hal/hpusb.c?v=2.6.33#L818>

This value/result isn't used anywhere, so we could also remove it. 

> ---
>  drivers/net/wireless/ath/carl9170/rx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/carl9170/rx.c b/drivers/net/wireless/ath/carl9170/rx.c
> index 924135b..d66533c 100644
> --- a/drivers/net/wireless/ath/carl9170/rx.c
> +++ b/drivers/net/wireless/ath/carl9170/rx.c
> @@ -453,7 +453,7 @@ static void carl9170_rx_phy_status(struct ar9170 *ar,
>  	/* post-process RSSI */
>  	for (i = 0; i < 7; i++)
>  		if (phy->rssi[i] & 0x80)
> -			phy->rssi[i] = ((phy->rssi[i] & 0x7f) + 1) & 0x7f;
> +			phy->rssi[i] = ((~phy->rssi[i] & 0x7f) + 1) & 0x7f;
>  
>  	/* TODO: we could do something with phy_errors */
>  	status->signal = ar->noise[0] + phy->rssi_combined;
> 


  reply	other threads:[~2015-09-10 13:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-10 18:04 [PATCH] carl9170: fix bad rssi reading Hiroaki KAWAI
2015-09-10 13:07 ` Christian Lamparter [this message]
2015-09-10 16:43   ` Hiroaki Kawai
     [not found]   ` <CABD3darfGTc8gVgAo4j7S4M0uymoF2gy8ihLraN2qcXJFO9cWw@mail.gmail.com>
2015-09-10 16:56     ` Christian Lamparter
2015-09-29  7:38 ` Kalle Valo

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=1738409.B3jGDQ6NWL@debian64 \
    --to=chunkeey@googlemail.com \
    --cc=hiroaki.kawai@gmail.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.