summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>2026-05-13 18:26:56 +0300
committerJohannes Berg <johannes.berg@intel.com>2026-05-20 13:03:10 +0300
commit7a8a3ff2815501f78f494808355ddf37e08647d0 (patch)
treebc9f0d1a34dc175f4cadfe33519a0a5e9700aefd
parent0128a77a2b0a9f077b34e610e424f7af8ce2c2e9 (diff)
downloadlinux-7a8a3ff2815501f78f494808355ddf37e08647d0.tar.xz
wifi: mac80211: don't call ieee80211_handle_reconfig_failure when not needed
In case reconfiguration of NAN fails, we call ieee80211_handle_reconfig_failure, that marks all interfaces as not in the driver. Then, at the error path of the reconfig, cfg80211_shutdown_all_interfaces is called to destroy all the interfaces. If we have any other interface but the NAN one, for example a BSS station, then when its state (links, stations) will be removed, we won't tell the driver about this, because we will think that the interfaces are not in the driver, and then drivers might remain with dangling pointers to objects like stations and links (at least for iwlwifi this is the case). ieee80211_handle_reconfig_failure is meant to be called after we cleaned up the state in the driver, there is no reason to call it for NAN reconfiguration failure. Fix the code to just warn in such a case, as we do in other error paths in reconfig where it is too complicated to rewind. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20260513182548.6a25f3a0a6ec.I83d1f2a7eed20200a78a62757c6b193e3bab892b@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/util.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index c3861e414804..255905f971c8 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2203,11 +2203,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
}
break;
case NL80211_IFTYPE_NAN:
- res = ieee80211_reconfig_nan(sdata);
- if (res < 0) {
- ieee80211_handle_reconfig_failure(local);
- return res;
- }
+ WARN_ON(ieee80211_reconfig_nan(sdata));
break;
case NL80211_IFTYPE_NAN_DATA:
case NL80211_IFTYPE_AP_VLAN: