]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Introduce a new QCA vendor command for host driver TX/RX counters
authorMeng Yuan <menyua@qti.qualcomm.com>
Thu, 15 Jan 2026 03:02:33 +0000 (11:02 +0800)
committerJouni Malinen <j@w1.fi>
Thu, 29 Jan 2026 18:11:21 +0000 (20:11 +0200)
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 <menyua@qti.qualcomm.com>
src/common/qca-vendor.h

index 69d57c4fd6fdea4c9ded49b5be1cd51d558c2042..419d42e9b44fe93f23f12c0174be6c5884d2ef74 100644 (file)
@@ -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 */