ath9k_hw: start initial NF calibration after PA calibration on <AR9003
authorFelix Fietkau <nbd@openwrt.org>
Sat, 25 Oct 2014 15:19:32 +0000 (17:19 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 27 Oct 2014 18:16:18 +0000 (14:16 -0400)
This makes the initial NF calibration less likely to fail.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ar9002_calib.c
drivers/net/wireless/ath/ath9k/hw.c

index 07994e3223290332f436269beb59e7f2fade5d94..42190b67c6719594bcbe57b9d70e02186645bace 100644 (file)
@@ -856,6 +856,8 @@ static bool ar9002_hw_init_cal(struct ath_hw *ah, struct ath9k_channel *chan)
 
        /* Do PA Calibration */
        ar9002_hw_pa_cal(ah, true);
+       ath9k_hw_loadnf(ah, chan);
+       ath9k_hw_start_nfcal(ah, true);
 
        if (ah->caldata)
                set_bit(NFCAL_PENDING, &ah->caldata->cal_flags);
index 8be4b145339426b7ea8a47a4788c9dd6be04b238..85a78176b80964a8f3b31f7997ec35eb380182c6 100644 (file)
@@ -1953,8 +1953,10 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
        if (ath9k_hw_mci_is_enabled(ah))
                ar9003_mci_check_bt(ah);
 
-       ath9k_hw_loadnf(ah, chan);
-       ath9k_hw_start_nfcal(ah, true);
+       if (AR_SREV_9300_20_OR_LATER(ah)) {
+               ath9k_hw_loadnf(ah, chan);
+               ath9k_hw_start_nfcal(ah, true);
+       }
 
        if (AR_SREV_9300_20_OR_LATER(ah))
                ar9003_hw_bb_watchdog_config(ah);