summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorBenjamin Berg <benjamin.berg@intel.com>2023-12-20 05:38:00 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-12-19 15:07:13 +0300
commit8c917f16eb6198073ff8bc5d5c83a1bef9fae813 (patch)
tree25914f2df645c39c66d8e5228565e31d77e52a94 /net
parent044879ce54069cf5f0efe7b4e67200d92e23a7da (diff)
downloadlinux-8c917f16eb6198073ff8bc5d5c83a1bef9fae813.tar.xz
wifi: mac80211: do not re-add debugfs entries during resume
The driver debugfs entries still exist when the interface is re-added during reconfiguration. This can be either because of a HW restart (in_reconfig) or because we are resuming. Fixes: a1f5dcb1c0c1 ("wifi: mac80211: add a driver callback to add vif debugfs") 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/20231220043149.ddd48c66ec6b.Ia81080d92129ceecf462eceb4966bab80df12060@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/driver-ops.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/driver-ops.c b/net/mac80211/driver-ops.c
index d3820333cd59..5e0435db2f9c 100644
--- a/net/mac80211/driver-ops.c
+++ b/net/mac80211/driver-ops.c
@@ -77,7 +77,7 @@ int drv_add_interface(struct ieee80211_local *local,
sdata->flags |= IEEE80211_SDATA_IN_DRIVER;
- if (!local->in_reconfig) {
+ if (!local->in_reconfig && !local->resuming) {
drv_vif_add_debugfs(local, sdata);
/* initially vif is not MLD */
ieee80211_link_debugfs_drv_add(&sdata->deflink);
@@ -534,7 +534,7 @@ int drv_change_vif_links(struct ieee80211_local *local,
if (ret)
return ret;
- if (!local->in_reconfig) {
+ if (!local->in_reconfig && !local->resuming) {
for_each_set_bit(link_id, &links_to_add,
IEEE80211_MLD_MAX_NUM_LINKS) {
link = rcu_access_pointer(sdata->link[link_id]);
@@ -590,7 +590,7 @@ int drv_change_sta_links(struct ieee80211_local *local,
return ret;
/* during reconfig don't add it to debugfs again */
- if (local->in_reconfig)
+ if (local->in_reconfig || local->resuming)
return 0;
for_each_set_bit(link_id, &links_to_add, IEEE80211_MLD_MAX_NUM_LINKS) {