From 81b8a7bf506a61e38face0d2b3dbf2dee9d5947b Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 18 Jan 2023 06:01:00 -0800 Subject: [PATCH 01/15] fw-api: CL 21180715 - update fw common interface files Change-Id: I4e96f7fea072b7bc95ac00a22110216ff33b3b43 WMI: add PDEV_SET_TGTR2P_TABLE_CMD,_EVENT msg defs CRs-Fixed: 2262693 --- fw/wmi_tlv_defs.h | 15 +++++++++++ fw/wmi_unified.h | 66 +++++++++++++++++++++++++++++++++++++++++++++++ fw/wmi_version.h | 2 +- 3 files changed, 82 insertions(+), 1 deletion(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index e580a96ad2c6..58b40027e63c 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1336,6 +1336,8 @@ typedef enum { WMITLV_TAG_STRUC_wmi_tdma_schedule_request_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_hpa_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_hpa_evt_fixed_param, + WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table_event_fixed_param, } WMITLV_TAG_ID; /* @@ -1854,6 +1856,7 @@ typedef enum { OP(WMI_ESL_EGID_CMDID) \ OP(WMI_TDMA_SCHEDULE_REQUEST_CMDID) \ OP(WMI_HPA_CMDID) \ + OP(WMI_PDEV_SET_TGTR2P_TABLE_CMDID) \ /* add new CMD_LIST elements above this line */ @@ -2153,6 +2156,7 @@ typedef enum { OP(WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_EVENTID) \ OP(WMI_TAS_POWER_HISTORY_EVENTID) \ OP(WMI_HPA_EVENTID) \ + OP(WMI_PDEV_SET_TGTR2P_TABLE_EVENTID) \ /* add new EVT_LIST elements above this line */ @@ -5270,6 +5274,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_TDMA_SCHEDULE_REQUEST_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, data, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_HPA_CMDID); +/* WMI cmd to set target rate to power table */ +#define WMITLV_TABLE_WMI_PDEV_SET_TGTR2P_TABLE_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table_cmd_fixed_param, wmi_pdev_set_tgtr2p_table_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_INT8, r2p_array, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_SET_TGTR2P_TABLE_CMDID); + /************************** TLV definitions of WMI events *******************************/ @@ -7147,6 +7157,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_hpa_evt_fixed_param, wmi_hpa_evt_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_HPA_EVENTID); +/* WMI target rate to power table return status event */ +#define WMITLV_TABLE_WMI_PDEV_SET_TGTR2P_TABLE_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table_event_fixed_param, wmi_pdev_set_tgtr2p_table_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_SET_TGTR2P_TABLE_EVENTID); + #ifdef __cplusplus diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index f4c3a70e34f4..8ada62d7fc5f 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -515,6 +515,8 @@ typedef enum { WMI_PDEV_FEATURESET_CMDID, /** tag as Filter Pass category and the filters set for FP mode */ WMI_PDEV_MESH_RX_FILTER_ENABLE_CMDID, + /* WMI cmd to set Target rate to power table */ + WMI_PDEV_SET_TGTR2P_TABLE_CMDID, /* VDEV (virtual device) specific commands */ /** vdev create */ @@ -1715,6 +1717,9 @@ typedef enum { /* Event to indicate Schedule tid queue suspended info */ WMI_PDEV_SCHED_TIDQ_SUSP_INFO_EVENTID, + /* Event to send target rate to power table update status */ + WMI_PDEV_SET_TGTR2P_TABLE_EVENTID, + /* VDEV specific events */ /** VDEV started event in response to VDEV_START request */ @@ -33144,6 +33149,7 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command) WMI_RETURN_STRING(WMI_ESL_EGID_CMDID); WMI_RETURN_STRING(WMI_TDMA_SCHEDULE_REQUEST_CMDID); WMI_RETURN_STRING(WMI_HPA_CMDID); + WMI_RETURN_STRING(WMI_PDEV_SET_TGTR2P_TABLE_CMDID); /* To set target rate to power table */ } return (A_UINT8 *) "Invalid WMI cmd"; @@ -41464,6 +41470,66 @@ typedef struct { A_UINT32 ecwmax[WMI_AC_MAX]; } wmi_tdma_schedule_request_cmd_fixed_param; +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table _fixed_param */ + A_UINT32 pdev_id; + /* freq_band: + * Indicates the intended FreqBand for updating targetPowerR2PTable. + * 0: 5G + * 1: 2G + * 2: 6G + */ + A_UINT32 freq_band; + /* sub_band: + * Denotes band defined in targetPowerR2PFreqRangexG BDF fields. + * Valid values for each target is listed below + * For 11AX targets, + * 2G - 0 + * 5G/6G - 0/1/2 + * + * For 11BE targets, + * 2G - 0 + * 5G/6G - 0/1 + */ + A_UINT32 sub_band; + /* is_ext: + * Applicable only for 11BE targets + * 0 - Default targetPowerR2PTable + * 1 - To update targetPowerR2PTable in extension fields + * For 11AX targets, value is expected to be 0. + */ + A_UINT32 is_ext; + A_UINT32 target_type; /* 0 - IPQ95xx, 1 - QCN90xx, 0x10 - QCN92xx */ + A_UINT32 r2p_array_len; /* length of targetPowerR2PTable */ + /* end_of_r2ptable_update: + * This field can be used to indicate FW to trigger update of SW structures + * once user has updated for all the sub-bands of the Frequency band. + * This would be used when there are multiple sub-bands. + */ + A_UINT32 end_of_r2ptable_update; +/* + * Following this structure is the TLV containing targetPowerR2PTablexG + * of type INT8 and with a unit of 0.25dBm. + */ +} wmi_pdev_set_tgtr2p_table_cmd_fixed_param; + +typedef enum { + WMI_PDEV_TGTR2P_SUCCESS = 0, + WMI_PDEV_TGTR2P_SUCCESS_WAITING_FOR_END_OF_UPDATE, + WMI_PDEV_TGTR2P_ERROR_INVALID_FREQ_BAND, + WMI_PDEV_TGTR2P_ERROR_INVALID_SUB_BAND, + WMI_PDEV_TGTR2P_ERROR_EXTENSION_FIELDS_NOT_ENABLED_IN_BDF, + WMI_PDEV_TGTR2P_ERROR_INVALID_TARGET_TPYE, + WMI_PDEV_TGTR2P_ERROR_R2P_ARRAY_LEN_MISMATCH, +} wmi_pdev_set_tgtr2p_event_status_type; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table_event_fixed_param */ + A_UINT32 status; /* enum wmi_pdev_set_tgtr2p_event_status_type to indicate the status code/result */ +} wmi_pdev_set_tgtr2p_table_event_fixed_param; + + + /* ADD NEW DEFS HERE */ diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 23c847aab56f..fc78608d14a7 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_ 1260 +#define __WMI_REVISION_ 1261 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 80f49ef562d84ec60735040bcfe069d3c28e8635 Mon Sep 17 00:00:00 2001 From: spuligil Date: Thu, 19 Jan 2023 18:01:21 -0800 Subject: [PATCH 02/15] fw-api: CL 21221210 - update fw common interface files Change-Id: Ieab8deb2b9910f495366307090169176455b13ba WMI: add PDEV_PARAM_BYPASS_ENCRYPTION def CRs-Fixed: 2262693 --- fw/wmi_unified.h | 7 +++++++ fw/wmi_version.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 8ada62d7fc5f..eedbadac80da 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -9003,6 +9003,13 @@ typedef enum { * 4..31 | RESERVED */ WMI_PDEV_PARAM_SET_DISABLED_SCHED_MODES, + + /* + * Override default FW behavior and explicitly enable / disable + * to allow frames without encryption when no encryption is set. + * + */ + WMI_PDEV_PARAM_BYPASS_ENCRYPTION, } WMI_PDEV_PARAM; #define WMI_PDEV_ONLY_BSR_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 0, 1) diff --git a/fw/wmi_version.h b/fw/wmi_version.h index fc78608d14a7..59339f55305f 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_ 1261 +#define __WMI_REVISION_ 1262 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From f7be7cd15282a1d7b64845f9b14a3a5fb2ee28b1 Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 20 Jan 2023 06:00:57 -0800 Subject: [PATCH 03/15] fw-api: CL 21225121 - update fw common interface files HTT stats: add MSDU latency fields in htt_tx_tid_stats_v1 TLV Change-Id: I277332c0a9d64d4477f9e7813ca9c9c279c7bdf6 CRs-Fixed: 2262693 --- fw/htt_stats.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/fw/htt_stats.h b/fw/htt_stats.h index 8435f8bd94b7..97169aa68b78 100644 --- a/fw/htt_stats.h +++ b/fw/htt_stats.h @@ -1481,6 +1481,17 @@ typedef struct _htt_tx_tid_stats_v1_tlv { A_UINT32 mlo_flush_partner_info_high; A_UINT32 mlo_flush_initator_info_low; A_UINT32 mlo_flush_initator_info_high; + /* + * head_msdu_tqm_timestamp_us: + * MSDU enqueue timestamp (TQM reference timestamp) for the MSDU + * at the head of the MPDU queue + * head_msdu_tqm_latency_us: + * The age of the MSDU that is at the head of the MPDU queue, + * i.e. the delta between the current TQM time and the MSDU's + * enqueue timestamp. + */ + A_UINT32 head_msdu_tqm_timestamp_us; + A_UINT32 head_msdu_tqm_latency_us; } htt_tx_tid_stats_v1_tlv; #define HTT_RX_TID_STATS_SW_PEER_ID_M 0x0000ffff From f8e35dc5f6959d3bc568c93e1f787fb84f35912b Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 20 Jan 2023 06:01:41 -0800 Subject: [PATCH 04/15] fw-api: CL 21225942 - update fw common interface files Change-Id: I4f3c1bb65c7b56781cf93163aa7dabd8a87dcd9a HTT: add TX_MONITOR_CFG_WORD_MASK_COMPACTION_ENABLE flag CRs-Fixed: 2262693 --- fw/htt.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/fw/htt.h b/fw/htt.h index cddf564ee9d8..2ad3ca3680be 100644 --- a/fw/htt.h +++ b/fw/htt.h @@ -241,9 +241,10 @@ * 3.114 Add HTT_H2T_MSG_TYPE_UMAC_HANG_RECOVERY_SOC_START_PRE_RESET def. * 3.115 Add HTT_H2T_MSG_TYPE_RX_CCE_SUPER_RULE_SETUP and * HTT_T2H_MSG_TYPE_RX_CCE_SUPER_RULE_SETUP_DONE msg defs. + * 3.116 Add HTT_TX_MONITOR_CFG_WORD_MASK_COMPACTION_ENABLE flag. */ #define HTT_CURRENT_VERSION_MAJOR 3 -#define HTT_CURRENT_VERSION_MINOR 115 +#define HTT_CURRENT_VERSION_MINOR 116 #define HTT_NUM_TX_FRAG_DESC 1024 @@ -7141,7 +7142,8 @@ PREPACK struct htt_tx_monitor_cfg_t { filter_in_tx_msdu_end_mgmt: 1, filter_in_tx_msdu_end_ctrl: 1, filter_in_tx_msdu_end_data: 1, - rsvd3: 17; + word_mask_compaction_enable: 1, + rsvd3: 16; A_UINT32 tlv_filter_mask_in0; A_UINT32 tlv_filter_mask_in1; A_UINT32 tlv_filter_mask_in2; @@ -7411,6 +7413,18 @@ PREPACK struct htt_tx_monitor_cfg_t { ((_var) |= ((_val) << HTT_TX_MONITOR_CFG_FILTER_IN_TX_MSDU_END_DATA_S)); \ } while (0) +#define HTT_TX_MONITOR_CFG_WORD_MASK_COMPACTION_ENABLE_M 0x00008000 +#define HTT_TX_MONITOR_CFG_WORD_MASK_COMPACTION_ENABLE_S 15 +#define HTT_TX_MONITOR_CFG_WORD_MASK_COMPACTION_ENABLE_GET(_var) \ + (((_var) & HTT_TX_MONITOR_CFG_WORD_MASK_COMPACTION_ENABLE_M) >> \ + HTT_TX_MONITOR_CFG_WORD_MASK_COMPACTION_ENABLE_S) +#define HTT_TX_MONITOR_CFG_WORD_MASK_COMPACTION_ENABLE_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_TX_MONITOR_CFG_WORD_MASK_COMPACTION_ENABLE, _val); \ + ((_var) |= ((_val) << HTT_TX_MONITOR_CFG_WORD_MASK_COMPACTION_ENABLE_S)); \ + } while (0) + + #define HTT_TX_MONITOR_CFG_TLV_FILTER_MASK_M 0xffffffff #define HTT_TX_MONITOR_CFG_TLV_FILTER_MASK_S 0 #define HTT_TX_MONITOR_CFG_TLV_FILTER_MASK_GET(_var) \ From b888f44e76fd5257c010d33ff7b50fc33159acb0 Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 20 Jan 2023 18:00:56 -0800 Subject: [PATCH 05/15] fw-api: CL 21236391 - update fw common interface files Change-Id: Ib38a78df3cfef6ebfe196df13d381f29057b8417 WMI: add kck_len,kek_len fields to key_material_ext TLV CRs-Fixed: 2262693 --- fw/wmi_unified.h | 9 +++++++-- fw/wmi_version.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index eedbadac80da..fa2931e92929 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -25336,10 +25336,15 @@ typedef struct { /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_key_material_ext */ A_UINT32 tlv_header; /* - * key_buffer contains kck,kck2,kek,kek2,replay counter, in order - * The split between kck vs. kek should be known to host based on akmp. + * key_buffer contains kck,kck2,kek,kek2,replay counter, in order. + * If both the below kck_len and kek_len fields are 0x0, the split + * between kck vs. kek should be inferred based on akmp. */ A_UINT8 key_buffer[GTK_OFFLOAD_KEK_EXTENDED_BYTES+GTK_OFFLOAD_KCK_EXTENDED_BYTES+GTK_REPLAY_COUNTER_BYTES]; + /* length of kck in key_buffer */ + A_UINT32 kck_len; + /* length of kek in key_buffer */ + A_UINT32 kek_len; } wmi_key_material_ext; typedef struct { diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 59339f55305f..9b5068ecfeae 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_ 1262 +#define __WMI_REVISION_ 1263 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From a1854ba2c7e5b2ce35f2748c1125733daede69a2 Mon Sep 17 00:00:00 2001 From: spuligil Date: Sat, 21 Jan 2023 12:01:07 -0800 Subject: [PATCH 06/15] fw-api: CL 21241300 - update fw common interface files Change-Id: If308430d71f55e9ad0170460b22685b5e8b5490a WMI: add PEER_BULK_SET_CMD msg def CRs-Fixed: 2262693 --- fw/wmi_tlv_defs.h | 8 ++++++++ fw/wmi_unified.h | 35 +++++++++++++++++++++++++++++++++++ fw/wmi_version.h | 2 +- 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 58b40027e63c..5a3b02d8f62f 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1338,6 +1338,7 @@ typedef enum { WMITLV_TAG_STRUC_wmi_hpa_evt_fixed_param, WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table_event_fixed_param, + WMITLV_TAG_STRUC_wmi_peer_bulk_set_cmd_fixed_param, } WMITLV_TAG_ID; /* @@ -1857,6 +1858,7 @@ typedef enum { OP(WMI_TDMA_SCHEDULE_REQUEST_CMDID) \ OP(WMI_HPA_CMDID) \ OP(WMI_PDEV_SET_TGTR2P_TABLE_CMDID) \ + OP(WMI_PEER_BULK_SET_CMDID) \ /* add new CMD_LIST elements above this line */ @@ -4800,6 +4802,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PEER_CFR_CAPTURE_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_chan_width_peer_list, peer_info, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_PEER_CHAN_WIDTH_SWITCH_CMDID); +/* BULK Peer Set command */ +#define WMITLV_TABLE_WMI_PEER_BULK_SET_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_bulk_set_cmd_fixed_param, wmi_peer_bulk_set_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_peer_list, peer_info, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_PEER_BULK_SET_CMDID); + /* OBSS_PD Spatial_Reuse Set Default OBSS Thresholds */ #define WMITLV_TABLE_WMI_PDEV_OBSS_PD_SPATIAL_REUSE_SET_DEF_OBSS_THRESH_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param, wmi_obss_spatial_reuse_set_def_obss_thresh_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index fa2931e92929..a6b02c35264d 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -745,6 +745,8 @@ typedef enum { /* Set disabled scheduler modes for one or more peers */ WMI_PEER_SCHED_MODE_DISABLE_CMDID, + /* Group SET cmd for PEERS */ + WMI_PEER_BULK_SET_CMDID, /* beacon/management specific commands */ @@ -17125,6 +17127,9 @@ typedef struct { */ #define WMI_PEER_CHWIDTH_PUNCTURE_20MHZ_BITMAP 0x27 +#define WMI_PEER_SET_TX_POWER 0x28 + + typedef struct { A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_set_param_cmd_fixed_param */ /** unique id identifying the VDEV, generated by the caller */ @@ -37044,6 +37049,36 @@ typedef struct { */ } wmi_peer_chan_width_switch_cmd_fixed_param; +#define WMI_PEER_BULK_SET_VDEV_ID(comp, value) WMI_SET_BITS(comp, 0, 8, value) +#define WMI_PEER_BULK_GET_VDEV_ID(comp) WMI_GET_BITS(comp, 0, 8) +/* bits 30:8 currently unused */ +#define WMI_PEER_BULK_SET_VALID_VDEV_ID(comp) WMI_SET_BITS(comp, 31, 1, 1) +#define WMI_PEER_BULK_GET_VALID_VDEV_ID(comp) WMI_GET_BITS(comp, 31, 1) + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_wmi_peer_list */ + wmi_mac_addr peer_macaddr; + /** parameter id */ + A_UINT32 param_id; + A_UINT32 param_value; +} wmi_peer_list; + +/* WMI_PEER_BULK_SET_CMDID */ +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_bulk_set_cmd_fixed_param */ + /* vdev_var: + * The MSb (bit 31) indicates that the vdev_id is valid. + * The LSB (bits 0-7) is used to infer the actual vdev_id. + * The other bits can be used for future enhancements. + */ + A_UINT32 vdev_var; + + /* + * Following this structure is the TLV array: + * struct wmi_peer_list peer_info[]; + */ +} wmi_peer_bulk_set_cmd_fixed_param; + typedef struct { /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_he_tb_action_frm_cmd_fixed_param */ A_UINT32 tlv_header; diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 9b5068ecfeae..2ca9939d227a 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_ 1263 +#define __WMI_REVISION_ 1264 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 4de851227d67c5c3254d608c190cfcba33f65ddb Mon Sep 17 00:00:00 2001 From: spuligil Date: Mon, 30 Jan 2023 06:01:10 -0800 Subject: [PATCH 07/15] fw-api: CL 21250849 - update fw common interface files Change-Id: I70808ec7019943f371404017c2297d6ce73c7739 WMI: add LATENCY_DISABLE flags for UL_OFDMA,_MU_MIMO CRs-Fixed: 2262693 --- fw/wmi_unified.h | 28 ++++++++++++++++++++++++++-- fw/wmi_version.h | 2 +- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index a6b02c35264d..e2860a47c0ab 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -746,7 +746,7 @@ typedef enum { WMI_PEER_SCHED_MODE_DISABLE_CMDID, /* Group SET cmd for PEERS */ - WMI_PEER_BULK_SET_CMDID, + WMI_PEER_BULK_SET_CMDID, /* beacon/management specific commands */ @@ -29812,6 +29812,24 @@ typedef struct { #define WMI_LATENCY_SET_MSDUQ_ID(latency_tid_info,val) \ WMI_SET_BITS(latency_tid_info, WMI_LATENCY_MSDUQ_ID_BIT_POS, WMI_LATENCY_MSDUQ_ID_NUM_BITS, val) +#define WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS 18 +#define WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS 1 + +#define WMI_LATENCY_GET_DISABLE_UL_OFDMA(latency_tid_info) \ + WMI_GET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS, WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS) + +#define WMI_LATENCY_SET_DISABLE_UL_OFDMA(latency_tid_info,val) \ + WMI_SET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_OFDMA_BIT_POS, WMI_LATENCY_DISABLE_UL_OFDMA_NUM_BITS, val) + +#define WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS 19 +#define WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS 1 + +#define WMI_LATENCY_GET_DISABLE_UL_MU_MIMO(latency_tid_info) \ + WMI_GET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS, WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS) + +#define WMI_LATENCY_SET_DISABLE_UL_MU_MIMO(latency_tid_info,val) \ + WMI_SET_BITS(latency_tid_info, WMI_LATENCY_DISABLE_UL_MU_MIMO_BIT_POS, WMI_LATENCY_DISABLE_UL_MU_MIMO_NUM_BITS, val) + typedef struct { /** TLV tag and len; tag equals * WMITLV_TAG_STRUC_wmi_tid_latency_info @@ -29855,7 +29873,13 @@ typedef struct { */ A_UINT32 min_tput; /* latency_tid_info - * Bits 18-31 - Reserved (Shall be zero) + * Bits 20-31 - Reserved (Shall be zero) + * Bit 19 - Disable UL MU-MIMO. If set, UL MU-MIMO is disabled + * for the specified AC. Note that TID level control is + * not possible for UL MU-MIMO (the granularity is AC). + * Bit 18 - Disable UL OFDMA. If set, UL OFDMA is disabled for + * the specified AC. Note that TID level control is not + * possible for UL OFDMA (the granularity is AC). * Bits 14-17 - MSDU queue flow id within the TID for configuring * latency info per MSDU flow queue * Bit 12-13 - burst size sum. Bit to indicate whether to add or diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 2ca9939d227a..aa4ad232d4a5 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_ 1264 +#define __WMI_REVISION_ 1265 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 132e9dca212840d284017b00ab80c1aaa7bd26b0 Mon Sep 17 00:00:00 2001 From: spuligil Date: Mon, 30 Jan 2023 06:01:56 -0800 Subject: [PATCH 08/15] fw-api: CL 21265209 - update fw common interface files Change-Id: I4a9c42f5e54ec1d9ff91fd62edac85e918bf640d WMI: add MLO preferred link info CRs-Fixed: 2262693 --- fw/wmi_tlv_defs.h | 4 +++- fw/wmi_unified.h | 30 +++++++++++++++++++++++++++++- fw/wmi_version.h | 2 +- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 5a3b02d8f62f..9430e12d0bf6 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1339,6 +1339,7 @@ typedef enum { WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table_event_fixed_param, WMITLV_TAG_STRUC_wmi_peer_bulk_set_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_peer_preferred_link_map, } WMITLV_TAG_ID; /* @@ -5077,7 +5078,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_MLO_TEARDOWN_CMDID); /** WMI cmd used to setup Tid to Link Mapping for a MLO Peer */ #define WMITLV_TABLE_WMI_MLO_PEER_TID_TO_LINK_MAP_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_tid_to_link_map_fixed_param, wmi_peer_tid_to_link_map_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_tid_to_link_map, tid_to_link_map, WMITLV_SIZE_VAR) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_tid_to_link_map, tid_to_link_map, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_peer_preferred_link_map, peer_preferred_link_map, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_MLO_PEER_TID_TO_LINK_MAP_CMDID); /** WMI cmd used to setup Tid to Link Mapping for a vdev */ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index e2860a47c0ab..1a3d00f8bc15 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -40486,6 +40486,31 @@ typedef struct { A_UINT32 tid_to_link_map_info; } wmi_tid_to_link_map; +#define WMI_MAX_NUM_PREFERRED_LINKS 4 + +typedef struct { + /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_preferred_link_map */ + A_UINT32 tlv_header; + + /* num_preferred_links: + * If it is 0, all links are equally preferred and which link to be used + * in each schedule is decided by FW. + */ + A_UINT32 num_preferred_links; + + /* [0] - highest preferred link, [1] - 2nd preferred link, etc. */ + A_UINT32 preferred_link_order[WMI_MAX_NUM_PREFERRED_LINKS]; + + /* expected_max_latency_ms: + * 0 - Expected Max Latency to be estimated in Firmware + * Non 0 - Firmware should try to achieve given max latency + * in first preferred link. + * If unable to meet in first preferred link, start scheduling + * in next preferred link and so on. + */ + A_UINT32 expected_max_latency_ms[WLAN_MAX_AC]; +} wmi_peer_preferred_link_map; + typedef struct { /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_tid_to_link_map_fixed_param */ A_UINT32 tlv_header; @@ -40497,7 +40522,10 @@ typedef struct { /** * Following this structure is the TLV: - * struct wmi_tid_to_link_map tid_to_link_map[]; + * - struct wmi_tid_to_link_map tid_to_link_map[]; + * - struct wmi_peer_preferred_link_map peer_preferred_link_map[]; + * Note - TLV array of peer_preferred_link_map has either 0 or 1 + * entries, not multiple entries. */ } wmi_peer_tid_to_link_map_fixed_param; diff --git a/fw/wmi_version.h b/fw/wmi_version.h index aa4ad232d4a5..e3b2398695d2 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_ 1265 +#define __WMI_REVISION_ 1266 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 90396487dbb8fb5625cffa16b80b01f93e6dd7a0 Mon Sep 17 00:00:00 2001 From: spuligil Date: Mon, 30 Jan 2023 06:02:41 -0800 Subject: [PATCH 09/15] fw-api: CL 21265211 - update fw common interface files HTT stats: add EHT flag in rx_pkt_cnt, rx_pkt_crc_pass_cnt Change-Id: I3e5232ab16036b8acb63ed19a18faca53b5aa77f CRs-Fixed: 2262693 --- fw/htt_stats.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fw/htt_stats.h b/fw/htt_stats.h index 97169aa68b78..cd126364f8b6 100644 --- a/fw/htt_stats.h +++ b/fw/htt_stats.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -7505,13 +7505,13 @@ typedef struct { /** rx_pkt_cnt - * Received EOP (end-of-packet) count per packet type; * [0] = 11a; [1] = 11b; [2] = 11n; [3] = 11ac; [4] = 11ax; [5] = GF - * [6-7]=RSVD + * [6] = EHT; [7]=RSVD; [6] = Applicable only for BE */ A_UINT32 rx_pkt_cnt[HTT_MAX_RX_PKT_CNT]; /** rx_pkt_crc_pass_cnt - * Received EOP (end-of-packet) count per packet type; * [0] = 11a; [1] = 11b; [2] = 11n; [3] = 11ac; [4] = 11ax; [5] = GF - * [6-7]=RSVD + * [6] = EHT; [7]=RSVD; [6] = Applicable only for BE */ A_UINT32 rx_pkt_crc_pass_cnt[HTT_MAX_RX_PKT_CRC_PASS_CNT]; /** per_blk_err_cnt - @@ -7533,12 +7533,12 @@ typedef struct { A_UINT32 rx_ota_err_cnt[HTT_MAX_RX_OTA_ERR_CNT]; /** rx_pkt_cnt_ext - * Received EOP (end-of-packet) count per packet type for BE; - * [0] = EHT; [1] = WUR; [2] = AZ; [3]=RVSD + * [0] = WUR; [1] = AZ; [2-3]=RVSD */ A_UINT32 rx_pkt_cnt_ext[HTT_MAX_RX_PKT_CNT_EXT]; /** rx_pkt_crc_pass_cnt_ext - * Received EOP (end-of-packet) count per packet type for BE; - * [0] = EHT; [1] = WUR; [2] = AZ; [3]=RVSD + * [0] = WUR; [1] = AZ; [2-3]=RVSD */ A_UINT32 rx_pkt_crc_pass_cnt_ext[HTT_MAX_RX_PKT_CRC_PASS_CNT_EXT]; /** rx_pkt_mu_cnt - From 13f3bcef932de95a5f81b75729e7879ed5e339ee Mon Sep 17 00:00:00 2001 From: spuligil Date: Mon, 30 Jan 2023 06:03:31 -0800 Subject: [PATCH 10/15] fw-api: CL 21283507 - update fw common interface files Change-Id: I4507629cb3c401f0d785b7fd22569585cc0c8301 WMI: add PDEV_PARAM_SET_SCAN_BLANKING_MODE + CHAN_INFO_EVENT blanking_params CRs-Fixed: 2262693 --- fw/wmi_tlv_defs.h | 4 +++- fw/wmi_unified.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++ fw/wmi_version.h | 2 +- 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 9430e12d0bf6..0d9b2e31ded8 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1340,6 +1340,7 @@ typedef enum { WMITLV_TAG_STRUC_wmi_pdev_set_tgtr2p_table_event_fixed_param, WMITLV_TAG_STRUC_wmi_peer_bulk_set_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_peer_preferred_link_map, + WMITLV_TAG_STRUC_wmi_scan_blanking_params_info, } WMITLV_TAG_ID; /* @@ -5470,7 +5471,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_TX_POWER_EVENTID); /* Channel Info Event */ #define WMITLV_TABLE_WMI_CHAN_INFO_EVENTID(id,op,buf,len) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param, wmi_chan_info_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_chan_info_event_fixed_param, wmi_chan_info_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_scan_blanking_params_info, scan_blanking_params, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_CHAN_INFO_EVENTID); /* RSSI dB to dBm conversion params info event to host */ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 1a3d00f8bc15..8e1cd78da611 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -9012,6 +9012,14 @@ typedef enum { * */ WMI_PDEV_PARAM_BYPASS_ENCRYPTION, + + /* + * Param to Enable/Disable scan blanking feature on the Scan Radio + * Host should ensure to send this param only for Scan Radio + * The WMI_SCAN_BLANKING_MODE enum specifies the possible values for this parameter. + * Based on the received input, the scan blanking feature will be carried out as explained in the enum WMI_SCAN_BLANKING_MODE + */ + WMI_PDEV_PARAM_SET_SCAN_BLANKING_MODE, } WMI_PDEV_PARAM; #define WMI_PDEV_ONLY_BSR_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 0, 1) @@ -17715,8 +17723,49 @@ typedef struct { * If per_chain_noise_floor value is 0 then it should be ignored. */ A_UINT32 per_chain_noise_floor[WMI_MAX_CHAINS]; + +/** + * Following this structure is the optional TLV: + * struct wmi_scan_blanking_params_info[0/1]; + */ } wmi_chan_info_event_fixed_param; +/** + * The below structure contains parameters related to the scan radio + * blanking feature + */ +typedef struct { + /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_blanking_params_info */ + A_UINT32 tlv_header; + /* scan_radio_blanking_duration: + * Cumulative scan disabled duration which indicates the total time in + * micro seconds where rx blanking was enabled on the scan radio due to + * simultaneous transmissions on the same band in the serving radio. + */ + A_UINT32 scan_radio_blanking_duration; + /* scan_radio_blanking_count: + * Count of the number of times rx blanking was enabled on the scan radio + * due to simultaneous transmissions on the same band in the serving radio. + */ + A_UINT32 scan_radio_blanking_count; +} wmi_scan_blanking_params_info; + +typedef enum { + /* Blanking feature will be disabled */ + WMI_SCAN_BLANKING_DISABLED = 0, + + /* Blanking enabled only on current operating band */ + WMI_SCAN_BLANKING_ENABLED, + + /* + * Blanking enabled on both 5GHz and 6GHz bands when scan radio + * home channel is on either 5GHz or 6GHz bands + */ + WMI_SCAN_BLANKING_ENABLED_NO_ISOLATION, + + WMI_SCAN_BLANKING_MAX, +} WMI_SCAN_BLANKING_MODE; + /** * The below three structures are the params used for converting RSSI * from dB to dBm units. diff --git a/fw/wmi_version.h b/fw/wmi_version.h index e3b2398695d2..24de0e6a2e85 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_ 1266 +#define __WMI_REVISION_ 1267 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 76201f26fa1025e7b10a234e67a4a62b84f4a3d2 Mon Sep 17 00:00:00 2001 From: spuligil Date: Mon, 30 Jan 2023 06:04:27 -0800 Subject: [PATCH 11/15] fw-api: CL 21305799 - update fw common interface files HTT stats: add extra_eht_ltf counter and flag Change-Id: I399bf4bdca499883366d49e96aacd8fc903719cf CRs-Fixed: 2262693 --- fw/htt_ppdu_stats.h | 20 ++++++++++++++++++-- fw/htt_stats.h | 2 ++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/fw/htt_ppdu_stats.h b/fw/htt_ppdu_stats.h index 64a6cd9f3f08..e93a5b802876 100644 --- a/fw/htt_ppdu_stats.h +++ b/fw/htt_ppdu_stats.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -1796,6 +1796,19 @@ typedef enum HTT_PPDU_STATS_RESP_PPDU_TYPE HTT_PPDU_STATS_RESP_PPDU_TYPE; ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_PUNC_PATTERN_BITMAP_S)); \ } while (0) +#define HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF_M 0x00010000 +#define HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF_S 16 + +#define HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF_GET(_var) \ + (((_var) & HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF_M) >> \ + HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF_S) + +#define HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF_SET (_var , _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_EXTRA_EHT_LTF_S)); \ + } while (0) + typedef enum HTT_PPDU_STATS_RU_SIZE { HTT_PPDU_STATS_RU_26, HTT_PPDU_STATS_RU_52, @@ -1981,9 +1994,12 @@ typedef struct { /* * BIT [15:0] :- Punctured BW bitmap pattern to indicate which BWs are * punctured. + * BIT 16 :- flag showing whether EHT extra LTF is applied + * for current PPDU */ A_UINT32 punc_pattern_bitmap: 16, - reserved4: 16; + extra_eht_ltf: 1, + reserved4: 15; } htt_ppdu_stats_user_rate_tlv; #define HTT_PPDU_STATS_USR_RATE_VALID_M 0x80000000 diff --git a/fw/htt_stats.h b/fw/htt_stats.h index cd126364f8b6..f487f8550590 100644 --- a/fw/htt_stats.h +++ b/fw/htt_stats.h @@ -4991,6 +4991,8 @@ typedef struct { A_UINT32 ax_su_embedded_trigger_data_ppdu_err; /** sta side trigger stats */ A_UINT32 trigger_type_11be[HTT_TX_PDEV_STATS_NUM_11BE_TRIGGER_TYPES]; + /** Stats for Extra EHT LTF */ + A_UINT32 extra_eht_ltf; } htt_tx_pdev_rate_stats_tlv; typedef struct { From 2c8535ecc3c1a7ed19e94bf81957b25dc485fc7f Mon Sep 17 00:00:00 2001 From: spuligil Date: Mon, 30 Jan 2023 06:05:10 -0800 Subject: [PATCH 12/15] fw-api: CL 21305800 - update fw common interface files Change-Id: Ic5d3f754385bb1e505cf97e33e2cde531426716f WMI: add [low,high] [2,5]ghz_chan_ext fields in HAL_REG_CAP structs CRs-Fixed: 2262693 --- fw/wlan_defs.h | 11 +++++++---- fw/wmi_unified.h | 6 +++++- fw/wmi_version.h | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/fw/wlan_defs.h b/fw/wlan_defs.h index abb978c19516..35018ed69bbf 100755 --- a/fw/wlan_defs.h +++ b/fw/wlan_defs.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2013-2016, 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -458,6 +458,10 @@ typedef struct { A_UINT32 low_5ghz_chan; A_UINT32 high_5ghz_chan; A_UINT32 wireless_modes_ext; /* REGDMN MODE ext */ + A_UINT32 low_2ghz_chan_ext; + A_UINT32 high_2ghz_chan_ext; + A_UINT32 low_5ghz_chan_ext; + A_UINT32 high_5ghz_chan_ext; } HAL_REG_CAPABILITIES; #ifdef NUM_SPATIAL_STREAM @@ -972,8 +976,7 @@ struct wlan_dbg_mem_stats { }; struct wlan_dbg_peer_stats { - - A_INT32 dummy; /* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */ + A_INT32 dummy; /* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */ }; /* @@ -1017,7 +1020,7 @@ typedef struct { * TEMPORARY: leave rssi_chain3 in place for AR900B builds until code using * rssi_chain3 has been converted to use wlan_dbg_rx_rate_info_v2_t. */ - A_UINT32 rssi_chain3; + A_UINT32 rssi_chain3; } wlan_dbg_rx_rate_info_v1b_t; #if defined(AR900B) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 8e1cd78da611..f9dab1c9366d 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -32134,6 +32134,10 @@ typedef struct { A_UINT32 phy_id; /* regdomain value specified in EEPROM */ A_UINT32 wireless_modes_ext; + A_UINT32 low_2ghz_chan_ext; /* freq in MHz */ + A_UINT32 high_2ghz_chan_ext; /* freq in MHz */ + A_UINT32 low_5ghz_chan_ext; /* freq in MHz */ + A_UINT32 high_5ghz_chan_ext; /* freq in MHz */ } WMI_HAL_REG_CAPABILITIES_EXT2; /* @@ -40573,7 +40577,7 @@ typedef struct { * Following this structure is the TLV: * - struct wmi_tid_to_link_map tid_to_link_map[]; * - struct wmi_peer_preferred_link_map peer_preferred_link_map[]; - * Note - TLV array of peer_preferred_link_map has either 0 or 1 + * Note - TLV array of peer_preferred_link_map has either 0 or 1 * entries, not multiple entries. */ } wmi_peer_tid_to_link_map_fixed_param; diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 24de0e6a2e85..fe9a80d2a9b4 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_ 1267 +#define __WMI_REVISION_ 1268 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 129e260a49942c470e4970b83aca7c751f61a593 Mon Sep 17 00:00:00 2001 From: spuligil Date: Mon, 30 Jan 2023 06:05:56 -0800 Subject: [PATCH 13/15] fw-api: CL 21308799 - update fw common interface files WMI: add CoDel parameters to SAWF_SVC_CLASS_CFG_CMD msg Add CoDel enable/disable flag, latency target spec, and baseline interval spec as info elements in SAWF_SVC_CLASS_CFG_CMD message. Change-Id: Ie1e186005256f04aeb7e2c76738a0fffa992fc46 CRs-Fixed: 2262693 --- fw/wmi_unified.h | 42 ++++++++++++++++++++++++++++++++++++++++++ fw/wmi_version.h | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index f9dab1c9366d..72344c72d419 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -41068,6 +41068,15 @@ typedef struct { A_UINT32 cust_bdf_ver_minor; } wmi_cust_bdf_version_capabilities; +enum WMI_CODEL_ENABLE_VALUES { + WMI_CODEL_DISABLED, + WMI_CODEL_ENABLED, + /* WMI_CODEL_DEBUG: + * partly enabled – track interval and check target, but don’t drop + */ + WMI_CODEL_DEBUG, +}; + typedef enum { WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MIN_THRUPUT = 0, WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MAX_THRUPUT = 0xffffffff, @@ -41079,8 +41088,14 @@ typedef enum { WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_TID = 0xffffffff, WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_MSDU_LOSS_RATE = 0, WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_DISABLED_SCHED_MODE = 0, + WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_ENABLED = WMI_CODEL_DISABLED, + WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_LATENCY_TARGET_MS = 0xffffffff, + WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_INTERVAL_MS = 0xffffffff, } WMI_SAWF_SVC_CLASS_PARAM_DEFAULTS; +#define WMI_CODEL_INTERVAL_MAX_MS 0x0000ffff +#define WMI_CODEL_LATENCY_TARGET_MAX_MS 0x00003fff + typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_sawf_svc_class_cfg_cmd_fixed_param */ A_UINT32 svc_class_id; /* which service class is being configured */ @@ -41171,6 +41186,33 @@ typedef struct { * The WMI_SCHED_MODE_FLAGS enum defines the bit positions for each mode. */ A_UINT32 disabled_sched_modes; + + A_UINT32 codel_enabled; /* contains a WMI_CODEL_ENABLE_VALUES enum value */ + /* codel_latency_target_ms: + * The codel_latency_target_ms field specifies the latency target for + * MSDU queues belonging to this service class. + * The latency of each such MSDU queue will periodically be checked + * (with the periodicity controlled by the code_interval_ms parameter). + * If the MSDU queue's latency is above this target latency, a MSDU will + * be dropped from the head of the queue, to attempt to get the flow's + * producer to scale down its rate of MSDU production. + * This value should be roughly 10% to 30% of the codel_interval_ms value. + * This value must be <= WMI_CODEL_LATENCY_TARGET_MAX_MS (or must equal + * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_LATENCY_TARGET_MS). + */ + A_UINT32 codel_latency_target_ms; + /* codel_interval_ms: + * The codel_interval_ms field specifies the baseline interval between + * successive checks that a given MSDU queue's latency is under the + * CoDel target latency. + * If in a given interval a MSDU queue has a latency exceeding the target, + * the duration of the subsequent interval for that MSDU queue will be + * reduced. The interval will get reset to the baseline interval when + * the MSDU queue's latency is again under the CoDel target latency. + * This value must be <= WMI_CODEL_INTERVAL_MAX_MS (or must equal + * WMI_SAWF_SVC_CLASS_PARAM_DEFAULT_CODEL_INTERVAL_MS). + */ + A_UINT32 codel_interval_ms; } wmi_sawf_svc_class_cfg_cmd_fixed_param; typedef struct { diff --git a/fw/wmi_version.h b/fw/wmi_version.h index fe9a80d2a9b4..483874c41310 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_ 1268 +#define __WMI_REVISION_ 1269 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From d02a10837b20474b912e112ffe7a53523853b8ee Mon Sep 17 00:00:00 2001 From: spuligil Date: Mon, 30 Jan 2023 06:06:47 -0800 Subject: [PATCH 14/15] fw-api: CL 21322154 - update fw common interface files add WMITLV_TAG_STRUC_wmi_peer_list def Change-Id: I0377a905fa90291e3c64468c276e55cb65586b35 CRs-Fixed: 2262693 --- fw/wmi_tlv_defs.h | 1 + fw/wmi_version.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 0d9b2e31ded8..e7b0b5fe53cc 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1341,6 +1341,7 @@ typedef enum { WMITLV_TAG_STRUC_wmi_peer_bulk_set_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_peer_preferred_link_map, WMITLV_TAG_STRUC_wmi_scan_blanking_params_info, + WMITLV_TAG_STRUC_wmi_peer_list, } WMITLV_TAG_ID; /* diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 483874c41310..1158e62f7d81 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_ 1269 +#define __WMI_REVISION_ 1270 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 9ea024200a1adf785fb833a4272833bec61a7a3e Mon Sep 17 00:00:00 2001 From: spuligil Date: Mon, 30 Jan 2023 06:07:33 -0800 Subject: [PATCH 15/15] fw-api: CL 21330000 - update fw common interface files HTT: add T2H CODEL_MSDUQ_LATENCIES_ARRAY_CFG_IND msg def Define a new HTT T2H message to specify the location and size of an array shared between host and target to allow the host to periodicially provide MSDU queue latency stats to the target (for use by the CoDel latency-management algorithm). Change-Id: I8c5bff2234f5b0371eb04469410ea9fe37a3d106 CRs-Fixed: 2262693 --- fw/htt.h | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/fw/htt.h b/fw/htt.h index 2ad3ca3680be..b27e7bbcf194 100644 --- a/fw/htt.h +++ b/fw/htt.h @@ -242,9 +242,10 @@ * 3.115 Add HTT_H2T_MSG_TYPE_RX_CCE_SUPER_RULE_SETUP and * HTT_T2H_MSG_TYPE_RX_CCE_SUPER_RULE_SETUP_DONE msg defs. * 3.116 Add HTT_TX_MONITOR_CFG_WORD_MASK_COMPACTION_ENABLE flag. + * 3.117 Add HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_IND def. */ #define HTT_CURRENT_VERSION_MAJOR 3 -#define HTT_CURRENT_VERSION_MINOR 116 +#define HTT_CURRENT_VERSION_MINOR 117 #define HTT_NUM_TX_FRAG_DESC 1024 @@ -10552,6 +10553,7 @@ enum htt_t2h_msg_type { HTT_T2H_MSG_TYPE_RX_ADDBA_EXTN = 0x31, HTT_T2H_MSG_TYPE_RX_DELBA_EXTN = 0x32, HTT_T2H_MSG_TYPE_RX_CCE_SUPER_RULE_SETUP_DONE = 0x33, + HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_IND = 0x34, HTT_T2H_MSG_TYPE_TEST, @@ -19914,5 +19916,81 @@ PREPACK struct htt_rx_cce_super_rule_setup_done_t { ((_var) |= ((_val) << HTT_RX_CCE_SUPER_RULE_SETUP_DONE_CFG_RESULT_1_S)); \ } while (0) +/** + * @brief target -> host CoDel MSDU queue latencies array configuration + * + * MSG_TYPE => HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_IND + * + * @details + * The HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_IND message is used + * by the target to inform the host of the location and size of the DDR array of + * per MSDU queue latency metrics. This array is updated by the host and + * read by the target. The target uses these metric values to determine + * which MSDU queues have latencies exceeding their CoDel latency target. + * + * |31 16|15 8|7 0| + * |-------------------------------------------+----------| + * | number of array elements | reserved | MSG_TYPE | + * |-------------------------------------------+----------| + * | array physical address, low bits | + * |------------------------------------------------------| + * | array physical address, high bits | + * |------------------------------------------------------| + * Header fields: + * - MSG_TYPE + * Bits 7:0 + * Purpose: Identifies this as a CoDel MSDU queue latencies + * array configuration message. + * Value: (HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_IND) + * - NUM_ELEM + * Bits 31:16 + * Purpose: Inform the host of the length of the MSDU queue latencies array. + * Value: Specifies the number of elements in the MSDU queue latency + * metrics array. This value is the same as the maximum number of + * MSDU queues supported by the target. + * Since each array element is 16 bits, the size in bytes of the + * MSDU queue latency metrics array is twice the number of elements. + * - PADDR_LOW + * Bits 31:0 + * Purpose: Inform the host of the MSDU queue latencies array's location. + * Value: Lower 32 bits of the physical address of the MSDU queue latency + * metrics array. + * - PADDR_HIGH + * Bits 31:0 + * Purpose: Inform the host of the MSDU queue latencies array's location. + * Value: Upper 32 bits of the physical address of the MSDU queue latency + * metrics array. + */ +typedef struct { + A_UINT32 msg_type: 8, /* bits 7:0 */ + reserved: 8, /* bits 15:8 */ + num_elem: 16; /* bits 31:16 */ + A_UINT32 paddr_low; + A_UINT32 paddr_high; +} htt_t2h_codel_msduq_latencies_array_cfg_int_t; + +#define HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_SIZE 12 /* bytes */ + +#define HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_INT_NUM_ELEM_M 0xffff0000 +#define HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_INT_NUM_ELEM_S 16 + +#define HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_INT_NUM_ELEM_GET(_var) \ + (((_var) & HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_INT_NUM_ELEM_M) >> \ + HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_INT_NUM_ELEM_S) +#define HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_INT_NUM_ELEM_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL( \ + HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_INT_NUM_ELEM, _val); \ + ((_var) |= ((_val) << \ + HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_INT_NUM_ELEM_S)); \ + } while (0) + +/* + * This CoDel MSDU queue latencies array whose location and number of + * elements are specified by this HTT_T2H message consists of 16-bit elements + * that each specify a statistical summary (min) of a MSDU queue's latency, + * using microseconds units. + */ +#define HTT_CODEL_MSDUQ_LATENCIES_ARRAY_ELEM_BYTES 2 #endif