linux/drivers/net/wireless/ath/ath10k
Kang Yang 54a5b38e43 wifi: ath10k: skip WMI and beacon transmission when device is wedged
In ath10k_wmi_cmd_send(), the current code detects ATH10K_STATE_WEDGED
and sets ret to -ESHUTDOWN, but still proceeds to transmit pending
beacons and calls ath10k_wmi_cmd_send_nowait().

This can lead to incorrect behavior, as WMI commands and beacons are
still sent after the device has been marked as wedged, and the original
-ESHUTDOWN return value may be overwritten by the result of the send
path.

The wedged state indicates the hardware is already unreliable, and no
further interaction with firmware is expected or meaningful in this
state.

Fix this by skipping beacon transmission and the WMI send path entirely
once ATH10K_STATE_WEDGED is detected, ensuring consistent return values
and avoiding unnecessary firmware interaction.

Tested-on: QCA6174 hw3.2 PCI WLAN.RM.4.4.1-00288-QCARMSWPZ-1
Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00189

Fixes: c256a94d1b ("wifi: ath10k: shutdown driver when hardware is unreliable")
Signed-off-by: Kang Yang <kang.yang@oss.qualcomm.com>
Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20260428061737.37-1-kang.yang@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
2026-05-12 07:00:00 -07:00
..
ahb.c wifi: ath10k: Don't use %pK through printk 2025-04-17 15:49:35 -07:00
ahb.h
bmi.c wifi: ath10k: Add missing include of export.h 2025-06-23 07:28:33 -07:00
bmi.h
ce.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
ce.h
core.c wifi: ath10k: use = {} to initialize bmi_target_info instead of memset 2025-10-30 14:55:08 -07:00
core.h wifi: ath10k: Support for FTM TLV test commands 2025-10-22 08:30:52 -07:00
coredump.c wifi: ath10k: Add missing include of export.h 2025-06-23 07:28:33 -07:00
coredump.h
debug.c wifi: ath10k: Prefer {} to {0} in initializers 2025-07-21 14:34:01 -07:00
debug.h
debugfs_sta.c wifi: ath10k: Prefer {} to {0} in initializers 2025-07-21 14:34:01 -07:00
hif.h
htc.c wifi: ath10k: Add missing include of export.h 2025-06-23 07:28:33 -07:00
htc.h
htt_rx.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
htt_tx.c wifi: ath10k: Prefer {} to {0} in initializers 2025-07-21 14:34:01 -07:00
htt.c
htt.h
hw.c wifi: cfg80211/mac80211: Add support to get radio index 2025-06-24 15:19:27 +02:00
hw.h wifi: Fix typos 2025-07-24 09:05:31 +02:00
Kconfig wifi: ath10k: snoc: select POWER_SEQUENCING 2026-04-23 10:57:50 -07:00
leds.c wifi: ath10k: remove gpio number assignment 2025-09-18 16:43:48 -07:00
leds.h
mac.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
mac.h
Makefile
p2p.c
p2p.h
pci.c wifi: ath10k: Prefer {} to {0} in initializers 2025-07-21 14:34:01 -07:00
pci.h
qmi_wlfw_v01.c
qmi_wlfw_v01.h
qmi.c wifi: ath10k: Add device-tree quirk to skip host cap QMI requests 2026-04-08 10:13:09 -07:00
qmi.h
rx_desc.h
sdio.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sdio.h
snoc.c wifi: ath10k: Add device-tree quirk to skip host cap QMI requests 2026-04-08 10:13:09 -07:00
snoc.h wifi: ath10k: Add device-tree quirk to skip host cap QMI requests 2026-04-08 10:13:09 -07:00
spectral.c
spectral.h
swap.c
swap.h
targaddrs.h
testmode_i.h wifi: ath10k: Support for FTM TLV test commands 2025-10-22 08:30:52 -07:00
testmode.c wifi: ath10k: Support for FTM TLV test commands 2025-10-22 08:30:52 -07:00
testmode.h
thermal.c
thermal.h
trace.c wifi: ath10k: Add missing include of export.h 2025-06-23 07:28:33 -07:00
trace.h
txrx.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
txrx.h
usb.c wifi: ath10k: rename disconnect callback 2026-03-10 08:27:56 -07:00
usb.h
wmi-ops.h
wmi-tlv.c wifi: ath10k: fix station lookup failure during disconnect 2026-04-07 17:28:20 -07:00
wmi-tlv.h
wmi.c wifi: ath10k: skip WMI and beacon transmission when device is wedged 2026-05-12 07:00:00 -07:00
wmi.h wifi: ath10k: Support for FTM TLV test commands 2025-10-22 08:30:52 -07:00
wow.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
wow.h