Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;