From 2cee035644d18a58816c0920b9ade98ea0ec69e2 Mon Sep 17 00:00:00 2001 From: Brian Norris Date: Fri, 25 Sep 2026 17:22:18 -0700 Subject: [PATCH] wifi: mwifiex: Reattach interfaces on suspend failure If our .suspend() fails, we forget to unwind the early steps -- namely, re-attaching our network interfaces. This commonly occurs if, for example, we fail to program WoWLAN patterns to the device. Without this, the interface won't work again. Tested on a Rockchip RK3399 Gru/Kevin Chromebook, with Marvell 8997 PCIe WLAN. Signed-off-by: Brian Norris Link: https://patch.msgid.link/20260925172218.1.Ie4146d413a6be79caa11cf34e19b23f514ad3f5e@changeid Signed-off-by: Johannes Berg --- drivers/net/wireless/marvell/mwifiex/cfg80211.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c index e6e7739c4a3b..a30fd0c936e1 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -3566,6 +3566,14 @@ static int mwifiex_cfg80211_suspend(struct wiphy *wiphy, mwifiex_dbg(adapter, ERROR, "Failed to set HS params\n"); done: + if (ret) { + for (i = 0; i < adapter->priv_num; i++) { + priv = adapter->priv[i]; + if (priv->netdev) + netif_device_attach(priv->netdev); + } + } + sta_priv->scan_aborting = false; return ret; }