From: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx> During CSA the PHY used by the link is changing, So the driver needs to modify the links phy to the FW. Currently the driver is doing it by removing the link and adding a new one with the new phy_id, but the FW expects the link only to be modified. Fix this by modifying the links phy_id instead of removing it and adding a new one Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@xxxxxxxxx> Signed-off-by: Gregory Greenman <gregory.greenman@xxxxxxxxx> --- .../wireless/intel/iwlwifi/mvm/mld-mac80211.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c index 33368e5945f4..5be8058ca669 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c @@ -157,9 +157,16 @@ static int __iwl_mvm_mld_assign_vif_chanctx(struct iwl_mvm *mvm, switching_chanctx, &ret)) goto out; - ret = iwl_mvm_add_link(mvm, vif); - if (ret) - goto out; + if (!switching_chanctx) { + ret = iwl_mvm_add_link(mvm, vif); + if (ret) + goto out; + } else { + ret = iwl_mvm_link_changed(mvm, vif, 0, false); + if (ret) + goto out_remove_link; + } + ret = iwl_mvm_link_changed(mvm, vif, LINK_CONTEXT_MODIFY_ACTIVE | LINK_CONTEXT_MODIFY_RATES_INFO, true); @@ -219,10 +226,9 @@ static void __iwl_mvm_mld_unassign_vif_chanctx(struct iwl_mvm *mvm, if (vif->type == NL80211_IFTYPE_MONITOR) iwl_mvm_mld_rm_snif_sta(mvm, vif); - /* Link needs to be deactivated before removal */ iwl_mvm_link_changed(mvm, vif, LINK_CONTEXT_MODIFY_ACTIVE, false); - iwl_mvm_remove_link(mvm, vif); - + if (!switching_chanctx) + iwl_mvm_remove_link(mvm, vif); out: if (switching_chanctx) return; -- 2.38.1