Whether a feature is available often comes down to a WMI service bit the firmware reports at boot, and ath11k only logs the ext services, at debug level. List the number of every set bit of the service map in /wmi_services, so that the capabilities of a given firmware build can be read directly. Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1 Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1 Assisted-by: LLM Signed-off-by: Andrei-Alexandru Bleortu --- drivers/net/wireless/ath/ath11k/debugfs.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/net/wireless/ath/ath11k/debugfs.c b/drivers/net/wireless/ath/ath11k/debugfs.c index 70922612d3..75d2e81c77 100644 --- a/drivers/net/wireless/ath/ath11k/debugfs.c +++ b/drivers/net/wireless/ath/ath11k/debugfs.c @@ -851,6 +851,18 @@ static const struct file_operations fops_sram_dump = { .llseek = default_llseek, }; +static int ath11k_wmi_services_show(struct seq_file *m, void *v) +{ + struct ath11k_base *ab = m->private; + unsigned int i; + + for_each_set_bit(i, ab->wmi_ab.svc_map, WMI_MAX_EXT2_SERVICE) + seq_printf(m, "%u\n", i); + + return 0; +} +DEFINE_SHOW_ATTRIBUTE(ath11k_wmi_services); + int ath11k_debugfs_pdev_create(struct ath11k_base *ab) { if (test_bit(ATH11K_FLAG_REGISTERED, &ab->dev_flags)) @@ -862,6 +874,9 @@ int ath11k_debugfs_pdev_create(struct ath11k_base *ab) debugfs_create_file("soc_dp_stats", 0400, ab->debugfs_soc, ab, &fops_soc_dp_stats); + debugfs_create_file("wmi_services", 0400, ab->debugfs_soc, ab, + &ath11k_wmi_services_fops); + if (ab->hw_params.sram_dump.start != 0) debugfs_create_file("sram", 0400, ab->debugfs_soc, ab, &fops_sram_dump); -- 2.47.3