mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel J Blueman <daniel@quora.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Felix Fietkau <nbd@nbd.name>,
	linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org, Daniel J Blueman <daniel@quora.org>
Subject: [PATCH] wifi: mac80211: remove NO_VIRTUAL_MONITOR monitor interfaces on suspend
Date: Wed, 18 Nov 2026 15:29:47 +0800	[thread overview]
Message-ID: <20261118072949.14222-1-daniel@quora.org> (raw)

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


                 reply	other threads:[~2026-11-18  7:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261118072949.14222-1-daniel@quora.org \
    --to=daniel@quora.org \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®