mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-08-16 16:38:56 +00:00
wifi: mac80211: remove debugfs dir for virtual monitor
Don't call ieee80211_debugfs_recreate_netdev() for virtual monitor interface when deleting it. The virtual monitor interface shouldn't have debugfs entries and trying to update them will *create* them on deletion. And when the virtual monitor interface is created/destroyed multiple times we'll get warnings about debugfs name conflicts. Signed-off-by: Alexander Wetzel <Alexander@wetzel-home.de> Link: https://patch.msgid.link/20250204164240.370153-1-Alexander@wetzel-home.de Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
5b999006e3
commit
646262c71a
@ -116,8 +116,14 @@ void drv_remove_interface(struct ieee80211_local *local,
|
||||
|
||||
sdata->flags &= ~IEEE80211_SDATA_IN_DRIVER;
|
||||
|
||||
/* Remove driver debugfs entries */
|
||||
ieee80211_debugfs_recreate_netdev(sdata, sdata->vif.valid_links);
|
||||
/*
|
||||
* Remove driver debugfs entries.
|
||||
* The virtual monitor interface doesn't get a debugfs
|
||||
* entry, so it's exempt here.
|
||||
*/
|
||||
if (sdata != local->monitor_sdata)
|
||||
ieee80211_debugfs_recreate_netdev(sdata,
|
||||
sdata->vif.valid_links);
|
||||
|
||||
trace_drv_remove_interface(local, sdata);
|
||||
local->ops->remove_interface(&local->hw, &sdata->vif);
|
||||
|
@ -1206,16 +1206,17 @@ void ieee80211_del_virtual_monitor(struct ieee80211_local *local)
|
||||
return;
|
||||
}
|
||||
|
||||
RCU_INIT_POINTER(local->monitor_sdata, NULL);
|
||||
mutex_unlock(&local->iflist_mtx);
|
||||
|
||||
synchronize_net();
|
||||
|
||||
clear_bit(SDATA_STATE_RUNNING, &sdata->state);
|
||||
ieee80211_link_release_channel(&sdata->deflink);
|
||||
|
||||
if (ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF))
|
||||
drv_remove_interface(local, sdata);
|
||||
|
||||
RCU_INIT_POINTER(local->monitor_sdata, NULL);
|
||||
mutex_unlock(&local->iflist_mtx);
|
||||
|
||||
synchronize_net();
|
||||
|
||||
kfree(sdata);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user