diff options
author | Bruno Randolf <br1@einfach.org> | 2010-03-09 02:56:15 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-10 17:44:40 -0500 |
commit | 49a85d211a63ad1d565842ebc535c5168d85d86a (patch) | |
tree | 9b0dfa2e9403524cb041a5838d47cedb7ab3d964 /drivers/net/wireless | |
parent | 7644395f8df9aa5b42af268a485b83e44bba2784 (diff) |
ath5k: IQ calibration for AR5211 is slightly different
according to the HAL sources the calculation of the Q value is slightly
different for AR5211 chips.
i couldn't test this since IQ calibration never finishes on older parts. this
is a different problem...
Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/phy.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index 5aee85f27c0..20d562b07c9 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c | |||
@@ -1391,7 +1391,11 @@ static int ath5k_hw_rf511x_calibrate(struct ath5k_hw *ah, | |||
1391 | } | 1391 | } |
1392 | 1392 | ||
1393 | i_coffd = ((i_pwr >> 1) + (q_pwr >> 1)) >> 7; | 1393 | i_coffd = ((i_pwr >> 1) + (q_pwr >> 1)) >> 7; |
1394 | q_coffd = q_pwr >> 7; | 1394 | |
1395 | if (ah->ah_version == AR5K_AR5211) | ||
1396 | q_coffd = q_pwr >> 6; | ||
1397 | else | ||
1398 | q_coffd = q_pwr >> 7; | ||
1395 | 1399 | ||
1396 | /* No correction */ | 1400 | /* No correction */ |
1397 | if (i_coffd == 0 || q_coffd == 0) | 1401 | if (i_coffd == 0 || q_coffd == 0) |
@@ -1405,7 +1409,10 @@ static int ath5k_hw_rf511x_calibrate(struct ath5k_hw *ah, | |||
1405 | if (i_coff < -32) | 1409 | if (i_coff < -32) |
1406 | i_coff = -32; | 1410 | i_coff = -32; |
1407 | 1411 | ||
1408 | q_coff = (((s32)i_pwr / q_coffd) - 128); | 1412 | if (ah->ah_version == AR5K_AR5211) |
1413 | q_coff = (i_pwr / q_coffd) - 64; | ||
1414 | else | ||
1415 | q_coff = (i_pwr / q_coffd) - 128; | ||
1409 | 1416 | ||
1410 | /* Boundary check */ | 1417 | /* Boundary check */ |
1411 | if (q_coff > 15) | 1418 | if (q_coff > 15) |