aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLukáš Turek <8an@praha12.net>2009-11-19 23:02:02 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-11-23 17:05:29 -0500
commitf1cf2dbd0f798b71b1590e7aca6647f2caef1649 (patch)
treeb5b6a0e0242818329b4914352df7a868e58cd235 /drivers
parent98e3ac99e25601c3fb83dc91367d76f864496847 (diff)
ath5k: Fix I/Q calibration
The sign of correction coefficients was lost in the calculations, which caused high packetloss in 802.11a mode after the results were applied. Fixed by removing unneccesary and broken AND with a bit mask. Signed-off-by: Lukas Turek <8an@praha12.net> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath5k/phy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index 721ec5ee381..bbfdcd5e7cb 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -1399,7 +1399,7 @@ static int ath5k_hw_rf511x_calibrate(struct ath5k_hw *ah,
if (i_coffd == 0 || q_coffd == 0)
goto done;
- i_coff = ((-iq_corr) / i_coffd) & 0x3f;
+ i_coff = ((-iq_corr) / i_coffd);
/* Boundary check */
if (i_coff > 31)
@@ -1407,7 +1407,7 @@ static int ath5k_hw_rf511x_calibrate(struct ath5k_hw *ah,
if (i_coff < -32)
i_coff = -32;
- q_coff = (((s32)i_pwr / q_coffd) - 128) & 0x1f;
+ q_coff = (((s32)i_pwr / q_coffd) - 128);
/* Boundary check */
if (q_coff > 15)