uhttpd: finish inherited uloop in forked childs, fixes misdispatched events leading...
[openwrt/openwrt.git] / package / mac80211 / patches / 578-ath9k_cleanup_ani_ofdm_trig.patch
1 --- a/drivers/net/wireless/ath/ath9k/ani.c
2 +++ b/drivers/net/wireless/ath/ath9k/ani.c
3 @@ -179,6 +179,14 @@ static void ath9k_hw_set_ofdm_nil(struct
4 ath9k_hw_ani_control(ah,
5 ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION,
6 entry_ofdm->ofdm_weak_signal_on);
7 +
8 + if (aniState->ofdmNoiseImmunityLevel >= ATH9K_ANI_OFDM_DEF_LEVEL) {
9 + ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH;
10 + ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW_ABOVE_INI;
11 + } else {
12 + ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_BELOW_INI;
13 + ah->config.ofdm_trig_low = ATH9K_ANI_OFDM_TRIG_LOW;
14 + }
15 }
16
17 static void ath9k_hw_ani_ofdm_err_trigger(struct ath_hw *ah)
18 @@ -428,21 +436,10 @@ void ath9k_hw_ani_monitor(struct ath_hw
19
20 if (aniState->listenTime > ah->aniperiod) {
21 if (cckPhyErrRate < ah->config.cck_trig_low &&
22 - ((ofdmPhyErrRate < ah->config.ofdm_trig_low &&
23 - aniState->ofdmNoiseImmunityLevel <
24 - ATH9K_ANI_OFDM_DEF_LEVEL) ||
25 - (ofdmPhyErrRate < ATH9K_ANI_OFDM_TRIG_LOW_ABOVE_INI &&
26 - aniState->ofdmNoiseImmunityLevel >=
27 - ATH9K_ANI_OFDM_DEF_LEVEL))) {
28 + ofdmPhyErrRate < ah->config.ofdm_trig_low) {
29 ath9k_hw_ani_lower_immunity(ah);
30 aniState->ofdmsTurn = !aniState->ofdmsTurn;
31 - } else if ((ofdmPhyErrRate > ah->config.ofdm_trig_high &&
32 - aniState->ofdmNoiseImmunityLevel >=
33 - ATH9K_ANI_OFDM_DEF_LEVEL) ||
34 - (ofdmPhyErrRate >
35 - ATH9K_ANI_OFDM_TRIG_HIGH_BELOW_INI &&
36 - aniState->ofdmNoiseImmunityLevel <
37 - ATH9K_ANI_OFDM_DEF_LEVEL)) {
38 + } else if (ofdmPhyErrRate > ah->config.ofdm_trig_high) {
39 ath9k_hw_ani_ofdm_err_trigger(ah);
40 aniState->ofdmsTurn = false;
41 } else if (cckPhyErrRate > ah->config.cck_trig_high) {