diff options
| author | Miri Korenblit | 2026-01-07 14:04:51 +0200 |
|---|---|---|
| committer | Sasha Levin | 2026-03-04 07:19:40 -0500 |
| commit | 0c4f1c02d27a880b10b58c63f574f13bed4f711d (patch) | |
| tree | 4170dd291f0d61c2afbc20ce75b4d790515256cf /net | |
| parent | 93e01e837e105299f1c259ef71f6e1ec4fe806e3 (diff) | |
wifi: cfg80211: stop NAN and P2P in cfg80211_leave
[ Upstream commit e1696c8bd0056bc1a5f7766f58ac333adc203e8a ]
Seems that there is an assumption that this function should be called
only for netdev interfaces, but it can also be called in suspend, or
from nl80211_netlink_notify (indirectly).
Note that the documentation of NL80211_ATTR_SOCKET_OWNER explicitly
says that NAN interfaces would be destroyed as well in the
nl80211_netlink_notify case.
Fix this by also stopping P2P and NAN.
Fixes: cb3b7d87652a ("cfg80211: add start / stop NAN commands")
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260107140430.dab142cbef0b.I290cc47836d56dd7e35012ce06bec36c6da688cd@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/wireless/core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 1788431c8220..2b6bdb7eaf18 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -1328,8 +1328,10 @@ void __cfg80211_leave(struct cfg80211_registered_device *rdev, __cfg80211_leave_ocb(rdev, dev); break; case NL80211_IFTYPE_P2P_DEVICE: + cfg80211_stop_p2p_device(rdev, wdev); + break; case NL80211_IFTYPE_NAN: - /* cannot happen, has no netdev */ + cfg80211_stop_nan(rdev, wdev); break; case NL80211_IFTYPE_AP_VLAN: case NL80211_IFTYPE_MONITOR: |
