From: Michal Kazior Date: Wed, 29 Jan 2014 06:56:19 +0000 (+0100) Subject: mac80211: move csa_active setting in STA CSA X-Git-Tag: v3.15-rc1~113^2~289^2^2~101^2~21 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=c46a73f39642db4931544a9376338d05aa196df8;p=~emulex%2Finfiniband.git mac80211: move csa_active setting in STA CSA The sdata->vif.csa_active could be left set after, e.g. channel context constraints check fail in STA mode leaving the interface in a strange state for a brief period of time until it is disconnected. This was harmless but ugly. Signed-off-by: Michal Kazior Reviewed-by: Luciano Coelho Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index cadf05905e5..6c9ebca0239 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -1012,7 +1012,6 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, } ifmgd->flags |= IEEE80211_STA_CSA_RECEIVED; - sdata->vif.csa_active = true; mutex_lock(&local->chanctx_mtx); if (local->use_chanctx) { @@ -1050,6 +1049,7 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata, mutex_unlock(&local->chanctx_mtx); sdata->csa_chandef = csa_ie.chandef; + sdata->vif.csa_active = true; if (csa_ie.mode) ieee80211_stop_queues_by_reason(&local->hw,