DORMANTno replies

[PATCH wireless v2] wifi: mac80211: drop the monitor filter counts on stop, not just sometimes

From: Devin Wittmayer <hidden>
Date: 2026-09-04 20:28:30
Also in: lkml, stable
Subsystem: mac80211, the rest · Maintainers: Johannes Berg, Linus Torvalds

Bringing a monitor up raises the receive filter counts for every monitor.
Taking one down lowers them only inside the branch that retires the
virtual monitor. So an active monitor leaves an increment behind on every
cycle, and the hardware keeps delivering frames nobody asked for.

Dropping cooked monitor support indented the decrement into that branch.
It sat outside before.

Counts after each up, down and delete cycle on a 7921 USB part:

  without   cycle one ends at 1, cycle two starts at 2
  with      every cycle starts and ends at 1, in any order

Move the decrement back out so it mirrors the increment.

Fixes: 286e69677065 ("wifi: mac80211: Drop cooked monitor support")
Cc: stable@vger.kernel.org
Signed-off-by: Devin Wittmayer <redacted>
---
The counts are fcsfail, plcpfail, control, pspoll, other_bss and the one
that keeps TX status reporting armed. Changing flags on a running monitor
still balances, so only the open and stop pair drift.

v2: changelog rewritten by hand, and the counts above are measured on
    hardware.

v1: https://lore.kernel.org/linux-wireless/20260825043754.66918-1-lucid_duck@justthetip.ca/ (local)

 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 43460a705a6b..9b400caf2765 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 */
-- 
2.55.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help