Commit d1ee2c19 authored by Benjamin Berg's avatar Benjamin Berg Committed by Johannes Berg
Browse files

wifi: iwlwifi: mld: only create debugfs symlink if it does not exist



When mac80211 switches between non-MLO and MLO it will recreate the
debugfs directories. This results in the add_if_debugfs handler being
called multiple times. As the convenience symlink is created in the mld
debugfs directory and not the vif, it will not be removed by mac80211
when this happens and still exists.

Add a check and only create the convenience symlink if we have not yet
done so.

Fixes: d1e879ec ("wifi: iwlwifi: add iwlmld sub-driver")
Signed-off-by: default avatarBenjamin Berg <benjamin.berg@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250420095642.2490696f032a.I74319c7cf18f7e16a3d331cb96e38504b9fbab66@changeid


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent c155f7c3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -949,6 +949,7 @@ void iwl_mld_add_vif_debugfs(struct ieee80211_hw *hw,
	snprintf(name, sizeof(name), "%pd", vif->debugfs_dir);
	snprintf(target, sizeof(target), "../../../%pd3/iwlmld",
		 vif->debugfs_dir);
	if (!mld_vif->dbgfs_slink)
		mld_vif->dbgfs_slink =
			debugfs_create_symlink(name, mld->debugfs_dir, target);

+1 −0
Original line number Diff line number Diff line
@@ -651,6 +651,7 @@ void iwl_mld_mac80211_remove_interface(struct ieee80211_hw *hw,

#ifdef CONFIG_IWLWIFI_DEBUGFS
	debugfs_remove(iwl_mld_vif_from_mac80211(vif)->dbgfs_slink);
	iwl_mld_vif_from_mac80211(vif)->dbgfs_slink = NULL;
#endif

	iwl_mld_rm_vif(mld, vif);