]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: ath12k: Avoid CPU busy-wait by handling VDEV_STAT and BCN_STAT
authorBjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Tue, 10 Jun 2025 03:06:22 +0000 (22:06 -0500)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Tue, 17 Jun 2025 23:28:34 +0000 (16:28 -0700)
commit18ae7d0cdd76420e80f6ab15ada063708f14ba40
treebd2c828d8791d6836260e6f813dca53e75d8b541
parent27605c8c0f69e319df156b471974e4e223035378
wifi: ath12k: Avoid CPU busy-wait by handling VDEV_STAT and BCN_STAT

When the ath12k driver is built without CONFIG_ATH12K_DEBUG, the
recently refactored stats code can cause any user space application
(such at NetworkManager) to consume 100% CPU for 3 seconds, every time
stats are read.

Commit 'b8a0d83fe4c7 ("wifi: ath12k: move firmware stats out of
debugfs")' moved ath12k_debugfs_fw_stats_request() out of debugfs, by
merging the additional logic into ath12k_mac_get_fw_stats().

Among the added responsibility of ath12k_mac_get_fw_stats() was the
busy-wait for `fw_stats_done`.

Signalling of `fw_stats_done` happens when one of the
WMI_REQUEST_PDEV_STAT, WMI_REQUEST_VDEV_STAT, and WMI_REQUEST_BCN_STAT
messages are received, but the handling of the latter two commands remained
in the debugfs code. As `fw_stats_done` isn't signalled, the calling
processes will spin until the timeout (3 seconds) is reached.

Moving the handling of these two additional responses out of debugfs
resolves the issue.

Fixes: b8a0d83fe4c7 ("wifi: ath12k: move firmware stats out of debugfs")
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Tested-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://patch.msgid.link/20250609-ath12k-fw-stats-done-v1-1-2b3624656697@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/debugfs.c
drivers/net/wireless/ath/ath12k/debugfs.h
drivers/net/wireless/ath/ath12k/wmi.c