提交 a57c688d 编写于 作者: L Luciano Coelho 提交者: Emmanuel Grumbach

iwlwifi: mvm: finalize on post_switch instead of unassign

Now that mac80211 waits for the first beacon on the new channel before
calling post_channel_switch, the reconfiguration of the firmware
should be done in the post_channel_switch operation instead of when
assigning the vif to the new context.
Signed-off-by: NLuciano Coelho <luciano.coelho@intel.com>
上级 4500e133
...@@ -2841,23 +2841,13 @@ static int __iwl_mvm_assign_vif_chanctx(struct iwl_mvm *mvm, ...@@ -2841,23 +2841,13 @@ static int __iwl_mvm_assign_vif_chanctx(struct iwl_mvm *mvm,
} }
/* Handle binding during CSA */ /* Handle binding during CSA */
if ((vif->type == NL80211_IFTYPE_AP) || if (vif->type == NL80211_IFTYPE_AP) {
(switching_chanctx && (vif->type == NL80211_IFTYPE_STATION))) {
iwl_mvm_update_quotas(mvm, NULL); iwl_mvm_update_quotas(mvm, NULL);
iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL); iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL);
} }
if (switching_chanctx && vif->type == NL80211_IFTYPE_STATION) { if (switching_chanctx && vif->type == NL80211_IFTYPE_STATION) {
struct iwl_mvm_sta *mvmsta; iwl_mvm_update_quotas(mvm, NULL);
mvmsta = iwl_mvm_sta_from_staid_protected(mvm,
mvmvif->ap_sta_id);
if (WARN_ON(!mvmsta))
goto out;
/* TODO: only re-enable after the first beacon */
iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, false);
} }
goto out; goto out;
...@@ -3228,10 +3218,27 @@ static int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw, ...@@ -3228,10 +3218,27 @@ static int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw,
mutex_lock(&mvm->mutex); mutex_lock(&mvm->mutex);
if (vif->type == NL80211_IFTYPE_STATION) {
struct iwl_mvm_sta *mvmsta;
mvmsta = iwl_mvm_sta_from_staid_protected(mvm,
mvmvif->ap_sta_id);
if (WARN_ON(!mvmsta)) {
ret = -EIO;
goto out_unlock;
}
iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, false);
iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL);
}
mvmvif->ps_disabled = false; mvmvif->ps_disabled = false;
ret = iwl_mvm_power_update_ps(mvm); ret = iwl_mvm_power_update_ps(mvm);
out_unlock:
mutex_unlock(&mvm->mutex); mutex_unlock(&mvm->mutex);
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册