Skip to contentSkip to conversation

ath9k: Send AUTHORIZED event only for station mode

PATCH New Sujith Manoharan 1 participant 1 message Oct 10, 2014 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: Send AUTHORIZED event only for station mode

From: Sujith Manoharan <[email protected]>

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.

---
 drivers/net/wireless/ath/ath9k/main.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
drivers/net/wireless/ath/ath9k/main.c +6 -4
index 2048ef1..0545fe6 100644
@@ -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;
Signature · 1 line
2.1.2