diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2014-10-17 07:40:09 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-10-27 14:16:14 -0400 |
commit | b8f9279be048677d6d8244dd91493f684ce5c7d0 (patch) | |
tree | a197f853d9bf37151dfd43ef42d630c495e27b57 /drivers/net/wireless/ath/ath9k/main.c | |
parent | df3c6eb34da5ed61d288c23466e1ec4dd7ca509a (diff) | |
download | lwn-b8f9279be048677d6d8244dd91493f684ce5c7d0.tar.gz lwn-b8f9279be048677d6d8244dd91493f684ce5c7d0.zip |
ath9k: Enable multi-channel properly
In MCC mode, currently the decision to enable
the multi-channel state machine is done
based on the association status if one of
the interfaces assigned to a context is in
station mode.
This allows the driver to switch to the other
context before the current station is able to
complete the 4-way handshake in case it is
required and this causes problems.
Instead, enable multi-channel mode when the
station moves to the authorized state. This
disallows an early switch to the other channel.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 902807e98f5e..446bc46733f9 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -1569,6 +1569,13 @@ static int ath9k_sta_state(struct ieee80211_hw *hw, "Remove station: %pM\n", sta->addr); } + 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); + } + return ret; } @@ -1761,12 +1768,6 @@ static void ath9k_bss_info_changed(struct ieee80211_hw *hw, avp->assoc = bss_conf->assoc; ath9k_calculate_summary_state(sc, avp->chanctx); - - if (ath9k_is_chanctx_enabled()) { - if (bss_conf->assoc) - ath_chanctx_event(sc, vif, - ATH_CHANCTX_EVENT_ASSOC); - } } if (changed & BSS_CHANGED_IBSS) { |