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

Commit cddec902 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by John W. Linville
Browse files

b43: N-PHY: fix RSSI calibration



Specs were updated, change code to match it.

Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 32c336a5
Loading
Loading
Loading
Loading
+9 −8
Original line number Diff line number Diff line
@@ -1369,7 +1369,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)
					i << 2);
			b43_nphy_poll_rssi(dev, 2, results[i], 8);
		}
		for (i = 0; i < 4; i++) {
		for (i = 0; i < 4; i += 2) {
			s32 curr;
			s32 mind = 40;
			s32 minpoll = 249;
@@ -1415,7 +1415,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)
			b43_nphy_scale_offset_rssi(dev, 0, 0, core + 1, 1, i);
			b43_nphy_poll_rssi(dev, i, poll_results, 8);
			for (j = 0; j < 4; j++) {
				if (j / 2 == core)
				if (j / 2 == core) {
					offset[j] = 232 - poll_results[j];
					if (offset[j] < 0)
						offset[j] = -(abs(offset[j] + 4) / 8);
@@ -1426,6 +1426,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)
				}
			}
		}
	}

	b43_phy_write(dev, B43_NPHY_RFCTL_INTC1, saved_regs_phy_rfctl[0]);
	b43_phy_write(dev, B43_NPHY_RFCTL_INTC2, saved_regs_phy_rfctl[1]);