1 From: Felix Fietkau <nbd@openwrt.org>
2 Date: Sat, 18 Oct 2014 13:39:11 +0200
3 Subject: [PATCH] ath9k_hw: do not run NF and periodic calibration at the
6 It can cause inconsistent calibration results or in some cases turn the
9 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
12 --- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c
13 +++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
14 @@ -660,7 +660,6 @@ static void ar9002_hw_olc_temp_compensat
15 static int ar9002_hw_calibrate(struct ath_hw *ah, struct ath9k_channel *chan,
16 u8 rxchainmask, bool longcal)
18 - bool iscaldone = true;
19 struct ath9k_cal_list *currCal = ah->cal_list_curr;
20 bool nfcal, nfcal_pending = false;
22 @@ -672,15 +671,13 @@ static int ar9002_hw_calibrate(struct at
23 if (currCal && !nfcal &&
24 (currCal->calState == CAL_RUNNING ||
25 currCal->calState == CAL_WAITING)) {
26 - iscaldone = ar9002_hw_per_calibration(ah, chan,
27 - rxchainmask, currCal);
29 - ah->cal_list_curr = currCal = currCal->calNext;
31 - if (currCal->calState == CAL_WAITING) {
33 - ath9k_hw_reset_calibration(ah, currCal);
35 + if (!ar9002_hw_per_calibration(ah, chan, rxchainmask, currCal))
38 + ah->cal_list_curr = currCal = currCal->calNext;
39 + if (currCal->calState == CAL_WAITING) {
40 + ath9k_hw_reset_calibration(ah, currCal);
45 @@ -710,7 +707,7 @@ static int ar9002_hw_calibrate(struct at
53 /* Carrier leakage Calibration fix */