From: Johannes Berg Date: Wed, 30 Aug 2023 08:30:51 +0000 (+0300) Subject: wifi: iwlwifi: mvm: disconnect long CSA only w/o alternative X-Git-Tag: v6.7-rc1~160^2~207^2~142 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aee2eac7ccbe975cd1463f558cffc34605e02050;p=thirdparty%2Flinux.git wifi: iwlwifi: mvm: disconnect long CSA only w/o alternative If there's an alternative link to use while the CSA is in progress, there's no need to disconnect since another link is still usable during the switching time. Change the code here to handle that accordingly. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman Link: https://lore.kernel.org/r/20230830112059.dd1b96a37e51.Idafdcbfcb36ca4c486f4221aef77643869331514@changeid Signed-off-by: Johannes Berg --- diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 6bb3b1f519132..b4f2b018388cd 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -5459,7 +5459,8 @@ int iwl_mvm_pre_channel_switch(struct ieee80211_hw *hw, goto out_unlock; } - if (chsw->delay > IWL_MAX_CSA_BLOCK_TX) + if (chsw->delay > IWL_MAX_CSA_BLOCK_TX && + hweight16(vif->valid_links) <= 1) schedule_delayed_work(&mvmvif->csa_work, 0); if (chsw->block_tx) {