From: Meng Yuan Date: Thu, 15 Jan 2026 03:02:33 +0000 (+0800) Subject: Introduce a new QCA vendor command for host driver TX/RX counters X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31cb81f228b60f673c1fbbee0a6c6ad5c21c715b;p=thirdparty%2Fhostap.git Introduce a new QCA vendor command for host driver TX/RX counters Add new vendor TX/RX counters to retrieve host/driver side specific counters and drop counts. Standard interfaces (e.g., station dump) typically reports aggregated HW+SW statistics. This interface exposes separate host-side counters to allow userspace to obtain host-level specific data, distinguished from firmware/hardware statistics. Signed-off-by: Meng Yuan --- diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h index 69d57c4fd..419d42e9b 100644 --- a/src/common/qca-vendor.h +++ b/src/common/qca-vendor.h @@ -1475,6 +1475,11 @@ enum qca_radiotap_vendor_ids { * * No attributes are used in the request. The response includes attributes * defined in enum qca_wlan_vendor_attr_qsh_stats. + * + * @QCA_NL80211_VENDOR_SUBCMD_WLAN_HOST_TXRX_STATS: This vendor subcommand is + * used to retrieve WLAN host driver side TX/RX statistics. + * The attributes used with this command are defined in + * enum qca_wlan_host_txrx_stats_attr. */ enum qca_nl80211_vendor_subcmds { QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0, @@ -1729,6 +1734,7 @@ enum qca_nl80211_vendor_subcmds { QCA_NL80211_VENDOR_SUBCMD_ATF_OFFLOAD_OPS = 268, QCA_NL80211_VENDOR_SUBCMD_DCS_CONFIG = 269, QCA_NL80211_VENDOR_SUBCMD_QSH_GET_STATS = 270, + QCA_NL80211_VENDOR_SUBCMD_WLAN_HOST_TXRX_STATS = 271, }; /* Compatibility defines for previously used subcmd names. @@ -23274,4 +23280,43 @@ enum qca_wlan_vendor_attr_qsh_stats { QCA_WLAN_VENDOR_ATTR_QSH_STATS_AFTER_LAST - 1 }; +/** + * enum qca_wlan_host_txrx_stats_attr - Defines attributes to be used + * with vendor subcmd QCA_NL80211_VENDOR_SUBCMD_WLAN_HOST_TXRX_STATS. + * + * @QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_TX_PKTS: 32-bit unsigned value + * for total TX packets successfully transmitted to the firmware. + * + * @QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_TX_DROPPED: 32-bit unsigned + * value for total TX packets dropped by the WLAN host driver (e.g., due + * to queue exhaustion). + * + * @QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_RX_PKTS: 32-bit unsigned value + * for total RX packets successfully delivered to the network stack. + * + * @QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_RX_DROPPED: 32-bit unsigned + * value for total RX packets dropped by the WLAN host driver. + * + * @QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_IPA_EXCEPTION_RX_DROPPED: + * 64-bit unsigned value for IPA exception RX drops. Counts packets + * routed from IPA to WLAN driver that were dropped. + * + * @QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_PAD: Attribute used for padding + * for 64-bit alignment. + */ + +enum qca_wlan_host_txrx_stats_attr { + QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_INVALID = 0, + QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_TX_PKTS = 1, + QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_TX_DROPPED = 2, + QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_RX_PKTS = 3, + QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_RX_DROPPED = 4, + QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_IPA_EXCEPTION_RX_DROPPED = 5, + QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_PAD = 6, + + QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_LAST, + QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_MAX = + QCA_WLAN_VENDOR_ATTR_HOST_TXRX_STATS_PARAM_LAST - 1 +}; + #endif /* QCA_VENDOR_H */