mac80211: sync with master branch as of 9edff13abd97
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 303-ath9k-don-t-run-periodic-and-nf-calibation-at-the-sa.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Tue, 27 Dec 2016 23:16:23 +0100
3 Subject: [PATCH] ath9k: don't run periodic and nf calibation at the same
4 time
5
6 The checks already prevents periodic cal from being started while noise
7 floor calibration runs. It is missing checks for the other way around.
8
9 Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 ---
11
12 --- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c
13 +++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
14 @@ -676,10 +676,10 @@ static int ar9002_hw_calibrate(struct at
15 return 0;
16
17 ah->cal_list_curr = currCal = currCal->calNext;
18 - if (currCal->calState == CAL_WAITING) {
19 + if (currCal->calState == CAL_WAITING)
20 ath9k_hw_reset_calibration(ah, currCal);
21 - return 0;
22 - }
23 +
24 + return 0;
25 }
26
27 /* Do NF cal only at longer intervals */