[PATCH ath-next v5 00/12] wifi: ath10k: fix recovery and WEDGED failure handling

From: Kang Yang

Date: Wed Dec 02 2026 - 01:09:30 EST


Recovery failures can consume significant time before the
driver eventually gives up and enters ATH10K_STATE_WEDGED.

This series fixes several issues in the recovery and WEDGED
failure-handling paths, including recovery detection,
recovery time bounding, waiter release, and PCIe error
handling.

Several patches fix specific bugs and therefore carry Fixes
tags. The remaining patches address closely related issues in
the same recovery path because the fixes alone do not fully
resolve the reported failures.

Taken together, the series ensures that recovery either
succeeds or transitions to ATH10K_STATE_WEDGED within a
bounded amount of time, avoids unnecessary waits after
recovery has failed, and reduces the likelihood of watchdog
timeouts on affected platforms.

Google has reported this class of failures for an extended
period, with more than 4000 observed crashes over the last
month.

---
v5:
- patch 2: in ath10k_reconfig_complete(), move
cancel_delayed_work_sync() and the pending_recovery reset
in front of the ATH10K_STATE_RESTARTED check so the monitor
cancellation always pairs with the reset and the final state
is read after the monitor can no longer run.
- patch 5: introduce ath10k_peer_delete_start() that wraps
reinit_completion(&ar->peer_delete_done) and
ath10k_wmi_peer_delete(), and use it from all three
peer-delete call sites so the reinit-before-send pattern
lives in one place.
- patch 9: trim the verbose comment next to
ath10k_sdio_disable_intrs() down to "Prevent IRQ storm.".
- patch 11 (new): move irqs_disabled_comp into struct
ath10k_sdio so a late complete() from wr_async_work or
ath10k_sdio_drop_wr_async_reqs() cannot write to a dead
stack frame after wait_for_completion_timeout() has
expired.
- reformat the series' multi-line block comments to the
"/*" alone on the first line kernel style.

v4:
- patch 1: also clear pending_recovery and cancel the monitor when
ath10k_core_restart() has nothing to restart (OFF state), and arm
the monitor before queueing restart_work.
- patch 2 (new): the monitor never restarts restart_work, so its
periodic re-arming and fail_cont_count only measured elapsed time.
Replace them with a single one-shot deadline and drop fail_cont_count
and ATH10K_RECOVERY_MAX_FAIL_COUNT. The time allowed for recovery
stays at 20 seconds.
- patch 3 (new): shorten the recovery timeout from 20 to 10 seconds.
This replaces the old patch 4 ("bound recovery time before entering
WEDGED") and its recovery_start_jiffies based 15-second deadline,
which a single timeout makes unnecessary.
- patch 4, 7: adapt to the one-shot monitor, no functional change.
- patch 9: reword the commit message to match the order of the
calls.
- patch 10: fix the function name in the commit message.
- patch 11: describe the change in skb ownership in
ath10k_sdio_hif_stop() in the commit message.

v3:
- rebase onto the latest ath-next.
- patch 1: fold the old patch 5 ("check the recovery deadline on its own
timeline") into this patch, so the recovery monitor is a self-rearming
delayed work from the start; move recovery_start_jiffies to patch 4.
- patch 4: reword the commit message; recovery_start_jiffies is now
introduced here, where it is first used.
- patch 8 (new): on SDIO, mask the target interrupts and start recovery
when an invalid HTC bundle count is read from the lookahead, to stop
the SDIO IRQ storm.
- patch 9 (new): reject scan requests while the device is not running.
- patch 10 (new): sdio: drop pending async writes and stop the sleep timer
and work across power cycles, so stale requests cannot touch the bus
after power up.

v2:
- patch 3: also wake wow.wakeup_completed, peer_stats_info_complete and
wmi.radar_confirm on WEDGED; reinit peer_delete_done before each
peer delete command.
- patch 5: remove the early-return time_after() branch from the monitor;
in ath10k_reconfig_complete(), cancel the monitor with
cancel_delayed_work_sync() before clearing fail_cont_count and
pending_recovery.
- add SDIO Test-on tag.

To: Jeff Johnson <jjohnson@xxxxxxxxxx>
To: Loic Poulain <loic.poulain@xxxxxxxxxxxxxxxx>
To: Baochen Qiang <baochen.qiang@xxxxxxxxxxxxxxxx>
Cc: Jeff Johnson <jeff.johnson@xxxxxxxxxxxxxxxx>
Cc: linux-wireless@xxxxxxxxxxxxxxx
Cc: ath10k@xxxxxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Kang Yang <kang.yang@xxxxxxxxxxxxxxxx>

---
Kang Yang (12):
wifi: ath10k: fix SDIO aux workqueue starvation in recovery detection
wifi: ath10k: replace the recovery failure count with a single deadline
wifi: ath10k: shorten the recovery timeout to 10 seconds
wifi: ath10k: wake blocked waiters when entering WEDGED state
wifi: ath10k: also wake remaining blocked waiters
wifi: ath10k: hard-block the radio when entering WEDGED state
wifi: ath10k: remove now-unused driver_recovery completion
wifi: ath10k: trigger recovery on PCIe MMIO wake-up failures
wifi: ath10k: trigger recovery on corrupted HTC bundle lookahead
wifi: ath10k: reject scan requests while the device is not running
wifi: ath10k: move sdio irqs_disabled completion off the stack
wifi: ath10k: drop async writes and sleep timer across power cycles

drivers/net/wireless/ath/ath10k/core.c | 111 ++++++++++++++++++---------------
drivers/net/wireless/ath/ath10k/core.h | 9 +--
drivers/net/wireless/ath/ath10k/mac.c | 37 +++++++----
drivers/net/wireless/ath/ath10k/pci.c | 24 +++++++
drivers/net/wireless/ath/ath10k/sdio.c | 85 +++++++++++++++++--------
drivers/net/wireless/ath/ath10k/sdio.h | 1 +
drivers/net/wireless/ath/ath10k/snoc.c | 8 +--
7 files changed, 178 insertions(+), 97 deletions(-)
---
base-commit: 1983b40acfcb3c3464b291c85977290a785bcfdc
change-id: 20261119-recovery-v4-de5f5df13e9f

Best regards,
--
Kang Yang <kang.yang@xxxxxxxxxxxxxxxx>