mac80211: update to 2014-10-08
[openwrt/svn-archive/archive.git] / package / kernel / mac80211 / patches / 309-ath9k-Clear-NoA-schedule-properly.patch
1 From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
2 Date: Fri, 17 Oct 2014 07:40:14 +0530
3 Subject: [PATCH] ath9k: Clear NoA schedule properly
4
5 When an active context transitions to inactive
6 state, the NoA schedule needs to be removed
7 for the context that has beaconing enabled.
8 Not doing this will affect p2p clients.
9
10 Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
11 ---
12
13 --- a/drivers/net/wireless/ath/ath9k/channel.c
14 +++ b/drivers/net/wireless/ath/ath9k/channel.c
15 @@ -356,6 +356,21 @@ void ath_chanctx_event(struct ath_softc
16 "Move chanctx state from WAIT_FOR_TIMER to WAIT_FOR_BEACON\n");
17 }
18
19 + /*
20 + * When a context becomes inactive, for example,
21 + * disassociation of a station context, the NoA
22 + * attribute needs to be removed from subsequent
23 + * beacons.
24 + */
25 + if (!ctx->active && avp->noa_duration &&
26 + sc->sched.state != ATH_CHANCTX_STATE_WAIT_FOR_BEACON) {
27 + avp->noa_duration = 0;
28 + avp->periodic_noa = false;
29 +
30 + ath_dbg(common, CHAN_CTX,
31 + "Clearing NoA schedule\n");
32 + }
33 +
34 if (sc->sched.state != ATH_CHANCTX_STATE_WAIT_FOR_BEACON)
35 break;
36