Skip to content

Commit 8c917f1

Browse files
benzeajmberg-intel
authored andcommitted
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: a1f5dcb ("wifi: mac80211: add a driver callback to add vif debugfs") Signed-off-by: Benjamin Berg <[email protected]> Reviewed-by: Gregory Greenman <[email protected]> Signed-off-by: Miri Korenblit <[email protected]> Link: https://msgid.link/20231220043149.ddd48c66ec6b.Ia81080d92129ceecf462eceb4966bab80df12060@changeid Signed-off-by: Johannes Berg <[email protected]>
1 parent 044879c commit 8c917f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

net/mac80211/driver-ops.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ int drv_add_interface(struct ieee80211_local *local,
7777

7878
sdata->flags |= IEEE80211_SDATA_IN_DRIVER;
7979

80-
if (!local->in_reconfig) {
80+
if (!local->in_reconfig && !local->resuming) {
8181
drv_vif_add_debugfs(local, sdata);
8282
/* initially vif is not MLD */
8383
ieee80211_link_debugfs_drv_add(&sdata->deflink);
@@ -534,7 +534,7 @@ int drv_change_vif_links(struct ieee80211_local *local,
534534
if (ret)
535535
return ret;
536536

537-
if (!local->in_reconfig) {
537+
if (!local->in_reconfig && !local->resuming) {
538538
for_each_set_bit(link_id, &links_to_add,
539539
IEEE80211_MLD_MAX_NUM_LINKS) {
540540
link = rcu_access_pointer(sdata->link[link_id]);
@@ -590,7 +590,7 @@ int drv_change_sta_links(struct ieee80211_local *local,
590590
return ret;
591591

592592
/* during reconfig don't add it to debugfs again */
593-
if (local->in_reconfig)
593+
if (local->in_reconfig || local->resuming)
594594
return 0;
595595

596596
for_each_set_bit(link_id, &links_to_add, IEEE80211_MLD_MAX_NUM_LINKS) {

0 commit comments

Comments
 (0)