From beb514eec232f988675be85feb9231c330178fdd Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 21 Nov 2025 12:02:06 -0800 Subject: [PATCH 1/2] fw-api: CL 31021605 - update fw common interface files Change-Id: Ib4e42d837b9746ce12b65e3697359615f044ee9a CRs-Fixed: 3830439 --- fw/wmi_services.h | 1 + fw/wmi_tlv_defs.h | 8 ++++++- fw/wmi_unified.h | 54 +++++++++++++++++++++++++++++++++++++++++++++++ fw/wmi_version.h | 2 +- 4 files changed, 63 insertions(+), 2 deletions(-) diff --git a/fw/wmi_services.h b/fw/wmi_services.h index 705dcff7ec06..6ba4f4c06cd7 100644 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -744,6 +744,7 @@ typedef enum { WMI_SERVICE_CFR_UNASSOC_RX_CAPTURE_SUPPORT = 480, /* Indicates FW supports RX-based unassociated CFR capture */ WMI_SERVICE_CFR_ASSOC_TX_CAPTURE_SUPPORT = 481, /* Indicates FW supports TX-based CFR capture */ WMI_SERVICE_VDEV_UNIFIED_CONNECT_DISCONNECT_SUPPORT = 482, /* Indicates FW support for unified connect and disconnect vdev cmds for link switch */ + WMI_SERVICE_ENHANCED_STATS_SUPPORT = 483, /* Indicates FW supports "enhanced stats" */ WMI_MAX_EXT2_SERVICE diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index d8d8183cc5e7..871590bb4e78 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1535,6 +1535,9 @@ typedef enum { WMITLV_TAG_STRUC_wmi_vdev_unified_disconnect_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_vdev_unified_connect_event_fixed_param, WMITLV_TAG_STRUC_wmi_vdev_unified_disconnect_event_fixed_param, + WMITLV_TAG_STRUC_wmi_vdev_beacon_stats, + WMITLV_TAG_STRUC_wmi_vdev_congestion_stats, + WMITLV_TAG_STRUC_wmi_vdev_data_stats, } WMITLV_TAG_ID; /* * IMPORTANT: Please add _ALL_ WMI Commands Here. @@ -7719,7 +7722,10 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PEER_STATS_INFO_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_ctrl_path_pdev_bcn_tx_stats_struct, ctrl_path_pdev_bcn_tx_stats, WMITLV_SIZE_VAR) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_ctrl_path_pdev_conn_stats_struct, ctrl_path_pdev_conn_stats, WMITLV_SIZE_VAR) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_ctrl_path_ml_rcfg_stats_struct, ctrl_path_ml_rcfg_stats, WMITLV_SIZE_VAR) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_ctrl_path_sta_dar_stats_struct, ctrl_path_sta_dar_stats, WMITLV_SIZE_VAR) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_ctrl_path_sta_dar_stats_struct, ctrl_path_sta_dar_stats, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_vdev_beacon_stats, vdev_beacon_stats, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_vdev_congestion_stats, vdev_congestion_stats, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_vdev_data_stats, vdev_data_stats, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_CTRL_PATH_STATS_EVENTID); /* diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 3c148d3ba5d3..33572d9c2615 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -37975,6 +37975,7 @@ typedef enum { WMI_REQUEST_CTRL_PATH_PDEV_CONN_STAT = 21, WMI_REQUEST_CTRL_PATH_ML_RECONFIG_STAT = 22, WMI_REQUEST_CTRL_PATH_STA_DAR_STAT = 23, + WMI_REQUEST_ENHANCED_STAT = 24, } wmi_ctrl_path_stats_id; typedef enum { @@ -47224,6 +47225,59 @@ typedef struct { } wmi_cfr_capture_filter_resp_event_fixed_param; +/* max beacon bmiss bitmask array size, in 32-bit words */ +#define WMI_MAX_BCN_BMISS_HISTORY_LENGTH 8 + +/* max MCS counters supported for enhance stats */ +#define WMI_ENHANCE_STATS_MAX_MCS_COUNTERS 16 + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_beacon_stats */ + A_UINT32 vdev_id; /* ID of the vdev these beacon stats are from */ + /* length: + * Number of A_UINT32 elements within the bmiss_bitmask array which + * contain valid data. + * Array elements beyond this limit should be ignored. + */ + A_UINT32 length; + /* bmiss_bitmask: + * Beacon miss bitmask indicating which beacons got missed from up to + * the last 255 expected beacons (32*8 bits). + * Only bmiss_bitmask[0] through bmiss_bitmask[length-1] (inclusive) + * contain valid data. + */ + A_UINT32 bmiss_bitmask[WMI_MAX_BCN_BMISS_HISTORY_LENGTH]; +} wmi_vdev_beacon_stats; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_qdata_congestion_stats */ + A_UINT32 vdev_id; /* ID of the vdev these congestion stats are from */ + /* cca_busy_time: + * Number of milliseconds during which CCA is busy, + * out of total time spent on the channel + */ + A_UINT32 cca_busy_time; + /* on_time: + * Total time in milliseconds for which we were on the channel + * and monitored + */ + A_UINT32 on_time; +} wmi_vdev_congestion_stats; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_data_stats */ + A_UINT32 vdev_id; /* ID of the vdev these data stats are from */ + /* Set of TX MCS counters for data PPDUs */ + A_UINT32 tx_mcs_data_ppdu[WMI_ENHANCE_STATS_MAX_MCS_COUNTERS]; + /* Set of TX BW counters for data PPDUs */ + A_UINT32 tx_bw_data_ppdu[WMI_STATS_EXT_EVENT_VDEV_EXT_BW_COUNTERS_MAX]; + /* Set of RX MCS counters for data PPDUs */ + A_UINT32 rx_mcs_data_ppdu[WMI_ENHANCE_STATS_MAX_MCS_COUNTERS]; + /* Set of RX BW counters for data PPDUs */ + A_UINT32 rx_bw_data_ppdu[WMI_STATS_EXT_EVENT_VDEV_EXT_BW_COUNTERS_MAX]; +} wmi_vdev_data_stats; + + #define WMI_UNIFIED_CHAIN_PHASE_MASK 0x0000ffff #define WMI_UNIFIED_CHAIN_PHASE_GET(tlv, chain_idx) \ ((A_UINT16) ((tlv)->chain_phase[chain_idx] & WMI_UNIFIED_CHAIN_PHASE_MASK)) diff --git a/fw/wmi_version.h b/fw/wmi_version.h index b70d34142501..2a631cbb504a 100644 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -37,7 +37,7 @@ #define __WMI_VER_MINOR_ 0 /** WMI revision number has to be incremented when there is a * change that may or may not break compatibility. */ -#define __WMI_REVISION_ 1677 +#define __WMI_REVISION_ 1678 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From ff3a4c7cfc676c517bc1d544b03ee80630729774 Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 21 Nov 2025 12:03:51 -0800 Subject: [PATCH 2/2] fw-api: CL 31023126 - update fw common interface files Change-Id: I4e423ca0877e6de241073062579b6af312157b07 CRs-Fixed: 3830439 --- fw/htt.h | 1 + fw/htt_stats.h | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) diff --git a/fw/htt.h b/fw/htt.h index 3c949416f709..41d66f06944f 100644 --- a/fw/htt.h +++ b/fw/htt.h @@ -881,6 +881,7 @@ typedef enum { HTT_STATS_TXBF_OFDMA_BN_STEER_TAG = 229, /* htt_stats_txbf_ofdma_bn_steer_tlv */ HTT_STATS_TXBF_OFDMA_BN_STEER_MPDU_TAG = 230, /* htt_stats_txbf_ofdma_bn_steer_mpdu_tlv */ HTT_STATS_TXBF_OFDMA_BN_PARBW_TAG = 231, /* htt_stats_txbf_ofdma_bn_parbw_tlv */ + HTT_STATS_OPTIONAL_CONFIGS_TAG = 232, /* htt_stats_optional_configs_tlv */ HTT_STATS_MAX_TAG, } htt_stats_tlv_tag_t; diff --git a/fw/htt_stats.h b/fw/htt_stats.h index aa24e860103d..50fac11c59af 100644 --- a/fw/htt_stats.h +++ b/fw/htt_stats.h @@ -850,6 +850,14 @@ enum htt_dbg_ext_stats_type { */ HTT_DBG_EXT_STATS_HDS_PROF = 76, + /** HTT_DBG_EXT_STATS_OPTIONAL_CONFIGS + * PARAMS: + * - No Params + * RESP MSG: + * - htt_stats_optional_configs_tlv + */ + HTT_DBG_EXT_STATS_OPTIONAL_CONFIGS = 77, + /* keep this last */ HTT_DBG_NUM_EXT_STATS = 256, @@ -11960,6 +11968,84 @@ typedef struct { ((word) |= (((value) << 24) & 0xff000000)) +typedef struct { + htt_tlv_hdr_t tlv_hdr; + union { + A_UINT32 flags; + struct { + /* + * bit 0: Dynamic ED CCA status flag + * bit 1: LPI status flag + * bit 2: Green Tx status flag + * bit 3: ANI status flag + * bit 4: Static ANI status flag + * bit 5: ANN Powerboost status flag + * bit 6: EANI status flag + * bit 7: Spur Mitigation status flag + * bit 8: Multigain RSSI status flag + */ + A_UINT32 + is_dyn_cca_enabled: 1, /* bit 0 */ + is_lpi_enabled: 1, /* bit 1 */ + is_gtx_enabled: 1, /* bit 2 */ + is_ani_enabled: 1, /* bit 3 */ + is_static_ani_enabled: 1, /* bit 4 */ + is_ann_pbt_enabled: 1, /* bit 5 */ + is_e_ani_enabled: 1, /* bit 6 */ + is_spur_mit_enabled: 1, /* bit 7 */ + is_multigain_rssi_enabled: 1, /* bit 8 */ + + reserved: 23; /* bits 31:9 */ + }; + }; +} htt_stats_optional_configs_tlv; + +#define HTT_STATS_OPT_CONF_GET_DYN_CCA(word) \ + (((word) & 0x1) >> 0) +#define HTT_STATS_OPT_CONF_SET_DYN_CCA(word, value) \ + ((word) = ((word) & ~0x1) | (((value) & 0x1) << 0)) + +#define HTT_STATS_OPT_CONF_GET_LPI(word) \ + (((word) & 0x2) >> 1) +#define HTT_STATS_OPT_CONF_SET_LPI(word, value) \ + ((word) = ((word) & ~0x2) | (((value) & 0x1) << 1)) + +#define HTT_STATS_OPT_CONF_GET_GTX(word) \ + (((word) & 0x4) >> 2) +#define HTT_STATS_OPT_CONF_SET_GTX(word, value) \ + ((word) = ((word) & ~0x4) | (((value) & 0x1) << 2)) + +#define HTT_STATS_OPT_CONF_GET_ANI(word) \ + (((word) & 0x8) >> 3) +#define HTT_STATS_OPT_CONF_SET_ANI(word, value) \ + ((word) = ((word) & ~0x8) | (((value) & 0x1) << 3)) + +#define HTT_STATS_OPT_CONF_GET_STATIC_ANI(word) \ + (((word) & 0x10) >> 4) +#define HTT_STATS_OPT_CONF_SET_STATIC_ANI(word, value) \ + ((word) = ((word) & ~0x10) | (((value) & 0x1) << 4)) + +#define HTT_STATS_OPT_CONF_GET_ANN_PBT(word) \ + (((word) & 0x20) >> 5) +#define HTT_STATS_OPT_CONF_SET_ANN_PBT(word, value) \ + ((word) = ((word) & ~0x20) | (((value) & 0x1) << 5)) + +#define HTT_STATS_OPT_CONF_GET_EANI(word) \ + (((word) & 0x40) >> 6) +#define HTT_STATS_OPT_CONF_SET_EANI(word, value) \ + ((word) = ((word) & ~0x40) | (((value) & 0x1) << 6)) + +#define HTT_STATS_OPT_CONF_GET_SPUR_MIT(word) \ + (((word) & 0x80) >> 7) +#define HTT_STATS_OPT_CONF_SET_SPUR_MIT(word, value) \ + ((word) = ((word) & ~0x80) | (((value) & 0x1) << 7)) + +#define HTT_STATS_OPT_CONF_GET_MULTIGAIN_RSSI(word) \ + (((word) & 0x100) >> 8) +#define HTT_STATS_OPT_CONF_SET_MULTIGAIN_RSSI(word, value) \ + ((word) = ((word) & ~0x100) | (((value) & 0x1) << 8)) + + typedef struct { union { A_UINT32 word32;