linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] carl9170: fix bad rssi reading
@ 2015-09-10 18:04 Hiroaki KAWAI
  2015-09-10 13:07 ` Christian Lamparter
  2015-09-29  7:38 ` Kalle Valo
  0 siblings, 2 replies; 5+ messages in thread
From: Hiroaki KAWAI @ 2015-09-10 18:04 UTC (permalink / raw)
  To: linux-wireless; +Cc: Hiroaki KAWAI

Fix rssi calculation error which was introduced in otus to ar9170
porting.

Signed-off-by: Hiroaki KAWAI <hiroaki.kawai@gmail.com>
---
 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;
-- 
2.5.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-09-29  7:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-10 18:04 [PATCH] carl9170: fix bad rssi reading Hiroaki KAWAI
2015-09-10 13:07 ` Christian Lamparter
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).