[PATCH 1/3] wifi: ath10k: add firmware feature bit to skip channel stats events
From: Gianluca Boiano
Date: Sat Nov 21 2026 - 14:50:21 EST
SDM660 WCN3990 firmware crashes during scan when the scan command
requests channel stats events (WMI_SCAN_CHAN_STAT_EVENT):
qcom-q6v5-mss 4080000.remoteproc: fatal error received:
err_qdi.c:459:EX:wlan_process:1:WLAN RT:2073:PC=b00a5d88
qcacld-3.0 only sets this flag when gEnableSNRMonitoring=1, which
defaults to 0 and is not set by the vendor WCNSS_qcom_cfg.ini, so the
vendor driver never exercises this path.
Add ATH10K_FW_FEATURE_NO_CHAN_STAT_EVENT so affected firmware images
can opt out via firmware-N.bin. With the bit set the firmware no longer
reports per-channel statistics during scan, so survey data is not
updated on these devices.
Tested on SDM660 (WCN3990).
Signed-off-by: Gianluca Boiano <morf3089@xxxxxxxxx>
---
drivers/net/wireless/ath/ath10k/core.c | 1 +
drivers/net/wireless/ath/ath10k/core.h | 3 +++
drivers/net/wireless/ath/ath10k/wmi.c | 4 +++-
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index 2aa18adb3..d37add4cf 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -815,6 +815,7 @@ static const char *const ath10k_core_fw_feature_str[] = {
[ATH10K_FW_FEATURE_SINGLE_CHAN_INFO_PER_CHANNEL] = "single-chan-info-per-channel",
[ATH10K_FW_FEATURE_PEER_FIXED_RATE] = "peer-fixed-rate",
[ATH10K_FW_FEATURE_IRAM_RECOVERY] = "iram-recovery",
+ [ATH10K_FW_FEATURE_NO_CHAN_STAT_EVENT] = "no-chan-stat-event",
};
static unsigned int ath10k_core_get_fw_feature_str(char *buf,
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index dfee43261..29a4c0d74 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -838,6 +838,9 @@ enum ath10k_fw_features {
/* Firmware support IRAM recovery */
ATH10K_FW_FEATURE_IRAM_RECOVERY = 22,
+ /* Firmware crashes when asked for channel stats events during scan. */
+ ATH10K_FW_FEATURE_NO_CHAN_STAT_EVENT = 23,
+
/* keep last */
ATH10K_FW_FEATURE_COUNT,
};
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index e57588c19..adaf3c80f 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -7095,7 +7095,9 @@ void ath10k_wmi_start_scan_init(struct ath10k *ar,
| WMI_SCAN_EVENT_FOREIGN_CHANNEL
| WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT
| WMI_SCAN_EVENT_DEQUEUED;
- arg->scan_ctrl_flags |= WMI_SCAN_CHAN_STAT_EVENT;
+ if (!test_bit(ATH10K_FW_FEATURE_NO_CHAN_STAT_EVENT,
+ ar->running_fw->fw_file.fw_features))
+ arg->scan_ctrl_flags |= WMI_SCAN_CHAN_STAT_EVENT;
arg->n_bssids = 1;
arg->bssids[0].bssid = "\xFF\xFF\xFF\xFF\xFF\xFF";
}
--
2.56.1