mac80211: update to 2014-10-08
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 321-ath9k-Fix-RoC-expiration.patch
1 From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
2 Date: Fri, 17 Oct 2014 07:40:26 +0530
3 Subject: [PATCH] ath9k: Fix RoC expiration
4
5 mac80211 has to be notified when a RoC period
6 expires in the driver. In MCC mode, since the
7 offchannel/RoC timer is set with the requested
8 duration, ieee80211_remain_on_channel_expired() needs
9 to be called when the timer expires.
10
11 But, currently it is done after we move back to
12 the operating channel. This is incorrect - fix this
13 by calling ieee80211_remain_on_channel_expired() when
14 the RoC timer expires and in ath_roc_complete() when
15 the RoC request is aborted.
16
17 Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
18 ---
19
20 --- a/drivers/net/wireless/ath/ath9k/channel.c
21 +++ b/drivers/net/wireless/ath/ath9k/channel.c
22 @@ -894,7 +894,7 @@ void ath_roc_complete(struct ath_softc *
23
24 sc->offchannel.roc_vif = NULL;
25 sc->offchannel.roc_chan = NULL;
26 - if (!abort)
27 + if (abort)
28 ieee80211_remain_on_channel_expired(sc->hw);
29 ath_offchannel_next(sc);
30 ath9k_ps_restore(sc);
31 @@ -1028,6 +1028,7 @@ static void ath_offchannel_timer(unsigne
32 case ATH_OFFCHANNEL_ROC_WAIT:
33 ctx = ath_chanctx_get_oper_chan(sc, false);
34 sc->offchannel.state = ATH_OFFCHANNEL_ROC_DONE;
35 + ieee80211_remain_on_channel_expired(sc->hw);
36 ath_chanctx_switch(sc, ctx, NULL);
37 break;
38 default: