From feb3a036d1cd7b708969dfc58feed16c51a496dc Mon Sep 17 00:00:00 2001 From: Devin Wittmayer Date: Fri, 4 Sep 2026 13:28:17 -0700 Subject: [PATCH] wifi: mac80211: fix monitor filter refcount leak When bringing a monitor interface up and down again, the refcount is leaked for active monitor interfaces, so the hardware filter is never reset. Move the decrement out so it mirrors the increment. Signed-off-by: Devin Wittmayer Link: https://patch.msgid.link/20260904202817.12564-1-lucid_duck@justthetip.ca [rewrite commit message better] Signed-off-by: Johannes Berg --- net/mac80211/iface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index fdac729ca580..18e62c5ff0fd 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -630,8 +630,9 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, bool going_do hw_reconf_flags |= IEEE80211_CONF_CHANGE_MONITOR; } - ieee80211_adjust_monitor_flags(sdata, -1); } + + ieee80211_adjust_monitor_flags(sdata, -1); break; case NL80211_IFTYPE_NAN: /* Check if any open NAN_DATA interfaces */