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
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.
12 Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
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
21 + if (ctx == &sc->offchannel.chan) {
22 + spin_lock_bh(&sc->chan_lock);
24 + if (likely(sc->sched.channel_switch_time))
25 + ctx->flush_timeout =
26 + usecs_to_jiffies(sc->sched.channel_switch_time);
28 + ctx->flush_timeout =
29 + msecs_to_jiffies(10);
31 + spin_unlock_bh(&sc->chan_lock);
34 + * There is no need to iterate over the
35 + * active/assigned channel contexts if
36 + * the current context is offchannel.
43 list_for_each_entry(avp, &ctx->vifs, list) {