aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-11-28 06:59:45 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-02 14:37:01 -0500
commit8cbe6e66889d2e4dbea37b2fc6f276bd69d1ef67 (patch)
tree787e1cff9b00e004886c13fab3a09719f2821611 /drivers
parent8c1d5a7a2230a162af709fa118f051e0d18ff427 (diff)
b43: N-PHY: fix RSSI calibration
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/b43/phy_n.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index a721cac42976..85a7a60c54bf 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -2064,7 +2064,10 @@ static void b43_nphy_rev2_rssi_cal(struct b43_wldev *dev, u8 type)
2064 u16 class, override; 2064 u16 class, override;
2065 u8 regs_save_radio[2]; 2065 u8 regs_save_radio[2];
2066 u16 regs_save_phy[2]; 2066 u16 regs_save_phy[2];
2067
2067 s8 offset[4]; 2068 s8 offset[4];
2069 u8 core;
2070 u8 rail;
2068 2071
2069 u16 clip_state[2]; 2072 u16 clip_state[2];
2070 u16 clip_off[2] = { 0xFFFF, 0xFFFF }; 2073 u16 clip_off[2] = { 0xFFFF, 0xFFFF };
@@ -2165,12 +2168,11 @@ static void b43_nphy_rev2_rssi_cal(struct b43_wldev *dev, u8 type)
2165 if (results_min[i] == 248) 2168 if (results_min[i] == 248)
2166 offset[i] = code - 32; 2169 offset[i] = code - 32;
2167 2170
2168 if (i % 2 == 0) 2171 core = (i / 2) ? 2 : 1;
2169 b43_nphy_scale_offset_rssi(dev, 0, offset[i], 1, 0, 2172 rail = (i % 2) ? 1 : 0;
2170 type); 2173
2171 else 2174 b43_nphy_scale_offset_rssi(dev, 0, offset[i], core, rail,
2172 b43_nphy_scale_offset_rssi(dev, 0, offset[i], 2, 1, 2175 type);
2173 type);
2174 } 2176 }
2175 2177
2176 b43_radio_maskset(dev, B2055_C1_PD_RSSIMISC, 0xF8, state[0]); 2178 b43_radio_maskset(dev, B2055_C1_PD_RSSIMISC, 0xF8, state[0]);