Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] wifi: mac80211: remove NO_VIRTUAL_MONITOR monitor interfaces on suspend
@ 2026-11-18  7:29 Daniel J Blueman
  0 siblings, 0 replies; only message in thread
From: Daniel J Blueman @ 2026-11-18  7:29 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Felix Fietkau, linux-wireless, linux-kernel, stable,
	Daniel J Blueman

When suspending with an ath12k interface with the NO_VIRTUAL_MONITOR
hardware flag and monitor mode set, the driver skips removing the
interface. This results in a firmware failure and unusable interface,
triggering:

WARNING: net/mac80211/pm.c:173 at __ieee80211_suspend+0x44c/0x530 [mac80211], CPU#11: kworker/u73:11/20379
...
 ieee80211_suspend+0x24/0x50
 wiphy_suspend+0x2c0/0x420
 dpm_run_callback+0x60/0x2a0
 device_suspend+0x268/0x7f0
 async_suspend+0x28/0x58
 async_run_entry_fn+0x3c/0x190
 process_one_work+0x1bc/0x4f0
 worker_thread+0x18c/0x320
 kthread+0x128/0x150
 ret_from_fork+0x10/0x20

Fix this by also removing interfaces with the NO_VIRTUAL_MONITOR hardware
flag in monitor mode.

Failure analysis and fix development was assisted by Claude Fable under my
 instruction. Validated on my ASUS Zenbook A16 (Snapdragon X2 Extreme) and
QCC2072.

Fixes: 9d40f7e32774 ("wifi: mac80211: add flag to opt out of virtual monitor support")
Cc: stable@vger.kernel.org
Signed-off-by: Daniel J Blueman <daniel@quora.org>
---
 net/mac80211/pm.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index f63676c44853..503c24cd2e85 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -151,8 +151,12 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan,
 			continue;
 		switch (sdata->vif.type) {
 		case NL80211_IFTYPE_AP_VLAN:
-		case NL80211_IFTYPE_MONITOR:
 			continue;
+		case NL80211_IFTYPE_MONITOR:
+			if (!ieee80211_hw_check(hw, NO_VIRTUAL_MONITOR))
+				continue;
+			ieee80211_link_release_channel(&sdata->deflink);
+			break;
 		case NL80211_IFTYPE_STATION:
 			ieee80211_mgd_quiesce(sdata);
 			break;
-- 
2.55.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-18  7:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18  7:29 [PATCH] wifi: mac80211: remove NO_VIRTUAL_MONITOR monitor interfaces on suspend Daniel J Blueman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox