From d27d73bf513d866cf932187576e0529a832e1678 Mon Sep 17 00:00:00 2001 From: Yingying Tang Date: Fri, 22 May 2026 15:10:00 +0530 Subject: [PATCH] wifi: ath12k: skip WoW path when no vif is present When userspace sets WoWLAN configuration (e.g. iw phy0 wowlan enable magic-packet) and then suspends with all interfaces administratively down, mac80211 still calls drv_suspend() with a wowlan config. The existing handler issues WMI_WOW_ENABLE_CMDID to firmware that has no active vdev, leaving it in an undefined state. On resume the device is inaccessible: MHI fails to leave M3, the PCIe link is unrecoverable and every subsequent WMI command times out. Detect the empty arvifs list at op_suspend entry and return 1, which makes mac80211 fall back to its normal radio-off path (cfg80211_shutdown_all_interfaces) and skips the WoW handshake entirely. Signed-off-by: Yingying Tang --- drivers/net/wireless/ath/ath12k/wow.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/wireless/ath/ath12k/wow.c b/drivers/net/wireless/ath/ath12k/wow.c index d8789104d8869..fea258ccf72ce 100644 --- a/drivers/net/wireless/ath/ath12k/wow.c +++ b/drivers/net/wireless/ath/ath12k/wow.c @@ -867,6 +867,14 @@ int ath12k_wow_op_suspend(struct ieee80211_hw *hw, lockdep_assert_wiphy(hw->wiphy); + /* Without an active vif there is no BSS, channel, or vdev to back + * WoW. Letting WMI_WOW_ENABLE_CMDID reach firmware in this state + * leaves it in an undefined mode and breaks MHI/PCIe on resume. + * Return 1 so mac80211 falls back to a normal radio-off suspend. + */ + if (list_empty(&ar->arvifs)) + return 1; + ret = ath12k_wow_cleanup(ar); if (ret) { ath12k_warn(ar->ab, "failed to clear wow wakeup events: %d\n",