Commit c452d944 authored by Hiroaki KAWAI's avatar Hiroaki KAWAI Committed by Kalle Valo

carl9170: fix bad rssi reading

Fix rssi calculation error which was introduced in otus to ar9170
porting.
Signed-off-by: default avatarHiroaki KAWAI <hiroaki.kawai@gmail.com>
Acked-by: default avatarChristian Lamparter <chunkeey@googlemail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 76ea6fdb
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment