ath9k_hw: Fix noise floor calibration timeout on fast channel change
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>
Tue, 25 Oct 2011 11:17:36 +0000 (16:47 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 2 Nov 2011 19:23:12 +0000 (15:23 -0400)
During the fast channel change noise floor values are being loaded
twice at init_cal and after channel_change. The commit "ath9k_hw:
Improve fast channel change for AR9003 chips" overlooked it that
caused failure to load nf while doing bgscan. This patch performs noise
floor calibration after the fast and full reset.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ar9002_calib.c
drivers/net/wireless/ath/ath9k/ar9003_calib.c
drivers/net/wireless/ath/ath9k/hw.c

index e0ab0657cc3a8808379ae0cc93e32e0863e13305..88279e325dcac0037ba3b6ed6b13a22bf23bc752 100644 (file)
@@ -868,10 +868,6 @@ static bool ar9002_hw_init_cal(struct ath_hw *ah, struct ath9k_channel *chan)
        /* Do PA Calibration */
        ar9002_hw_pa_cal(ah, true);
 
-       /* Do NF Calibration after DC offset and other calibrations */
-       ath9k_hw_loadnf(ah, chan);
-       ath9k_hw_start_nfcal(ah, true);
-
        if (ah->caldata)
                ah->caldata->nfcal_pending = true;
 
index a4cd1617092b1c2d0ccf710832cdaba7df6dfc2e..12a730dcb500912ad81bfeebfe6b8f9119cdfa33 100644 (file)
@@ -1085,9 +1085,6 @@ skip_tx_iqcal:
                ar9003_hw_rtt_disable(ah);
        }
 
-       ath9k_hw_loadnf(ah, chan);
-       ath9k_hw_start_nfcal(ah, true);
-
        /* Initialize list pointers */
        ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL;
        ah->supp_cals = IQ_MISMATCH_CAL;
index f16d2033081f3ea8df6b30a8ee74258772a2d500..b479160dc26266092f0c2ff23a8db385d8efe5de 100644 (file)
@@ -1724,6 +1724,9 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
        if (!ath9k_hw_init_cal(ah, chan))
                return -EIO;
 
+       ath9k_hw_loadnf(ah, chan);
+       ath9k_hw_start_nfcal(ah, true);
+
        ENABLE_REGWRITE_BUFFER(ah);
 
        ath9k_hw_restore_chainmask(ah);