From: Pabitra Dash Date: Tue, 13 Jan 2026 10:52:29 +0000 (+0530) Subject: Define QCA vendor subcommand to fetch QSH Wi-Fi statistics X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=755a570c9f36cf3e1a7c183ebe51714f2688561e;p=thirdparty%2Fhostap.git Define QCA vendor subcommand to fetch QSH Wi-Fi statistics Context-aware modules like Qualcomm Sensing Hub (QSH) run in low-power domains (e.g., Sensor DSP) and require Wi-Fi scan and ranging services for location and context-awareness purposes. These services often operate continuously, even while the host system is in power-save sleep mode, without involving the host subsystem. However, sometimes the host subsystem needs to monitor these services. To enable monitoring, introduce a vendor subcommand to the QCA nl80211 vendor interface. QCA_NL80211_VENDOR_SUBCMD_QSH_GET_STATS: Retrieves the Wi-Fi scan count from the sensor (currently only scan count; might be extended to include additional statistics in the future), enabling analysis of power usage related to QSH-driven scans. This enhancement improves visibility into QSH scan behavior for better performance in resource-constrained and latency-critical scenarios. Signed-off-by: Pabitra Dash --- diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h index 9adf402e4..d27fcd812 100644 --- a/src/common/qca-vendor.h +++ b/src/common/qca-vendor.h @@ -1468,6 +1468,13 @@ enum qca_radiotap_vendor_ids { * * The attributes used with this command are defined in * enum qca_wlan_vendor_attr_dcs. + * + * @QCA_NL80211_VENDOR_SUBCMD_QSH_GET_STATS: Retrieve Qualcomm Sensing Hub (QSH) + * related Wi-Fi statistics from the sensor. Currently supports scan count; + * might be extended in the future. + * + * No attributes are used in the request. The response includes attributes + * defined in enum qca_wlan_vendor_attr_qsh_stats. */ enum qca_nl80211_vendor_subcmds { QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0, @@ -1721,6 +1728,7 @@ enum qca_nl80211_vendor_subcmds { QCA_NL80211_VENDOR_SUBCMD_GET_COEX_STATS = 267, QCA_NL80211_VENDOR_SUBCMD_ATF_OFFLOAD_OPS = 268, QCA_NL80211_VENDOR_SUBCMD_DCS_CONFIG = 269, + QCA_NL80211_VENDOR_SUBCMD_QSH_GET_STATS = 270, }; /* Compatibility defines for previously used subcmd names. @@ -23186,4 +23194,22 @@ enum qca_wlan_vendor_attr_dcs { QCA_WLAN_VENDOR_ATTR_DCS_AFTER_LAST - 1 }; +/** + * enum qca_wlan_vendor_attr_qsh_stats - Attributes used by + * %QCA_NL80211_VENDOR_SUBCMD_QSH_GET_STATS. + * + * @QCA_WLAN_VENDOR_ATTR_QSH_STATS_SCAN_COUNT: 32-bit unsigned value + * representing the Wi-Fi scan count from the sensor. This attribute is + * mandatory. It's a response-only attribute. + */ +enum qca_wlan_vendor_attr_qsh_stats { + QCA_WLAN_VENDOR_ATTR_QSH_STATS_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_QSH_STATS_SCAN_COUNT = 1, + + /* keep last */ + QCA_WLAN_VENDOR_ATTR_QSH_STATS_AFTER_LAST, + QCA_WLAN_VENDOR_ATTR_QSH_STATS_MAX = + QCA_WLAN_VENDOR_ATTR_QSH_STATS_AFTER_LAST - 1 +}; + #endif /* QCA_VENDOR_H */