Skip to content

Commit d1ee2c1

Browse files
benzeajmberg-intel
authored andcommitted
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: d1e879e ("wifi: iwlwifi: add iwlmld sub-driver") Signed-off-by: Benjamin Berg <benjamin.berg@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250420095642.2490696f032a.I74319c7cf18f7e16a3d331cb96e38504b9fbab66@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent c155f7c commit d1ee2c1

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/net/wireless/intel/iwlwifi/mld/debugfs.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -949,8 +949,9 @@ void iwl_mld_add_vif_debugfs(struct ieee80211_hw *hw,
949949
snprintf(name, sizeof(name), "%pd", vif->debugfs_dir);
950950
snprintf(target, sizeof(target), "../../../%pd3/iwlmld",
951951
vif->debugfs_dir);
952-
mld_vif->dbgfs_slink =
953-
debugfs_create_symlink(name, mld->debugfs_dir, target);
952+
if (!mld_vif->dbgfs_slink)
953+
mld_vif->dbgfs_slink =
954+
debugfs_create_symlink(name, mld->debugfs_dir, target);
954955

955956
if (iwlmld_mod_params.power_scheme != IWL_POWER_SCHEME_CAM &&
956957
vif->type == NL80211_IFTYPE_STATION) {

drivers/net/wireless/intel/iwlwifi/mld/mac80211.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ void iwl_mld_mac80211_remove_interface(struct ieee80211_hw *hw,
651651

652652
#ifdef CONFIG_IWLWIFI_DEBUGFS
653653
debugfs_remove(iwl_mld_vif_from_mac80211(vif)->dbgfs_slink);
654+
iwl_mld_vif_from_mac80211(vif)->dbgfs_slink = NULL;
654655
#endif
655656

656657
iwl_mld_rm_vif(mld, vif);

0 commit comments

Comments
 (0)