iwlwifi: mvm: pass force_assoc_off all the way down to avoid hacks
In some cases, we need to force the association to be off in the MAC_CONTEXT_CMD command we send to the firmware. Instead of having to hack the vif->bss_conf.assoc value, pass it all the way down the call chain. Additionally, for the iwl_mvm_mac_ctxt_add() case, we *always* set forced_assoc_off to true, so we can remove the hack in the d3 code that was forcing it to off by hacking the bss_conf.assoc value. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Reviewed-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
This commit is contained in:

committed by
Emmanuel Grumbach

parent
fa7b2e7fd0
commit
bca49d9a22
@@ -663,10 +663,8 @@ static int iwl_mvm_d3_reprogram(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
|
||||
if (WARN_ON(!vif->bss_conf.assoc))
|
||||
return -EINVAL;
|
||||
/* hack */
|
||||
vif->bss_conf.assoc = false;
|
||||
|
||||
ret = iwl_mvm_mac_ctxt_add(mvm, vif);
|
||||
vif->bss_conf.assoc = true;
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
@@ -702,7 +700,7 @@ static int iwl_mvm_d3_reprogram(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
|
||||
return ret;
|
||||
rcu_assign_pointer(mvm->fw_id_to_mac_id[mvmvif->ap_sta_id], ap_sta);
|
||||
|
||||
ret = iwl_mvm_mac_ctxt_changed(mvm, vif);
|
||||
ret = iwl_mvm_mac_ctxt_changed(mvm, vif, false);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
Reference in New Issue
Block a user