diff options
Diffstat (limited to 'drivers/net')
-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) |