wifi: iwlwifi: mvm: skip adding debugfs symlink for reconfig
authorBenjamin Berg <benjamin.berg@intel.com>
Tue, 23 Jan 2024 18:08:19 +0000 (20:08 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 26 Jan 2024 09:43:32 +0000 (10:43 +0100)
The function to add an interface may be called without a previous
removal if the HW is being reconfigured. As such, only add the symlink
if the hardware is not being reconfigured due to a HW_RESTART.

Fixes: c36235acb34f ("wifi: iwlwifi: mvm: rework debugfs handling")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240123200528.314395eacda4.I5823e962c3c3674b942383733debd10b3fe903e2@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

index 7f13dff04b265caf265f24662d7609f60289120d..3447d67a8b311be1ceaf0b232e71c9121e38bd71 100644 (file)
@@ -1600,7 +1600,8 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
         */
        if (vif->type == NL80211_IFTYPE_AP ||
            vif->type == NL80211_IFTYPE_ADHOC) {
-               iwl_mvm_vif_dbgfs_add_link(mvm, vif);
+               if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status))
+                       iwl_mvm_vif_dbgfs_add_link(mvm, vif);
                ret = 0;
                goto out;
        }
@@ -1640,7 +1641,8 @@ static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw,
                        iwl_mvm_chandef_get_primary_80(&vif->bss_conf.chandef);
        }
 
-       iwl_mvm_vif_dbgfs_add_link(mvm, vif);
+       if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status))
+               iwl_mvm_vif_dbgfs_add_link(mvm, vif);
 
        if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status) &&
            vif->type == NL80211_IFTYPE_STATION && !vif->p2p &&
index 61170173f917a00707fc63956b8d7f252737c809..1f36e934ef69e4b9de587647fcbb7efd7b083bd9 100644 (file)
@@ -81,7 +81,8 @@ static int iwl_mvm_mld_mac_add_interface(struct ieee80211_hw *hw,
                ieee80211_hw_set(mvm->hw, RX_INCLUDES_FCS);
        }
 
-       iwl_mvm_vif_dbgfs_add_link(mvm, vif);
+       if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status))
+               iwl_mvm_vif_dbgfs_add_link(mvm, vif);
 
        if (!test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status) &&
            vif->type == NL80211_IFTYPE_STATION && !vif->p2p &&