From: Sujith Manoharan Date: Fri, 17 Oct 2014 02:10:19 +0000 (+0530) Subject: ath9k: Send AUTHORIZED event only for station mode X-Git-Tag: v5.15~16721^2~28^2~180 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91e6ceb354289ef1b143735b218599b5ad1b58c8;p=platform%2Fkernel%2Flinux-starfive.git ath9k: Send AUTHORIZED event only for station mode ATH_CHANCTX_EVENT_AUTHORIZED is required to trigger the MCC scheduler when a station interface becomes authorized. But, since the driver gets station state notifications when the current operating mode is AP too, make sure that we send ATH_CHANCTX_EVENT_AUTHORIZED only when the interface is in station mode. Signed-off-by: Sujith Manoharan Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 2048ef1..0545fe6 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -1590,10 +1590,12 @@ static int ath9k_sta_state(struct ieee80211_hw *hw, } if (ath9k_is_chanctx_enabled()) { - if (old_state == IEEE80211_STA_ASSOC && - new_state == IEEE80211_STA_AUTHORIZED) - ath_chanctx_event(sc, vif, - ATH_CHANCTX_EVENT_AUTHORIZED); + if (vif->type == NL80211_IFTYPE_STATION) { + if (old_state == IEEE80211_STA_ASSOC && + new_state == IEEE80211_STA_AUTHORIZED) + ath_chanctx_event(sc, vif, + ATH_CHANCTX_EVENT_AUTHORIZED); + } } return ret;