wifi: iwlwifi: mvm: add support for post_channel_switch in MLD mode
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Tue, 28 Mar 2023 07:58:49 +0000 (10:58 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 30 Mar 2023 10:07:53 +0000 (12:07 +0200)
Adjust the existing iwl_mvm_post_channel_switch()
to the new MLD API and use it in the new MLD ieee80211_ops

Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230328104948.fa3992f7dfd2.Ie298a9b1522e956d7b699f0432795548bc6e47f9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h

index ce2f502bfff89da61eb2f4c62533c0aa3a1e81c0..631d1becc6abb0aee69aa1d3c3f6bae6328e4c6d 100644 (file)
@@ -1317,8 +1317,8 @@ static int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
        return iwl_mvm_send_cmd_pdu(mvm, cmd_id, 0, len, &cmd);
 }
 
-static int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw,
-                                      struct ieee80211_vif *vif)
+int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw,
+                               struct ieee80211_vif *vif)
 {
        struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
        struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
@@ -1339,8 +1339,10 @@ static int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw,
                }
 
                iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, false);
-
-               iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL);
+               if (mvm->mld_api_is_used)
+                       iwl_mvm_mld_mac_ctxt_changed(mvm, vif, false);
+               else
+                       iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL);
 
                if (!fw_has_capa(&mvm->fw->ucode_capa,
                                 IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD)) {
index 92f174231f60cbf2d4f17851fbde98b383dd3e16..818aed050b73f0614920185e97f454f5282665c4 100644 (file)
@@ -640,6 +640,7 @@ const struct ieee80211_ops iwl_mvm_mld_hw_ops = {
        .switch_vif_chanctx = iwl_mvm_mld_switch_vif_chanctx,
        .join_ibss = iwl_mvm_mld_start_ap_ibss,
        .leave_ibss = iwl_mvm_mld_stop_ap_ibss,
+       .post_channel_switch = iwl_mvm_post_channel_switch,
        .sta_state = iwl_mvm_mld_mac_sta_state,
        .conf_tx = iwl_mvm_mld_mac_conf_tx,
        .bss_info_changed = iwl_mvm_mld_bss_info_changed,
index ba59a6c305295a0b4d7884d3391064d4f3da0eb7..bf1de6405cd690f3557c25f1f6bca0455c77b551 100644 (file)
@@ -2298,6 +2298,8 @@ static inline u8 iwl_mvm_phy_band_from_nl80211(enum nl80211_band band)
 
 /* Channel Switch */
 void iwl_mvm_channel_switch_disconnect_wk(struct work_struct *wk);
+int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw,
+                               struct ieee80211_vif *vif);
 
 /* Channel Context */
 /**