mac80211: update to 2014-10-08
[openwrt/svn-archive/archive.git] / package / kernel / mac80211 / patches / 312-ath9k-Fix-offchannel-flush-timeout.patch
1 From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
2 Date: Fri, 17 Oct 2014 07:40:17 +0530
3 Subject: [PATCH] ath9k: Fix offchannel flush timeout
4
5 An offchannel operation also needs to have
6 a flush timeout that doesn't exceed the NoA
7 absence duration of a GO context, so use
8 channel_switch_time. The first offchannel
9 operation is set a flush timeout of 10ms since
10 channel_switch_time will be zero.
11
12 Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
13 ---
14
15 --- a/drivers/net/wireless/ath/ath9k/channel.c
16 +++ b/drivers/net/wireless/ath/ath9k/channel.c
17 @@ -207,6 +207,26 @@ void ath_chanctx_check_active(struct ath
18 if (!ctx)
19 return;
20
21 + if (ctx == &sc->offchannel.chan) {
22 + spin_lock_bh(&sc->chan_lock);
23 +
24 + if (likely(sc->sched.channel_switch_time))
25 + ctx->flush_timeout =
26 + usecs_to_jiffies(sc->sched.channel_switch_time);
27 + else
28 + ctx->flush_timeout =
29 + msecs_to_jiffies(10);
30 +
31 + spin_unlock_bh(&sc->chan_lock);
32 +
33 + /*
34 + * There is no need to iterate over the
35 + * active/assigned channel contexts if
36 + * the current context is offchannel.
37 + */
38 + return;
39 + }
40 +
41 ictx = ctx;
42
43 list_for_each_entry(avp, &ctx->vifs, list) {