314-ath9k-Send-AUTHORIZED-event-only-for-station-mode.patch 1.1 KB

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