Search Linux Wireless

Re: [PATCH] carl9170: fix bad rssi reading

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

 



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@xxxxxxxxx>
Acked-by: Christian Lamparter <chunkeey@xxxxxxxxxxxxxx>

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;
> 

--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux