summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/carl9170/rx.c
diff options
context:
space:
mode:
authorHiroaki KAWAI <hiroaki.kawai@gmail.com>2015-09-10 21:04:45 +0300
committerKalle Valo <kvalo@codeaurora.org>2015-09-29 10:38:20 +0300
commitc452d944bee09c8c2529d965f10999d80991402a (patch)
tree2e3126a94c46cf9bd87e0116c2b7e1995dbbe5ee /drivers/net/wireless/ath/carl9170/rx.c
parent76ea6fdbeb2540ea8a06189b519175ee5616ab56 (diff)
downloadlinux-c452d944bee09c8c2529d965f10999d80991402a.tar.xz
carl9170: fix bad rssi reading
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> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/carl9170/rx.c')
-rw-r--r--drivers/net/wireless/ath/carl9170/rx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/carl9170/rx.c b/drivers/net/wireless/ath/carl9170/rx.c
index 924135b8e575..d66533cbc38a 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;