ath9k_hw: use the skip count for PA calibration on AR9271
authorSujith <Sujith.Manoharan@atheros.com>
Wed, 17 Mar 2010 08:55:21 +0000 (14:25 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 23 Mar 2010 20:50:15 +0000 (16:50 -0400)
Periodic power amplifier offset calibration is skipped on ath9k
algorithmically, this is required on AR9271.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/calib.c

index e76dd7498653c79fa892c21a682685f4ae96fe45..d5026e4f484b580131758646ab95d508cd52ce79 100644 (file)
@@ -1059,9 +1059,12 @@ bool ath9k_hw_calibrate(struct ath_hw *ah, struct ath9k_channel *chan,
        /* Do NF cal only at longer intervals */
        if (longcal) {
                /* Do periodic PAOffset Cal */
-               if (AR_SREV_9271(ah))
-                       ath9k_hw_9271_pa_cal(ah, false);
-               else if (AR_SREV_9285_11_OR_LATER(ah)) {
+               if (AR_SREV_9271(ah)) {
+                       if (!ah->pacal_info.skipcount)
+                               ath9k_hw_9271_pa_cal(ah, false);
+                       else
+                               ah->pacal_info.skipcount--;
+               } else if (AR_SREV_9285_11_OR_LATER(ah)) {
                        if (!ah->pacal_info.skipcount)
                                ath9k_hw_9285_pa_cal(ah, false);
                        else