aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2012-12-09 20:52:36 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-12-10 15:49:49 -0500
commitd882d242e4bfb2016e611a5aab0112fcece7a8ac (patch)
tree3d054275be2223e4ffa0fdc5030ea3447dc049ff /drivers
parent36d2943ba738a601e29cbd86fa6ab6ac838f3905 (diff)
ath9k_hw: Fix PAPRD retraining for AR9485
Retraining of PAPRD based on agc2_pwr is required for chips other than AR9485. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_paprd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
index b28565e80785..fb3a87eeb678 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
@@ -965,9 +965,13 @@ EXPORT_SYMBOL(ar9003_paprd_init_table);
965bool ar9003_paprd_is_done(struct ath_hw *ah) 965bool ar9003_paprd_is_done(struct ath_hw *ah)
966{ 966{
967 int paprd_done, agc2_pwr; 967 int paprd_done, agc2_pwr;
968
968 paprd_done = REG_READ_FIELD(ah, AR_PHY_PAPRD_TRAINER_STAT1, 969 paprd_done = REG_READ_FIELD(ah, AR_PHY_PAPRD_TRAINER_STAT1,
969 AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE); 970 AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE);
970 971
972 if (AR_SREV_9485(ah))
973 goto exit;
974
971 if (paprd_done == 0x1) { 975 if (paprd_done == 0x1) {
972 agc2_pwr = REG_READ_FIELD(ah, AR_PHY_PAPRD_TRAINER_STAT1, 976 agc2_pwr = REG_READ_FIELD(ah, AR_PHY_PAPRD_TRAINER_STAT1,
973 AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR); 977 AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR);
@@ -983,7 +987,7 @@ bool ar9003_paprd_is_done(struct ath_hw *ah)
983 if (agc2_pwr <= PAPRD_IDEAL_AGC2_PWR_RANGE) 987 if (agc2_pwr <= PAPRD_IDEAL_AGC2_PWR_RANGE)
984 paprd_done = 0; 988 paprd_done = 0;
985 } 989 }
986 990exit:
987 return !!paprd_done; 991 return !!paprd_done;
988} 992}
989EXPORT_SYMBOL(ar9003_paprd_is_done); 993EXPORT_SYMBOL(ar9003_paprd_is_done);