From 1cb26e37e60059d4503d6fdc9ebdd5a2aacfc61c Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 19 May 2023 06:01:17 -0700 Subject: [PATCH 01/25] fw-api: CL 23101916 - update fw common interface files Change-Id: Ie6e4604d27ac36a92a07e091a6bff3dfa07d9ee4 WMI: add 11AZ security and ranging vdev params CRs-Fixed: 2262693 --- fw/wmi_unified.h | 42 +++++++++++++++++++++++++++++++++++++++++- fw/wmi_version.h | 2 +- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 43a7f1160145..88945a2131f7 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -17915,7 +17915,9 @@ typedef enum { * bit 0: URNM_MFPR in RSNXE * bit 1: MFPC in RSN CAP * bit 2: MFPR in RSN CAP - * bit 31:3 Reserved + * bit 3: URNM_MFPR_X20 in RSNXE + * bit 4: RSTA_EXTCAP_I2R_LMR_FB + * bit 31:5 Reserved */ WMI_VDEV_PARAM_11AZ_SECURITY_CONFIG, /* 0xAB */ @@ -17981,6 +17983,24 @@ typedef enum { */ WMI_VDEV_PARAM_CHWIDTH_WITH_NOTIFY, /* 0xBA */ + /* + * Min time between measurment for 11AZ NTB ranging + * in units of 100 microseconds + */ + WMI_VDEV_PARAM_RTT_11AZ_NTB_MIN_TIME_BW_MEAS, /* 0xBB */ + + /* + * Max time between measurment for 11AZ NTB ranging + * in units of 10 milliseconds + */ + WMI_VDEV_PARAM_RTT_11AZ_NTB_MAX_TIME_BW_MEAS, /* 0xBC */ + + /* + * Max session expiry for 11AZ TB ranging. + * Session expiry value is computed as 2^(Max Session Exp + 8) ms. + */ + WMI_VDEV_PARAM_RTT_11AZ_TB_MAX_SESSION_EXPIRY, /* 0xBD */ + /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE === * The below vdev param types are used for prototyping, and are @@ -36697,6 +36717,11 @@ typedef struct { bits 15:1 - reserved bits 31:16 - maximum PSD EIRP (dB/MHz) */ +/* + * NOTE: no further fields can be added into this struct, due to + * message buffer size limitations in certain targets for the + * WMI_REG_CHAN_LIST_CC_EXT_EVENT message. + */ } wmi_regulatory_rule_ext_struct; #define WMI_REG_CHAN_PRIORITY_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16) @@ -36711,6 +36736,11 @@ typedef struct { * the frequencies below this value will be de-prioritized. * bits 31:16 = reserved for future */ +/* + * NOTE: no further fields can be added into this struct, due to + * message buffer size limitations in certain targets for the + * WMI_REG_CHAN_LIST_CC_EXT_EVENT message. + */ } wmi_regulatory_chan_priority_struct; #define WMI_REG_FCC_RULE_CHAN_FREQ_GET(freq_info) WMI_GET_BITS(freq_info, 0, 16) @@ -36726,6 +36756,11 @@ typedef struct { * bits 23:16 = u8 FCC_Tx_power (dBm units) * bits 31:24 = u8 reserved for future */ +/* + * NOTE: no further fields can be added into this struct, due to + * message buffer size limitations in certain targets for the + * WMI_REG_CHAN_LIST_CC_EXT_EVENT message. + */ } wmi_regulatory_fcc_rule_struct; typedef enum { @@ -36832,6 +36867,11 @@ typedef struct { A_UINT32 num_6g_reg_rules_client_sp[WMI_REG_CLIENT_MAX]; A_UINT32 num_6g_reg_rules_client_lpi[WMI_REG_CLIENT_MAX]; A_UINT32 num_6g_reg_rules_client_vlp[WMI_REG_CLIENT_MAX]; +/* + * NOTE: no further fields can be added into this struct, due to + * message buffer size limitations in certain targets for the + * WMI_REG_CHAN_LIST_CC_EXT_EVENT message. + */ /* * This fixed_param TLV is followed by the following TLVs: * - wmi_regulatory_rule_ext reg_rule_array[] struct TLV array. diff --git a/fw/wmi_version.h b/fw/wmi_version.h index acaf43729fa4..62a530698af1 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_ 1336 +#define __WMI_REVISION_ 1337 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 9e574ad8d5d84816b663ee232c8f92f32cd5af78 Mon Sep 17 00:00:00 2001 From: spuligil Date: Mon, 22 May 2023 06:01:16 -0700 Subject: [PATCH 02/25] fw-api: CL 23138893 - update fw common interface files Change-Id: I397217853b318e7aa19f2d7fb5615dea729b022b WMI: add ROAM_SYNCH_KEY_EVENT msg def, MLO fields CRs-Fixed: 2262693 --- fw/wmi_tlv_defs.h | 6 ++++++ fw/wmi_unified.h | 9 +++++++++ fw/wmi_version.h | 2 +- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 409ac89f6d84..a9197f9d1776 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -2221,6 +2221,7 @@ typedef enum { OP(WMI_VENDOR_VDEV_EVENTID) \ OP(WMI_VENDOR_PEER_EVENTID) \ OP(WMI_PDEV_SET_RF_PATH_RESP_EVENTID) \ + OP(WMI_ROAM_SYNCH_KEY_EVENTID) \ /* add new EVT_LIST elements above this line */ @@ -5758,6 +5759,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_pdev_band_to_mac, mac_freq_mapping, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_SYNCH_EVENTID); +/* Roam Synch key Event */ +#define WMITLV_TABLE_WMI_ROAM_SYNCH_KEY_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_ml_key_material_param, ml_key_material, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_SYNCH_KEY_EVENTID); + /* Roam Synch frame Event */ #define WMITLV_TABLE_WMI_ROAM_SYNCH_FRAME_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_synch_frame_event_fixed_param, wmi_roam_synch_frame_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 88945a2131f7..718a38b1e94c 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -1982,6 +1982,8 @@ typedef enum { WMI_ROAM_FRAME_EVENTID, /** Send firmware ini value corresponding to param_id */ WMI_ROAM_GET_VENDOR_CONTROL_PARAM_EVENTID, + /** roam synch key event */ + WMI_ROAM_SYNCH_KEY_EVENTID, /** P2P disc found */ WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P), @@ -6225,6 +6227,7 @@ typedef struct { */ A_UINT32 flags; wmi_mac_addr link_addr; /* link address */ + wmi_mac_addr self_link_addr; /* self-link address */ } wmi_roam_ml_setup_links_param; /* @@ -24515,6 +24518,11 @@ typedef struct { A_UINT32 key_cipher; A_UINT8 pn[WMI_MAX_PN_LEN]; A_UINT8 key_buff[WMI_MAX_KEY_LEN]; + /* + * When link_id is 0xf, this field will be MLD address. + * Otherwise, it will be bssid which specified with link_id. + */ + wmi_mac_addr mac_addr; } wmi_roam_ml_key_material_param; typedef struct { @@ -39663,6 +39671,7 @@ typedef struct { * Bit 2: 6G band support if 1 */ A_UINT32 support_link_band; /* Configure the band bitmap of mlo connection supports. */ + A_UINT32 max_active_links; /* Max active links supported for STA */ } wmi_roam_mlo_config_cmd_fixed_param; typedef struct { diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 62a530698af1..5241685a4f7b 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_ 1337 +#define __WMI_REVISION_ 1338 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 44e65aa7a3f93e027a5e4bcfe02c837f88c5f631 Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 24 May 2023 06:01:14 -0700 Subject: [PATCH 03/25] fw-api: CL 23178089 - update fw common interface files Change-Id: Id43b31d057cf3984611606a261d20e8ef96427d2 WMI: add rx_vht_gi field in vdev_smart_monitor_event msg 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 718a38b1e94c..2d62bfdf71bf 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -44427,6 +44427,13 @@ typedef struct { A_UINT32 vdev_id; /** Average RSSI value of Data Frames */ A_INT32 avg_rssi_data_dbm; + /** rx_vht_sgi: + * Short guard interval state of Data frames obtaining from rx PPDU TLV + * of VHTSIGA buf. + * 0: Default (No sgi set) + * 1: sgi set + */ + A_UINT32 rx_vht_sgi; } wmi_vdev_smart_monitor_event_fixed_param; typedef struct { diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 5241685a4f7b..e43371a54581 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_ 1338 +#define __WMI_REVISION_ 1339 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From a80a6124ad9caebc0188530ce0cfb62b9af21484 Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 24 May 2023 12:01:12 -0700 Subject: [PATCH 04/25] fw-api: CL 23190594 - update fw common interface files Change-Id: I7528eaff5d06fa1775a5eb530dfaded19126fd53 WMI: add var-len data to WMI_VENDOR_* msgs, mv wmi_mac_addr def to wlan_defs.h CRs-Fixed: 2262693 --- fw/wlan_defs.h | 7 +++++++ fw/wmi_tlv_defs.h | 18 +++++++++++------ fw/wmi_unified.h | 50 +++++++++++++++++++++++++++++++++++++++-------- fw/wmi_version.h | 2 +- 4 files changed, 62 insertions(+), 15 deletions(-) diff --git a/fw/wlan_defs.h b/fw/wlan_defs.h index 0686917aced3..5024efe702ff 100755 --- a/fw/wlan_defs.h +++ b/fw/wlan_defs.h @@ -1849,5 +1849,12 @@ typedef struct { A_COMPILE_TIME_ASSERT(check_mlo_glb_h_shmem_8byte_size_quantum, (((sizeof(mlo_glb_h_shmem) % sizeof(A_UINT64) == 0x0)))); +/** 2 word representation of MAC addr */ +typedef struct _wmi_mac_addr { + /** upper 4 bytes of MAC address */ + A_UINT32 mac_addr31to0; + /** lower 2 bytes of MAC address */ + A_UINT32 mac_addr47to32; +} wmi_mac_addr; #endif /* __WLANDEFS_H__ */ diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index a9197f9d1776..747eeed5ffa5 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -5395,13 +5395,16 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_PAUSE_CMDID); /* pdev,vdev,peer cmd messages for tunneling vendor-specific contents */ #define WMITLV_TABLE_WMI_VENDOR_PDEV_CMDID(id,op,buf,len) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_vendor_cmd_fixed_param, wmi_pdev_vendor_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_vendor_cmd_fixed_param, wmi_pdev_vendor_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, opaque_vendor_var_len_data, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_VENDOR_PDEV_CMDID); #define WMITLV_TABLE_WMI_VENDOR_VDEV_CMDID(id,op,buf,len) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_vendor_cmd_fixed_param, wmi_vdev_vendor_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_vendor_cmd_fixed_param, wmi_vdev_vendor_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, opaque_vendor_var_len_data, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_VENDOR_VDEV_CMDID); #define WMITLV_TABLE_WMI_VENDOR_PEER_CMDID(id,op,buf,len) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_vendor_cmd_fixed_param, wmi_peer_vendor_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_vendor_cmd_fixed_param, wmi_peer_vendor_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, opaque_vendor_var_len_data, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_VENDOR_PEER_CMDID); /* SET MLO link BSS param */ @@ -7357,13 +7360,16 @@ WMITLV_CREATE_PARAM_STRUC(WMI_MLO_LINK_DISABLE_REQUEST_EVENTID); /* pdev,vdev,peer event messages for tunneling vendor-specific contents */ #define WMITLV_TABLE_WMI_VENDOR_PDEV_EVENTID(id,op,buf,len) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_vendor_event_fixed_param, wmi_pdev_vendor_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_vendor_event_fixed_param, wmi_pdev_vendor_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, opaque_vendor_var_len_data, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_VENDOR_PDEV_EVENTID); #define WMITLV_TABLE_WMI_VENDOR_VDEV_EVENTID(id,op,buf,len) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_vendor_event_fixed_param, wmi_vdev_vendor_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_vendor_event_fixed_param, wmi_vdev_vendor_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, opaque_vendor_var_len_data, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_VENDOR_VDEV_EVENTID); #define WMITLV_TABLE_WMI_VENDOR_PEER_EVENTID(id,op,buf,len) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_vendor_event_fixed_param, wmi_peer_vendor_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_vendor_event_fixed_param, wmi_peer_vendor_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, opaque_vendor_var_len_data, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_VENDOR_PEER_EVENTID); /* link switch event */ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 2d62bfdf71bf..95f1b457cda2 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -198,14 +198,6 @@ static INLINE void wmi_packed_arr_set_bits(A_UINT32 *arr, A_UINT32 entry_index, ((val & (((A_UINT32) 1 << bits_per_entry) - 1)) << start_bit_in_uint); } -/** 2 word representation of MAC addr */ -typedef struct _wmi_mac_addr { - /** upper 4 bytes of MAC address */ - A_UINT32 mac_addr31to0; - /** lower 2 bytes of MAC address */ - A_UINT32 mac_addr47to32; -} wmi_mac_addr; - /** macro to convert MAC address from WMI word format to char array */ #define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr,c_macaddr) do { \ (c_macaddr)[0] = (((pwmi_mac_addr)->mac_addr31to0) >> 0) & 0xff; \ @@ -43552,6 +43544,13 @@ typedef struct wmi_pdev_vendor_event * because their offsets within wmi_pdev_vendor_event_fixed_param * would change, causing backwards incompatibilities. */ +/* + * This fixed_param TLV may be followed by the below TLVs: + * - A_UINT32 opaque_vendor_var_len_data[]: + * Variable-length array of opaque data. + * The _fixed_param.sub_type value clarifies how to interpret the + * contents of this opaque data. + */ } wmi_pdev_vendor_event_fixed_param; typedef wmi_pdev_vendor_event_fixed_param wmi_vendor_pdev_event_fixed_param; @@ -43572,6 +43571,13 @@ typedef struct wmi_vdev_vendor_event * because their offsets within wmi_vdev_vendor_event_fixed_param * would change, causing backwards incompatibilities. */ +/* + * This fixed_param TLV may be followed by the below TLVs: + * - A_UINT32 opaque_vendor_var_len_data[]: + * Variable-length array of opaque data. + * The _fixed_param.sub_type value clarifies how to interpret the + * contents of this opaque data. + */ } wmi_vdev_vendor_event_fixed_param; typedef wmi_vdev_vendor_event_fixed_param wmi_vendor_vdev_event_fixed_param; @@ -43594,6 +43600,13 @@ typedef struct wmi_peer_vendor_event * because their offsets within wmi_peer_vendor_event_fixed_param * would change, causing backwards incompatibilities. */ +/* + * This fixed_param TLV may be followed by the below TLVs: + * - A_UINT32 opaque_vendor_var_len_data[]: + * Variable-length array of opaque data. + * The _fixed_param.sub_type value clarifies how to interpret the + * contents of this opaque data. + */ } wmi_peer_vendor_event_fixed_param; typedef wmi_peer_vendor_event_fixed_param wmi_vendor_peer_event_fixed_param; @@ -43612,6 +43625,13 @@ typedef struct wmi_pdev_vendor_cmd * because their offsets within wmi_pdev_vendor_cmd_fixed_param * would change, causing backwards incompatibilities. */ +/* + * This fixed_param TLV may be followed by the below TLVs: + * - A_UINT32 opaque_vendor_var_len_data[]: + * Variable-length array of opaque data. + * The _fixed_param.sub_type value clarifies how to interpret the + * contents of this opaque data. + */ } wmi_pdev_vendor_cmd_fixed_param; typedef wmi_pdev_vendor_cmd_fixed_param wmi_vendor_pdev_cmd_fixed_param; @@ -43632,6 +43652,13 @@ typedef struct wmi_vdev_vendor_cmd * because their offsets within wmi_vdev_vendor_cmd_fixed_param * would change, causing backwards incompatibilities. */ +/* + * This fixed_param TLV may be followed by the below TLVs: + * - A_UINT32 opaque_vendor_var_len_data[]: + * Variable-length array of opaque data. + * The _fixed_param.sub_type value clarifies how to interpret the + * contents of this opaque data. + */ } wmi_vdev_vendor_cmd_fixed_param; typedef wmi_vdev_vendor_cmd_fixed_param wmi_vendor_vdev_cmd_fixed_param; @@ -43654,6 +43681,13 @@ typedef struct wmi_peer_vendor_cmd * because their offsets within wmi_peer_vendor_cmd_fixed_param * would change, causing backwards incompatibilities. */ +/* + * This fixed_param TLV may be followed by the below TLVs: + * - A_UINT32 opaque_vendor_var_len_data[]: + * Variable-length array of opaque data. + * The _fixed_param.sub_type value clarifies how to interpret the + * contents of this opaque data. + */ } wmi_peer_vendor_cmd_fixed_param; typedef wmi_peer_vendor_cmd_fixed_param wmi_vendor_peer_cmd_fixed_param; diff --git a/fw/wmi_version.h b/fw/wmi_version.h index e43371a54581..53f5dbd3e348 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_ 1339 +#define __WMI_REVISION_ 1340 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From e85a9581915169bb61cdeb18408807e9623b5864 Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 24 May 2023 12:02:00 -0700 Subject: [PATCH 05/25] fw-api: CL 23191762 - update fw common interface files HTT stats: report FW CoDel drop, no-drop counters Define HTT stats TLVs for reporting how many times the FWs CoDel latency-control logic did / didnt choose to drop the head MSDU from a CoDel-enabled MSDU queue following completion of a CoDel latency stats collection window.These drop + no-drop stats are defined per service class and per MSDU queue, though it is expected that the FW will only support per-queue CoDel stats in debug build. Change-Id: I9cb45834f3429fc7b807bfb031d7bb2cd7f0d5ee CRs-Fixed: 2262693 --- fw/htt.h | 8 +++-- fw/htt_stats.h | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 102 insertions(+), 2 deletions(-) diff --git a/fw/htt.h b/fw/htt.h index 4f3e66fa3b55..bb3c1bb2248a 100644 --- a/fw/htt.h +++ b/fw/htt.h @@ -803,6 +803,8 @@ typedef enum { HTT_STATS_MLO_UMAC_SSR_HANDSHAKE_TAG = 185, /* htt_mlo_umac_htt_handshake_stats_tlv */ HTT_STATS_MLO_UMAC_SSR_MLO_TAG = 186, /* htt_mlo_umac_ssr_mlo_stats_tlv */ HTT_STATS_PDEV_TDMA_TAG = 187, /* htt_pdev_tdma_stats_tlv */ + HTT_STATS_CODEL_SVC_CLASS_TAG = 188, /* htt_codel_svc_class_stats_tlv */ + HTT_STATS_CODEL_MSDUQ_TAG = 189, /* htt_codel_msduq_stats_tlv */ HTT_STATS_MAX_TAG, @@ -10774,7 +10776,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_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_IND = 0x34, /* DEPRECATED */ HTT_T2H_MSG_TYPE_RX_DATA_IND = 0x35, HTT_T2H_MSG_TYPE_SOFT_UMAC_TX_COMPL_IND = 0x36, HTT_T2H_MSG_TYPE_PRIMARY_LINK_PEER_MIGRATE_IND = 0x37, @@ -21075,6 +21077,8 @@ PREPACK struct htt_rx_cce_super_rule_setup_done_t { } while (0) /** + * THE BELOW MESSAGE HAS BEEN DEPRECATED + *====================================== * @brief target -> host CoDel MSDU queue latencies array configuration * * MSG_TYPE => HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_IND @@ -21125,7 +21129,7 @@ typedef struct { num_elem: 16; /* bits 31:16 */ A_UINT32 paddr_low; A_UINT32 paddr_high; -} htt_t2h_codel_msduq_latencies_array_cfg_int_t; +} htt_t2h_codel_msduq_latencies_array_cfg_int_t; /* DEPRECATED */ #define HTT_T2H_CODEL_MSDUQ_LATENCIES_ARRAY_CFG_SIZE 12 /* bytes */ diff --git a/fw/htt_stats.h b/fw/htt_stats.h index 145d380981b2..11e67bc1ff6a 100644 --- a/fw/htt_stats.h +++ b/fw/htt_stats.h @@ -546,6 +546,15 @@ enum htt_dbg_ext_stats_type { */ HTT_DBG_PDEV_TDMA_STATS = 57, + /** HTT_DBG_CODEL_STATS + * PARAMS: + * - No Params + * RESP MSG: + * - htt_codel_svc_class_stats_tlv + * - htt_codel_msduq_stats_tlv + */ + HTT_DBG_CODEL_STATS = 58, + /* keep this last */ HTT_DBG_NUM_EXT_STATS = 256, @@ -9550,5 +9559,92 @@ typedef struct { htt_umac_ssr_stats_t stats; } htt_umac_ssr_stats_tlv; +typedef struct { + htt_tlv_hdr_t tlv_hdr; + A_UINT32 svc_class_id; + /* codel_drops: + * How many times have MSDU queues belonging to this service class + * dropped their head MSDU due to the queue's latency being above + * the CoDel latency limit specified for the service class throughout + * the full CoDel latency statistics collection window. + */ + A_UINT32 codel_drops; + /* codel_no_drops: + * How many times have MSDU queues belonging to this service class + * completed a CoDel latency statistics collection window and + * concluded that no head MSDU drop is needed, due to the MSDU queue's + * latency being under the limit specified for the service class at + * some point during the window. + */ + A_UINT32 codel_no_drops; +} htt_codel_svc_class_stats_tlv; + +#define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_M 0x0000FFFF +#define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_S 0 + +#define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_GET(_var) \ + (((_var) & HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_M) >> \ + HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_S) +#define HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM, _val); \ + ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_TX_FLOW_NUM_S)); \ + } while (0) + +#define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_M 0x00FF0000 +#define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_S 16 + +#define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_GET(_var) \ + (((_var) & HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_M) >> \ + HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_S) +#define HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID, _val); \ + ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_SVC_CLASS_ID_S)); \ + } while (0) + +#define HTT_CODEL_MSDUQ_STATS_DROPS_M 0x0000FFFF +#define HTT_CODEL_MSDUQ_STATS_DROPS_S 0 + +#define HTT_CODEL_MSDUQ_STATS_DROPS_GET(_var) \ + (((_var) & HTT_CODEL_MSDUQ_STATS_DROPS_M) >> \ + HTT_CODEL_MSDUQ_STATS_DROPS_S) +#define HTT_CODEL_MSDUQ_STATS_DROPS_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_DROPS, _val); \ + ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_DROPS_S)); \ + } while (0) + +#define HTT_CODEL_MSDUQ_STATS_NO_DROPS_M 0xFFFF0000 +#define HTT_CODEL_MSDUQ_STATS_NO_DROPS_S 16 + +#define HTT_CODEL_MSDUQ_STATS_NO_DROPS_GET(_var) \ + (((_var) & HTT_CODEL_MSDUQ_STATS_NO_DROPS_M) >> \ + HTT_CODEL_MSDUQ_STATS_NO_DROPS_S) +#define HTT_CODEL_MSDUQ_STATS_NO_DROPS_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_CODEL_MSDUQ_STATS_NO_DROPS, _val); \ + ((_var) |= ((_val) << HTT_CODEL_MSDUQ_STATS_NO_DROPS_S)); \ + } while (0) + +typedef struct { + htt_tlv_hdr_t tlv_hdr; + union { + A_UINT32 id__word; + struct { + A_UINT32 tx_flow_num: 16, /* FW's MSDU queue ID */ + svc_class_id: 8, + reserved: 8; + }; + }; + union { + A_UINT32 stats__word; + struct { + A_UINT32 + codel_drops: 16, + codel_no_drops: 16; + }; + }; +} htt_codel_msduq_stats_tlv; #endif /* __HTT_STATS_H__ */ From 3d56b70a6ec0314072a25cf47656b5f3a4a34071 Mon Sep 17 00:00:00 2001 From: spuligil Date: Sun, 28 May 2023 06:01:14 -0700 Subject: [PATCH 06/25] fw-api: CL 23242420 - update fw common interface files Change-Id: Id1a5d0502da90ac1133d47024c590e9ac41534ab WMI: add max_ml_peer_ids field in mlo_setup_complete event msg 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 95f1b457cda2..3be042208cf4 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -43841,6 +43841,13 @@ typedef struct { A_UINT32 pdev_id; /** Return status. 0 for success, non-zero otherwise */ A_UINT32 status; + /** max_ml_peer_ids: + * Max number of ml_peerids across the SOC, Derived as + * max_mlo_peer * num chips. + * (Max_mlo_peer and num_chips are provided by Host Platform + * in QMI exchange). + */ + A_UINT32 max_ml_peer_ids; } wmi_mlo_setup_complete_event_fixed_param; typedef struct { diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 53f5dbd3e348..1c4b09e98858 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_ 1340 +#define __WMI_REVISION_ 1341 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 7d19bafc312556cda5107794107afccc1d9bbe01 Mon Sep 17 00:00:00 2001 From: spuligil Date: Thu, 1 Jun 2023 06:01:17 -0700 Subject: [PATCH 07/25] fw-api: CL 23307781 - update fw common interface files Change-Id: I24e0026587f5b73bba79d25b254c58c08ad1d623 WMI: add key_ken,_flags fields in roam_ml_key_material_param struct CRs-Fixed: 2262693 --- fw/wmi_unified.h | 2 ++ fw/wmi_version.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 3be042208cf4..cf943d6c97e8 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -24515,6 +24515,8 @@ typedef struct { * Otherwise, it will be bssid which specified with link_id. */ wmi_mac_addr mac_addr; + A_UINT32 key_len; /* number of valid bytes within key_buff */ + A_UINT32 key_flags; } wmi_roam_ml_key_material_param; typedef struct { diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 1c4b09e98858..13e5a448dc1a 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_ 1341 +#define __WMI_REVISION_ 1342 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From f33e86393b14b25d2099bc4aee63bd15ec067cd5 Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 2 Jun 2023 04:06:52 -0700 Subject: [PATCH 08/25] fw-api: CL 23329795 - update fw common interface files Change-Id: I3fe050cdf7234665e52dac04b1678fded469af47 WMI: add MULTIPASS_SAP_SUPPORT flag in target capabilities CRs-Fixed: 2262693 --- fw/wmi_unified.h | 8 +++++++- fw/wmi_version.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index cf943d6c97e8..a1b39b272295 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -3338,6 +3338,11 @@ typedef struct { #define WMI_TARGET_CAP_CONCURRENCE_SUPPORT_SET(target_cap_flags, value) \ WMI_SET_BITS(target_cap_flags, 11, 2, value) +#define WMI_TARGET_CAP_MULTIPASS_SAP_SUPPORT_GET(target_cap_flags) \ + WMI_GET_BITS(target_cap_flags, 13, 1) +#define WMI_TARGET_CAP_MULTIPASS_SAP_SUPPORT_SET(target_cap_flags, value) \ + WMI_SET_BITS(target_cap_flags, 13, 1, value) + /* * wmi_htt_msdu_idx_to_htt_msdu_qtype GET/SET APIs */ @@ -3480,7 +3485,8 @@ typedef struct { * Bits 12:11 concurrence support capability * Bit11 - [ML-STA + SL-STA] 0: not supported; 1:supported * Bit12 - [ML-STA + SL-SAP] 0: not supported; 1:supported - * Bits 31:13 - Reserved + * Bit 13 - Support for multipass SAP + * Bits 31:14 - Reserved */ A_UINT32 target_cap_flags; diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 13e5a448dc1a..58f77b5adf5f 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_ 1342 +#define __WMI_REVISION_ 1343 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 47ed1a51a8703a5d253df0d4dc16cdccdf9ff366 Mon Sep 17 00:00:00 2001 From: spuligil Date: Thu, 8 Jun 2023 18:01:22 -0700 Subject: [PATCH 09/25] fw-api: CL 23420522 - update fw common interface files Change-Id: Ia169714da68b10bc7e812832e2829afc8cb0b463 WMI: add STA_DUMP_SUPPORT flag and more VENDOR_REQ enum vals 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 a1b39b272295..83fbf321303b 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -5075,12 +5075,14 @@ typedef enum { WMI_VENDOR1_REQ1_VERSION_3_20 = 2, WMI_VENDOR1_REQ1_VERSION_3_30 = 3, WMI_VENDOR1_REQ1_VERSION_3_40 = 4, + WMI_VENDOR1_REQ1_VERSION_4_00 = 5, } WMI_VENDOR1_REQ1_VERSION; typedef enum { WMI_VENDOR1_REQ2_VERSION_3_00 = 0, WMI_VENDOR1_REQ2_VERSION_3_01 = 1, WMI_VENDOR1_REQ2_VERSION_3_20 = 2, + WMI_VENDOR1_REQ2_VERSION_3_50 = 3, } WMI_VENDOR1_REQ2_VERSION; typedef enum { @@ -5358,6 +5360,11 @@ typedef enum { #define WMI_SET_HOST_BAND_CAP(feature_bitmap, val) \ WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 106, 6, val) +#define WMI_GET_STA_DUMP_SUPPORT(var, feature_bitmap) \ + WMI_GET_BITS_ARRAY_LEN32_BYTES(var, feature_bitmap, 112, 1) +#define WMI_SET_STA_DUMP_SUPPORT(feature_bitmap, val) \ + WMI_SET_BITS_ARRAY_LEN32_BYTES(feature_bitmap, 112, 1, val) + /* * Specify how many A_UINT32 words are needed to hold the feature bitmap flags. * This value may change over time. diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 58f77b5adf5f..afeb559e6d35 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_ 1343 +#define __WMI_REVISION_ 1344 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 2908765223d603368bf1d44dfbd05b8e1e212a6d Mon Sep 17 00:00:00 2001 From: spuligil Date: Sun, 11 Jun 2023 06:01:18 -0700 Subject: [PATCH 10/25] fw-api: CL 23441442 - update fw common interface files Change-Id: I8fe2c7b5f4c73bf498ec6d274c688e6cafbce071 WMI: add PDEV_PARAM_CTS_TIMEOUT and PDEV_PARAM_SLOT_TIME defs CRs-Fixed: 2262693 --- fw/wmi_unified.h | 10 ++++++++++ fw/wmi_version.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 83fbf321303b..2d21c47ae3be 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -9192,6 +9192,16 @@ typedef enum { * 1 - Force PCIE Gen Speed and Lane Width to maximum supported value. */ WMI_PDEV_PARAM_PCIE_CONFIG, + + /** CTS timeout - change wireless packet cts timeout configuration, + * units are microseconds + */ + WMI_PDEV_PARAM_CTS_TIMEOUT, + + /** Slot time - change wireless packet slot time value dynamically, + * units are microseconds + */ + WMI_PDEV_PARAM_SLOT_TIME, } 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 afeb559e6d35..ff4cccb04e20 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_ 1344 +#define __WMI_REVISION_ 1345 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 7a83aad64cd477aaf00250dba2be52ab84ca773b Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 13 Jun 2023 06:01:04 -0700 Subject: [PATCH 11/25] fw-api: CL 23459166 - update fw common interface files Change-Id: If56a660d140025e3a01d1954ac583ad2be1cb7d4 WMI: add MLO_PRIMARY_LINK_PEER_MIGRATION_CMD,_EVENT msg defs CRs-Fixed: 2262693 --- fw/wmi_tlv_defs.h | 18 +++++++++++ fw/wmi_unified.h | 80 +++++++++++++++++++++++++++++++++++++++++++++++ fw/wmi_version.h | 2 +- 3 files changed, 99 insertions(+), 1 deletion(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 747eeed5ffa5..b84d452cb7a1 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1381,6 +1381,10 @@ typedef enum { WMITLV_TAG_STRUC_wmi_mlo_set_link_bss_params_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_mlo_link_switch_req_evt_fixed_param, WMITLV_TAG_STRUC_wmi_mlo_link_switch_cnf_fixed_param, + WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_fixed_param, + WMITLV_TAG_STRUC_wmi_mlo_new_primary_link_peer_info, + WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_compl_fixed_param, + WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_status, } WMITLV_TAG_ID; /* * IMPORTANT: Please add _ALL_ WMI Commands Here. @@ -1910,6 +1914,7 @@ typedef enum { OP(WMI_VENDOR_PDEV_CMDID) \ OP(WMI_VENDOR_VDEV_CMDID) \ OP(WMI_VENDOR_PEER_CMDID) \ + OP(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID) \ /* add new CMD_LIST elements above this line */ @@ -2222,6 +2227,7 @@ typedef enum { OP(WMI_VENDOR_PEER_EVENTID) \ OP(WMI_PDEV_SET_RF_PATH_RESP_EVENTID) \ OP(WMI_ROAM_SYNCH_KEY_EVENTID) \ + OP(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_EVENTID) \ /* add new EVT_LIST elements above this line */ @@ -7377,6 +7383,18 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VENDOR_PEER_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_mlo_link_switch_req_evt_fixed_param, wmi_mlo_link_switch_req_evt_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_MLO_LINK_SWITCH_REQUEST_EVENTID); +/* MLO Primary Link Peer Migration command */ +#define WMITLV_TABLE_WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_fixed_param, wmi_mlo_primary_link_peer_migration_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_mlo_new_primary_link_peer_info, new_primary_link_peer_info, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID); + +/* MLO Primary Link Peer Migration Event */ +#define WMITLV_TABLE_WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_compl_fixed_param, wmi_mlo_primary_link_peer_migration_compl_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_mlo_primary_link_peer_migration_status, primary_link_peer_migration_status, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_EVENTID); + #ifdef __cplusplus } diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 2d21c47ae3be..a65784228cc1 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -1559,6 +1559,8 @@ typedef enum { WMI_MLO_LINK_SET_BSS_PARAMS_CMDID, /** WMI cmd to confirm the status of link switch request handling */ WMI_MLO_LINK_SWITCH_CONF_CMDID, + /** WMI cmd to migrate the primary link peer */ + WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID, /** WMI commands specific to Service Aware WiFi (SAWF) */ /** configure or reconfigure the parameters for a service class */ @@ -2398,6 +2400,8 @@ typedef enum { WMI_MLO_LINK_DISABLE_REQUEST_EVENTID, /** request host to switch to new link for specified vdev */ WMI_MLO_LINK_SWITCH_REQUEST_EVENTID, + /** Response event for WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID */ + WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_EVENTID, /* WMI event specific to Quiet handling */ WMI_QUIET_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_QUIET_OFL), @@ -36472,6 +36476,7 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command) WMI_RETURN_STRING(WMI_PDEV_SET_RF_PATH_CMDID); /* set RF path of PHY */ WMI_RETURN_STRING(WMI_VDEV_PAUSE_CMDID); WMI_RETURN_STRING(WMI_GPIO_STATE_REQ_CMDID); + WMI_RETURN_STRING(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID); } return (A_UINT8 *) "Invalid WMI cmd"; @@ -45713,6 +45718,81 @@ typedef struct { A_UINT32 reason; /*see definition of WMI_LINK_SWITCH_CNF_REASON*/ } wmi_mlo_link_switch_cnf_fixed_param; +#define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_ML_PEER_ID_GET(new_link_info) WMI_GET_BITS(new_link_info, 0, 16) +#define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_ML_PEER_ID_SET(new_link_info, value) WMI_SET_BITS(new_link_info, 0, 16, value) + +#define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_HW_LINK_ID_GET(new_link_info) WMI_GET_BITS(new_link_info, 16, 16) +#define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_HW_LINK_ID_SET(new_link_info, value) WMI_SET_BITS(new_link_info, 16, 16, value) + +typedef struct { + /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_new_primary_link_peer_info */ + A_UINT32 tlv_header; + + union { + A_UINT32 new_link_info; + struct { + A_UINT32 ml_peer_id :16, + hw_link_id :16; + }; + }; +} wmi_mlo_new_primary_link_peer_info; + +typedef struct { + /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_fixed_param */ + A_UINT32 tlv_header; + + A_UINT32 vdev_id; + + /** + * Following this structure is + * the array of "wmi_mlo_new_primary_link_peer_info" TLVs. + */ +} wmi_mlo_primary_link_peer_migration_fixed_param; + +#define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_ML_PEER_ID_GET(status_info) WMI_GET_BITS(status_info, 0, 16) +#define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_ML_PEER_ID_SET(status_info, value) WMI_SET_BITS(status_info, 0, 16, value) + +#define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_STATUS_GET(status_info) WMI_GET_BITS(status_info, 16, 8) +#define WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_STATUS_STATUS_SET(status_info, value) WMI_SET_BITS(status_info, 16, 8, value) + +typedef enum { + WMI_PRIMARY_LINK_PEER_MIGRATION_SUCCESS, + WMI_PRIMARY_LINK_PEER_MIGRATION_IN_PROGRESS, + WMI_PRIMARY_LINK_PEER_MIGRATION_DELETE_IN_PROGRESS, + WMI_PRIMARY_LINK_PEER_MIGRATION_DELETED, + WMI_PRIMARY_LINK_PEER_MIGRATION_TX_PIPES_FAILED, + WMI_PRIMARY_LINK_PEER_MIGRATION_RX_PIPES_FAILED, + + /* Add any new status above this line */ + WMI_PRIMARY_LINK_PEER_MIGRATION_FAIL = 255, +} WMI_PRIMARY_LINK_PEER_MIGRATION_STATUS; + +typedef struct { + /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_status */ + A_UINT32 tlv_header; + + union { + A_UINT32 status_info; + struct { + A_UINT32 ml_peer_id :16, + status :8, /* WMI_PRIMARY_LINK_PEER_MIGRATION_STATUS */ + reserved :8; + }; + }; +} wmi_mlo_primary_link_peer_migration_status; + +typedef struct { + /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_compl_fixed_param */ + A_UINT32 tlv_header; + A_UINT32 vdev_id; + + /** + * Following the fixed param is + * the array of TLVs "wmi_mlo_primary_link_peer_migration_status". + */ +} wmi_mlo_primary_link_peer_migration_compl_fixed_param; + + /* ADD NEW DEFS HERE */ diff --git a/fw/wmi_version.h b/fw/wmi_version.h index ff4cccb04e20..2637a3c0eb5d 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_ 1345 +#define __WMI_REVISION_ 1346 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 9e139737f2b4c106ce2ff7c5daebc8ee8aabe7f0 Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 13 Jun 2023 06:01:58 -0700 Subject: [PATCH 12/25] fw-api: CL 23459857 - update fw common interface files Change-Id: Ia891132dd204c05bc927ca0784e101e9e53cfec7 HTT: add T2H PEER_EXTENDED_EVENT msg def CRs-Fixed: 2262693 --- fw/htt.h | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 129 insertions(+), 1 deletion(-) diff --git a/fw/htt.h b/fw/htt.h index bb3c1bb2248a..e30687171c0d 100644 --- a/fw/htt.h +++ b/fw/htt.h @@ -249,9 +249,10 @@ * 3.121 Add HTT_T2H_MSG_TYPE_PEER_AST_OVERRIDE_INDEX_IND def. * 3.122 Add is_umac_hang flag in H2T UMAC_HANG_RECOVERY_SOC_START_PRE_RESET msg * 3.123 Add HTT_OPTION_TLV_TCL_METADATA_V21 def. + * 3.124 Add HTT_T2H_MSG_TYPE_PEER_EXTENDED_EVENT def. */ #define HTT_CURRENT_VERSION_MAJOR 3 -#define HTT_CURRENT_VERSION_MINOR 123 +#define HTT_CURRENT_VERSION_MINOR 124 #define HTT_NUM_TX_FRAG_DESC 1024 @@ -10781,6 +10782,7 @@ enum htt_t2h_msg_type { HTT_T2H_MSG_TYPE_SOFT_UMAC_TX_COMPL_IND = 0x36, HTT_T2H_MSG_TYPE_PRIMARY_LINK_PEER_MIGRATE_IND = 0x37, HTT_T2H_MSG_TYPE_PEER_AST_OVERRIDE_INDEX_IND = 0x38, + HTT_T2H_MSG_TYPE_PEER_EXTENDED_EVENT = 0x39, HTT_T2H_MSG_TYPE_TEST, @@ -14044,6 +14046,132 @@ typedef enum { #define HTT_RX_MLO_PEER_UNMAP_MLO_PEER_ID_SET HTT_RX_MLO_PEER_MAP_MLO_PEER_ID_SET #define HTT_RX_MLO_PEER_UNMAP_MLO_PEER_ID_GET HTT_RX_MLO_PEER_MAP_MLO_PEER_ID_GET +/** + * @brief target -> host peer extended event for additional information + * + * MSG_TYPE => HTT_T2H_MSG_TYPE_PEER_EXTENDED_EVENT + * + * @details + * The following diagram shows the format of the peer extended message sent + * from the target to the host. This layout assumes the target operates + * as little-endian. + * + * This message always contains a SW peer ID. The main purpose of the + * SW peer ID is to tell the host what peer ID logical link id will be tagged + * with, so that the host can use that peer ID to determine which link + * transmitted the rx/tx frame. + * + * This message also contains MLO logical link id assigned to peer + * with sw_peer_id if it is valid ML link peer. + * + * + * |31 28|27 24|23 20|19|18 16|15 8|7 0| + * |---------------------------------------------------------------------------| + * | VDEV_ID | SW peer ID | msg type | + * |---------------------------------------------------------------------------| + * | MAC addr 3 | MAC addr 2 | MAC addr 1 | MAC addr 0 | + * |---------------------------------------------------------------------------| + * | Reserved |V | LINK ID | MAC addr 5 | MAC addr 4 | + * |---------------------------------------------------------------------------| + * | Reserved | + * |---------------------------------------------------------------------------| + * | Reserved | + * |---------------------------------------------------------------------------| + * + * Where: + * LINK_ID (LOGICAL) - 3 Bits Bit16,17,18 of 3rd byte + * V (valid) - 1 Bit Bit19 of 3rd byte + * + * The following field definitions describe the format of the rx peer extended + * event messages sent from the target to the host. + * MSG_TYPE + * Bits 7:0 + * Purpose: identifies this as an rx MLO peer extended information message + * Value: 0x39 (HTT_T2H_MSG_TYPE_PEER_EXTENDED_EVENT) + * - PEER_ID (a.k.a. SW_PEER_ID) + * Bits 8:23 + * Purpose: The peer ID (index) that WAL has allocated + * Value: (rx) peer ID + * - VDEV_ID + * Bits 24:31 + * Purpose: Gives the vdev id of peer with peer_id as above. + * Value: VDEV ID of wal_peer + * + * - MAC_ADDR_L32 + * Bits 31:0 + * Purpose: Identifies which peer node the peer ID is for. + * Value: lower 4 bytes of peer node's MAC address + * + * - MAC_ADDR_U16 + * Bits 15:0 + * Purpose: Identifies which peer node the peer ID is for. + * Value: upper 2 bytes of peer node's MAC address + * Rest all bits are reserved for future expansion + * - LOGICAL_LINK_ID + * Bits 18:16 + * Purpose: Gives the logical link id of peer with peer_id as above. This + * field should be taken alongwith LOGICAL_LINK_ID_VALID + * Value: Logical link id used by wal_peer + * - LOGICAL_LINK_ID_VALID + * Bit 19 + * Purpose: Clarifies whether the logical link id of peer with peer_id as + * is valid or not + * Value: 0/1 indicating LOGICAL_LINK_ID is valid or not + */ +#define HTT_RX_PEER_EXTENDED_PEER_ID_M 0x00ffff00 +#define HTT_RX_PEER_EXTENDED_PEER_ID_S 8 +#define HTT_RX_PEER_EXTENDED_VDEV_ID_M 0xff000000 +#define HTT_RX_PEER_EXTENDED_VDEV_ID_S 24 + +#define HTT_RX_PEER_EXTENDED_MAC_ADDR_L32_M 0xffffffff +#define HTT_RX_PEER_EXTENDED_MAC_ADDR_L32_S 0 + +#define HTT_RX_PEER_EXTENDED_MAC_ADDR_U16_M 0x0000ffff +#define HTT_RX_PEER_EXTENDED_MAC_ADDR_U16_S 0 +#define HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_M 0x00070000 +#define HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_S 16 +#define HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_VALID_M 0x00080000 +#define HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_VALID_S 19 + + +#define HTT_RX_PEER_EXTENDED_PEER_ID_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_PEER_MAP_PEER_ID, value); \ + (word) |= (value) << HTT_RX_PEER_EXTENDED_PEER_ID_S; \ + } while (0) +#define HTT_RX_PEER_EXTENDED_PEER_ID_GET(word) \ + (((word) & HTT_RX_PEER_EXTENDED_PEER_ID_M) >> HTT_RX_PEER_EXTENDED_PEER_ID_S) + +#define HTT_RX_PEER_EXTENDED_VDEV_ID_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_PEER_EXTENDED_VDEV_ID, value); \ + (word) |= (value) << HTT_RX_PEER_EXTENDED_VDEV_ID_S; \ + } while (0) +#define HTT_RX_PEER_EXTENDED_VDEV_ID_GET(word) \ + (((word) & HTT_RX_PEER_EXTENDED_VDEV_ID_M) >> HTT_RX_PEER_EXTENDED_VDEV_ID_S) + +#define HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID, value); \ + (word) |= (value) << HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_S; \ + } while (0) +#define HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_GET(word) \ + (((word) & HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_M) >> HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_S) + +#define HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_VALID_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_VALID, value); \ + (word) |= (value) << HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_VALID_S; \ + } while (0) +#define HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_VALID_GET(word) \ + (((word) & HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_VALID_M) >> HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_VALID_S) + +#define HTT_RX_PEER_EXTENDED_MAC_ADDR_OFFSET 4 /* bytes */ +#define HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_OFFSET 8 /* bytes */ +#define HTT_RX_PEER_EXTENDED_LOGICAL_LINK_ID_VALID_OFFSET 8 /* bytes */ + +#define HTT_RX_PEER_EXTENDED_EVENT_BYTES 20 /* bytes */ + /** * @brief target -> host message specifying security parameters * From 843d007317258be922a05d0f4354f8063763cb5d Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 13 Jun 2023 12:01:09 -0700 Subject: [PATCH 13/25] fw-api: CL 23467477 - update fw common interface files WMI: add peer_info_v2, group_info_v2 in ATF msgs, add MAX_CLIENT_512 svc flag Also, combine WMI: add dynamic_force_link_num MLO control flag change. Change-Id: I150e8541b07f3d3ef6de072732be1a3db7152491 CRs-Fixed: 2262693 --- fw/wmi_services.h | 1 + fw/wmi_tlv_defs.h | 8 +- fw/wmi_unified.h | 184 +++++++++++++++++++++++++++++++++++++++++++--- fw/wmi_version.h | 2 +- 4 files changed, 180 insertions(+), 15 deletions(-) diff --git a/fw/wmi_services.h b/fw/wmi_services.h index 56482ac65d82..47562761f0b9 100644 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -632,6 +632,7 @@ typedef enum { WMI_SERVICE_MLO_TID_TO_LINK_MAPPING_SUPPORT = 379, /* Indicates FW supports TID-TO-LINK mapping */ WMI_SERVICE_PER_LINK_STATS_SUPPORT = 380, /* Indicates FW supports per link stats for MLO */ WMI_SERVICE_N_LINK_MLO_SUPPORT = 381, /* Indicate FW supports N MLO link & vdev re-purpose between links */ + WMI_SERVICE_ATF_MAX_CLIENT_512_SUPPORT = 382, /* Indicates FW supports maximum of 512 clients when ATF is enabled */ WMI_MAX_EXT2_SERVICE diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index b84d452cb7a1..b04a4d2f1fe3 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1385,6 +1385,8 @@ typedef enum { WMITLV_TAG_STRUC_wmi_mlo_new_primary_link_peer_info, WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_compl_fixed_param, WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_status, + WMITLV_TAG_STRUC_wmi_atf_group_info_v2, + WMITLV_TAG_STRUC_wmi_atf_peer_info_v2, } WMITLV_TAG_ID; /* * IMPORTANT: Please add _ALL_ WMI Commands Here. @@ -4484,7 +4486,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_FWTEST_CMDID); /* ATF PEER REQUEST commands. */ #define WMITLV_TABLE_WMI_PEER_ATF_REQUEST_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param, wmi_peer_atf_request_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ -WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_atf_peer_info, peer_info, WMITLV_SIZE_VAR) +WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_atf_peer_info, peer_info, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_atf_peer_info_v2, peer_info_v2, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_PEER_ATF_REQUEST_CMDID); #define WMITLV_TABLE_WMI_VDEV_TID_LATENCY_CONFIG_CMDID(id,op,buf,len) \ @@ -4500,7 +4503,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PEER_TID_LATENCY_CONFIG_CMDID); /* ATF Group Request commands */ #define WMITLV_TABLE_WMI_ATF_SSID_GROUPING_REQUEST_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_atf_ssid_grp_request_fixed_param, wmi_atf_ssid_grp_request_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_atf_group_info, group_info, WMITLV_SIZE_VAR) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_atf_group_info, group_info, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_atf_group_info_v2, group_info_v2, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_ATF_SSID_GROUPING_REQUEST_CMDID); /* ATF Group WMM Request commands */ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index a65784228cc1..7d0bc8915d4e 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -32770,12 +32770,100 @@ typedef struct { A_UINT32 pdev_id; } wmi_atf_peer_info; +#define WMI_ATF_PEER_UNITS_BIT_POS 0 +#define WMI_ATF_PEER_UNITS_NUM_BITS 16 + +#define WMI_ATF_GET_PEER_UNITS(atf_peer_info) \ + WMI_GET_BITS(atf_peer_info,WMI_ATF_PEER_UNITS_BIT_POS,WMI_ATF_PEER_UNITS_NUM_BITS) + +#define WMI_ATF_SET_PEER_UNITS(atf_peer_info,val) \ + WMI_SET_BITS(atf_peer_info,WMI_ATF_PEER_UNITS_BIT_POS,WMI_ATF_PEER_UNITS_NUM_BITS, val) + +#define WMI_ATF_GROUP_ID_BIT_POS 16 +#define WMI_ATF_GROUP_ID_NUM_BITS 8 + +#define WMI_ATF_GET_GROUP_ID(atf_peer_info) \ + WMI_GET_BITS(atf_peer_info,WMI_ATF_GROUP_ID_BIT_POS,WMI_ATF_GROUP_ID_NUM_BITS) + +#define WMI_ATF_SET_GROUP_ID(atf_peer_info,val) \ + WMI_SET_BITS(atf_peer_info,WMI_ATF_GROUP_ID_BIT_POS,WMI_ATF_GROUP_ID_NUM_BITS, val) + +#define WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS 24 +#define WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS 1 + +#define WMI_ATF_GET_EXPLICIT_PEER_FLAG(atf_peer_info) \ + WMI_GET_BITS(atf_peer_info,WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS,WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS) + +#define WMI_ATF_SET_EXPLICIT_PEER_FLAG(atf_peer_info,val) \ + WMI_SET_BITS(atf_peer_info,WMI_ATF_EXPLICIT_PEER_FLAG_BIT_POS,WMI_ATF_EXPLICIT_PEER_FLAG_NUM_BITS, val) + +typedef struct { + /* The new structure is an optimized version of wmi_atf_peer_info & wmi_atf_peer_ext_info combined */ + A_UINT32 tlv_header; + wmi_mac_addr peer_macaddr; + /* atf_peer_info + * Bits 0-15 - atf_units (based on 1 part in 1000 (per mille)) + * Bits 16-23 - atf_groupid + * Bit 24 - Configured Peer Indication (0/1), this bit would be set by + * host to indicate that the peer has airtime % configured + * explicitly by user + * Bits 25-31 - Reserved (Shall be zero) + */ + A_UINT32 atf_peer_info; +} wmi_atf_peer_info_v2; + +#define WMI_ATF_PEER_FULL_UPDATE_BIT_POS 0 +#define WMI_ATF_PEER_FULL_UPDATE_NUM_BITS 1 + +#define WMI_ATF_GET_PEER_FULL_UPDATE(atf_flags) \ + WMI_GET_BITS(atf_flags,WMI_ATF_PEER_FULL_UPDATE_BIT_POS,WMI_ATF_PEER_FULL_UPDATE_NUM_BITS) + +#define WMI_ATF_SET_PEER_FULL_UPDATE(atf_flags,val) \ + WMI_SET_BITS(atf_flags,WMI_ATF_PEER_FULL_UPDATE_BIT_POS,WMI_ATF_PEER_FULL_UPDATE_NUM_BITS,val) + +#define WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS 1 +#define WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS 1 + +#define WMI_ATF_GET_PEER_PENDING_WMI_CMDS(atf_flags) \ + WMI_GET_BITS(atf_flags,WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS, WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS) + +#define WMI_ATF_SET_PEER_PENDING_WMI_CMDS(atf_flags,val) \ + WMI_SET_BITS(atf_flags,WMI_ATF_PEER_PENDING_WMI_CMDS_BIT_POS, WMI_ATF_PEER_PENDING_WMI_CMDS_NUM_BITS, val) + +#define WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS 2 +#define WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS 1 + +#define WMI_ATF_GET_PEER_PDEV_ID_VALID(atf_flags) \ + WMI_GET_BITS(atf_flags,WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS, WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS) + +#define WMI_ATF_SET_PEER_PDEV_ID_VALID(atf_flags,val) \ + WMI_SET_BITS(atf_flags,WMI_ATF_PEER_PDEV_ID_VALID_BIT_POS, WMI_ATF_PEER_PDEV_ID_VALID_NUM_BITS, val) + typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_atf_request_fixed_param */ A_UINT32 num_peers; + A_UINT32 pdev_id; + /* atf_flags + * Bit 0 - full or partial update; + * full update - + * indicates that this is done for all the connected peers + * partial update - + * indicates update for only the newly connected peers + * (whenever some peers gets connected/disconnected) + * Bit 1 - indicates whether there are more iterations of WMI command + * incoming after the current set of cmds + * Example : If there are 500 peers present and tlv can accomodate + * only 50 peers at a time, then this will be set for all the + * instances of the WMI commands except the last one. + * Bit 2 - indicates if pdev_id is valid or not + * Bits 3-31 - Reserved (Shall be zero) + */ + A_UINT32 atf_flags; /* - * Following this structure is the TLV: - * struct wmi_atf_peer_info peer_info[num_peers]; + * Following this structure is one of the following TLVs + * (only one of them will have valid data in a particular message) + * - struct wmi_atf_peer_info peer_info[num_peers]; + * - struct wmi_atf_peer_info_v2 peer_info_v2[num_peers]; */ } wmi_peer_atf_request_fixed_param; @@ -32808,12 +32896,69 @@ typedef struct { A_UINT32 atf_group_flags; } wmi_atf_group_info; +#define WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS 0 +#define WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS 16 + +#define WMI_ATF_GROUP_GET_NUM_EXPLICIT_PEERS(atf_total_num_peers) \ + WMI_GET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS) + +#define WMI_ATF_GROUP_SET_NUM_EXPLICIT_PEERS(atf_total_num_peers, val) \ + WMI_SET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_EXPLICIT_PEERS_NUM_BITS, val) + +#define WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS 16 +#define WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS 16 + +#define WMI_ATF_GROUP_GET_NUM_IMPLICIT_PEERS(atf_total_num_peers) \ + WMI_GET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS) + +#define WMI_ATF_GROUP_SET_NUM_IMPLICIT_PEERS(atf_total_num_peers, val) \ + WMI_SET_BITS(atf_total_num_peers, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_BIT_POS, WMI_ATF_GROUP_NUM_IMPLICIT_PEERS_NUM_BITS, val) + +typedef struct { + /** TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_atf_group_info_v2 */ + A_UINT32 tlv_header; + A_UINT32 atf_group_id; /* ID of the Air Time Management group */ + /* atf_group_units + * Fraction of air time allowed for the group, in per mille units + * (from 0-1000). + * For example, to indicate that the group can use 12.3% of the air time, + * the atf_group_units setting would be 123. + */ + A_UINT32 atf_group_units; + /* atf_group_flags + * Bits 0-3 - Group Schedule Policy (Fair/Strict/Fair with upper bound) + * Refer to WMI_ATF_SSID_ definitions + * Bit 4-31 - Reserved (Shall be zero) + */ + A_UINT32 atf_group_flags; + /* atf_total_num_peers + * + * Bits 0-15 - total number of explicit peers + * Bits 16-31 - total number of implicit peers + * An explicit peer has an ATF % configured by the user. + * An implicit peer has an ATF % = + * (Group_ATF_percent - Total_Explicit_Peers_ATF_Percent) / + * number of implicit peers + * This computation can be done in FW based on atf_total_num_peers. + */ + A_UINT32 atf_total_num_peers; + /* atf_total_implicit_peer_units + * + * Air time allocated for all the implicit peers + * (from 0-1000, in per mille units) + */ + A_UINT32 atf_total_implicit_peer_units; +} wmi_atf_group_info_v2; + typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_atf_ssid_grp_request_fixed_param */ A_UINT32 pdev_id; /* - * Following this structure is the TLV: - * struct wmi_atf_group_info group_info[]; + * Following this structure is the one of the following TLVs + * (only one of them will have valid data in a particular message) + * - struct wmi_atf_group_info group_info[]; + * - struct wmi_atf_group_info_v2 group_info[]; */ } wmi_atf_ssid_grp_request_fixed_param; @@ -43737,23 +43882,38 @@ typedef enum { WMI_MLO_LINK_FORCE_REASON_TDLS = 4, /* Set force specific links because of 11BE MLO TDLS setup/teardown */ } WMI_MLO_LINK_FORCE_REASON; -#define WMI_MLO_CONTROL_FLAGS_GET_OVERWRITE_FORCE_ACTIVE(mlo_flags) WMI_GET_BITS(control_flags, 0, 1) -#define WMI_MLO_CONTROL_FLAGS_SET_OVERWRITE_FORCE_ACTIVE(mlo_flags, value) WMI_SET_BITS(control_flags, 0, 1, value) -#define WMI_MLO_CONTROL_FLAGS_GET_OVERWRITE_FORCE_INACTIVE(mlo_flags) WMI_GET_BITS(control_flags, 1, 1) -#define WMI_MLO_CONTROL_FLAGS_SET_OVERWRITE_FORCE_INACTIVE(mlo_flags, value) WMI_SET_BITS(control_flags, 1, 1, value) +#define WMI_MLO_CONTROL_FLAGS_GET_OVERWRITE_FORCE_ACTIVE(mlo_flags) \ + WMI_GET_BITS(control_flags, 0, 1) +#define WMI_MLO_CONTROL_FLAGS_SET_OVERWRITE_FORCE_ACTIVE(mlo_flags, value) \ + WMI_SET_BITS(control_flags, 0, 1, value) +#define WMI_MLO_CONTROL_FLAGS_GET_OVERWRITE_FORCE_INACTIVE(mlo_flags) \ + WMI_GET_BITS(control_flags, 1, 1) +#define WMI_MLO_CONTROL_FLAGS_SET_OVERWRITE_FORCE_INACTIVE(mlo_flags, value) \ + WMI_SET_BITS(control_flags, 1, 1, value) +#define WMI_MLO_CONTROL_FLAGS_GET_DYNAMIC_FORCE_LINK_NUM(mlo_flags) \ + WMI_GET_BITS(control_flags, 2, 1) +#define WMI_MLO_CONTROL_FLAGS_SET_DYNAMIC_FORCE_LINK_NUM(mlo_flags, value) \ + WMI_SET_BITS(control_flags, 2, 1, value) /* * This structure is used for passing wmi_mlo_control_flags. - * When force_mode is WMI_MLO_LINK_FORCE_ACTIVE or WMI_MLO_LINK_FORCE_INACTIVE - * host can pass below control flags, to indicate if FW need to clear earlier - * force bitmap config. + * + * - When force_mode is WMI_MLO_LINK_FORCE_ACTIVE or + * WMI_MLO_LINK_FORCE_INACTIVE host can pass below control flags, + * to indicate if FW need to clear earlier force bitmap config. + * + * - When force mode is WMI_MLO_LINK_FORCE_ACTIVE_LINK_NUM or + * WMI_MLO_LINK_FORCE_INACTIVE_LINK_NUM, host can pass below control flags, + * to indicate if FW need to use force link number instead of force link + * bitmap. */ typedef struct { union { struct { A_UINT32 overwrite_force_active_bitmap:1, /* indicate overwrite all earlier force_active bitmaps */ overwrite_force_inactive_bitmap:1, /* indicate overwrite all earlier force_inactive bitmaps */ - unused: 30; + dynamic_force_link_num:1, /* indicate fw to use force link number instead of force link bitmap */ + unused: 29; }; A_UINT32 control_flags; }; diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 2637a3c0eb5d..3b48f1d69951 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_ 1346 +#define __WMI_REVISION_ 1347 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From a7e13535d77ab155ae681c281909206dfb80f5af Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 14 Jun 2023 18:01:14 -0700 Subject: [PATCH 14/25] fw-api: CL 23485848 - update fw common interface files Change-Id: I647204a3ac2b5581a6a920d5bd7b8ca0b2423498 HTT: expand fisa_aggr_limit from 4 -> 6 bits in h2t fisa_config_t CRs-Fixed: 2262693 --- fw/htt.h | 9 +++++---- fw/wmi_services.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fw/htt.h b/fw/htt.h index e30687171c0d..37e9514f8014 100644 --- a/fw/htt.h +++ b/fw/htt.h @@ -250,9 +250,10 @@ * 3.122 Add is_umac_hang flag in H2T UMAC_HANG_RECOVERY_SOC_START_PRE_RESET msg * 3.123 Add HTT_OPTION_TLV_TCL_METADATA_V21 def. * 3.124 Add HTT_T2H_MSG_TYPE_PEER_EXTENDED_EVENT def. + * 3.125 Expand fisa_aggr_limit bits in fisa_control_bits_v2. */ #define HTT_CURRENT_VERSION_MAJOR 3 -#define HTT_CURRENT_VERSION_MINOR 124 +#define HTT_CURRENT_VERSION_MINOR 125 #define HTT_NUM_TX_FRAG_DESC 1024 @@ -8621,8 +8622,8 @@ PREPACK struct htt_h2t_msg_type_fisa_config_t { } fisa_control_bits; struct { A_UINT32 fisa_enable: 1, - fisa_aggr_limit: 4, - reserved: 27; + fisa_aggr_limit: 6, + reserved: 25; } fisa_control_bits_v2; A_UINT32 fisa_control_value; @@ -8842,7 +8843,7 @@ PREPACK struct htt_h2t_msg_type_fisa_config_t { } while (0) /* Dword 1: fisa_control_value fisa_aggr_limit */ -#define HTT_RX_FISA_CONFIG_FISA_V2_AGGR_LIMIT_M 0x0000001e +#define HTT_RX_FISA_CONFIG_FISA_V2_AGGR_LIMIT_M 0x0000007e #define HTT_RX_FISA_CONFIG_FISA_V2_AGGR_LIMIT_S 1 #define HTT_RX_FISA_CONFIG_FISA_V2_AGGR_LIMIT_GET(_var) \ (((_var) & HTT_RX_FISA_CONFIG_FISA_V2_AGGR_LIMIT_M) >> \ diff --git a/fw/wmi_services.h b/fw/wmi_services.h index 47562761f0b9..016c7c25e08a 100644 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -633,6 +633,7 @@ typedef enum { WMI_SERVICE_PER_LINK_STATS_SUPPORT = 380, /* Indicates FW supports per link stats for MLO */ WMI_SERVICE_N_LINK_MLO_SUPPORT = 381, /* Indicate FW supports N MLO link & vdev re-purpose between links */ WMI_SERVICE_ATF_MAX_CLIENT_512_SUPPORT = 382, /* Indicates FW supports maximum of 512 clients when ATF is enabled */ + WMI_SERVICE_FISA_DYNAMIC_MSDU_AGGR_SIZE_SUPPORT = 383, /* Indicates FW support for FISA aggregation size up to 64 instead of only 16 */ WMI_MAX_EXT2_SERVICE From 0118697ccc7183fc44f74fe453885c64b658e3f7 Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 14 Jun 2023 18:02:04 -0700 Subject: [PATCH 15/25] fw-api: CL 23485853 - update fw common interface files add WMI_UNIFIED_VDEV_SUBTYPE_BRIDGE def Change-Id: I66e76123d21878b14f07de1d177781dc0c11f1e1 CRs-Fixed: 2262693 --- fw/wmi_unified.h | 12 +++++++++++- fw/wmi_version.h | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 7d0bc8915d4e..ce4d95d5dd93 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -7206,6 +7206,8 @@ typedef struct { /* This TLV is followed by wmi_tx_send_params * wmi_tx_send_params tx_send_params; * wmi_mlo_tx_send_params mlo_tx_send_params[]; + * Note: WMI_MLO_MGMT_TID path validated for specific scenario + * (BTM Usecase). Full support is not available. * wmi_tx_send_params_ext tx_send_params_ext[0 or 1]; */ } wmi_mgmt_tx_send_cmd_fixed_param; @@ -15839,7 +15841,7 @@ typedef struct { A_UINT32 vdev_id; /** VDEV type (AP,STA,IBSS,MONITOR) */ A_UINT32 vdev_type; - /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0)*/ + /** VDEV subtype (P2PDEV, P2PCLI, P2PGO, BT3.0, BRIDGE) */ A_UINT32 vdev_subtype; /** VDEV MAC address */ wmi_mac_addr vdev_macaddr; @@ -16087,6 +16089,14 @@ typedef enum { */ #define WMI_UNIFIED_VDEV_SUBTYPE_SMART_MON 0x7 +/* Subtype to indicate that the VDEV is in Bridge mode. + * Bridge VDEV is dummy VDEV required for 4 chip MLO scenario. + * Bridge Peer will be connected to Bridge VDEV. + * Bridge VDEV/PEER will be required to seamlessly transmit + * to diagonal links in 4 chip MLO. + */ +#define WMI_UNIFIED_VDEV_SUBTYPE_BRIDGE 0x8 + /** values for vdev_start_request flags */ /** Indicates that AP VDEV uses hidden ssid. only valid for * AP/GO */ diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 3b48f1d69951..9097a9241a34 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_ 1347 +#define __WMI_REVISION_ 1348 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From d35c331283cf57d3d6acfa86975122cd679dd0a5 Mon Sep 17 00:00:00 2001 From: Nandha Kishore Easwaran Date: Thu, 18 May 2023 15:16:43 +0530 Subject: [PATCH 16/25] fw-api: Changes in monitor headers to support Big endian Use BIG endian version of mon_buf and mon_dest structures. Change-Id: I819e8947e927042c8362a601e8a07751f85f9ccd CRs-Fixed: 3510779 --- hw/qca5332/mon_buffer_addr.h | 4 ++-- hw/qca5332/mon_destination_ring.h | 4 ++-- hw/qcn9224/v1/mon_buffer_addr.h | 4 ++-- hw/qcn9224/v2/mon_buffer_addr.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/qca5332/mon_buffer_addr.h b/hw/qca5332/mon_buffer_addr.h index 8bd6d621e985..95225bed09c1 100644 --- a/hw/qca5332/mon_buffer_addr.h +++ b/hw/qca5332/mon_buffer_addr.h @@ -1,5 +1,5 @@ -/* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved. +/* Copyright (c) 2022-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 above @@ -34,7 +34,7 @@ struct mon_buffer_addr { -#ifndef WIFI_BIT_ORDER_BIG_ENDIAN +#ifndef BIG_ENDIAN_HOST uint32_t buffer_virt_addr_31_0 : 32; // [31:0] uint32_t buffer_virt_addr_63_32 : 32; // [31:0] uint32_t dma_length : 12, // [11:0] diff --git a/hw/qca5332/mon_destination_ring.h b/hw/qca5332/mon_destination_ring.h index 385c2eda04f7..c16810423d63 100644 --- a/hw/qca5332/mon_destination_ring.h +++ b/hw/qca5332/mon_destination_ring.h @@ -1,5 +1,5 @@ -/* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved. +/* Copyright (c) 2022-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 above @@ -32,7 +32,7 @@ struct mon_destination_ring { -#ifndef WIFI_BIT_ORDER_BIG_ENDIAN +#ifndef BIG_ENDIAN_HOST uint32_t stat_buf_virt_addr_31_0 : 32; // [31:0] uint32_t stat_buf_virt_addr_63_32 : 32; // [31:0] uint32_t ppdu_id : 32; // [31:0] diff --git a/hw/qcn9224/v1/mon_buffer_addr.h b/hw/qcn9224/v1/mon_buffer_addr.h index 050db3aac6d1..b711c84afc8e 100644 --- a/hw/qcn9224/v1/mon_buffer_addr.h +++ b/hw/qcn9224/v1/mon_buffer_addr.h @@ -1,5 +1,5 @@ -/* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved. +/* Copyright (c) 2022-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 above @@ -34,7 +34,7 @@ struct mon_buffer_addr { -#ifndef WIFI_BIT_ORDER_BIG_ENDIAN +#ifndef BIG_ENDIAN_HOST uint32_t buffer_virt_addr_31_0 : 32; uint32_t buffer_virt_addr_63_32 : 32; uint32_t dma_length : 12, diff --git a/hw/qcn9224/v2/mon_buffer_addr.h b/hw/qcn9224/v2/mon_buffer_addr.h index 050db3aac6d1..b711c84afc8e 100644 --- a/hw/qcn9224/v2/mon_buffer_addr.h +++ b/hw/qcn9224/v2/mon_buffer_addr.h @@ -1,5 +1,5 @@ -/* Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved. +/* Copyright (c) 2022-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 above @@ -34,7 +34,7 @@ struct mon_buffer_addr { -#ifndef WIFI_BIT_ORDER_BIG_ENDIAN +#ifndef BIG_ENDIAN_HOST uint32_t buffer_virt_addr_31_0 : 32; uint32_t buffer_virt_addr_63_32 : 32; uint32_t dma_length : 12, From 6f24f8089c6242c5f3562b565e937fdd82c84e70 Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 16 Jun 2023 04:56:58 -0700 Subject: [PATCH 17/25] fw-api: CL 23504182 - update fw common interface files Change-Id: If4b155f5f5876d62092fac4ec1bee13d8d540d12 WMI: add TWT IE option in mgmt_rx_params_ext CRs-Fixed: 2262693 --- fw/wmi_unified.h | 15 +++++++++++++++ fw/wmi_version.h | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index ce4d95d5dd93..0e5ac8fa8fb0 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -6372,6 +6372,7 @@ typedef struct { typedef enum { WMI_RX_PARAMS_EXT_META_ADDBA = 0x0, + WMI_RX_PARAMS_EXT_META_TWT = 0x1, } wmi_mgmt_rx_params_ext_meta_t; typedef struct { @@ -6396,6 +6397,20 @@ typedef struct { }; A_UINT32 mgmt_rx_params_ext_dword1; }; + union { + struct { + /* WMI_RX_PARAMS_EXT_META_TWT */ + A_UINT32 twt_ie_buf_len; /* IE length */ + /* Following this structure is the TLV byte stream of IE data + * of length twt_ie_buf_len: + * A_UINT8 ie_data[]; <-- length in bytes given by field + * twt_ie_buf_len. + * This ie_data[] would contain only the TWT IE information + * when twt_ie_buf_len is non zero. + */ + }; + A_UINT32 mgmt_rx_params_ext_dword2; + }; } wmi_mgmt_rx_params_ext; typedef struct { diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 9097a9241a34..2f433311dc96 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_ 1348 +#define __WMI_REVISION_ 1349 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 957cbcfad8ff7a6bd140dee4f993ec70a0fb264e Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 16 Jun 2023 04:58:01 -0700 Subject: [PATCH 18/25] fw-api: CL 23507997 - update fw common interface files Change-Id: If80971d7e3744a28e3b9c6c68e9f858ec14de49b WMI: add MLO_LINK_RECOMMENDATION_CMD msg def CRs-Fixed: 2262693 --- fw/wmi_tlv_defs.h | 9 +++++++++ fw/wmi_unified.h | 24 ++++++++++++++++++++++++ fw/wmi_version.h | 2 +- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index b04a4d2f1fe3..974358c4f225 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1387,6 +1387,8 @@ typedef enum { WMITLV_TAG_STRUC_wmi_mlo_primary_link_peer_migration_status, WMITLV_TAG_STRUC_wmi_atf_group_info_v2, WMITLV_TAG_STRUC_wmi_atf_peer_info_v2, + WMITLV_TAG_STRUC_wmi_mlo_link_recommendation_fixed_param, + WMITLV_TAG_STRUC_wmi_mlo_peer_recommended_links, } WMITLV_TAG_ID; /* * IMPORTANT: Please add _ALL_ WMI Commands Here. @@ -1917,6 +1919,7 @@ typedef enum { OP(WMI_VENDOR_VDEV_CMDID) \ OP(WMI_VENDOR_PEER_CMDID) \ OP(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID) \ + OP(WMI_MLO_LINK_RECOMMENDATION_CMDID) \ /* add new CMD_LIST elements above this line */ @@ -5170,6 +5173,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_MLO_PEER_TID_TO_LINK_MAP_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_mlo_ap_vdev_tid_to_link_map_ie_info, mlo_vdev_tid_to_link_map_ie_info, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_CMDID); +/** WMI cmd used to set up Tid to Link Mapping for a vdev */ +#define WMITLV_TABLE_WMI_MLO_LINK_RECOMMENDATION_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_mlo_link_recommendation_fixed_param, wmi_mlo_link_recommendation_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_mlo_peer_recommended_links, mlo_peer_recommended_links, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_MLO_LINK_RECOMMENDATION_CMDID); + /* Mcast ipv4 address filter list cmd */ #define WMITLV_TABLE_WMI_VDEV_IGMP_OFFLOAD_CMDID(id,op,buf,len) \ WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_igmp_offload_fixed_param, wmi_igmp_offload_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 0e5ac8fa8fb0..f572f33e3d8c 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -1561,6 +1561,8 @@ typedef enum { WMI_MLO_LINK_SWITCH_CONF_CMDID, /** WMI cmd to migrate the primary link peer */ WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID, + /** WMI cmd to recommand preferred link */ + WMI_MLO_LINK_RECOMMENDATION_CMDID, /** WMI commands specific to Service Aware WiFi (SAWF) */ /** configure or reconfigure the parameters for a service class */ @@ -36647,6 +36649,7 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command) WMI_RETURN_STRING(WMI_VDEV_PAUSE_CMDID); WMI_RETURN_STRING(WMI_GPIO_STATE_REQ_CMDID); WMI_RETURN_STRING(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID); + WMI_RETURN_STRING(WMI_MLO_LINK_RECOMMENDATION_CMDID); } return (A_UINT8 *) "Invalid WMI cmd"; @@ -44097,6 +44100,27 @@ typedef struct { A_UINT32 status; } wmi_mlo_teardown_complete_fixed_param; +typedef struct { + /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_peer_recommended_links; */ + A_UINT32 tlv_header; + /** AID (association id) of this station */ + A_UINT32 assoc_id; + /** Request link id set to disable */ + A_UINT32 linkid_bitmap; +} wmi_mlo_peer_recommended_links; + +typedef struct { + /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mlo_link_recommendation_fixed_param */ + A_UINT32 tlv_header; + /* unique id identifying the VDEV, generated by the caller */ + A_UINT32 vdev_id; + /* DTIM specified in units of num beacon intervals */ + A_UINT32 dtim_period; + /* The TLVs follows this structure: + * wmi_mlo_peer_recommended_links recommended_links[]; + */ +} wmi_mlo_link_recommendation_fixed_param; + #define WMI_TID_TO_LINK_MAP_TID_NUM_GET(_var) WMI_GET_BITS(_var, 0, 5) #define WMI_TID_TO_LINK_MAP_TID_NUM_SET(_var, _val) WMI_SET_BITS(_var, 0, 5, _val) diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 2f433311dc96..a10f180fbcd3 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_ 1349 +#define __WMI_REVISION_ 1350 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From d8df6dd8591c01324ed8b99f46a13e2dacb65371 Mon Sep 17 00:00:00 2001 From: spuligil Date: Sat, 17 Jun 2023 12:01:19 -0700 Subject: [PATCH 19/25] fw-api: CL 23520891 - update fw common interface files Change-Id: I2bb028305802184c008433a53443638d357b0169 WMI: add regdomain_bitmap in pdev_set_regdomain_cmd TLV CRs-Fixed: 2262693 --- fw/wmi_unified.h | 11 +++++++++++ fw/wmi_version.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index f572f33e3d8c..2d2a35f571aa 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -7285,6 +7285,14 @@ typedef struct { A_UINT32 linkid_bitmap; } wmi_mlo_link_disable_request_event_fixed_param; +typedef enum { + /** + * Projects support to offload regulatory database by default. + * If don`t offload regulatory database, host can set this bit. + */ + WMI_REGDOMAIN_DATABASE_NO_OFFLOAD_BITMASK = 0x00000001, +} WMI_REGDOMAIN_BITMASK; + typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_set_regdomain_cmd_fixed_param */ @@ -7350,6 +7358,9 @@ typedef struct { A_UINT32 conformance_test_limit_6G_subband_UNII6_client[3][2]; A_UINT32 conformance_test_limit_6G_subband_UNII7_client[3][2]; A_UINT32 conformance_test_limit_6G_subband_UNII8_client[3][2]; + + /** reg domain bitmap */ + A_UINT32 regdomain_bitmap; } wmi_pdev_set_regdomain_cmd_fixed_param; typedef struct { diff --git a/fw/wmi_version.h b/fw/wmi_version.h index a10f180fbcd3..268f4418d746 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_ 1350 +#define __WMI_REVISION_ 1351 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 48b8e2e4ec1a8b8d1e9f0572e22a9d3eea63b3eb Mon Sep 17 00:00:00 2001 From: spuligil Date: Sun, 18 Jun 2023 06:00:57 -0700 Subject: [PATCH 20/25] fw-api: CL 23523211 - update fw common interface files WMI: add min_device_tx_pwr field in vdev_start_response_event msg Also, add WMI_MLO_LINK_SWITCH_REQUEST_EVENTID to ALL_EVT_LIST (missed originally) Change-Id: I8f617ba3309f7372f0584c32e4d1ae4f3dae1355 CRs-Fixed: 2262693 --- fw/wmi_tlv_defs.h | 1 + fw/wmi_unified.h | 4 ++++ fw/wmi_version.h | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 974358c4f225..6a2cee351198 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -2233,6 +2233,7 @@ typedef enum { OP(WMI_PDEV_SET_RF_PATH_RESP_EVENTID) \ OP(WMI_ROAM_SYNCH_KEY_EVENTID) \ OP(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_EVENTID) \ + OP(WMI_MLO_LINK_SWITCH_REQUEST_EVENTID) \ /* add new EVT_LIST elements above this line */ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 2d2a35f571aa..76977b9db210 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -18537,6 +18537,10 @@ typedef struct { A_UINT32 mac_tsf_id; /** ignore mac_tsf_id unless mac_tsf_id_valid is set */ A_UINT32 mac_tsf_id_valid; + /** min_device_tx_pwr_valid = 0 means value is not specified. */ + A_UINT32 min_device_tx_pwr_valid; + /** minimum allowed device Tx power (in dBm) for this connection. */ + A_INT32 min_device_tx_pwr; } wmi_vdev_start_response_event_fixed_param; typedef struct { diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 268f4418d746..a617945dad47 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_ 1351 +#define __WMI_REVISION_ 1352 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 94aa66285409f78e105c1d169209735c6184a8f7 Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 20 Jun 2023 06:01:18 -0700 Subject: [PATCH 21/25] fw-api: CL 23529709 - update fw common interface files Change-Id: Ife670969ee1a5318bba8a82d2227f8e66e7c8770 WMI: add aux_dev_caps var-len array in SERVICE_READY_EXT2 EVENT msg CRs-Fixed: 2262693 --- fw/wmi_tlv_defs.h | 4 +- fw/wmi_unified.h | 98 +++++++++++++++++++++++++++++++++++++++++++++++ fw/wmi_version.h | 2 +- 3 files changed, 102 insertions(+), 2 deletions(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 6a2cee351198..4d0bf91d1943 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1389,6 +1389,7 @@ typedef enum { WMITLV_TAG_STRUC_wmi_atf_peer_info_v2, WMITLV_TAG_STRUC_wmi_mlo_link_recommendation_fixed_param, WMITLV_TAG_STRUC_wmi_mlo_peer_recommended_links, + WMITLV_TAG_STRUC_wmi_aux_dev_capabilities, } WMITLV_TAG_ID; /* * IMPORTANT: Please add _ALL_ WMI Commands Here. @@ -5493,7 +5494,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_SERVICE_READY_EXT_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_cust_bdf_version_capabilities, cust_bdf_version_capabilities, WMITLV_SIZE_VAR) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_sw_cal_ver_cap, sw_cal_ver_cap, WMITLV_SIZE_VAR) \ WMITLV_FXAR(id,op,buf,len, WMITLV_TAG_ARRAY_INT32, A_INT32, hw_tx_power_signed, WMITLV_SIZE_FIX, WMI_HW_TX_POWER_CAPS_MAX) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, WMI_COEX_FIX_CHANNEL_CAPABILITIES, coex_fix_channel_caps, WMITLV_SIZE_VAR) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, WMI_COEX_FIX_CHANNEL_CAPABILITIES, coex_fix_channel_caps, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_aux_dev_capabilities, aux_dev_caps, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_SERVICE_READY_EXT2_EVENTID); #define WMITLV_TABLE_WMI_SPECTRAL_CAPABILITIES_EVENTID(id,op,buf,len) \ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 76977b9db210..f08d471fab7a 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -3563,6 +3563,7 @@ typedef struct { * wmi_htt_msdu_idx_to_htt_msdu_qtype htt_msdu_idx_to_qtype_map[]; * wmi_dbs_or_sbs_cap_ext dbs_or_sbs_cap_ext; * A_INT32 hw_tx_power_signed[WMI_HW_TX_POWER_CAPS_MAX]; + * wmi_aux_dev_capabilities aux_dev_caps[]; */ } wmi_service_ready_ext2_event_fixed_param; @@ -46016,6 +46017,103 @@ typedef struct { */ } wmi_mlo_primary_link_peer_migration_compl_fixed_param; +/* WMI_AUX_DEV_CAPS_SUPPORTED_MODE: + * How many bits to shift for each supported mode. + * This works just like Linux file permission bits + * (i.e. user|group|other values for each rwx perms). + */ +typedef enum _WMI_AUX_DEV_CAPS_SUPPORTED_MODE { + WMI_AUX_DEV_SUPPORTED_MODE_SCAN = 0, + WMI_AUX_DEV_SUPPORTED_MODE_LISTEN = 1, + WMI_AUX_DEV_SUPPORTED_MODE_EMLSR = 2, +} WMI_AUX_DEV_CAPS_SUPPORTED_MODE; + +/* wmi_aux_dev_capabilities: + * TLV representing AUX mode capabilities + * A one-dimensional "flattened" array of these structs shall represent + * all AUX capabilities regardless of the actual AUX count. + * + * For example, if 2x AUX are present, then the array is expected to look + * something like this: + * wmi_aux_dev_capabilities caps[] = { + * // 4 elements for AUX_0 - one element for each HW mode: + * AUX_0_single_mac, + * AUX_0_dual_mac, + * AUX_0_single_mac_emlsr, + * AUX_0_split_emlsr, + * // 4 elements for AUX_1: + * AUX_1_single_mac, + * AUX_1_dual_mac, + * AUX_1_single_mac_emlsr, + * AUX_1_split_emlsr, + * }; + * In effect, indexes 0 to 3 (inclusive) represent the first AUX, + * 4 to 7 (inclusive) represent the second, and so on. + * Note that each element explicitly identifies which AUX and HW mode it + * corresponds to, via the aux_index and hw_mode_id fields respectively. + * So the receiver should not assume the ordering will be as shown above + * (AUX0 single, AUX0 dual, AUX0 single emlsr, AUX0 split emlsr, + * AUX1 single, AUX1 dual, AUX1 single emlsr, AUX1 split emlsr) + * but instead should directly check each element's aux_index and hw_mode_id + * fields. + */ +typedef struct { + /* tlv_header -- WMITLV_TAG_STRUC_wmi_aux_dev_capabilities */ + A_UINT32 tlv_header; + + /* aux_index -- Which AUX this TLV applies to. + Ex: aux_index=0 is first AUX, aux_index=1 is second AUX, etc */ + A_UINT32 aux_index; + + /* + * This TLV represents which AUX capabilities are supported by + * which MAC for the given HW mode. + * pdev ID value of 0x0 denotes that the AUX mode is not applicable + * for the given HW mode. + * + * hw_mode_id | Single DBS_OR_SBS AUX eMLSR AUX eMLSR + * | Phy single split + * -------------------------------------------------------------- + * supported_modes | SCAN/ SCAN/ EMLSR EMLSR + * | LISTEN LISTEN + * listen_pdev_id_map | 0x1 0x2 0x0 0x0 + * emlsr_pdev_id_map | 0x0 0x0 0x1 0x2 + */ + + /* hw_mode_id: + * Which HW mode this TLV applies to. + * HW mode values are defined in WMI_HW_MODE_CONFIG_TYPE. + */ + A_UINT32 hw_mode_id; + + /* supported_modes: + * Which mode this AUX supports for the HW mode defined in hw_mode_id. + * Shift amounts are defined in WMI_AUX_DEV_CAPS_SUPPORTED_MODE. + * This works just like user|group|other bits for Linux file permissions: + * 0x1 = SCAN (0 0 1) + * 0x2 = LISTEN (0 1 0) + * 0x3 = SCAN+LISTEN (0 1 1) + * 0x4 = EMLSR (1 0 0) + */ + A_UINT32 supported_modes_bitmap; + + /* listen_pdev_id_map: + * Which AUX MAC can listen/scan for the HW mode described in hw_mode_id. + * 0x0 - AUX cannot be used for listen mode. + * 0x1 - AUX can be attached to MAC-0 in AUX listen mode. + * 0x2 - AUX can be attached to MAC-1 in AUX listen mode. + */ + A_UINT32 listen_pdev_id_map; + + /* emlsr_pdev_id_map: + * Which AUX MAC can perform eMLSR for the HW mode described in hw_mode_id. + * 0x0 - AUX cannot be used for eMLSR mode. + * 0x1 - AUX can be attached to MAC-0 in AUX eMLSR mode. + * 0x2 - AUX can be attached to MAC-1 in AUX eMLSR mode. + */ + A_UINT32 emlsr_pdev_id_map; +} wmi_aux_dev_capabilities; + /* ADD NEW DEFS HERE */ diff --git a/fw/wmi_version.h b/fw/wmi_version.h index a617945dad47..d8b20f440239 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_ 1352 +#define __WMI_REVISION_ 1353 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 7b7058806a61207775e706b3c8d7f6e4e8137b08 Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 20 Jun 2023 18:01:32 -0700 Subject: [PATCH 22/25] fw-api: CL 23542073 - update fw common interface files Change-Id: Ia69e8ae41cee4bfd4dabbfa5f01ad4d19d508227 WMI: spec channel width switch too in VDEV_PARAM_CHWIDTH_WITH_NOTIFY CRs-Fixed: 2262693 --- fw/wmi_unified.h | 24 +++++++++++++++++++++--- fw/wmi_version.h | 2 +- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index f08d471fab7a..0582c558eb95 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -10531,7 +10531,21 @@ typedef enum { WMI_CHAN_WIDTH_MAX, } wmi_channel_width; -/*Clear stats*/ +/* channel width switch type */ +typedef enum { + WMI_CHAN_WIDTH_SWITCH_TYPE_TXRX = 0, + WMI_CHAN_WIDTH_SWITCH_TYPE_TXONLY = 1, + + WMI_CHAN_WIDTH_SWITCH_TYPE_MAX, +} wmi_chan_width_switch_type; + +#define WMI_VDEV_CHAN_WIDTH_NOTIFY_GET_CHAN_WIDTH(chwidth_notify) WMI_GET_BITS(chwidth_notify, 0, 8) +#define WMI_VDEV_CHAN_WIDTH_NOTIFY_SET_CHAN_WIDTH(chwidth_notify, value) WMI_SET_BITS(chwidth_notify, 0, 8, value) + +#define WMI_VDEV_CHAN_WIDTH_NOTIFY_GET_SWITCH_TYPE(chwidth_notify) WMI_GET_BITS(chwidth_notify, 8, 2) +#define WMI_VDEV_CHAN_WIDTH_NOTIFY_SET_SWITCH_TYPE(chwidth_notify, value) WMI_SET_BITS(chwidth_notify, 8, 2, value) + +/* Clear stats */ typedef struct { A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_clear_link_stats_cmd_fixed_param */ /** unique id identifying the VDEV, generated by the caller */ @@ -18038,9 +18052,13 @@ typedef enum { * (except TDLS) about change in bandwidth, through OMN/OMI notification * before performing bandwidth update internally. * Please note incase of STA VDEV only BSS peer gets updated, - * associated TDLS peer bandwidth wont be impacted. + * associated TDLS peer bandwidth won't be impacted. * - * The the updated bandwith is specified with a wmi_channel_width value. + * bit 7:0 the updated bandwidth is specified with + * a wmi_channel_width value + * bit 9:8 the updated bandwidth switch type is specified with + * a wmi_chan_width_switch_type value + * bit 31:10 reserved */ WMI_VDEV_PARAM_CHWIDTH_WITH_NOTIFY, /* 0xBA */ diff --git a/fw/wmi_version.h b/fw/wmi_version.h index d8b20f440239..7373da4a4397 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_ 1353 +#define __WMI_REVISION_ 1354 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 5f497f6bad202664e298c8d0050101eaca42b947 Mon Sep 17 00:00:00 2001 From: spuligil Date: Thu, 22 Jun 2023 06:01:14 -0700 Subject: [PATCH 23/25] fw-api: CL 23557966 - update fw common interface files add WMI_VENDOR_OUI_ACTION_ENABLE_CTS2SELF_WITH_QOS_NULL def Change-Id: I20e0cb68828728a1a299ccb02b096982554889cd CRs-Fixed: 2262693 --- fw/wmi_tlv_defs.h | 2 ++ fw/wmi_unified.h | 6 ++++++ fw/wmi_version.h | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 4d0bf91d1943..b7cf224889c6 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1921,6 +1921,8 @@ typedef enum { OP(WMI_VENDOR_PEER_CMDID) \ OP(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID) \ OP(WMI_MLO_LINK_RECOMMENDATION_CMDID) \ + OP(WMI_MLO_LINK_SET_BSS_PARAMS_CMDID) \ + OP(WMI_MLO_LINK_SWITCH_CONF_CMDID) \ /* add new CMD_LIST elements above this line */ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 0582c558eb95..1731398f8d2b 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -24843,6 +24843,12 @@ typedef enum */ WMI_VENDOR_OUI_ACTION_DISABLE_DYNAMIC_QOS_NULL_TX_RATE = 10, + /* + * Enable CTS2SELF with QoS null frame if specific vendor OUI + * received in beacon. + */ + WMI_VENDOR_OUI_ACTION_ENABLE_CTS2SELF_WITH_QOS_NULL = 11, + /* Add any action before this line */ WMI_VENDOR_OUI_ACTION_MAX_ACTION_ID } wmi_vendor_oui_action_id; diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 7373da4a4397..2aca298638cb 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_ 1354 +#define __WMI_REVISION_ 1355 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From 100c793c0913721c83fab34539704922f5ce2d02 Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 23 Jun 2023 03:40:53 -0700 Subject: [PATCH 24/25] fw-api: CL 23566455 - update fw common interface files Change-Id: I301686747f6e713c1f2f52b76d95db64f701e543 WMI: add NAN_OEM_DATA CMD,EVENT msg defs CRs-Fixed: 2262693 --- fw/wmi_tlv_defs.h | 18 ++++++++++++++++ fw/wmi_unified.h | 54 +++++++++++++++++++++++++++++++++++++++++++++++ fw/wmi_version.h | 2 +- 3 files changed, 73 insertions(+), 1 deletion(-) diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index b7cf224889c6..624b8449afe2 100644 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1390,6 +1390,8 @@ typedef enum { WMITLV_TAG_STRUC_wmi_mlo_link_recommendation_fixed_param, WMITLV_TAG_STRUC_wmi_mlo_peer_recommended_links, WMITLV_TAG_STRUC_wmi_aux_dev_capabilities, + WMITLV_TAG_STRUC_wmi_nan_oem_data_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_nan_oem_data_event_fixed_param, } WMITLV_TAG_ID; /* * IMPORTANT: Please add _ALL_ WMI Commands Here. @@ -1923,6 +1925,7 @@ typedef enum { OP(WMI_MLO_LINK_RECOMMENDATION_CMDID) \ OP(WMI_MLO_LINK_SET_BSS_PARAMS_CMDID) \ OP(WMI_MLO_LINK_SWITCH_CONF_CMDID) \ + OP(WMI_NAN_OEM_DATA_CMDID) \ /* add new CMD_LIST elements above this line */ @@ -2237,6 +2240,7 @@ typedef enum { OP(WMI_ROAM_SYNCH_KEY_EVENTID) \ OP(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_EVENTID) \ OP(WMI_MLO_LINK_SWITCH_REQUEST_EVENTID) \ + OP(WMI_NAN_OEM_DATA_EVENTID) \ /* add new EVT_LIST elements above this line */ @@ -3867,6 +3871,13 @@ WMITLV_CREATE_PARAM_STRUC(WMI_DEL_PROACTIVE_ARP_RSP_PATTERN_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_nan_host_config_param, host_config, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_NAN_CMDID); +/* NAN OEM Data Cmd */ +#define WMITLV_TABLE_WMI_NAN_OEM_DATA_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_nan_oem_data_cmd_fixed_param, wmi_nan_oem_data_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_FIXED_STRUC, wmi_nan_oem_data_hdr, nan_oem_data_hdr, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, nan_oem_data_buffer, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_NAN_OEM_DATA_CMDID); + /* NAN Data Get Capabilities Cmd */ #define WMITLV_TABLE_WMI_NDI_GET_CAP_REQ_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_ndi_get_cap_req_fixed_param, wmi_ndi_get_cap_req_fixed_param_PROTOTYPE, fixed_param, WMITLV_SIZE_FIX) @@ -6255,6 +6266,13 @@ WMITLV_CREATE_PARAM_STRUC(WMI_OEM_DMA_RING_CFG_RSP_EVENTID) WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_nan_event_info, event_info, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_NAN_EVENTID); +/* NAN OEM Data Event */ +#define WMITLV_TABLE_WMI_NAN_OEM_DATA_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_nan_oem_data_event_fixed_param, wmi_nan_oem_data_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_FIXED_STRUC, wmi_nan_oem_data_hdr, nan_oem_data_hdr, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, nan_oem_data_buffer, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_NAN_OEM_DATA_EVENTID); + /* NAN discovery interface created event */ #define WMITLV_TABLE_WMI_NAN_DISC_IFACE_CREATED_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_nan_disc_iface_created_event_fixed_param, wmi_nan_disc_iface_created_event_fixed_param_PROTOTYPE, fixed_param, WMITLV_SIZE_FIX) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 1731398f8d2b..5ace2a15c094 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -1344,6 +1344,8 @@ typedef enum { /** Nan Request */ WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN), + /** Command to handle OEM's NAN specific opaque data */ + WMI_NAN_OEM_DATA_CMDID, /** Modem power state command */ WMI_MODEM_POWER_STATE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_COEX), @@ -2278,6 +2280,8 @@ typedef enum { WMI_NAN_STARTED_CLUSTER_EVENTID, WMI_NAN_JOINED_CLUSTER_EVENTID, WMI_NAN_DMESG_EVENTID, + /** Event to deliver OEM's NAN specific opaque data */ + WMI_NAN_OEM_DATA_EVENTID, /* Coex Event */ WMI_COEX_REPORT_ANTENNA_ISOLATION_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_COEX), @@ -27618,6 +27622,42 @@ typedef struct { */ } wmi_nan_cmd_param; +typedef enum { + WMI_NAN_VENDOR1_REQ1 = 1, +} WMI_NAN_OEM_DATA_TYPE; + +typedef struct { + /** oem_data_type: + * Indicate what kind of OEM-specific data is present in the + * oem_data_buffer[]. + * Possible values are listed in the enum WMI_NAN_OEM_DATA_TYPE. + */ + A_UINT32 oem_data_type; + /** oem_data_len: + * Actual length in bytes of the OEM-specific data within the + * oem_data_buffer[]. + * Note that it is possible for a single message to contain multiple + * OEM opaque data blobs. In such cases, the oem_data_len field of + * nan_oem_data_hdr[0] not only specifies the size of the first such + * opaque blob, but furthermore specifies the offset in oem_data_buffer[] + * where the second opaque blob begins. + */ + A_UINT32 oem_data_len; +} wmi_nan_oem_data_hdr; + +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_oem_data_cmd_fixed_param */ + + /* Following this structure are the below TLVs: + * - wmi_nan_oem_data_hdr nan_oem_data_hdr[]; + * This TLV explains the type and size of the one or more OEM NAN + * opaque data blobs carried in this message. + * - A_UINT8 nan_oem_data_buffer[]; + * This TLV holds the contents of the one or more OEM NAN opaque data + * blobs carried in this message. + */ +} wmi_nan_oem_data_cmd_fixed_param; + #define WMI_NAN_GET_RANGING_INITIATOR_ROLE(flag) WMI_GET_BITS(flag, 0, 1) #define WMI_NAN_SET_RANGING_INITIATOR_ROLE(flag, val) WMI_SET_BITS(flag, 0, 1, val) #define WMI_NAN_GET_RANGING_RESPONDER_ROLE(flag) WMI_GET_BITS(flag, 1, 1) @@ -27650,6 +27690,19 @@ typedef struct { */ } wmi_nan_event_hdr; +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_oem_data_event_fixed_param */ + + /* Following this structure are the below TLVs: + * - wmi_nan_oem_data_hdr nan_oem_data_hdr[]; + * This TLV explains the type and size of the one or more OEM NAN + * opaque data blobs carried in this message. + * - A_UINT8 nan_oem_data_buffer[]; + * This TLV holds the contents of the one or more OEM NAN opaque data + * blobs carried in this message. + */ +} wmi_nan_oem_data_event_fixed_param; + typedef struct { A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_event_info */ A_UINT32 mac_id; /* MAC ID associated with NAN primary discovery channel; Valid only for NAN enable resp message identified by NAN_MSG_ID_ENABLE_RSP */ @@ -36690,6 +36743,7 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command) WMI_RETURN_STRING(WMI_GPIO_STATE_REQ_CMDID); WMI_RETURN_STRING(WMI_MLO_PRIMARY_LINK_PEER_MIGRATION_CMDID); WMI_RETURN_STRING(WMI_MLO_LINK_RECOMMENDATION_CMDID); + WMI_RETURN_STRING(WMI_NAN_OEM_DATA_CMDID); } return (A_UINT8 *) "Invalid WMI cmd"; diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 2aca298638cb..d519bf6c2a2c 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_ 1355 +#define __WMI_REVISION_ 1356 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work From b9736f2024170f998fb1c5ba68fcc07890289467 Mon Sep 17 00:00:00 2001 From: spuligil Date: Sat, 24 Jun 2023 06:01:26 -0700 Subject: [PATCH 25/25] fw-api: CL 23575205 - update fw common interface files add WMI_COEX_CONFIG_BT_RX_PER_THRESHOLD def Change-Id: Idaf1f30b923ef692189bb8d44a6b971a2bb99df0 CRs-Fixed: 2262693 --- fw/wmi_unified.h | 4 ++++ fw/wmi_version.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 5ace2a15c094..781425119ca2 100644 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -34405,6 +34405,10 @@ typedef enum wmi_coex_config_type { * 1 to place more emphasis on WLAN performance */ WMI_COEX_CONFIG_LE_SCAN_POLICY = 48, + /* WMI_COEX_CONFIG_BT_RX_PER_THRESHOLD + * config BT RX PER threshold + */ + WMI_COEX_CONFIG_BT_RX_PER_THRESHOLD = 49, } WMI_COEX_CONFIG_TYPE; typedef struct { diff --git a/fw/wmi_version.h b/fw/wmi_version.h index d519bf6c2a2c..cd7766461b8a 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_ 1356 +#define __WMI_REVISION_ 1357 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work