[PATCH net-next] wifi: brcmfmac: Improve D3 substate entering timeout handling

From: Sebastian Reichel

Date: Tue Sep 08 2026 - 14:09:42 EST


Some firmwares (e.g. BCM43752) do not service the D3_INFORM mailbox
handshake when idle, so the D3 ACK never arrives. If WoWL is not armed
the device is going to be powered off during system suspend and
re-probed on resume anyway (brcmf_pcie_pm_leave_D3() handles that), so
the missing ACK is harmless and must not abort the whole system suspend.
When WoWL is active the device has to stay powered with its state
preserved, so keep treating the timeout as fatal.

Signed-off-by: Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>
---
This was tested with Rockchip RK3588 EVB1, which has a BCM43752 based
WLAN card (AP6275P). This card is also used by a few other Rockchip
boards (at least Khadas Edge2, RK3576 EVB1). Unfortunately
linux-firmware does not contain any firmware files for this chip,
so I used the files available from Armbian [0]:

3779bd4f629961cf060a83cc5047a3b9b2d23c9d brcmfmac43752-pcie.bin
a471651d580b51da2a681e53c0cc3258eaa70e10 brcmfmac43752-pcie.clm_blob
87294b22f4bf7b7f718cf24076f102df07e3c414 brcmfmac43752-pcie.txt

[0] https://github.com/armbian/firmware/tree/master/brcm

At least with that firmware the suspend command times out blocking
system suspend. Testing on the Rockchip platform requires PCIe
suspend support for it, which has been send separately.

The patch is based on v7.3-rc1 and can go via -next as system suspend
with mainline kernel needs quite some work on Rockchip anyways.
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
index 55f4d7b970f2..c1a029d86c0f 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
@@ -2653,8 +2653,13 @@ static int brcmf_pcie_pm_enter_D3(struct device *dev)
BRCMF_PCIE_MBDATA_TIMEOUT);
if (!devinfo->mbdata_completed) {
brcmf_err(bus, "Timeout on response for entering D3 substate\n");
- brcmf_bus_change_state(bus, BRCMF_BUS_UP);
- return -EIO;
+
+ if (devinfo->wowl_enabled) {
+ brcmf_bus_change_state(bus, BRCMF_BUS_UP);
+ return -EIO;
+ }
+
+ brcmf_dbg(PCIE, "No D3 ACK, continuing to power the device off\n");
}

devinfo->state = BRCMFMAC_PCIE_STATE_DOWN;

---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20260908-brcmfmac-bcm43752-suspend-fix-f6539eda1e0d

Best regards,
--
Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>