ath9k: fix beacon timer restarts after card resets - improves stability in AP mode
[openwrt.git] / package / mac80211 / patches / 540-ath9k_beacon_timer_fix.patch
1 --- a/drivers/net/wireless/ath/ath9k/beacon.c
2 +++ b/drivers/net/wireless/ath/ath9k/beacon.c
3 @@ -526,16 +526,13 @@ static void ath_beacon_config_ap(struct 
4  {
5         u32 nexttbtt, intval;
6  
7 -       /* Configure the timers only when the TSF has to be reset */
8 -
9 -       if (!(sc->sc_flags & SC_OP_TSF_RESET))
10 -               return;
11 -
12         /* NB: the beacon interval is kept internally in TU's */
13         intval = conf->beacon_interval & ATH9K_BEACON_PERIOD;
14         intval /= ATH_BCBUF;    /* for staggered beacons */
15         nexttbtt = intval;
16 -       intval |= ATH9K_BEACON_RESET_TSF;
17 +
18 +       if (sc->sc_flags & SC_OP_TSF_RESET)
19 +               intval |= ATH9K_BEACON_RESET_TSF;
20  
21         /*
22          * In AP mode we enable the beacon timers and SWBA interrupts to