mac80211: update to 2014-10-08
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 305-ath9k-Process-beacons-properly.patch
1 From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
2 Date: Fri, 17 Oct 2014 07:40:10 +0530
3 Subject: [PATCH] ath9k: Process beacons properly
4
5 When the current operating channel context has
6 been marked as ATH_CHANCTX_STATE_FORCE_ACTIVE,
7 do not process beacons that might be received,
8 since we have to wait for the station to become
9 authorized.
10
11 Also, since the cached TSF value will be zero
12 initially do not rearm the timer in this
13 case when a beacon is received, since it results
14 in spurious values.
15
16 Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
17 ---
18
19 --- a/drivers/net/wireless/ath/ath9k/channel.c
20 +++ b/drivers/net/wireless/ath/ath9k/channel.c
21 @@ -495,10 +495,15 @@ void ath_chanctx_event(struct ath_softc
22 sc->cur_chan == &sc->offchannel.chan)
23 break;
24
25 - ath_chanctx_adjust_tbtt_delta(sc);
26 sc->sched.beacon_pending = false;
27 sc->sched.beacon_miss = 0;
28
29 + if (sc->sched.state == ATH_CHANCTX_STATE_FORCE_ACTIVE ||
30 + !sc->cur_chan->tsf_val)
31 + break;
32 +
33 + ath_chanctx_adjust_tbtt_delta(sc);
34 +
35 /* TSF time might have been updated by the incoming beacon,
36 * need update the channel switch timer to reflect the change.
37 */