[PATCH] wifi: mwifiex: Reattach interfaces on suspend failure
From: Brian Norris
Date: Fri Sep 25 2026 - 20:23:46 EST
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 <briannorris@xxxxxxxxxxxx>
---
This bug has existed for a very long time. I couldn't pick an easy "Fixes"
target, so I didn't bother.
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 d7f20ec0bb3e..2fc092635e10 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -3562,6 +3562,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;
}
--
2.56.0.rc1.315.gc6ed9934b7-goog