diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2012-07-05 21:55:46 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-07-09 16:36:36 -0400 |
commit | cddec90254c3c3d20752bf9053c496035cdfef6a (patch) | |
tree | 522099e434507b54e8a17d1a1abf22724f74a960 | |
parent | 32c336a5dfd16b4645c8a0dbc534efd02f079e02 (diff) | |
download | blackbird-op-linux-cddec90254c3c3d20752bf9053c496035cdfef6a.tar.gz blackbird-op-linux-cddec90254c3c3d20752bf9053c496035cdfef6a.zip |
b43: N-PHY: fix RSSI calibration
Specs were updated, change code to match it.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/b43/phy_n.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c index 108118820b36..b92bb9c92ad1 100644 --- a/drivers/net/wireless/b43/phy_n.c +++ b/drivers/net/wireless/b43/phy_n.c @@ -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,14 +1415,15 @@ 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); - else - offset[j] = (offset[j] + 4) / 8; - b43_nphy_scale_offset_rssi(dev, 0, - offset[2 * core], core + 1, j % 2, i); + if (offset[j] < 0) + offset[j] = -(abs(offset[j] + 4) / 8); + else + offset[j] = (offset[j] + 4) / 8; + b43_nphy_scale_offset_rssi(dev, 0, + offset[2 * core], core + 1, j % 2, i); + } } } } |