Root/package/mac80211/patches/543-ath9k_interference_nf_cal.patch

1--- a/drivers/net/wireless/ath/ath9k/ath9k.h
2+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
3@@ -423,6 +423,7 @@ int ath_beaconq_config(struct ath_softc
4 #define ATH_AP_SHORT_CALINTERVAL 100 /* 100 ms */
5 #define ATH_ANI_POLLINTERVAL_OLD 100 /* 100 ms */
6 #define ATH_ANI_POLLINTERVAL_NEW 1000 /* 1000 ms */
7+#define ATH_LONG_CALINTERVAL_INT 1000 /* 1000 ms */
8 #define ATH_LONG_CALINTERVAL 30000 /* 30 seconds */
9 #define ATH_RESTART_CALINTERVAL 1200000 /* 20 minutes */
10 
11--- a/drivers/net/wireless/ath/ath9k/main.c
12+++ b/drivers/net/wireless/ath/ath9k/main.c
13@@ -396,7 +396,12 @@ void ath_ani_calibrate(unsigned long dat
14     bool shortcal = false;
15     bool aniflag = false;
16     unsigned int timestamp = jiffies_to_msecs(jiffies);
17- u32 cal_interval, short_cal_interval;
18+ u32 cal_interval, short_cal_interval, long_cal_interval;
19+
20+ if (ah->caldata && ah->caldata->nfcal_interference)
21+ long_cal_interval = ATH_LONG_CALINTERVAL_INT;
22+ else
23+ long_cal_interval = ATH_LONG_CALINTERVAL;
24 
25     short_cal_interval = (ah->opmode == NL80211_IFTYPE_AP) ?
26         ATH_AP_SHORT_CALINTERVAL : ATH_STA_SHORT_CALINTERVAL;
27@@ -408,7 +413,7 @@ void ath_ani_calibrate(unsigned long dat
28     ath9k_ps_wakeup(sc);
29 
30     /* Long calibration runs independently of short calibration. */
31- if ((timestamp - common->ani.longcal_timer) >= ATH_LONG_CALINTERVAL) {
32+ if ((timestamp - common->ani.longcal_timer) >= long_cal_interval) {
33         longcal = true;
34         ath_print(common, ATH_DBG_ANI, "longcal @%lu\n", jiffies);
35         common->ani.longcal_timer = timestamp;
36

Archive Download this file



interactive