mac80211: update to 2014-10-08
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 314-ath9k-Send-AUTHORIZED-event-only-for-station-mode.patch
1 From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
2 Date: Fri, 17 Oct 2014 07:40:19 +0530
3 Subject: [PATCH] ath9k: Send AUTHORIZED event only for station mode
4
5 ATH_CHANCTX_EVENT_AUTHORIZED is required to trigger
6 the MCC scheduler when a station interface becomes
7 authorized. But, since the driver gets station state
8 notifications when the current operating mode is AP
9 too, make sure that we send ATH_CHANCTX_EVENT_AUTHORIZED
10 only when the interface is in station mode.
11
12 Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
13 ---
14
15 --- a/drivers/net/wireless/ath/ath9k/main.c
16 +++ b/drivers/net/wireless/ath/ath9k/main.c
17 @@ -1590,10 +1590,12 @@ static int ath9k_sta_state(struct ieee80
18 }
19
20 if (ath9k_is_chanctx_enabled()) {
21 - if (old_state == IEEE80211_STA_ASSOC &&
22 - new_state == IEEE80211_STA_AUTHORIZED)
23 - ath_chanctx_event(sc, vif,
24 - ATH_CHANCTX_EVENT_AUTHORIZED);
25 + if (vif->type == NL80211_IFTYPE_STATION) {
26 + if (old_state == IEEE80211_STA_ASSOC &&
27 + new_state == IEEE80211_STA_AUTHORIZED)
28 + ath_chanctx_event(sc, vif,
29 + ATH_CHANCTX_EVENT_AUTHORIZED);
30 + }
31 }
32
33 return ret;