diff options
| -rw-r--r-- | fw/htt.h | 909 | ||||
| -rw-r--r-- | fw/htt_ppdu_stats.h | 168 | ||||
| -rw-r--r-- | fw/htt_stats.h | 366 | ||||
| -rwxr-xr-x | fw/wmi_services.h | 11 | ||||
| -rwxr-xr-x | fw/wmi_tlv_defs.h | 190 | ||||
| -rwxr-xr-x | fw/wmi_unified.h | 809 | ||||
| -rwxr-xr-x | fw/wmi_version.h | 2 |
7 files changed, 2363 insertions, 92 deletions
@@ -186,9 +186,14 @@ * 3.66 Add HTT_T2H_MSG_TYPE_TX_OFFLOAD_DELIVER_IND msg. * Add PKT_CAPTURE_MODE flag within HTT_T2H TX_I_ORD_PADDR_IND msg. * 3.67 Add drop threshold field to HTT_H2T RX_RING_SELECTION_CFG msg. + * 3.68 Add ipa_drop threshold fields to HTT_H2T_MSG_TYPE_SRING_SETUP + * 3.69 Add htt_ul_ofdma_user_info_v0 defs + * 3.70 Add AST1-AST3 fields to HTT_T2H PEER_MAP_V2 msg + * 3.71 Add rx offload engine / flow search engine htt setup message defs for + * HTT_H2T_MSG_TYPE_RX_FSE_SETUP_CFG, HTT_H2T_MSG_TYPE_RX_FSE_OPERATION_CFG */ #define HTT_CURRENT_VERSION_MAJOR 3 -#define HTT_CURRENT_VERSION_MINOR 67 +#define HTT_CURRENT_VERSION_MINOR 71 #define HTT_NUM_TX_FRAG_DESC 1024 @@ -527,6 +532,8 @@ enum htt_h2t_msg_type { HTT_H2T_MSG_TYPE_RFS_CONFIG = 0xf, HTT_H2T_MSG_TYPE_EXT_STATS_REQ = 0x10, HTT_H2T_MSG_TYPE_PPDU_STATS_CFG = 0x11, + HTT_H2T_MSG_TYPE_RX_FSE_SETUP_CFG = 0x12, + HTT_H2T_MSG_TYPE_RX_FSE_OPERATION_CFG = 0x13, /* keep this last */ HTT_H2T_NUM_MSGS @@ -4299,9 +4306,9 @@ PREPACK struct htt_wdi_ipa_op_request_t * setup message * * The message would appear as follows: - * |31 24|23 20|19|18 16|15|14 8|7 0| - * |--------------- +-----------------+----------------+------------------| - * | ring_type | ring_id | pdev_id | msg_type | + * |31 24|23 21|20|19|18 16|15|14 8|7 0| + * |--------------- +-----------------+-----------------+-----------------| + * | ring_type | ring_id | pdev_id | msg_type | * |----------------------------------------------------------------------| * | ring_base_addr_lo | * |----------------------------------------------------------------------| @@ -4325,12 +4332,15 @@ PREPACK struct htt_wdi_ipa_op_request_t * |----------------------------------------------------------------------| * | intr_timer_th |IM| intr_batch_counter_th | * |----------------------------------------------------------------------| - * | reserved |RR|PTCF| intr_low_threshold | + * | reserved |ID|RR| PTCF| intr_low_threshold | + * |----------------------------------------------------------------------| + * | reserved |IPA drop thres hi|IPA drop thres lo| * |----------------------------------------------------------------------| * Where * IM = sw_intr_mode * RR = response_required * PTCF = prefetch_timer_cfg + * IP = IPA drop flag * * The message is interpreted as follows: * dword0 - b'0:7 - msg_type: This will be set to @@ -4413,7 +4423,12 @@ PREPACK struct htt_wdi_ipa_op_request_t * Others: Reserverd * b'19 - response_required: * Host needs HTT_T2H_MSG_TYPE_SRING_SETUP_DONE as response - * b'20:31 - reserved: reserved for future use + * b'20 - ipa_drop_flag: + Indicates that host will config ipa drop threshold percentage + * b'21:31 - reserved: reserved for future use + * dword13 - b'0:7 - ipa drop low threshold percentage: + * b'8:15 - ipa drop high threshold percentage: + * b'16:31 - Reserved */ PREPACK struct htt_sring_setup_t { A_UINT32 msg_type: 8, @@ -4438,7 +4453,11 @@ PREPACK struct htt_sring_setup_t { A_UINT32 intr_low_threshold: 16, prefetch_timer_cfg: 3, response_required: 1, - reserved1: 12; + ipa_drop_flag: 1, + reserved1: 11; + A_UINT32 ipa_drop_low_threshold: 8, + ipa_drop_high_threshold: 8, + reserved: 16; } POSTPACK; enum htt_srng_ring_type { @@ -5811,6 +5830,466 @@ PREPACK struct htt_rx_ring_selection_cfg_t { ((_var) |= ((_val) << HTT_H2T_PPDU_STATS_CFG_TLV_BITMASK_S)); \ } while (0) +/** + * @brief Host-->target HTT RX FSE setup message + * @details + * Through this message, the host will provide details of the flow tables + * in host DDR along with hash keys. + * This message can be sent per SOC or per PDEV, which is differentiated + * by pdev id values. + * The host will allocate flow search table and sends table size, + * physical DMA address of flow table, and hash keys to firmware to + * program into the RXOLE FSE HW block. + * + * The following field definitions describe the format of the RX FSE setup + * message sent from the host to target + * + * Header fields: + * dword0 - b'7:0 - msg_type: This will be set to + * HTT_H2T_MSG_TYPE_RX_FSE_SETUP_CFG + * b'15:8 - pdev_id: 0 indicates msg is for all LMAC rings, i.e. soc + * 1, 2, 3 indicates pdev_id 0,1,2 and the msg is for that + * pdev's LMAC ring. + * b'31:16 - reserved : Reserved for future use + * dword1 - b'19:0 - number of records: This field indicates the number of + * entries in the flow table. For example: 8k number of + * records is equivalent to + * 8 * 1024 * sizeof(RX_FLOW_SEARCH_ENTRY_STRUCT) + * b'27:20 - max search: This field specifies the skid length to FSE + * parser HW module whenever match is not found at the + * exact index pointed by hash. + * b'29:28 - ip_da_sa: This indicates which IPV4-IPV6 RFC to be used. + * Refer htt_ip_da_sa_prefix below for more details. + * b'31:30 - reserved: Reserved for future use + * dword2 - b'31:0 - base address lo: Lower 4 bytes base address of flow + * table allocated by host in DDR + * dword3 - b'31:0 - base address hi: Higher 4 bytes of base address of flow + * table allocated by host in DDR + * dword4:13 - b'31:0 - Toeplitz: 315 bits of Toeplitz keys for flow table + * entry hashing + * + * + * |31 30|29 28|27|26|25 20|19 16|15 8|7 0| + * |---------------------------------------------------------------| + * | reserved | pdev_id | MSG_TYPE | + * |---------------------------------------------------------------| + * |resvd|IPDSA| max_search | Number of records | + * |---------------------------------------------------------------| + * | base address lo | + * |---------------------------------------------------------------| + * | base address high | + * |---------------------------------------------------------------| + * | toeplitz key 31_0 | + * |---------------------------------------------------------------| + * | toeplitz key 63_32 | + * |---------------------------------------------------------------| + * | toeplitz key 95_64 | + * |---------------------------------------------------------------| + * | toeplitz key 127_96 | + * |---------------------------------------------------------------| + * | toeplitz key 159_128 | + * |---------------------------------------------------------------| + * | toeplitz key 191_160 | + * |---------------------------------------------------------------| + * | toeplitz key 223_192 | + * |---------------------------------------------------------------| + * | toeplitz key 255_224 | + * |---------------------------------------------------------------| + * | toeplitz key 287_256 | + * |---------------------------------------------------------------| + * | reserved | toeplitz key 314_288(26:0 bits) | + * |---------------------------------------------------------------| + * where: + * IPDSA = ip_da_sa + */ + +/** + * @brief: htt_ip_da_sa_prefix + * 0x0 -> Prefix is 0x20010db8_00000000_00000000 + * IPv6 addresses beginning with 0x20010db8 are reserved for + * documentation per RFC3849 + * 0x1 -> Prefix is 0x00000000_00000000_0000ffff RFC4291 IPv4-mapped IPv6 + * 0x2 -> Prefix is 0x0 RFC4291 IPv4-compatible IPv6 + * 0x3 -> Prefix is 0x0064ff9b_00000000_00000000 RFC6052 well-known prefix + */ + +enum htt_ip_da_sa_prefix { + HTT_RX_IPV6_20010db8, + HTT_RX_IPV4_MAPPED_IPV6, + HTT_RX_IPV4_COMPATIBLE_IPV6, + HTT_RX_IPV6_64FF9B, +}; + +PREPACK struct htt_h2t_msg_rx_fse_setup_t { + A_UINT32 msg_type:8, /* HTT_H2T_MSG_TYPE_RX_FSE_SETUP_CFG */ + pdev_id:8, + reserved0:16; + A_UINT32 num_records:20, + max_search:8, + ip_da_sa:2, /* htt_ip_da_sa_prefix enumeration */ + reserved1:2; + A_UINT32 base_addr_lo; + A_UINT32 base_addr_hi; + A_UINT32 toeplitz31_0; + A_UINT32 toeplitz63_32; + A_UINT32 toeplitz95_64; + A_UINT32 toeplitz127_96; + A_UINT32 toeplitz159_128; + A_UINT32 toeplitz191_160; + A_UINT32 toeplitz223_192; + A_UINT32 toeplitz255_224; + A_UINT32 toeplitz287_256; + A_UINT32 toeplitz314_288:27, + reserved2:5; +} POSTPACK; + +#define HTT_RX_FSE_SETUP_SZ (sizeof(struct htt_h2t_msg_rx_fse_setup_t)) +#define HTT_RX_FSE_OPERATION_SZ (sizeof(struct htt_h2t_msg_rx_fse_operation_t)) + +#define HTT_RX_FSE_SETUP_HASH_314_288_M 0x07ffffff +#define HTT_RX_FSE_SETUP_HASH_314_288_S 0 + +/* DWORD 0: Pdev ID */ +#define HTT_RX_FSE_SETUP_PDEV_ID_M 0x0000ff00 +#define HTT_RX_FSE_SETUP_PDEV_ID_S 8 +#define HTT_RX_FSE_SETUP_PDEV_ID_GET(_var) \ + (((_var) & HTT_RX_FSE_SETUP_PDEV_ID_M) >> \ + HTT_RX_FSE_SETUP_PDEV_ID_S) +#define HTT_RX_FSE_SETUP_PDEV_ID_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_SETUP_PDEV_ID, _val); \ + ((_var) |= ((_val) << HTT_RX_FSE_SETUP_PDEV_ID_S)); \ + } while (0) + +/* DWORD 1:num of records */ +#define HTT_RX_FSE_SETUP_NUM_REC_M 0x000fffff +#define HTT_RX_FSE_SETUP_NUM_REC_S 0 +#define HTT_RX_FSE_SETUP_NUM_REC_GET(_var) \ + (((_var) & HTT_RX_FSE_SETUP_NUM_REC_M) >> \ + HTT_RX_FSE_SETUP_NUM_REC_S) +#define HTT_RX_FSE_SETUP_NUM_REC_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_SETUP_NUM_REC, _val); \ + ((_var) |= ((_val) << HTT_RX_FSE_SETUP_NUM_REC_S)); \ + } while (0) + +/* DWORD 1:max_search */ +#define HTT_RX_FSE_SETUP_MAX_SEARCH_M 0x0ff00000 +#define HTT_RX_FSE_SETUP_MAX_SEARCH_S 20 +#define HTT_RX_FSE_SETUP_MAX_SEARCH_GET(_var) \ + (((_var) & HTT_RX_FSE_SETUP_MAX_SEARCH_M) >> \ + HTT_RX_FSE_SETUP_MAX_SEARCH_S) +#define HTT_RX_FSE_SETUP_MAX_SEARCH_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_SETUP_MAX_SEARCH, _val); \ + ((_var) |= ((_val) << HTT_RX_FSE_SETUP_MAX_SEARCH_S)); \ + } while (0) + +/* DWORD 1:ip_da_sa prefix */ +#define HTT_RX_FSE_SETUP_IP_DA_SA_PREFIX_M 0x30000000 +#define HTT_RX_FSE_SETUP_IP_DA_SA_PREFIX_S 28 +#define HTT_RX_FSE_SETUP_IP_DA_SA_PREFIX_GET(_var) \ + (((_var) & HTT_RX_FSE_SETUP_IP_DA_SA_PREFIX_M) >> \ + HTT_RX_FSE_SETUP_IP_DA_SA_PREFIX_S) +#define HTT_RX_FSE_SETUP_IP_DA_SA_PREFIX_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_SETUP_IP_DA_SA_PREFIX, _val); \ + ((_var) |= ((_val) << HTT_RX_FSE_SETUP_IP_DA_SA_PREFIX_S)); \ + } while (0) + +/* DWORD 2: Base Address LO */ +#define HTT_RX_FSE_SETUP_BASE_ADDR_LO_M 0xffffffff +#define HTT_RX_FSE_SETUP_BASE_ADDR_LO_S 0 +#define HTT_RX_FSE_SETUP_BASE_ADDR_LO_GET(_var) \ + (((_var) & HTT_RX_FSE_SETUP_BASE_ADDR_LO_M) >> \ + HTT_RX_FSE_SETUP_BASE_ADDR_LO_S) +#define HTT_RX_FSE_SETUP_BASE_ADDR_LO_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_SETUP_BASE_ADDR_LO, _val); \ + ((_var) |= ((_val) << HTT_RX_FSE_SETUP_BASE_ADDR_LO_S)); \ + } while (0) + +/* DWORD 3: Base Address High */ +#define HTT_RX_FSE_SETUP_BASE_ADDR_HI_M 0xffffffff +#define HTT_RX_FSE_SETUP_BASE_ADDR_HI_S 0 +#define HTT_RX_FSE_SETUP_BASE_ADDR_HI_GET(_var) \ + (((_var) & HTT_RX_FSE_SETUP_BASE_ADDR_HI_M) >> \ + HTT_RX_FSE_SETUP_BASE_ADDR_HI_S) +#define HTT_RX_FSE_SETUP_BASE_ADDR_HI_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_SETUP_BASE_ADDR_HI, _val); \ + ((_var) |= ((_val) << HTT_RX_FSE_SETUP_BASE_ADDR_HI_S)); \ + } while (0) + +/* DWORD 4-12: Hash Value */ +#define HTT_RX_FSE_SETUP_HASH_VALUE_M 0xffffffff +#define HTT_RX_FSE_SETUP_HASH_VALUE_S 0 +#define HTT_RX_FSE_SETUP_HASH_VALUE_GET(_var) \ + (((_var) & HTT_RX_FSE_SETUP_HASH_VALUE_M) >> \ + HTT_RX_FSE_SETUP_HASH_VALUE_S) +#define HTT_RX_FSE_SETUP_HASH_VALUE_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_SETUP_HASH_VALUE, _val); \ + ((_var) |= ((_val) << HTT_RX_FSE_SETUP_HASH_VALUE_S)); \ + } while (0) + +/* DWORD 13: Hash Value 314:288 bits */ +#define HTT_RX_FSE_SETUP_HASH_314_288_GET(_var) \ + (((_var) & HTT_RX_FSE_SETUP_HASH_314_288_M) >> \ + HTT_RX_FSE_SETUP_HASH_314_288_S) +#define HTT_RX_FSE_SETUP_HASH_314_288_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_SETUP_HASH_314_288, _val); \ + ((_var) |= ((_val) << HTT_RX_FSE_SETUP_HASH_314_288_S)); \ + } while (0) + +/** + * @brief Host-->target HTT RX FSE operation message + * @details + * The host will send this Flow Search Engine (FSE) operation message for + * every flow add/delete operation. + * The FSE operation includes FSE full cache invalidation or individual entry + * invalidation. + * This message can be sent per SOC or per PDEV which is differentiated + * by pdev id values. + * + * |31 16|15 8|7 1|0| + * |-------------------------------------------------------------| + * | reserved | pdev_id | MSG_TYPE | + * |-------------------------------------------------------------| + * | reserved | operation |I| + * |-------------------------------------------------------------| + * | ip_src_addr_31_0 | + * |-------------------------------------------------------------| + * | ip_src_addr_63_32 | + * |-------------------------------------------------------------| + * | ip_src_addr_95_64 | + * |-------------------------------------------------------------| + * | ip_src_addr_127_96 | + * |-------------------------------------------------------------| + * | ip_dst_addr_31_0 | + * |-------------------------------------------------------------| + * | ip_dst_addr_63_32 | + * |-------------------------------------------------------------| + * | ip_dst_addr_95_64 | + * |-------------------------------------------------------------| + * | ip_dst_addr_127_96 | + * |-------------------------------------------------------------| + * | l4_dst_port | l4_src_port | + * | (32-bit SPI incase of IPsec) | + * |-------------------------------------------------------------| + * | reserved | l4_proto | + * |-------------------------------------------------------------| + * + * where I is 1-bit ipsec_valid. + * + * The following field definitions describe the format of the RX FSE operation + * message sent from the host to target for every add/delete flow entry to flow + * table. + * + * Header fields: + * dword0 - b'7:0 - msg_type: This will be set to + * HTT_H2T_MSG_TYPE_RX_FSE_OPERATION_CFG + * b'15:8 - pdev_id: 0 indicates msg is for all LMAC rings, i.e. soc + * 1, 2, 3 indicates pdev_id 0,1,2 and the msg is for the + * specified pdev's LMAC ring. + * b'31:16 - reserved : Reserved for future use + * dword1 - b'0 - ipsec_valid: This indicates protocol IP or IPsec + * (Internet Protocol Security). + * IPsec describes the framework for providing security at + * IP layer. IPsec is defined for both versions of IP: + * IPV4 and IPV6. + * Please refer to htt_rx_flow_proto enumeration below for + * more info. + * ipsec_valid = 1 for IPSEC packets + * ipsec_valid = 0 for IP Packets + * b'7:1 - operation: This indicates types of FSE operation. + * Refer to htt_rx_fse_operation enumeration: + * 0 - No Cache Invalidation required + * 1 - Cache invalidate only one entry given by IP + * src/dest address at DWORD[2:9] + * 2 - Complete FSE Cache Invalidation + * 3 - FSE Disable + * 4 - FSE Enable + * b'31:8 - reserved: Reserved for future use + * dword2:9-b'31:0 - IP src/dest: IPV4/IPV6 source and destination address + * for per flow addition/deletion + * For IPV4 src/dest addresses, the first A_UINT32 is used + * and the subsequent 3 A_UINT32 will be padding bytes. + * For IPV6 src/dest Addresses, all A_UINT32 are used. + * dword10 -b'31:0 - L4 src port (15:0): 16-bit Source Port numbers range + * from 0 to 65535 but only 0 to 1023 are designated as + * well-known ports. Refer to [RFC1700] for more details. + * This field is valid only if + * (valid_ip_proto(l4_proto) && (ipsec_valid == 0)) + * - L4 dest port (31:16): 16-bit Destination Port numbers + * range from 0 to 65535 but only 0 to 1023 are designated + * as well-known ports. Refer to [RFC1700] for more details. + * This field is valid only if + * (valid_ip_proto(l4_proto) && (ipsec_valid == 0)) + * - SPI (31:0): Security Parameters Index is an + * identification tag added to the header while using IPsec + * for tunneling the IP traffici. + * Valid only if IPSec_valid bit (in DWORD1) is set to 1. + * dword11 -b'7:0 - l4_proto: This carries L4 protocol numbers, which are + * Assigned Internet Protocol Numbers. + * l4_proto numbers for standard protocol like UDP/TCP + * protocol at l4 layer, e.g. l4_proto = 6 for TCP, + * l4_proto = 17 for UDP etc. + * b'31:8 - reserved: Reserved for future use. + * + */ + +PREPACK struct htt_h2t_msg_rx_fse_operation_t { + A_UINT32 msg_type:8, + pdev_id:8, + reserved0:16; + A_UINT32 ipsec_valid:1, + operation:7, + reserved1:24; + A_UINT32 ip_src_addr_31_0; + A_UINT32 ip_src_addr_63_32; + A_UINT32 ip_src_addr_95_64; + A_UINT32 ip_src_addr_127_96; + A_UINT32 ip_dest_addr_31_0; + A_UINT32 ip_dest_addr_63_32; + A_UINT32 ip_dest_addr_95_64; + A_UINT32 ip_dest_addr_127_96; + union { + A_UINT32 spi; + struct { + A_UINT32 l4_src_port:16, + l4_dest_port:16; + } ip; + } u; + A_UINT32 l4_proto:8, + reserved:24; +} POSTPACK; + +/** + * Enumeration for IP Protocol or IPSEC Protocol + * IPsec describes the framework for providing security at IP layer. + * IPsec is defined for both versions of IP: IPV4 and IPV6. + */ +enum htt_rx_flow_proto { + HTT_RX_FLOW_IP_PROTO, + HTT_RX_FLOW_IPSEC_PROTO, +}; + +/** + * Enumeration for FSE Cache Invalidation + * 0 - No Cache Invalidation required + * 1 - Cache invalidate only one entry given by IP src/dest address at DWORD2:9 + * 2 - Complete FSE Cache Invalidation + * 3 - FSE Disable + * 4 - FSE Enable + */ +enum htt_rx_fse_operation { + HTT_RX_FSE_CACHE_INVALIDATE_NONE, + HTT_RX_FSE_CACHE_INVALIDATE_ENTRY, + HTT_RX_FSE_CACHE_INVALIDATE_FULL, + HTT_RX_FSE_DISABLE, + HTT_RX_FSE_ENABLE, +}; + +/* DWORD 0: Pdev ID */ +#define HTT_RX_FSE_OPERATION_PDEV_ID_M 0x0000ff00 +#define HTT_RX_FSE_OPERATION_PDEV_ID_S 8 +#define HTT_RX_FSE_OPERATION_PDEV_ID_GET(_var) \ + (((_var) & HTT_RX_FSE_OPERATION_PDEV_ID_M) >> \ + HTT_RX_FSE_OPERATION_PDEV_ID_S) +#define HTT_RX_FSE_OPERATION_PDEV_ID_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_OPERATION_PDEV_ID, _val); \ + ((_var) |= ((_val) << HTT_RX_FSE_OPERATION_PDEV_ID_S)); \ + } while (0) + +/* DWORD 1:IP PROTO or IPSEC */ +#define HTT_RX_FSE_IPSEC_VALID_M 0x00000001 +#define HTT_RX_FSE_IPSEC_VALID_S 0 + +#define HTT_RX_FSE_IPSEC_VALID_SET(word, ipsec_valid) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_IPSEC_VALID, ipsec_valid); \ + (word) |= ((ipsec_valid) << HTT_RX_FSE_IPSEC_VALID_S); \ + } while (0) +#define HTT_RX_FSE_IPSEC_VALID_GET(word) \ + (((word) & HTT_RX_FSE_IPSEC_VALID_M) >> HTT_RX_FSE_IPSEC_VALID_S) + +/* DWORD 1:FSE Operation */ +#define HTT_RX_FSE_OPERATION_M 0x000000fe +#define HTT_RX_FSE_OPERATION_S 1 + +#define HTT_RX_FSE_OPERATION_SET(word, op_val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_OPERATION, op_val); \ + (word) |= ((op_val) << HTT_RX_FSE_OPERATION_S); \ + } while (0) +#define HTT_RX_FSE_OPERATION_GET(word) \ + (((word) & HTT_RX_FSE_OPERATION_M) >> HTT_RX_FSE_OPERATION_S) + +/* DWORD 2-9:IP Address */ +#define HTT_RX_FSE_OPERATION_IP_ADDR_M 0xffffffff +#define HTT_RX_FSE_OPERATION_IP_ADDR_S 0 +#define HTT_RX_FSE_OPERATION_IP_ADDR_GET(_var) \ + (((_var) & HTT_RX_FSE_OPERATION_IP_ADDR_M) >> \ + HTT_RX_FSE_OPERATION_IP_ADDR_S) +#define HTT_RX_FSE_OPERATION_IP_ADDR_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_OPERATION_IP_ADDR, _val); \ + ((_var) |= ((_val) << HTT_RX_FSE_OPERATION_IP_ADDR_S)); \ + } while (0) + +/* DWORD 10:Source Port Number */ +#define HTT_RX_FSE_SOURCEPORT_M 0x0000ffff +#define HTT_RX_FSE_SOURCEPORT_S 0 + +#define HTT_RX_FSE_SOURCEPORT_SET(word, sport) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_SOURCEPORT, sport); \ + (word) |= ((sport) << HTT_RX_FSE_SOURCEPORT_S); \ + } while (0) +#define HTT_RX_FSE_SOURCEPORT_GET(word) \ + (((word) & HTT_RX_FSE_SOURCEPORT_M) >> HTT_RX_FSE_SOURCEPORT_S) + + +/* DWORD 11:Destination Port Number */ +#define HTT_RX_FSE_DESTPORT_M 0xffff0000 +#define HTT_RX_FSE_DESTPORT_S 16 + +#define HTT_RX_FSE_DESTPORT_SET(word, dport) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_DESTPORT, dport); \ + (word) |= ((dport) << HTT_RX_FSE_DESTPORT_S); \ + } while (0) +#define HTT_RX_FSE_DESTPORT_GET(word) \ + (((word) & HTT_RX_FSE_DESTPORT_M) >> HTT_RX_FSE_DESTPORT_S) + +/* DWORD 10-11:SPI (In case of IPSEC) */ +#define HTT_RX_FSE_OPERATION_SPI_M 0xffffffff +#define HTT_RX_FSE_OPERATION_SPI_S 0 +#define HTT_RX_FSE_OPERATION_SPI_GET(_var) \ + (((_var) & HTT_RX_FSE_OPERATION_SPI_ADDR_M) >> \ + HTT_RX_FSE_OPERATION_SPI_ADDR_S) +#define HTT_RX_FSE_OPERATION_SPI_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_OPERATION_SPI, _val); \ + ((_var) |= ((_val) << HTT_RX_FSE_OPERATION_SPI_S)); \ + } while (0) + +/* DWORD 12:L4 PROTO */ +#define HTT_RX_FSE_L4_PROTO_M 0x000000ff +#define HTT_RX_FSE_L4_PROTO_S 0 + +#define HTT_RX_FSE_L4_PROTO_SET(word, proto_val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_FSE_L4_PROTO, proto_val); \ + (word) |= ((proto_val) << HTT_RX_FSE_L4_PROTO_S); \ + } while (0) +#define HTT_RX_FSE_L4_PROTO_GET(word) \ + (((word) & HTT_RX_FSE_L4_PROTO_M) >> HTT_RX_FSE_L4_PROTO_S) + + /*=== target -> host messages ===============================================*/ @@ -7958,7 +8437,8 @@ PREPACK struct htt_tx_offload_deliver_ind_hdr_t * to identify which peer the frame needs to be forwarded to (i.e. the * peer assocated with the Destination MAC Address within the packet), * and particularly which vdev needs to transmit the frame (for cases - * of inter-vdev rx --> tx forwarding). + * of inter-vdev rx --> tx forwarding). The HW peer id here is the same + * meaning as AST_INDEX_0. * This DA-based peer ID that is provided for certain rx frames * (the rx frames that need to be re-transmitted as tx frames) * is the ID that the HW uses for referring to the peer in question, @@ -7971,7 +8451,7 @@ PREPACK struct htt_tx_offload_deliver_ind_hdr_t * |-----------------------------------------------------------------------| * | MAC addr 3 | MAC addr 2 | MAC addr 1 | MAC addr 0 | * |-----------------------------------------------------------------------| - * | HW peer ID | MAC addr 5 | MAC addr 4 | + * | HW peer ID / AST index 0 | MAC addr 5 | MAC addr 4 | * |-----------------------------------------------------------------------| * * @@ -8101,26 +8581,34 @@ PREPACK struct htt_tx_offload_deliver_ind_hdr_t * is the ID that the HW uses for referring to the peer in question, * rather than the peer ID that the SW+FW use to refer to the peer. * + * The HW peer id here is the same meaning as AST_INDEX_0. + * Some chips support up to 4 AST indices per peer: AST_INDEX_0, AST_INDEX_1, + * AST_INDEX_2, and AST_INDEX_3. AST 0 is always valid; for AST 1 through + * AST 3, check the AST_VALID_MASK(3) to see if the corresponding extension + * AST is valid. * - * |31 24|23 16|15 8|7 0| + * |31 28|27 24|23 20|19 17|16|15 8|7 0| * |-----------------------------------------------------------------------| * | SW peer ID | VDEV ID | msg type | * |-----------------------------------------------------------------------| * | MAC addr 3 | MAC addr 2 | MAC addr 1 | MAC addr 0 | * |-----------------------------------------------------------------------| - * | HW peer ID | MAC addr 5 | MAC addr 4 | + * | HW peer ID / AST index 0 | MAC addr 5 | MAC addr 4 | * |-----------------------------------------------------------------------| - * | Reserved_17_31 | Next Hop | AST Hash Value | + * | Reserved_20_31 |ASTVM|NH| AST Hash Value | * |-----------------------------------------------------------------------| - * | Reserved_0 | + * | ASTFM3 | ASTFM2 | ASTFM1 | ASTFM0 | AST index 1 | * |-----------------------------------------------------------------------| - * | Reserved_1 | + * |TID valid low pri| TID valid hi pri| AST index 2 | * |-----------------------------------------------------------------------| - * | Reserved_2 | + * | Reserved_1 | AST index 3 | * |-----------------------------------------------------------------------| - * | Reserved_3 | + * | Reserved_2 | * |-----------------------------------------------------------------------| - * + * Where: + * NH = Next Hop + * ASTVM = AST valid mask + * ASTFM = AST flow mask * * The following field definitions describe the format of the rx peer map v2 * messages sent from the target to the host. @@ -8144,7 +8632,7 @@ PREPACK struct htt_tx_offload_deliver_ind_hdr_t * Bits 15:0 * Purpose: Identifies which peer node the peer ID is for. * Value: upper 2 bytes of peer node's MAC address - * - HW_PEER_ID + * - HW_PEER_ID / AST_INDEX_0 * Bits 31:16 * Purpose: Identifies the HW peer ID corresponding to the peer MAC * address, so for rx frames marked for rx --> tx forwarding, the @@ -8159,6 +8647,36 @@ PREPACK struct htt_tx_offload_deliver_ind_hdr_t * Bit 16 * Purpose: Bit indicates that a next_hop AST entry is used for WDS * (Wireless Distribution System). + * - AST_VALID_MASK + * Bits 19:17 + * Purpose: Indicate if the AST 1 through AST 3 are valid + * - AST_INDEX_1 + * Bits 15:0 + * Purpose: indicate the second AST index for this peer + * - AST_0_FLOW_MASK + * Bits 19:16 + * Purpose: identify the which flow the AST 0 entry corresponds to. + * - AST_1_FLOW_MASK + * Bits 23:20 + * Purpose: identify the which flow the AST 1 entry corresponds to. + * - AST_2_FLOW_MASK + * Bits 27:24 + * Purpose: identify the which flow the AST 2 entry corresponds to. + * - AST_3_FLOW_MASK + * Bits 31:28 + * Purpose: identify the which flow the AST 3 entry corresponds to. + * - AST_INDEX_2 + * Bits 15:0 + * Purpose: indicate the third AST index for this peer + * - TID_VALID_HI_PRI + * Bits 23:16 + * Purpose: identify if this peer's TIDs 0-7 support HI priority flow + * - TID_VALID_LOW_PRI + * Bits 31:24 + * Purpose: identify if this peer's TIDs 0-7 support Low priority flow + * - AST_INDEX_3 + * Bits 15:0 + * Purpose: indicate the fourth AST index for this peer */ #define HTT_RX_PEER_MAP_V2_VDEV_ID_M 0xff00 #define HTT_RX_PEER_MAP_V2_VDEV_ID_S 8 @@ -8174,6 +8692,29 @@ PREPACK struct htt_tx_offload_deliver_ind_hdr_t #define HTT_RX_PEER_MAP_V2_AST_HASH_VALUE_S 0 #define HTT_RX_PEER_MAP_V2_NEXT_HOP_M 0x00010000 #define HTT_RX_PEER_MAP_V2_NEXT_HOP_S 16 +#define HTT_RX_PEER_MAP_V2_AST_VALID_MASK_M 0x000e0000 +#define HTT_RX_PEER_MAP_V2_AST_VALID_MASK_S 17 + +#define HTT_RX_PEER_MAP_V2_AST_INDEX_1_M 0xffff +#define HTT_RX_PEER_MAP_V2_AST_INDEX_1_S 0 +#define HTT_RX_PEER_MAP_V2_AST_0_FLOW_MASK_M 0x000f0000 +#define HTT_RX_PEER_MAP_V2_AST_0_FLOW_MASK_S 16 +#define HTT_RX_PEER_MAP_V2_AST_1_FLOW_MASK_M 0x00f00000 +#define HTT_RX_PEER_MAP_V2_AST_1_FLOW_MASK_S 20 +#define HTT_RX_PEER_MAP_V2_AST_2_FLOW_MASK_M 0x0f000000 +#define HTT_RX_PEER_MAP_V2_AST_2_FLOW_MASK_S 24 +#define HTT_RX_PEER_MAP_V2_AST_3_FLOW_MASK_M 0xf0000000 +#define HTT_RX_PEER_MAP_V2_AST_3_FLOW_MASK_S 28 + +#define HTT_RX_PEER_MAP_V2_AST_INDEX_2_M 0xffff +#define HTT_RX_PEER_MAP_V2_AST_INDEX_2_S 0 +#define HTT_RX_PEER_MAP_V2_TID_VALID_HI_PRI_M 0x00ff0000 +#define HTT_RX_PEER_MAP_V2_TID_VALID_HI_PRI_S 16 +#define HTT_RX_PEER_MAP_V2_TID_VALID_LOW_PRI_M 0xff000000 +#define HTT_RX_PEER_MAP_V2_TID_VALID_LOW_PRI_S 24 + +#define HTT_RX_PEER_MAP_V2_AST_INDEX_3_M 0xffff +#define HTT_RX_PEER_MAP_V2_AST_INDEX_3_S 0 #define HTT_RX_PEER_MAP_V2_VDEV_ID_SET(word, value) \ do { \ @@ -8215,10 +8756,97 @@ PREPACK struct htt_tx_offload_deliver_ind_hdr_t #define HTT_RX_PEER_MAP_V2_NEXT_HOP_GET(word) \ (((word) & HTT_RX_PEER_MAP_V2_NEXT_HOP_M) >> HTT_RX_PEER_MAP_V2_NEXT_HOP_S) +#define HTT_RX_PEER_MAP_V2_AST_VALID_MASK_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_PEER_MAP_V2_AST_VALID_MASK, value); \ + (word) |= (value) << HTT_RX_PEER_MAP_V2_AST_VALID_MASK_S; \ + } while (0) +#define HTT_RX_PEER_MAP_V2_AST_VALID_MASK_GET(word) \ + (((word) & HTT_RX_PEER_MAP_V2_AST_VALID_MASK_M) >> HTT_RX_PEER_MAP_V2_AST_VALID_MASK_S) + +#define HTT_RX_PEER_MAP_V2_AST_INDEX_1_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_PEER_MAP_V2_AST_INDEX_1, value); \ + (word) |= (value) << HTT_RX_PEER_MAP_V2_AST_INDEX_1_S; \ + } while (0) +#define HTT_RX_PEER_MAP_V2_AST_INDEX_1_GET(word) \ + (((word) & HTT_RX_PEER_MAP_V2_AST_INDEX_1_M) >> HTT_RX_PEER_MAP_V2_AST_INDEX_1_S) + +#define HTT_RX_PEER_MAP_V2_AST_0_FLOW_MASK_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_PEER_MAP_V2_AST_0_FLOW_MASK, value); \ + (word) |= (value) << HTT_RX_PEER_MAP_V2_AST_0_FLOW_MASK_S; \ + } while (0) +#define HTT_RX_PEER_MAP_V2_AST_0_FLOW_MASK_GET(word) \ + (((word) & HTT_RX_PEER_MAP_V2_AST_0_FLOW_MASK_M) >> HTT_RX_PEER_MAP_V2_AST_0_FLOW_MASK_S) + +#define HTT_RX_PEER_MAP_V2_AST_1_FLOW_MASK_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_PEER_MAP_V2_AST_1_FLOW_MASK, value); \ + (word) |= (value) << HTT_RX_PEER_MAP_V2_AST_1_FLOW_MASK_S; \ + } while (0) +#define HTT_RX_PEER_MAP_V2_AST_1_FLOW_MASK_GET(word) \ + (((word) & HTT_RX_PEER_MAP_V2_AST_1_FLOW_MASK_M) >> HTT_RX_PEER_MAP_V2_AST_1_FLOW_MASK_S) + +#define HTT_RX_PEER_MAP_V2_AST_2_FLOW_MASK_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_PEER_MAP_V2_AST_2_FLOW_MASK, value); \ + (word) |= (value) << HTT_RX_PEER_MAP_V2_AST_2_FLOW_MASK_S; \ + } while (0) +#define HTT_RX_PEER_MAP_V2_AST_2_FLOW_MASK_GET(word) \ + (((word) & HTT_RX_PEER_MAP_V2_AST_2_FLOW_MASK_M) >> HTT_RX_PEER_MAP_V2_AST_2_FLOW_MASK_S) + +#define HTT_RX_PEER_MAP_V2_AST_3_FLOW_MASK_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_PEER_MAP_V2_AST_3_FLOW_MASK, value); \ + (word) |= (value) << HTT_RX_PEER_MAP_V2_AST_3_FLOW_MASK_S; \ + } while (0) +#define HTT_RX_PEER_MAP_V2_AST_3_FLOW_MASK_GET(word) \ + (((word) & HTT_RX_PEER_MAP_V2_AST_3_FLOW_MASK_M) >> HTT_RX_PEER_MAP_V2_AST_3_FLOW_MASK_S) + +#define HTT_RX_PEER_MAP_V2_AST_INDEX_2_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_PEER_MAP_V2_AST_INDEX_2, value); \ + (word) |= (value) << HTT_RX_PEER_MAP_V2_AST_INDEX_2_S; \ + } while (0) +#define HTT_RX_PEER_MAP_V2_AST_INDEX_2_GET(word) \ + (((word) & HTT_RX_PEER_MAP_V2_AST_INDEX_2_M) >> HTT_RX_PEER_MAP_V2_AST_INDEX_2_S) +#define HTT_RX_PEER_MAP_V2_TID_VALID_HI_PRI_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_PEER_MAP_V2_TID_VALID_HI_PRI, value); \ + (word) |= (value) << HTT_RX_PEER_MAP_V2_TID_VALID_HI_PRI_S; \ + } while (0) +#define HTT_RX_PEER_MAP_V2_TID_VALID_HI_PRI_GET(word) \ + (((word) & HTT_RX_PEER_MAP_V2_TID_VALID_HI_PRI_M) >> HTT_RX_PEER_MAP_V2_TID_VALID_HI_PRI_S) + +#define HTT_RX_PEER_MAP_V2_TID_VALID_LOW_PRI_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_PEER_MAP_V2_TID_VALID_LOW_PRI, value); \ + (word) |= (value) << HTT_RX_PEER_MAP_V2_TID_VALID_LOW_PRI_S; \ + } while (0) +#define HTT_RX_PEER_MAP_V2_TID_VALID_LOW_PRI_GET(word) \ + (((word) & HTT_RX_PEER_MAP_V2_TID_VALID_LOW_PRI_M) >> HTT_RX_PEER_MAP_V2_TID_VALID_LOW_PRI_S) + +#define HTT_RX_PEER_MAP_V2_AST_INDEX_3_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_PEER_MAP_V2_AST_INDEX_3, value); \ + (word) |= (value) << HTT_RX_PEER_MAP_V2_AST_INDEX_3_S; \ + } while (0) +#define HTT_RX_PEER_MAP_V2_AST_INDEX_3_GET(word) \ + (((word) & HTT_RX_PEER_MAP_V2_AST_INDEX_3_M) >> HTT_RX_PEER_MAP_V2_AST_INDEX_3_S) + + #define HTT_RX_PEER_MAP_V2_MAC_ADDR_OFFSET 4 /* bytes */ #define HTT_RX_PEER_MAP_V2_HW_PEER_ID_OFFSET 8 /* bytes */ #define HTT_RX_PEER_MAP_V2_AST_HASH_INDEX_OFFSET 12 /* bytes */ #define HTT_RX_PEER_MAP_V2_NEXT_HOP_OFFSET 12 /* bytes */ +#define HTT_RX_PEER_MAP_V2_AST_VALID_MASK_OFFSET 12 /* bytes */ +#define HTT_RX_PEER_MAP_V2_AST_INDEX_1_OFFSET 16 /* bytes */ +#define HTT_RX_PEER_MAP_V2_AST_X_FLOW_MASK_OFFSET 16 /* bytes */ +#define HTT_RX_PEER_MAP_V2_AST_INDEX_2_OFFSET 20 /* bytes */ +#define HTT_RX_PEER_MAP_V2_TID_VALID_LO_PRI_OFFSET 20 /* bytes */ +#define HTT_RX_PEER_MAP_V2_TID_VALID_HI_PRI_OFFSET 20 /* bytes */ +#define HTT_RX_PEER_MAP_V2_AST_INDEX_3_OFFSET 24 /* bytes */ #define HTT_RX_PEER_MAP_V2_BYTES 32 @@ -12319,4 +12947,249 @@ PREPACK struct htt_t2h_msg_bkpressure_event_ind_t { A_UINT32 backpressure_time_ms; /* Time in milliseconds for which backpressure is seen continuously */ } POSTPACK; + +/* + * Defines two 32 bit words that can be used by the target to indicate a per + * user RU allocation and rate information. + * + * This information is currently provided in the "sw_response_reference_ptr" + * (word 0) and "sw_response_reference_ptr_ext" (word 1) fields of the + * "rx_ppdu_end_user_stats" TLV. + * + * VALID: + * The consumer of these words must explicitly check the valid bit, + * and only attempt interpretation of any of the remaining fields if + * the valid bit is set to 1. + * + * VERSION: + * The consumer of these words must also explicitly check the version bit, + * and only use the V0 definition if the VERSION field is set to 0. + * + * Version 1 is currently undefined, with the exception of the VALID and + * VERSION fields. + * + * Version 0: + * + * The fields below are duplicated per BW. + * + * The consumer must determine which BW field to use, based on the UL OFDMA + * PPDU BW indicated by HW. + * + * RU_START: RU26 start index for the user. + * Note that this is always using the RU26 index, regardless + * of the actual RU assigned to the user + * (i.e. the second RU52 is RU_START 2, RU_SIZE + * HTT_UL_OFDMA_V0_RU_SIZE_RU_52) + * + * For example, 20MHz (the value in the top row is RU_START) + * + * RU Size 0 (26): |0|1|2|3|4|5|6|7|8| + * RU Size 1 (52): | | | | | | + * RU Size 2 (106): | | | | + * RU Size 3 (242): | | + * + * RU_SIZE: Indicates the RU size, as defined by enum + * htt_ul_ofdma_user_info_ru_size. + * + * LDPC: LDPC enabled (if 0, BCC is used) + * + * DCM: DCM enabled + * + * |31 | 30|29 23|22 19|18 16|15 9| 8 | 7 |6 3|2 0| + * |---------------------------------+--------------------------------| + * |Ver|Valid| FW internal | + * |---------------------------------+--------------------------------| + * | reserved |Trig Type|RU SIZE| RU START |DCM|LDPC|MCS |NSS| + * |---------------------------------+--------------------------------| + */ + +enum htt_ul_ofdma_user_info_ru_size { + HTT_UL_OFDMA_V0_RU_SIZE_RU_26, + HTT_UL_OFDMA_V0_RU_SIZE_RU_52, + HTT_UL_OFDMA_V0_RU_SIZE_RU_106, + HTT_UL_OFDMA_V0_RU_SIZE_RU_242, + HTT_UL_OFDMA_V0_RU_SIZE_RU_484, + HTT_UL_OFDMA_V0_RU_SIZE_RU_996, + HTT_UL_OFDMA_V0_RU_SIZE_RU_996x2 +}; + +/* htt_up_ofdma_user_info_v0 provides an abstract view of the info */ +struct htt_ul_ofdma_user_info_v0 { + A_UINT32 word0; + A_UINT32 word1; +}; + +/* htt_up_ofdma_user_info_v0_bitmap shows what bitfields are within the info */ +PREPACK struct htt_ul_ofdma_user_info_v0_bitmap { + union { + A_UINT32 word0; + struct { + A_UINT32 w0_fw_rsvd:30; + A_UINT32 w0_valid:1; + A_UINT32 w0_version:1; + }; + }; + union { + A_UINT32 word1; + struct { + A_UINT32 w1_nss:3; + A_UINT32 w1_mcs:4; + A_UINT32 w1_ldpc:1; + A_UINT32 w1_dcm:1; + A_UINT32 w1_ru_start:7; + A_UINT32 w1_ru_size:3; + A_UINT32 w1_trig_type:4; + A_UINT32 w1_unused:9; + }; + }; +} POSTPACK; + +enum HTT_UL_OFDMA_TRIG_TYPE { + HTT_UL_OFDMA_USER_INFO_V0_TRIG_TYPE_BASIC = 0, + HTT_UL_OFDMA_USER_INFO_V0_TRIG_TYPE_BFRP, + HTT_UL_OFDMA_USER_INFO_V0_TRIG_TYPE_MU_BAR, + HTT_UL_OFDMA_USER_INFO_V0_TRIG_TYPE_MU_RTS_CTS, + HTT_UL_OFDMA_USER_INFO_V0_TRIG_TYPE_BSR, +}; + + +#define HTT_UL_OFDMA_USER_INFO_V0_SZ (sizeof(struct htt_ul_ofdma_user_info_v0)) + +#define HTT_UL_OFDMA_USER_INFO_V0_W0_FW_INTERNAL_M 0x0000ffff +#define HTT_UL_OFDMA_USER_INFO_V0_W0_FW_INTERNAL_S 0 + +#define HTT_UL_OFDMA_USER_INFO_V0_W0_VALID_M 0x40000000 +#define HTT_UL_OFDMA_USER_INFO_V0_W0_VALID_S 30 + +#define HTT_UL_OFDMA_USER_INFO_V0_W0_VER_M 0x80000000 +#define HTT_UL_OFDMA_USER_INFO_V0_W0_VER_S 31 + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_NSS_M 0x00000007 +#define HTT_UL_OFDMA_USER_INFO_V0_W1_NSS_S 0 + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_MCS_M 0x00000078 +#define HTT_UL_OFDMA_USER_INFO_V0_W1_MCS_S 3 + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_LDPC_M 0x00000080 +#define HTT_UL_OFDMA_USER_INFO_V0_W1_LDPC_S 7 + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_DCM_M 0x00000100 +#define HTT_UL_OFDMA_USER_INFO_V0_W1_DCM_S 8 + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_RU_START_M 0x0000fe00 +#define HTT_UL_OFDMA_USER_INFO_V0_W1_RU_START_S 9 + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_RU_SIZE_M 0x00070000 +#define HTT_UL_OFDMA_USER_INFO_V0_W1_RU_SIZE_S 16 + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_TRIG_TYP_M 0x00780000 +#define HTT_UL_OFDMA_USER_INFO_V0_W1_TRIG_TYP_S 19 + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_RESERVED1_M 0xff800000 +#define HTT_UL_OFDMA_USER_INFO_V0_W1_RESERVED1_S 23 + +/*--- word 0 ---*/ + +#define HTT_UL_OFDMA_USER_INFO_V0_W0_FW_INTERNAL_GET(word) \ + (((word) & HTT_UL_OFDMA_USER_INFO_V0_W0_FW_INTERNAL_M) >> HTT_UL_OFDMA_USER_INFO_V0_W0_FW_INTERNAL_S) + +#define HTT_UL_OFDMA_USER_INFO_V0_W0_FW_INTERNAL_SET(word, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_UL_OFDMA_USER_INFO_V0_W0_FW_INTERNAL, _val); \ + ((word) |= ((_val) << HTT_UL_OFDMA_USER_INFO_V0_W0_FW_INTERNAL_S)); \ + } while (0) + + +#define HTT_UL_OFDMA_USER_INFO_V0_W0_VALID_GET(word) \ + (((word) & HTT_UL_OFDMA_USER_INFO_V0_W0_VALID_M) >> HTT_UL_OFDMA_USER_INFO_V0_W0_VALID_S) + +#define HTT_UL_OFDMA_USER_INFO_V0_W0_VALID_SET(word, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_UL_OFDMA_USER_INFO_V0_W0_VALID, _val); \ + ((word) |= ((_val) << HTT_UL_OFDMA_USER_INFO_V0_W0_VALID_S)); \ + } while (0) + + +#define HTT_UL_OFDMA_USER_INFO_V0_W0_VER_GET(word) \ + (((word) & HTT_UL_OFDMA_USER_INFO_V0_W0_VER_M) >> HTT_UL_OFDMA_USER_INFO_V0_W0_VER_S) + +#define HTT_UL_OFDMA_USER_INFO_V0_W0_VER_SET(word, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_UL_OFDMA_USER_INFO_V0_W0_VER, _val); \ + ((word) |= ((_val) << HTT_UL_OFDMA_USER_INFO_V0_W0_VER_S)); \ + } while (0) + + +/*--- word 1 ---*/ + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_NSS_GET(word) \ + (((word) & HTT_UL_OFDMA_USER_INFO_V0_W1_NSS_M) >> HTT_UL_OFDMA_USER_INFO_V0_W1_NSS_S) + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_NSS_SET(word, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_UL_OFDMA_USER_INFO_V0_W1_NSS, _val); \ + ((word) |= ((_val) << HTT_UL_OFDMA_USER_INFO_V0_W1_NSS_S)); \ + } while (0) + + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_MCS_GET(word) \ + (((word) & HTT_UL_OFDMA_USER_INFO_V0_W1_MCS_M) >> HTT_UL_OFDMA_USER_INFO_V0_W1_MCS_S) + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_MCS_SET(word, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_UL_OFDMA_USER_INFO_V0_W1_MCS, _val); \ + ((word) |= ((_val) << HTT_UL_OFDMA_USER_INFO_V0_W1_MCS_S)); \ + } while (0) + + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_LDPC_GET(word) \ + (((word) & HTT_UL_OFDMA_USER_INFO_V0_W1_LDPC_M) >> HTT_UL_OFDMA_USER_INFO_V0_W1_LDPC_S) + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_LDPC_SET(word, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_UL_OFDMA_USER_INFO_V0_W1_LDPC, _val); \ + ((word) |= ((_val) << HTT_UL_OFDMA_USER_INFO_V0_W1_LDPC_S)); \ + } while (0) + + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_DCM_GET(word) \ + (((word) & HTT_UL_OFDMA_USER_INFO_V0_W1_DCM_M) >> HTT_UL_OFDMA_USER_INFO_V0_W1_DCM_S) + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_DCM_SET(word, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_UL_OFDMA_USER_INFO_V0_W1_DCM, _val); \ + ((word) |= ((_val) << HTT_UL_OFDMA_USER_INFO_V0_W1_DCM_S)); \ + } while (0) + + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_RU_START_GET(word) \ + (((word) & HTT_UL_OFDMA_USER_INFO_V0_W1_RU_START_M) >> HTT_UL_OFDMA_USER_INFO_V0_W1_RU_START_S) + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_RU_START_SET(word, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_UL_OFDMA_USER_INFO_V0_W1_RU_START, _val); \ + ((word) |= ((_val) << HTT_UL_OFDMA_USER_INFO_V0_W1_RU_START_S)); \ + } while (0) + + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_RU_SIZE_GET(word) \ + (((word) & HTT_UL_OFDMA_USER_INFO_V0_W1_RU_SIZE_M) >> HTT_UL_OFDMA_USER_INFO_V0_W1_RU_SIZE_S) + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_RU_SIZE_SET(word, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_UL_OFDMA_USER_INFO_V0_W1_RU_SIZE, _val); \ + ((word) |= ((_val) << HTT_UL_OFDMA_USER_INFO_V0_W1_RU_SIZE_S)); \ + } while (0) + + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_TRIG_TYP_GET(word) \ + (((word) & HTT_UL_OFDMA_USER_INFO_V0_W1_TRIG_TYP_M) >> HTT_UL_OFDMA_USER_INFO_V0_W1_TRIG_TYP_S) + +#define HTT_UL_OFDMA_USER_INFO_V0_W1_TRIG_TYP_SET(word, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_UL_OFDMA_USER_INFO_V0_W1_RU_TRIG_TYP, _val); \ + ((word) |= ((_val) << HTT_UL_OFDMA_USER_INFO_V0_W1_RU_TRIG_TYP_S)); \ + } while (0) + + #endif diff --git a/fw/htt_ppdu_stats.h b/fw/htt_ppdu_stats.h index 7181561e5c2b..91eb1d1b6783 100644 --- a/fw/htt_ppdu_stats.h +++ b/fw/htt_ppdu_stats.h @@ -26,6 +26,9 @@ #include <htt.h> #include <htt_stats.h> +#define HTT_STATS_MAX_CHAINS 8 +#define HTT_STATS_NUM_SUPPORTED_BW_SMART_ANTENNA 4 /* 20, 40, 80, 160 MHz */ + #define HTT_BA_64_BIT_MAP_SIZE_DWORDS 2 #define HTT_BA_256_BIT_MAP_SIZE_DWORDS 8 enum htt_ppdu_stats_tlv_tag { @@ -1288,8 +1291,32 @@ typedef struct { resp_ppdu_type: 2; }; }; + + /* Note: This is for tracking a UL OFDMA packet */ + union { + A_UINT32 trig_cookie_info; + struct { + A_UINT32 trig_cookie: 16, + trig_cookie_rsvd: 15, + trig_cookie_valid: 1; + }; + }; } htt_ppdu_stats_user_rate_tlv; +#define HTT_PPDU_STATS_USR_RATE_COOKIE_M 0x0000ffff +#define HTT_PPDU_STATS_USR_RATE_COOKIE_S 0 + +#define HTT_PPDU_STATS_USR_RATE_VALID_M 0x80000000 +#define HTT_PPDU_STATS_USR_RATE_VALID_S 31 + +#define HTT_PPDU_STATS_USR_RATE_COOKIE_GET(_val) \ + (((_val) & HTT_PPDU_STATS_USR_RATE_COOKIE_M) >> \ + HTT_PPDU_STATS_USR_RATE_COOKIE_S) + +#define HTT_PPDU_STATS_USR_RATE_VALID_GET(_val) \ + (((_val) & HTT_PPDU_STATS_USR_RATE_VALID_M) >> \ + HTT_PPDU_STATS_USR_RATE_VALID_S) + #define HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_TID_NUM_M 0x000000ff #define HTT_PPDU_STATS_ENQ_MPDU_BITMAP_TLV_TID_NUM_S 0 @@ -1486,6 +1513,84 @@ typedef enum HTT_PPDU_STATS_RESP_TYPE HTT_PPDU_STATS_RESP_TYPE; ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_RESP_TYPE_S)); \ } while (0) +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CHAIN_RSSI_M 0xffffffff +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CHAIN_RSSI_S 0 + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CHAIN_RSSI_GET(_var) \ + (((_var) & HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CHAIN_RSSI_M) >> \ + HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CHAIN_RSSI_S) + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CHAIN_RSSI_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CHAIN_RSSI, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CHAIN_RSSI_S)); \ + } while (0) + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TX_ANTENNA_MASK_M 0xffffffff +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TX_ANTENNA_MASK_S 0 + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TX_ANTENNA_MASK_GET(_var) \ + (((_var) & HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TX_ANTENNA_MASK_M) >> \ + HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TX_ANTENNA_MASK_S) + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TX_ANTENNA_MASK_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TX_ANTENNA_MASK, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_TX_ANTENNA_MASK_S)); \ + } while (0) + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_TRAINING_M 0x00010000 +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_TRAINING_S 16 + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_TRAINING_GET(_var) \ + (((_var) & HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_TRAINING_M) >> \ + HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_TRAINING_S) + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_TRAINING_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_TRAINING, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_IS_TRAINING_S)); \ + } while (0) + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_PENDING_TRAINING_PKTS_M 0x0000ffff +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_PENDING_TRAINING_PKTS_S 0 + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_PENDING_TRAINING_PKTS_GET(_var) \ + (((_var) & HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_PENDING_TRAINING_PKTS_M) >> \ + HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_PENDING_TRAINING_PKTS_S) + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_PENDING_TRAINING_PKTS_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_PENDING_TRAINING_PKTS, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_PENDING_TRAINING_PKTS_S)); \ + } while (0) + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MAX_RATES_M 0xffffffff +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MAX_RATES_S 0 + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MAX_RATES_GET(_var) \ + (((_var) & HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MAX_RATES_M) >> \ + HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MAX_RATES_S) + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MAX_RATES_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MAX_RATES, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_MAX_RATES_S)); \ + } while (0) + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CURRENT_RATE_PER_M 0xffffffff +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CURRENT_RATE_PER_S 0 + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CURRENT_RATE_PER_GET(_var) \ + (((_var) & HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CURRENT_RATE_PER_M) >> \ + HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CURRENT_RATE_PER_S) + +#define HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CURRENT_RATE_PER_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CURRENT_RATE_PER, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_USER_CMPLTN_COMMON_TLV_CURRENT_RATE_PER_S)); \ + } while (0) + enum HTT_PPDU_STATS_USER_COMPLETION_STATUS { HTT_PPDU_STATS_USER_STATUS_OK, HTT_PPDU_STATS_USER_STATUS_FILTERED, @@ -1540,6 +1645,36 @@ typedef struct { reserved0: 19; }; }; + + /* + * ack RSSI per chain for last transmission to the peer-TID + * (value in dB w.r.t noise floor) + */ + A_UINT32 chain_rssi[HTT_STATS_MAX_CHAINS]; + + /* Tx Antenna mask for last packet transmission */ + A_UINT32 tx_antenna_mask; + + /* For SmartAntenna + * BIT [15:0] :- pending_training_pkts + * Holds number of pending training packets during training. + * BIT [16] :- is_training + * This flag indicates if peer is under training. + * BIT [31:17] :- reserved1 + */ + A_UINT32 pending_training_pkts:16, + is_training:1, + reserved1:15; + + /* + * Max rates configured per BW: + * for BW supported by Smart Antenna - 20MHZ, 40MHZ and 80MHZ and 160MHZ + * (Note: 160 MHz is currently not supported by Smart Antenna) + */ + A_UINT32 max_rates[HTT_STATS_NUM_SUPPORTED_BW_SMART_ANTENNA]; + + /* PER of the last transmission to the peer-TID (in percent) */ + A_UINT32 current_rate_per; } htt_ppdu_stats_user_cmpltn_common_tlv; #define HTT_PPDU_STATS_USER_CMPLTN_BA_BITMAP_TLV_TID_NUM_M 0x000000ff @@ -1855,17 +1990,44 @@ typedef struct { }; } htt_ppdu_stats_flush_tlv; +#define HTT_PPDU_STATS_TX_MGMTCTRL_TLV_FRAME_LENGTH_M 0x0000ffff +#define HTT_PPDU_STATS_TX_MGMTCTRL_TLV_FRAME_LENGTH_S 0 + +#define HTT_PPDU_STATS_TX_MGMTCTRL_TLV_FRAME_LENGTH_GET(_var) \ + (((_var) & HTT_PPDU_STATS_TX_MGMTCTRL_TLV_FRAME_LENGTH_M) >> \ + HTT_PPDU_STATS_TX_MGMTCTRL_TLV_FRAME_LENGTH_S) + +#define HTT_PPDU_STATS_TX_MGMTCTRL_TLV_FRAME_LENGTH_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_TX_MGMTCTRL_TLV_FRAME_LENGTH, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_TX_MGMTCTRL_TLV_FRAME_LENGTH_S)); \ + } while (0) + typedef struct { htt_tlv_hdr_t tlv_hdr; + /* + * BIT [ 15 : 0] :- frame_length + * BIT [ 31 : 16] :- reserved1 + */ + union { + A_UINT32 rsvd__frame_length; + struct { + A_UINT32 frame_length: 16, + reserved1: 16; /* set to 0x0 */ + }; + }; + /* Future purpose */ - A_UINT32 reserved1; /* set to 0x0 */ A_UINT32 reserved2; /* set to 0x0 */ A_UINT32 reserved3; /* set to 0x0 */ /* mgmt/ctrl frame payload - * The size of payload (in bytes) can be derived from the length in - * tlv parametes, minus the 12 bytes of the above fields. + * The size of the actual mgmt payload (in bytes) can be obtained from + * the frame_length field. + * The size of entire payload including the padding for alignment + * (in bytes) can be derived from the length in tlv parametes, + * minus the 12 bytes of the above fields. */ A_UINT32 payload[1]; } htt_ppdu_stats_tx_mgmtctrl_payload_tlv; diff --git a/fw/htt_stats.h b/fw/htt_stats.h index 66075b8e7b85..388154d9ccfb 100644 --- a/fw/htt_stats.h +++ b/fw/htt_stats.h @@ -145,7 +145,15 @@ enum htt_dbg_ext_stats_type { * 6 bit htt_msdu_flow_stats_tlv * - config_param2: [Bit31 : Bit0] mac_addr31to0 * - config_param3: [Bit15 : Bit0] mac_addr47to32 - * [Bit31 : Bit16] reserved + * [Bit 16] If this bit is set, reset per peer stats + * of corresponding tlv indicated by config + * param 1. + * HTT_DBG_EXT_PEER_STATS_RESET_GET will be + * used to get this bit position. + * WMI_SERVICE_PER_PEER_HTT_STATS_RESET + * indicates that FW supports per peer HTT + * stats reset. + * [Bit31 : Bit17] reserved * RESP MSG: * - htt_peer_stats_t */ @@ -218,7 +226,8 @@ enum htt_dbg_ext_stats_type { /* HTT_DBG_EXT_STATS_PDEV_CCA_STATS * PARAMS: * - config_param0: - * [Bit0] - 1 sec interval histogram + * [Bit0] - Clear bit0 to read 1sec,100ms & cumulative CCA stats. + * Set bit0 to 1 to read 1sec interval histogram. * [Bit1] - 100ms interval histogram * [Bit3] - Cumulative CCA stats * RESP MSG: @@ -248,7 +257,8 @@ enum htt_dbg_ext_stats_type { * PARAMS: * - config_param0: * [Bit0] vdev_id_set:1 - * set to 1 if vdev_id is set and vdev stats are requested + * set to 1 if vdev_id is set and vdev stats are requested. + * set to 0 if pdev_stats sounding stats are requested. * [Bit8 : Bit1] vdev_id:8 * note:0xFF to get all active vdevs based on pdev_mask. * [Bit31 : Bit9] rsvd:22 @@ -284,11 +294,51 @@ enum htt_dbg_ext_stats_type { */ HTT_DBG_EXT_STATS_LATENCY_PROF_STATS = 25, + /* HTT_DBG_EXT_STATS_PDEV_UL_TRIGGER + * PARAMS: + * - No Params + * RESP MSG: + * - htt_rx_pdev_ul_trig_stats_t + */ + HTT_DBG_EXT_STATS_PDEV_UL_TRIG_STATS = 26, + + /* HTT_DBG_EXT_STATS_PDEV_UL_MUMIMO_TRIG_STATS = 27 + * PARAMS: + * - No Params + * RESP MSG: + * - htt_rx_pdev_ul_mumimo_trig_stats_t + */ + HTT_DBG_EXT_STATS_PDEV_UL_MUMIMO_TRIG_STATS = 27, + + /* HTT_DBG_EXT_STATS_FSE_RX + * PARAMS: + * - No Params + * RESP MSG: + * - htt_rx_fse_stats_t + */ + HTT_DBG_EXT_STATS_FSE_RX = 28, /* keep this last */ HTT_DBG_NUM_EXT_STATS = 256, }; +/* + * Macros to get/set the bit field in config param[3] that indicates to + * clear corresponding per peer stats specified by config param 1 + */ +#define HTT_DBG_EXT_PEER_STATS_RESET_M 0x00010000 +#define HTT_DBG_EXT_PEER_STATS_RESET_S 16 + +#define HTT_DBG_EXT_PEER_STATS_RESET_GET(_var) \ + (((_var) & HTT_DBG_EXT_PEER_STATS_RESET_M) >> \ + HTT_DBG_EXT_PEER_STATS_RESET_S) + +#define HTT_DBG_EXT_PEER_STATS_RESET_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_DBG_EXT_PEER_STATS_RESET, _val); \ + ((_var) |= ((_val) << HTT_DBG_EXT_PEER_STATS_RESET_S)); \ + } while (0) + typedef enum { HTT_STATS_TX_PDEV_CMN_TAG = 0, /* htt_tx_pdev_stats_cmn_tlv */ HTT_STATS_TX_PDEV_UNDERRUN_TAG = 1, /* htt_tx_pdev_stats_urrn_tlv_v */ @@ -384,6 +434,11 @@ typedef enum { HTT_STATS_LATENCY_PROF_STATS_TAG = 91, /* htt_latency_prof_stats_tlv */ HTT_STATS_LATENCY_CTX_TAG = 92, /* htt_latency_prof_ctx_tlv */ HTT_STATS_LATENCY_CNT_TAG = 93, /* htt_latency_prof_cnt_tlv */ + HTT_STATS_RX_PDEV_UL_TRIG_STATS_TAG = 94, /* htt_rx_pdev_ul_trigger_stats_tlv */ + HTT_STATS_RX_PDEV_UL_OFDMA_USER_STATS_TAG = 95, /* htt_rx_pdev_ul_ofdma_user_stats_tlv */ + HTT_STATS_RX_PDEV_UL_MIMO_USER_STATS_TAG = 96, /* htt_rx_pdev_ul_mimo_user_stats_tlv */ + HTT_STATS_RX_PDEV_UL_MUMIMO_TRIG_STATS_TAG = 97, /* htt_rx_pdev_ul_mumimo_trig_stats_tlv */ + HTT_STATS_RX_FSE_STATS_TAG = 98, /* htt_rx_fse_stats_tlv */ HTT_STATS_MAX_TAG, } htt_tlv_tag_t; @@ -780,6 +835,11 @@ typedef struct { A_UINT32 wal_rx_recovery_rst_rx_busy_count; A_UINT32 wal_rx_recovery_rst_phy_mac_hang_count; A_UINT32 rx_flush_cnt; /* Num rx flush issued */ + A_UINT32 phy_warm_reset_reason_tx_lifetime_expiry_cca_stuck; + A_UINT32 phy_warm_reset_reason_tx_consecutive_flush9_war; + A_UINT32 phy_warm_reset_reason_tx_hwsch_reset_war; + A_UINT32 phy_warm_reset_reason_hwsch_wdog_or_cca_wdog_war; + A_UINT32 fw_rx_rings_reset; } htt_hw_stats_pdev_errs_tlv; typedef struct { @@ -1155,9 +1215,28 @@ typedef enum { } HTT_STATS_PREAM_TYPE; #define HTT_TX_PEER_STATS_NUM_MCS_COUNTERS 12 +/* HTT_TX_PEER_STATS_NUM_GI_COUNTERS: + * GI Index 0: WHAL_GI_800 + * GI Index 1: WHAL_GI_400 + * GI Index 2: WHAL_GI_1600 + * GI Index 3: WHAL_GI_3200 + */ #define HTT_TX_PEER_STATS_NUM_GI_COUNTERS 4 #define HTT_TX_PEER_STATS_NUM_DCM_COUNTERS 5 + /* HTT_TX_PEER_STATS_NUM_BW_COUNTERS: + * bw index 0: rssi_pri20_chain0 + * bw index 1: rssi_ext20_chain0 + * bw index 2: rssi_ext40_low20_chain0 + * bw index 3: rssi_ext40_high20_chain0 + */ #define HTT_TX_PEER_STATS_NUM_BW_COUNTERS 4 +/* HTT_RX_PEER_STATS_NUM_BW_EXT_COUNTERS: + * bw index 4 (bw ext index 0): rssi_ext80_low20_chain0 + * bw index 5 (bw ext index 1): rssi_ext80_low_high20_chain0 + * bw index 6 (bw ext index 2): rssi_ext80_high_low20_chain0 + * bw index 7 (bw ext index 3): rssi_ext80_high20_chain0 + */ +#define HTT_RX_PEER_STATS_NUM_BW_EXT_COUNTERS 4 #define HTT_TX_PEER_STATS_NUM_SPATIAL_STREAMS 8 #define HTT_TX_PEER_STATS_NUM_PREAMBLE_TYPES HTT_STATS_PREAM_COUNT @@ -1236,6 +1315,8 @@ typedef struct _htt_rx_peer_rate_stats_tlv { A_UINT32 rx_ulmumimo_data_ppdu; /* ppdu level */ A_UINT32 rx_ulmumimo_mpdu_ok; /* mpdu level */ A_UINT32 rx_ulmumimo_mpdu_fail; /* mpdu level */ + + A_UINT8 rssi_chain_ext[HTT_RX_PEER_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PEER_STATS_NUM_BW_EXT_COUNTERS]; /* units = dB above noise floor */ } htt_rx_peer_rate_stats_tlv; typedef enum { @@ -1706,6 +1787,7 @@ typedef struct { #define HTT_TX_PDEV_STATS_NUM_AC_MUMIMO_USER_STATS 4 #define HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS 8 #define HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS 74 +#define HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS 8 typedef struct { htt_tlv_hdr_t tlv_hdr; @@ -1723,6 +1805,22 @@ typedef struct { A_UINT32 ac_mu_mimo_sch_nusers[HTT_TX_PDEV_STATS_NUM_AC_MUMIMO_USER_STATS]; A_UINT32 ax_mu_mimo_sch_nusers[HTT_TX_PDEV_STATS_NUM_AX_MUMIMO_USER_STATS]; A_UINT32 ax_ofdma_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS]; + A_UINT32 ax_ul_ofdma_basic_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS]; + A_UINT32 ax_ul_ofdma_bsr_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS]; + A_UINT32 ax_ul_ofdma_bar_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS]; + A_UINT32 ax_ul_ofdma_brp_sch_nusers[HTT_TX_PDEV_STATS_NUM_OFDMA_USER_STATS]; + + /* UL MUMIMO */ + /* + * ax_ul_mumimo_basic_sch_nusers[i] is the number of basic triggers sent + * for (i+1) users + */ + A_UINT32 ax_ul_mumimo_basic_sch_nusers[HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS]; + /* + * ax_ul_mumimo_brp_sch_nusers[i] is the number of brp triggers sent + * for (i+1) users + */ + A_UINT32 ax_ul_mumimo_brp_sch_nusers[HTT_TX_PDEV_STATS_NUM_UL_MUMIMO_USER_STATS]; } htt_tx_pdev_mu_mimo_sch_stats_tlv; typedef struct { @@ -3010,11 +3108,30 @@ typedef struct { #define HTT_RX_PDEV_STATS_NUM_DCM_COUNTERS 5 #define HTT_RX_PDEV_STATS_NUM_BW_COUNTERS 4 #define HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS 8 +#define HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS 8 #define HTT_RX_PDEV_STATS_NUM_PREAMBLE_TYPES HTT_STATS_PREAM_COUNT #define HTT_RX_PDEV_MAX_OFDMA_NUM_USER 8 #define HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER 8 #define HTT_RX_PDEV_STATS_RXEVM_MAX_PILOTS_PER_NSS 16 +/*HTT_RX_PDEV_STATS_NUM_RU_SIZE_COUNTERS: + * RU size index 0: HTT_UL_OFDMA_V0_RU_SIZE_RU_26 + * RU size index 1: HTT_UL_OFDMA_V0_RU_SIZE_RU_52 + * RU size index 2: HTT_UL_OFDMA_V0_RU_SIZE_RU_106 + * RU size index 3: HTT_UL_OFDMA_V0_RU_SIZE_RU_242 + * RU size index 4: HTT_UL_OFDMA_V0_RU_SIZE_RU_484 + * RU size index 5: HTT_UL_OFDMA_V0_RU_SIZE_RU_996 + */ #define HTT_RX_PDEV_STATS_NUM_RU_SIZE_COUNTERS 6 +/* HTT_RX_PDEV_STATS_NUM_RU_SIZE_160MHZ_CNTRS: + * RU size index 0: HTT_UL_OFDMA_V0_RU_SIZE_RU_26 + * RU size index 1: HTT_UL_OFDMA_V0_RU_SIZE_RU_52 + * RU size index 2: HTT_UL_OFDMA_V0_RU_SIZE_RU_106 + * RU size index 3: HTT_UL_OFDMA_V0_RU_SIZE_RU_242 + * RU size index 4: HTT_UL_OFDMA_V0_RU_SIZE_RU_484 + * RU size index 5: HTT_UL_OFDMA_V0_RU_SIZE_RU_996 + * RU size index 6: HTT_UL_OFDMA_V0_RU_SIZE_RU_996x2 + */ +#define HTT_RX_PDEV_STATS_NUM_RU_SIZE_160MHZ_CNTRS 7 /* includes 996x2 */ #define HTT_RX_PDEV_RATE_STATS_MAC_ID_M 0x000000ff #define HTT_RX_PDEV_RATE_STATS_MAC_ID_S 0 @@ -3115,6 +3232,8 @@ typedef struct { A_UINT32 rx_ulmumimo_data_ppdu[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER]; /* ppdu level */ A_UINT32 rx_ulmumimo_mpdu_ok[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER]; /* mpdu level */ A_UINT32 rx_ulmumimo_mpdu_fail[HTT_RX_PDEV_MAX_ULMUMIMO_NUM_USER]; /* mpdu level */ + A_UINT32 rx_ulofdma_non_data_nusers[HTT_RX_PDEV_MAX_OFDMA_NUM_USER]; + A_UINT32 rx_ulofdma_data_nusers[HTT_RX_PDEV_MAX_OFDMA_NUM_USER]; } htt_rx_pdev_rate_stats_tlv; /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_RX_RATE @@ -3129,10 +3248,112 @@ typedef struct { htt_rx_pdev_rate_stats_tlv rate_tlv; } htt_rx_pdev_rate_stats_t; +#define HTT_STATS_CMN_MAC_ID_M 0x000000ff +#define HTT_STATS_CMN_MAC_ID_S 0 + +#define HTT_STATS_CMN_MAC_ID_GET(_var) \ + (((_var) & HTT_STATS_CMN_MAC_ID_M) >> \ + HTT_STATS_CMN_MAC_ID_S) + +#define HTT_STATS_CMN_MAC_ID_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_STATS_CMN_MAC_ID, _val); \ + ((_var) |= ((_val) << HTT_STATS_CMN_MAC_ID_S)); \ + } while (0) + +typedef struct { + htt_tlv_hdr_t tlv_hdr; + + /* BIT [ 7 : 0] :- mac_id + * BIT [31 : 8] :- reserved + */ + A_UINT32 mac_id__word; + + A_UINT32 rx_11ax_ul_ofdma; + + A_UINT32 ul_ofdma_rx_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS]; + A_UINT32 ul_ofdma_rx_gi[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS]; + A_UINT32 ul_ofdma_rx_nss[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS]; + A_UINT32 ul_ofdma_rx_bw[HTT_RX_PDEV_STATS_NUM_BW_COUNTERS]; + A_UINT32 ul_ofdma_rx_stbc; + A_UINT32 ul_ofdma_rx_ldpc; + + /* + * These are arrays to hold the number of PPDUs that we received per RU. + * E.g. PPDUs (data or non data) received in RU26 will be incremented in + * array offset 0 and similarly RU52 will be incremented in array offset 1 + */ + A_UINT32 rx_ulofdma_data_ru_size_ppdu[HTT_RX_PDEV_STATS_NUM_RU_SIZE_160MHZ_CNTRS]; /* ppdu level */ + A_UINT32 rx_ulofdma_non_data_ru_size_ppdu[HTT_RX_PDEV_STATS_NUM_RU_SIZE_160MHZ_CNTRS]; /* ppdu level */ + +} htt_rx_pdev_ul_trigger_stats_tlv; + +/* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_UL_TRIG_STATS + * TLV_TAGS: + * - HTT_STATS_RX_PDEV_UL_TRIG_STATS_TAG + * NOTE: + * This structure is for documentation, and cannot be safely used directly. + * Instead, use the constituent TLV structures to fill/parse. + */ +typedef struct { + htt_rx_pdev_ul_trigger_stats_tlv ul_trigger_tlv; +} htt_rx_pdev_ul_trigger_stats_t; + +typedef struct { + htt_tlv_hdr_t tlv_hdr; + + A_UINT32 user_index; + A_UINT32 rx_ulofdma_non_data_ppdu; /* ppdu level */ + A_UINT32 rx_ulofdma_data_ppdu; /* ppdu level */ + A_UINT32 rx_ulofdma_mpdu_ok; /* mpdu level */ + A_UINT32 rx_ulofdma_mpdu_fail; /* mpdu level */ + A_UINT32 rx_ulofdma_non_data_nusers; + A_UINT32 rx_ulofdma_data_nusers; +} htt_rx_pdev_ul_ofdma_user_stats_tlv; + +typedef struct { + htt_tlv_hdr_t tlv_hdr; + + A_UINT32 user_index; + A_UINT32 rx_ulmumimo_non_data_ppdu; /* ppdu level */ + A_UINT32 rx_ulmumimo_data_ppdu; /* ppdu level */ + A_UINT32 rx_ulmumimo_mpdu_ok; /* mpdu level */ + A_UINT32 rx_ulmumimo_mpdu_fail; /* mpdu level */ +} htt_rx_pdev_ul_mimo_user_stats_tlv; + /* == RX PDEV/SOC STATS == */ typedef struct { htt_tlv_hdr_t tlv_hdr; + + /* + * BIT [7:0] :- mac_id + * BIT [31:8] :- reserved + * + * Refer to HTT_STATS_CMN_MAC_ID_GET/SET macros. + */ + A_UINT32 mac_id__word; + + A_UINT32 rx_11ax_ul_mumimo; + + A_UINT32 ul_mumimo_rx_mcs[HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS]; + A_UINT32 ul_mumimo_rx_gi[HTT_RX_PDEV_STATS_NUM_GI_COUNTERS][HTT_RX_PDEV_STATS_NUM_MCS_COUNTERS]; + A_UINT32 ul_mumimo_rx_nss[HTT_RX_PDEV_STATS_ULMUMIMO_NUM_SPATIAL_STREAMS]; + A_UINT32 ul_mumimo_rx_bw[HTT_RX_PDEV_STATS_NUM_BW_COUNTERS]; + A_UINT32 ul_mumimo_rx_stbc; + A_UINT32 ul_mumimo_rx_ldpc; +} htt_rx_pdev_ul_mumimo_trig_stats_tlv; + +/* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_UL_MUMIMO_TRIG_STATS + * TLV_TAGS: + * - HTT_STATS_RX_PDEV_UL_MUMIMO_TRIG_STATS_TAG + */ +typedef struct { + htt_rx_pdev_ul_mumimo_trig_stats_tlv ul_mumimo_trig_tlv; +} htt_rx_pdev_ul_mumimo_trig_stats_t; + +typedef struct { + htt_tlv_hdr_t tlv_hdr; /* Num Packets received on REO FW ring */ A_UINT32 fw_reo_ring_data_msdu; /* Num bc/mc packets indicated from fw to host */ @@ -3814,6 +4035,20 @@ typedef struct { A_UINT32 num_obss_tx_ppdu_success; A_UINT32 num_obss_tx_ppdu_failure; + /* num_sr_tx_transmissions: + * Counter of TX done by aborting other BSS RX with spatial reuse + * (for cases where rx RSSI from other BSS is below the packet-detection + * threshold for doing spatial reuse) + */ + union { + A_UINT32 num_sr_tx_transmissions; /* CORRECTED - use this one */ + A_UINT32 num_sr_tx_tranmissions; /* DEPRECATED - has typo in name */ + }; + /* num_sr_rx_ge_pd_rssi_thr + * counter of rx from other BSS for which RSSI was above the + * packet-detection threshold specified for enabling spatial reuse + */ + A_UINT32 num_sr_rx_ge_pd_rssi_thr; } htt_pdev_obss_pd_stats_tlv; /* NOTE: @@ -3930,5 +4165,130 @@ typedef struct { htt_latency_prof_cnt_tlv latency_cnt_stat; } htt_soc_latency_stats_t; +#define HTT_RX_MAX_PEAK_OCCUPANCY_INDEX 10 +#define HTT_RX_MAX_CURRENT_OCCUPANCY_INDEX 10 +#define HTT_RX_SQUARE_INDEX 6 +#define HTT_RX_MAX_PEAK_SEARCH_INDEX 4 +#define HTT_RX_MAX_PENDING_SEARCH_INDEX 4 + +/* STATS_TYPE : HTT_DBG_EXT_RX_FSE_STATS + * TLV_TAGS: + * - HTT_STATS_RX_FSE_STATS_TAG + */ +typedef struct { + htt_tlv_hdr_t tlv_hdr; + + /* + * Number of times host requested for fse enable/disable + */ + A_UINT32 fse_enable_cnt; + A_UINT32 fse_disable_cnt; + /* + * Number of times host requested for fse cache invalidation + * individual entries or full cache + */ + A_UINT32 fse_cache_invalidate_entry_cnt; + A_UINT32 fse_full_cache_invalidate_cnt; + + /* + * Cache hits count will increase if there is a matching flow in the cache + * There is no register for cache miss but the number of cache misses can + * be calculated as + * cache miss = (num_searches - cache_hits) + * Thus, there is no need to have a separate variable for cache misses. + * Num searches is flow search times done in the cache. + */ + A_UINT32 fse_num_cache_hits_cnt; + A_UINT32 fse_num_searches_cnt; + /** + * Cache Occupancy holds 2 types of values: Peak and Current. + * 10 bins are used to keep track of peak occupancy. + * 8 of these bins represent ranges of values, while the first and last + * bins represent the extreme cases of the cache being completely empty + * or completely full. + * For the non-extreme bins, the number of cache occupancy values per + * bin is the maximum cache occupancy (128), divided by the number of + * non-extreme bins (8), so 128/8 = 16 values per bin. + * The range of values for each histogram bins is specified below: + * Bin0 = Counter increments when cache occupancy is empty + * Bin1 = Counter increments when cache occupancy is within [1 to 16] + * Bin2 = Counter increments when cache occupancy is within [17 to 32] + * Bin3 = Counter increments when cache occupancy is within [33 to 48] + * Bin4 = Counter increments when cache occupancy is within [49 to 64] + * Bin5 = Counter increments when cache occupancy is within [65 to 80] + * Bin6 = Counter increments when cache occupancy is within [81 to 96] + * Bin7 = Counter increments when cache occupancy is within [97 to 112] + * Bin8 = Counter increments when cache occupancy is within [113 to 127] + * Bin9 = Counter increments when cache occupancy is equal to 128 + * The above histogram bin definitions apply to both the peak-occupancy + * histogram and the current-occupancy histogram. + * + * @fse_cache_occupancy_peak_cnt: + * Array records periodically PEAK cache occupancy values. + * Peak Occupancy will increment only if it is greater than current + * occupancy value. + * + * @fse_cache_occupancy_curr_cnt: + * Array records periodically current cache occupancy value. + * Current Cache occupancy always holds instant snapshot of + * current number of cache entries. + **/ + A_UINT32 fse_cache_occupancy_peak_cnt[HTT_RX_MAX_PEAK_OCCUPANCY_INDEX]; + A_UINT32 fse_cache_occupancy_curr_cnt[HTT_RX_MAX_CURRENT_OCCUPANCY_INDEX]; + /* + * Square stat is sum of squares of cache occupancy to better understand + * any variation/deviation within each cache set, over a given time-window. + * + * Square stat is calculated this way: + * Square = SUM(Squares of all Occupancy in a Set) / 8 + * The cache has 16-way set associativity, so the occupancy of a + * set can vary from 0 to 16. There are 8 sets within the cache. + * Therefore, the minimum possible square value is 0, and the maximum + * possible square value is (8*16^2) / 8 = 256. + * + * 6 bins are used to keep track of square stats: + * Bin0 = increments when square of current cache occupancy is zero + * Bin1 = increments when square of current cache occupancy is within + * [1 to 50] + * Bin2 = increments when square of current cache occupancy is within + * [51 to 100] + * Bin3 = increments when square of current cache occupancy is within + * [101 to 200] + * Bin4 = increments when square of current cache occupancy is within + * [201 to 255] + * Bin5 = increments when square of current cache occupancy is 256 + */ + A_UINT32 fse_search_stat_square_cnt[HTT_RX_SQUARE_INDEX]; + /** + * Search stats has 2 types of values: Peak Pending and Number of + * Search Pending. + * GSE command ring for FSE can hold maximum of 5 Pending searches + * at any given time. + * + * 4 bins are used to keep track of search stats: + * Bin0 = Counter increments when there are NO pending searches + * (For peak, it will be number of pending searches greater + * than GSE command ring FIFO outstanding requests. + * For Search Pending, it will be number of pending search + * inside GSE command ring FIFO.) + * Bin1 = Counter increments when number of pending searches are within + * [1 to 2] + * Bin2 = Counter increments when number of pending searches are within + * [3 to 4] + * Bin3 = Counter increments when number of pending searches are + * greater/equal to [ >= 5] + */ + A_UINT32 fse_search_stat_peak_cnt[HTT_RX_MAX_PEAK_SEARCH_INDEX]; + A_UINT32 fse_search_stat_search_pending_cnt[HTT_RX_MAX_PENDING_SEARCH_INDEX]; +} htt_rx_fse_stats_tlv; + +/* NOTE: + * This structure is for documentation, and cannot be safely used directly. + * Instead, use the constituent TLV structures to fill/parse. + */ +typedef struct { + htt_rx_fse_stats_tlv rx_fse_stats; +} htt_rx_fse_stats_t; + #endif /* __HTT_STATS_H__ */ diff --git a/fw/wmi_services.h b/fw/wmi_services.h index 4ea1de4d45b6..1d3f9d1c7305 100755 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -395,6 +395,17 @@ typedef enum { WMI_SERVICE_TX_COMPL_TSF64 = 210, /* FW supports 64-bit tx TSF in HTT_T2H TX_COMPL_IND msg */ WMI_SERVICE_DSM_ROAM_FILTER = 211, /* FW supports data stall AP mitigation while roaming */ WMI_SERVICE_PACKET_CAPTURE_SUPPORT = 212, /* target supports packet capture Mode (SMART MU) */ + WMI_SERVICE_PER_PEER_HTT_STATS_RESET = 213, /* FW supports HTT per peer stats reset facility */ + WMI_SERVICE_DELETE_ALL_PEER_SUPPORT = 214, /* target supports cmd to delete all peers within a vdev */ + WMI_SERVICE_DYNAMIC_HW_MODE_SWITCH_SUPPORT = 215, /* target supports Dynamic HW mode switch */ + WMI_SERVICE_MSDU_FLOW_OVERRIDE_BY_HOST = 216, /* target supports flow override feature */ + WMI_SERVICE_WMI_CHAN_RF_CHARACTERIZATION_INFO_EVENT= 217, /* target will send WMI_CHAN_RF_CHARACTERIZATION_INFO_EVENT */ + WMI_SERVICE_RX_FSE_SUPPORT = 218, /* target supports flow search through RxOLE FSE hw block */ + WMI_SERVICE_FREQINFO_IN_METADATA = 219, /* FW provides freq_info during spectral scan */ + WMI_SERVICE_EXT2_MSG = 220, /* WMI_SERVICE_READY_EXT2 msg is sent by target */ + WMI_SERVICE_WPA3_SAE_ROAM_SUPPORT = 221, /* Indicates FW supports WPA3 SAE roaming */ + WMI_SERVICE_WPA3_OWE_ROAM_SUPPORT = 222, /* Indicates FW supports WPA3 OWE roaming */ + WMI_SERVICE_AUDIO_AGGR = 223, /* Indicates FW supports audio frame aggregation */ /******* ADD NEW SERVICES HERE *******/ diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index bf02afa71e12..3b8d219dffc2 100755 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -984,6 +984,30 @@ typedef enum { WMITLV_TAG_STRUC_wmi_pdev_dsm_filter_fixed_param, WMITLV_TAG_STRUC_wmi_pdev_bssid_disallow_list_config_param, WMITLV_TAG_STRUC_wmi_mgmt_hdr, + WMITLV_TAG_STRUC_wmi_muedca_params_config_event_fixed_param, + WMITLV_TAG_STRUC_wmi_twt_btwt_invite_sta_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_twt_btwt_remove_sta_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_twt_btwt_invite_sta_complete_event_fixed_param, + WMITLV_TAG_STRUC_wmi_twt_btwt_remove_sta_complete_event_fixed_param, + WMITLV_TAG_STRUC_wmi_vdev_delete_all_peer_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_vdev_delete_all_peer_resp_event_fixed_param, + WMITLV_TAG_STRUC_wmi_chan_rf_characterization_info_event_fixed_param, + WMITLV_TAG_STRUC_wmi_oem_data_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_roam_enable_disable_trigger_reason_fixed_param, + WMITLV_TAG_STRUC_wmi_service_ready_ext2_event_fixed_param, + WMITLV_TAG_STRUC_wmi_roam_preauth_status_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_roam_preauth_start_event_fixed_param, + WMITLV_TAG_STRUC_wmi_set_elna_bypass_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_get_elna_bypass_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_get_elna_bypass_event_fixed_param, + WMITLV_TAG_STRUC_wmi_roam_pmkid_request_event_fixed_param, + WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_phase_fixed_param, + WMITLV_TAG_STRUC_wmi_audio_aggr_enable_cmd_fixed_param, + WMITLV_TAG_STRUC_audio_aggr_rate_set, + WMITLV_TAG_STRUC_wmi_audio_aggr_add_group, + WMITLV_TAG_STRUC_wmi_audio_aggr_del_group, + WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_rate, + WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_retry, } WMITLV_TAG_ID; /* @@ -1383,6 +1407,19 @@ typedef enum { OP(WMI_ROAM_IDLE_CONFIG_CMDID) \ OP(WMI_IDLE_TRIGGER_MONITOR_CMDID) \ OP(WMI_PDEV_DSM_FILTER_CMDID) \ + OP(WMI_TWT_BTWT_INVITE_STA_CMDID) \ + OP(WMI_TWT_BTWT_REMOVE_STA_CMDID) \ + OP(WMI_VDEV_DELETE_ALL_PEER_CMDID) \ + OP(WMI_OEM_DATA_CMDID) \ + OP(WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID) \ + OP(WMI_ROAM_PREAUTH_STATUS_CMDID) \ + OP(WMI_SET_ELNA_BYPASS_CMDID) \ + OP(WMI_GET_ELNA_BYPASS_CMDID) \ + OP(WMI_AUDIO_AGGR_ENABLE_CMDID) \ + OP(WMI_AUDIO_AGGR_ADD_GROUP_CMDID) \ + OP(WMI_AUDIO_AGGR_DEL_GROUP_CMDID) \ + OP(WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID) \ + OP(WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID) \ /* add new CMD_LIST elements above this line */ @@ -1393,6 +1430,7 @@ typedef enum { #define WMITLV_ALL_EVT_LIST(OP) \ OP(WMI_SERVICE_READY_EVENTID) \ OP(WMI_SERVICE_READY_EXT_EVENTID) \ + OP(WMI_SERVICE_READY_EXT2_EVENTID) \ OP(WMI_READY_EVENTID) \ OP(WMI_SCAN_EVENTID) \ OP(WMI_PDEV_TPC_CONFIG_EVENTID) \ @@ -1610,6 +1648,14 @@ typedef enum { OP(WMI_PDEV_RAP_INFO_EVENTID) \ OP(WMI_IFACE_COMBINATION_IND_EVENTID) \ OP(WMI_VDEV_MGMT_OFFLOAD_EVENTID) \ + OP(WMI_MUEDCA_PARAMS_CONFIG_EVENTID) \ + OP(WMI_TWT_BTWT_INVITE_STA_COMPLETE_EVENTID) \ + OP(WMI_TWT_BTWT_REMOVE_STA_COMPLETE_EVENTID) \ + OP(WMI_VDEV_DELETE_ALL_PEER_RESP_EVENTID) \ + OP(WMI_CHAN_RF_CHARACTERIZATION_INFO_EVENTID) \ + OP(WMI_ROAM_PREAUTH_START_EVENTID) \ + OP(WMI_GET_ELNA_BYPASS_EVENTID) \ + OP(WMI_ROAM_PMKID_REQUEST_EVENTID) \ /* add new EVT_LIST elements above this line */ @@ -1637,6 +1683,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PEER_CREATE_CMDID); WMITLV_CREATE_PARAM_STRUC(WMI_PEER_DELETE_CMDID); +/* Delete all peer Cmd */ +#define WMITLV_TABLE_WMI_VDEV_DELETE_ALL_PEER_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_delete_all_peer_cmd_fixed_param, wmi_vdev_delete_all_peer_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) + +WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_DELETE_ALL_PEER_CMDID); + /* Peer unmap response Cmd */ #define WMITLV_TABLE_WMI_PEER_UNMAP_RESPONSE_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_unmap_response_cmd_fixed_param, wmi_peer_unmap_response_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ @@ -3050,11 +3102,29 @@ WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_DEAUTH_CONFIG_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_idle_config_cmd_fixed_param, wmi_roam_idle_config_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_IDLE_CONFIG_CMDID); +/* Roam Pre-Authentication completion status */ +#define WMITLV_TABLE_WMI_ROAM_PREAUTH_STATUS_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_preauth_status_cmd_fixed_param, wmi_roam_preauth_status_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, pmkid, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, pmk, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_PREAUTH_STATUS_CMDID); + +/** Roam PMKID request event */ +#define WMITLV_TABLE_WMI_ROAM_PMKID_REQUEST_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_pmkid_request_event_fixed_param, wmi_roam_pmkid_request_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_pmkid_request_tlv_param, pmkid_request, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_PMKID_REQUEST_EVENTID); + /* Screen Status Command parameters */ #define WMITLV_TABLE_WMI_IDLE_TRIGGER_MONITOR_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_idle_trigger_monitor_cmd_fixed_param, wmi_idle_trigger_monitor_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_IDLE_TRIGGER_MONITOR_CMDID); +/* Enable or disable roaming trigger reason */ +#define WMITLV_TABLE_WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_enable_disable_trigger_reason_fixed_param, wmi_roam_enable_disable_trigger_reason_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID); + /* DSM filter parameters */ #define WMITLV_TABLE_WMI_PDEV_DSM_FILTER_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_dsm_filter_fixed_param, wmi_pdev_dsm_filter_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ @@ -3066,6 +3136,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_DSM_FILTER_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_blacklist_with_timeout_tlv_param, blacklist_with_timeout, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_BLACKLIST_EVENTID); +/* Roam Pre-Authentication Start Event */ +#define WMITLV_TABLE_WMI_ROAM_PREAUTH_START_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_preauth_start_event_fixed_param, wmi_roam_preauth_start_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_PREAUTH_START_EVENTID); + #define WMITLV_TABLE_WMI_LPI_RESULT_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_lpi_result_event_fixed_param, wmi_lpi_result_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR) @@ -3208,7 +3283,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_REQUEST_STATS_EXT_CMDID); #define WMITLV_TABLE_WMI_OBSS_SCAN_ENABLE_CMDID(id,op,buf,len) \ WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_obss_scan_enable_cmd_fixed_param, wmi_obss_scan_enable_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, channels, WMITLV_SIZE_VAR) \ - WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, ie_field, WMITLV_SIZE_VAR) + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, ie_field, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, chan_freqs, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_OBSS_SCAN_ENABLE_CMDID); /* 2.4Ghz HT40 OBSS scan disable */ @@ -3927,6 +4003,16 @@ WMITLV_CREATE_PARAM_STRUC(WMI_TWT_PAUSE_DIALOG_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_twt_resume_dialog_cmd_fixed_param, wmi_twt_resume_dialog_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_TWT_RESUME_DIALOG_CMDID); +/* B-TWT STA invitation cmd */ +#define WMITLV_TABLE_WMI_TWT_BTWT_INVITE_STA_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_twt_btwt_invite_sta_cmd_fixed_param, wmi_twt_btwt_invite_sta_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_TWT_BTWT_INVITE_STA_CMDID); + +/* B-TWT STA removal cmd */ +#define WMITLV_TABLE_WMI_TWT_BTWT_REMOVE_STA_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_twt_btwt_remove_sta_cmd_fixed_param, wmi_twt_btwt_remove_sta_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_TWT_BTWT_REMOVE_STA_CMDID); + /* Set peer tid configurations Cmd */ #define WMITLV_TABLE_WMI_PEER_TID_CONFIGURATIONS_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_tid_configurations_cmd_fixed_param, wmi_peer_tid_configurations_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) @@ -3940,6 +4026,22 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_OBSS_PD_SPATIAL_REUSE_CMDID); /* Peer CFR capture cmd */ #define WMITLV_TABLE_WMI_PEER_CFR_CAPTURE_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_cfr_capture_cmd_fixed_param, wmi_peer_cfr_capture_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +/* + * NOTE: from approximately 7/25/19 to 8/16/19, the below TLV was incorrectly + * added to this WMI_PEER_CFR_CAPTURE_CMDID message. + * Any targets compiled with these versions of the WMI definitions will + * expect that if there is a 2nd TLV in the WMI_PEER_CFR_CAPTURE_CMDID, + * it will be + * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_phase_fixed_param + * If in the future a new 2nd TLV is added to this WMI_PEER_CFR_CAPTURE_CMDID + * message, that would cause a target compiled with the erroneous old + * definitions to reject the WMI_PEER_CFR_CAPTURE_CMDID message containing + * the new 2nd TLV, because it would not match the + * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_phase_fixed_param + * tag expected by the old target. + * + * WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_phase_fixed_param, wmi_peer_cfr_capture_event_phase_fixed_param, phase_param, WMITLV_SIZE_FIX) + */ WMITLV_CREATE_PARAM_STRUC(WMI_PEER_CFR_CAPTURE_CMDID); /* CHANNEL WIDTH SWITCH commands for peers. */ @@ -3978,6 +4080,45 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_PKTLOG_FILTER_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_pdev_set_rap_config_on_sta_ps_tlv_param, rap_param, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_SET_RAP_CONFIG_CMDID); +/* OEM Data config cmd */ +#define WMITLV_TABLE_WMI_OEM_DATA_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_oem_data_cmd_fixed_param, wmi_oem_data_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, oem_data, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_OEM_DATA_CMDID); + +/* Set ELNA BYPASS cmd */ +#define WMITLV_TABLE_WMI_SET_ELNA_BYPASS_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_set_elna_bypass_cmd_fixed_param, wmi_set_elna_bypass_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_SET_ELNA_BYPASS_CMDID); + +/* Get ELNA BYPASS cmd */ +#define WMITLV_TABLE_WMI_GET_ELNA_BYPASS_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id, op, buf, len, WMITLV_TAG_STRUC_wmi_get_elna_bypass_cmd_fixed_param, wmi_get_elna_bypass_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_GET_ELNA_BYPASS_CMDID); + +/* Audio aggr config cmd */ +#define WMITLV_TABLE_WMI_AUDIO_AGGR_ENABLE_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_audio_aggr_enable_cmd_fixed_param, wmi_audio_aggr_enable_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_AUDIO_AGGR_ENABLE_CMDID); + +#define WMITLV_TABLE_WMI_AUDIO_AGGR_ADD_GROUP_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_audio_aggr_add_group, wmi_audio_aggr_add_group_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_FIXED_STRUC, wmi_mac_addr, client_addr, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_AUDIO_AGGR_ADD_GROUP_CMDID); + +#define WMITLV_TABLE_WMI_AUDIO_AGGR_DEL_GROUP_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_audio_aggr_del_group, wmi_audio_aggr_del_group_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_AUDIO_AGGR_DEL_GROUP_CMDID); + +#define WMITLV_TABLE_WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_rate, wmi_audio_aggr_set_group_rate_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, WMI_AUDIO_AGGR_RATE_SET_T, rate_set, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID); + +#define WMITLV_TABLE_WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_retry, wmi_audio_aggr_set_group_retry_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID); + /************************** TLV definitions of WMI events *******************************/ @@ -4012,6 +4153,18 @@ WMITLV_CREATE_PARAM_STRUC(WMI_SERVICE_AVAILABLE_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, WMI_CHAN_RF_CHARACTERIZATION_INFO, wmi_chan_rf_characterization_info, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_SERVICE_READY_EXT_EVENTID); +/* SERVICE_READY_EXT2 event */ +#define WMITLV_TABLE_WMI_SERVICE_READY_EXT2_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_service_ready_ext2_event_fixed_param, wmi_service_ready_ext2_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, WMI_DMA_RING_CAPABILITIES, dma_ring_caps, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_spectral_bin_scaling_params, wmi_bin_scaling_params, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_SERVICE_READY_EXT2_EVENTID); + +#define WMITLV_TABLE_WMI_CHAN_RF_CHARACTERIZATION_INFO_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_chan_rf_characterization_info_event_fixed_param, wmi_chan_rf_characterization_info_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, WMI_CHAN_RF_CHARACTERIZATION_INFO, wmi_chan_rf_characterization_info, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_CHAN_RF_CHARACTERIZATION_INFO_EVENTID); + /* iface combination indication event */ #define WMITLV_TABLE_WMI_IFACE_COMBINATION_IND_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_wlanfw_iface_cmb_ind_event_fixed_param, wmi_wlanfw_iface_cmb_ind_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ @@ -4227,9 +4380,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_BA_RSP_SSN_EVENTID); WMITLV_CREATE_PARAM_STRUC(WMI_AGGR_STATE_TRIG_EVENTID); /* Roam Event */ -#define WMITLV_TABLE_WMI_ROAM_EVENTID(id,op,buf,len) \ +#define WMITLV_TABLE_WMI_ROAM_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_event_fixed_param, wmi_roam_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, deauth_disassoc_frame, WMITLV_SIZE_VAR) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, deauth_disassoc_frame, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_pdev_hw_mode_transition_event_fixed_param, hw_mode_transition_fixed_param, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_pdev_set_hw_mode_response_vdev_mac_entry, wmi_pdev_set_hw_mode_response_vdev_mac_mapping, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_EVENTID); /* Roam Synch Event */ @@ -4299,6 +4454,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_KEEPALIVE_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_get_tpc_power_evt_fixed_param, wmi_get_tpc_power_evt_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_GET_TPC_POWER_EVENTID); +/** Get MU EDCA report param event */ +#define WMITLV_TABLE_WMI_MUEDCA_PARAMS_CONFIG_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_muedca_params_config_event_fixed_param, wmi_muedca_params_config_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_MUEDCA_PARAMS_CONFIG_EVENTID); + /* GPIO Input Event */ #define WMITLV_TABLE_WMI_GPIO_INPUT_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_gpio_input_event_fixed_param, wmi_gpio_input_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) @@ -4814,6 +4974,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PEER_STATE_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_delete_resp_event_fixed_param, wmi_peer_delete_resp_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_PEER_DELETE_RESP_EVENTID); +/* delete all peer response Event */ +#define WMITLV_TABLE_WMI_VDEV_DELETE_ALL_PEER_RESP_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_delete_all_peer_resp_event_fixed_param, wmi_vdev_delete_all_peer_resp_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_DELETE_ALL_PEER_RESP_EVENTID); + /* peer assoc conf Event */ #define WMITLV_TABLE_WMI_PEER_ASSOC_CONF_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_assoc_conf_event_fixed_param, wmi_peer_assoc_conf_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) @@ -5327,6 +5492,16 @@ WMITLV_CREATE_PARAM_STRUC(WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_twt_resume_dialog_complete_event_fixed_param, wmi_twt_resume_dialog_complete_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID); +/* inviting STA to B-TWT dialog complete Event */ +#define WMITLV_TABLE_WMI_TWT_BTWT_INVITE_STA_COMPLETE_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_twt_btwt_invite_sta_complete_event_fixed_param, wmi_twt_btwt_invite_sta_complete_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_TWT_BTWT_INVITE_STA_COMPLETE_EVENTID); + +/* removing STA from B-TWT dialog complete Event */ +#define WMITLV_TABLE_WMI_TWT_BTWT_REMOVE_STA_COMPLETE_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_twt_btwt_remove_sta_complete_event_fixed_param, wmi_twt_btwt_remove_sta_complete_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_TWT_BTWT_REMOVE_STA_COMPLETE_EVENTID); + /* Event to send roam scan stats */ #define WMITLV_TABLE_WMI_ROAM_SCAN_STATS_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_scan_stats_event_fixed_param, wmi_roam_scan_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ @@ -5360,7 +5535,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_ESP_ESTIMATE_EVENTID); /* Peer CFR capture event */ #define WMITLV_TABLE_WMI_PEER_CFR_CAPTURE_EVENTID(id,op,buf,len) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_fixed_param, wmi_peer_cfr_capture_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_fixed_param, wmi_peer_cfr_capture_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_phase_fixed_param, wmi_peer_cfr_capture_event_phase_fixed_param, phase_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_PEER_CFR_CAPTURE_EVENTID); #define WMITLV_TABLE_WMI_PDEV_COLD_BOOT_CAL_DATA_EVENTID(id,op,buf,len) \ @@ -5379,6 +5555,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_RAP_INFO_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, bufp, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_MGMT_OFFLOAD_EVENTID); +/* get ELNA BYPASS status event */ +#define WMITLV_TABLE_WMI_GET_ELNA_BYPASS_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_get_elna_bypass_event_fixed_param, wmi_get_elna_bypass_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_GET_ELNA_BYPASS_EVENTID); + + #ifdef __cplusplus } #endif diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 07958740e544..5645c895940e 100755 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -257,6 +257,7 @@ typedef enum { WMI_GRP_SPATIAL_REUSE, /* 0x40 */ WMI_GRP_ESP, /* 0x41 Estimate Service Parameters (802.11mc) */ WMI_GRP_HPCS_PULSE, /* 0x42 */ + WMI_GRP_AUDIO, /* 0x43 */ } WMI_GRP_ID; #define WMI_CMD_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1) @@ -480,6 +481,8 @@ typedef enum { WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID, /* request LTE-Coex info */ WMI_VDEV_GET_MWS_COEX_INFO_CMDID, + /** delete all peer (excluding bss peer) */ + WMI_VDEV_DELETE_ALL_PEER_CMDID, /* peer specific commands */ @@ -704,6 +707,10 @@ typedef enum { * but leave it reserved just to be safe. */ DEPRECATED__WMI_ROAM_DSM_FILTER_CMDID, + /** Enable or disable roaming triggers */ + WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON_CMDID, + /** Pre-Authentication completion status command */ + WMI_ROAM_PREAUTH_STATUS_CMDID, /** offload scan specific commands */ /** set offload scan AP profile */ @@ -744,7 +751,7 @@ typedef enum { /** AP power save specific config */ /** set AP power save specific param */ WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AP_PS), - /** set AP UAPSD coex pecific param */ + /** set AP UAPSD coex specific param */ WMI_AP_PS_PEER_UAPSD_COEX_CMDID, /** set Enhanced Green AP param */ WMI_AP_PS_EGAP_PARAM_CMDID, @@ -981,6 +988,10 @@ typedef enum { WMI_GET_TPC_POWER_CMDID, /* Specify when to start monitoring for idle state */ WMI_IDLE_TRIGGER_MONITOR_CMDID, + /** set ELNA BYPASS status */ + WMI_SET_ELNA_BYPASS_CMDID, + /** get ELNA BYPASS status */ + WMI_GET_ELNA_BYPASS_CMDID, /* Offload 11k related requests */ WMI_11K_OFFLOAD_REPORT_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_11K_OFFLOAD), @@ -1072,12 +1083,17 @@ typedef enum { WMI_BATCH_SCAN_DISABLE_CMDID, /*get batch scan result*/ WMI_BATCH_SCAN_TRIGGER_RESULT_CMDID, + + /* OEM related cmd */ WMI_OEM_REQ_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_OEM), WMI_OEM_REQUEST_CMDID, /* UNUSED */ /* OEM related cmd used for Low Power ranging */ WMI_LPI_OEM_REQ_CMDID, WMI_OEM_DMA_RING_CFG_REQ_CMDID, + /** Command to handle OEM's opaque data */ + WMI_OEM_DATA_CMDID, + /** Nan Request */ WMI_NAN_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_NAN), @@ -1211,6 +1227,8 @@ typedef enum { WMI_TWT_DEL_DIALOG_CMDID, WMI_TWT_PAUSE_DIALOG_CMDID, WMI_TWT_RESUME_DIALOG_CMDID, + WMI_TWT_BTWT_INVITE_STA_CMDID, + WMI_TWT_BTWT_REMOVE_STA_CMDID, /** WMI commands related to motion detection **/ WMI_MOTION_DET_CONFIG_PARAM_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_MOTION_DET), @@ -1224,6 +1242,13 @@ typedef enum { /** WMI commands related to High Precision Clock Synchronization feature **/ WMI_HPCS_PULSE_START_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_HPCS_PULSE), + + /** WMI commands related to Audio Frame aggregation feature **/ + WMI_AUDIO_AGGR_ENABLE_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_AUDIO), + WMI_AUDIO_AGGR_ADD_GROUP_CMDID, + WMI_AUDIO_AGGR_DEL_GROUP_CMDID, + WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID, + WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID, } WMI_CMD_ID; typedef enum { @@ -1332,6 +1357,10 @@ typedef enum { /* Event to report a rogue ap info that is detected in fw */ WMI_PDEV_RAP_INFO_EVENTID, + WMI_CHAN_RF_CHARACTERIZATION_INFO_EVENTID, + + /** 2nd extension of SERVICE_READY msg with extra target capability info */ + WMI_SERVICE_READY_EXT2_EVENTID, /* VDEV specific events */ /** VDEV started event in response to VDEV_START request */ @@ -1386,6 +1415,9 @@ typedef enum { /* Event to handle FW offloaded mgmt packets */ WMI_VDEV_MGMT_OFFLOAD_EVENTID, + /* FW response to Host for delete all peer cmdid */ + WMI_VDEV_DELETE_ALL_PEER_RESP_EVENTID, + /* peer specific events */ /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */ @@ -1514,6 +1546,10 @@ typedef enum { WMI_ROAM_SCAN_STATS_EVENTID, /** Blacklisted AP information event */ WMI_ROAM_BLACKLIST_EVENTID, + /** Roam Pre-Authentication start event */ + WMI_ROAM_PREAUTH_START_EVENTID, + /** Roaming PMKID request event */ + WMI_ROAM_PMKID_REQUEST_EVENTID, /** P2P disc found */ WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P), @@ -1713,6 +1749,12 @@ typedef enum { /** event to get TX power per input HALPHY parameters */ WMI_GET_TPC_POWER_EVENTID, + /** event to provide MU-EDCA Parameters (to update host's beacon config) */ + WMI_MUEDCA_PARAMS_CONFIG_EVENTID, + + /** event to get ELNA BYPASS status */ + WMI_GET_ELNA_BYPASS_EVENTID, + /* GPIO Event */ WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO), /** upload H_CV info WMI event @@ -1819,6 +1861,8 @@ typedef enum { WMI_TWT_DEL_DIALOG_COMPLETE_EVENTID, WMI_TWT_PAUSE_DIALOG_COMPLETE_EVENTID, WMI_TWT_RESUME_DIALOG_COMPLETE_EVENTID, + WMI_TWT_BTWT_INVITE_STA_COMPLETE_EVENTID, + WMI_TWT_BTWT_REMOVE_STA_COMPLETE_EVENTID, /** Events in Prototyping phase */ WMI_NDI_CAP_RSP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PROTOTYPE), @@ -1871,7 +1915,7 @@ typedef struct { A_UINT32 info; /** contains min power, max power, reg power and reg class id. */ A_UINT32 reg_info_1; - /** contains antennamax */ + /** contains antennamax, max bandwidth */ A_UINT32 reg_info_2; } wmi_channel; @@ -1945,6 +1989,12 @@ typedef enum { } while (0) #define WMI_GET_CHANNEL_MAX_TX_POWER(pwmi_channel) ((((pwmi_channel)->reg_info_2)>>8) & 0xff) +/* max bw supported for each channel, enum wmi_channel_width as value */ +#define WMI_SET_CHANNEL_MAX_BANDWIDTH(pwmi_channel,val) do { \ + (pwmi_channel)->reg_info_2 &= 0xff00ffff; \ + (pwmi_channel)->reg_info_2 |= ((val & 0xff) << 16); \ + } while (0) +#define WMI_GET_CHANNEL_MAX_BANDWIDTH(pwmi_channel) ((((pwmi_channel)->reg_info_2) >> 16) & 0xff) /** HT Capabilities*/ #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */ @@ -2522,6 +2572,68 @@ typedef struct { */ } wmi_service_ready_ext_event_fixed_param; +/* + * regdb version GET/SET APIs + */ +#define WMI_REG_DB_VERSION_MAJOR_BITPOS 0 +#define WMI_REG_DB_VERSION_MINOR_BITPOS 8 +#define WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS 16 +#define WMI_BDF_REG_DB_VERSION_MINOR_BITPOS 24 +#define WMI_REG_DB_VERSION_NUM_BITS 8 + +#define WMI_REG_DB_VERSION_MAJOR_GET(dword) \ + WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS) +#define WMI_REG_DB_VERSION_MAJOR_SET(dword, value) \ + WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value) + +#define WMI_REG_DB_VERSION_MINOR_GET(dword) \ + WMI_GET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS) +#define WMI_REG_DB_VERSION_MINOR_SET(dword, value) \ + WMI_SET_BITS(dword, WMI_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value) + +#define WMI_BDF_REG_DB_VERSION_MAJOR_GET(dword) \ + WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS) +#define WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, value) \ + WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MAJOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value) + +#define WMI_BDF_REG_DB_VERSION_MINOR_GET(dword) \ + WMI_GET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS) +#define WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, value) \ + WMI_SET_BITS(dword, WMI_BDF_REG_DB_VERSION_MINOR_BITPOS, WMI_REG_DB_VERSION_NUM_BITS, value) + +#define WMI_REG_DB_VERSION_SET(dword, reg_db_ver_major, reg_db_ver_minor, bdf_reg_db_ver_major, bdf_reg_db_ver_minor) \ + do { \ + WMI_REG_DB_VERSION_MAJOR_SET(dword, reg_db_ver_major); \ + WMI_REG_DB_VERSION_MINOR_SET(dword, reg_db_ver_minor); \ + WMI_BDF_REG_DB_VERSION_MAJOR_SET(dword, bdf_reg_db_ver_major); \ + WMI_BDF_REG_DB_VERSION_MINOR_SET(dword, bdf_reg_db_ver_minor); \ + } while (0) + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_service_ready_ext2_event_fixed_param.*/ + + /* + * regDB Version to be sent to Host on WMI service ready ext2 event. + * [7:0] - regDbVersionMajor + * [15:8] - regDbVersionMinor + * [23:16] - bdfRegDbVersionMajor + * [31:24] - bdfRegDbVersionMinor + * The WMI_*REG_DB_VERSION_[MAJOR,MINOR]_[SET,GET] macros are used to + * access these bitfields. + */ + A_UINT32 reg_db_version; +} wmi_service_ready_ext2_event_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_chan_rf_characterization_info_event_fixed_param */ + /* + * A variable-length TLV array of wmi_chan_rf_characterization_info will + * follow this fixed_param TLV, containing rx characterization info for + * primary channels. + * WMI_CHAN_RF_CHARACTERIZATION_INFO wmi_chan_rf_characterization_info[]; + */ +} wmi_chan_rf_characterization_info_event_fixed_param; + typedef enum { WMI_FW_STA_RTT_INITR = 0x00000001, WMI_FW_STA_RTT_RESPR = 0x00000002, @@ -2648,6 +2760,23 @@ typedef struct { * A 0x0 value for max_ast_index means the target has not specified a limit. */ A_UINT32 max_ast_index; + /* pktlog_defs_checksum: + * checksum computed from the definitions of the enums and structs + * used within pktlog traces. + * This pktlog defs checksum needs to be embedded into pktlog trace files + * (specifically in ath_pktlog_bufhdr.version). + * + * If pktlog_defs_checksum is zero then it is invalid; it should be ignored + * and ath_pktlog_bufhdr.magic_num needs to be PKTLOG_MAGIC_NUM_LEGACY + * (i.e. 7735225). + * + * If pktlog_defs_checksum is non-zero then it is valid, and the host + * should put it into the pktlog trace file header and set + * ath_pktlog_bufhdr.magic_num as PKTLOG_MAGIC_NUM_VERSION_IS_CHECKSUM + * (i.e. 2453506), to indicate that the file header version field contains + * a checksum. + */ + A_UINT32 pktlog_defs_checksum; /* * This fixed_param TLV is followed by these additional TLVs: @@ -3217,8 +3346,76 @@ typedef struct { * other - reserved. */ A_UINT32 ul_resp_config; + + /* msdu_flow_override_config0 - contains AST enable bitmask + * AST0 is unconditionally enabled, unless the MSDU flow override feature + * is entirely disabled. + * AST1 through AST3 are conditionally enabled, based on bits 0-2 in + * msdu_flow_override_config0. + * If all three bits are 0, no msdu flow override feature at all in FW. + * + * The WMI_MSDU_FLOW_AST_ENABLE_GET and WMI_MSDU_FLOW_AST_ENABLE_SET + * macros are used to read and write these bitfields. + */ + A_UINT32 msdu_flow_override_config0; + + /* msdu_flow_override_config1: + * Bits 3:0 - AST0_FLOW_MASK(4) + * Bits 7:4 - AST1_FLOW_MASK(4) + * Bits 11:8 - AST2_FLOW_MASK(4) + * Bits 15:12 - AST3_FLOW_MASK(4) + * Bits 23:16 - TID_VALID_HI_PRI (8) + * Bits 31:24 - TID_VALID_LOW_PRI (8) + * + * The macros + * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET + * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET + * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET + * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET + * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET + * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET + * are used to read and write these bitfields. + */ + A_UINT32 msdu_flow_override_config1; } wmi_resource_config; +#define WMI_MSDU_FLOW_AST_ENABLE_GET(msdu_flow_config0, ast_x) \ + (((ast_x) == 0) ? 1 : ((msdu_flow_config0) & (1 << ((ast_x) - 1)))) +#define WMI_MSDU_FLOW_AST_ENABLE_SET(msdu_flow_config0, ast_x, enable) \ + do { \ + if ((ast_x) == 0) break; \ + if ((enable)) { \ + (msdu_flow_config0) |= (1 << ((ast_x) - 1)); \ + } else { \ + (msdu_flow_config0) &= ~(1 << ((ast_x) - 1)); \ + } \ + } while(0) + +#define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x) \ + (((msdu_flow_config1) & (0x0f << ((ast_x) * 4))) >> ((ast_x) * 4)) +#define WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET( \ + msdu_flow_config1, ast_x, mask) \ + do { \ + (msdu_flow_config1) &= ~(0xF << ((ast_x) * 4)); \ + (msdu_flow_config1) |= ((mask) << ((ast_x) * 4)); \ + } while(0) + +#define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1) \ + (((msdu_flow_config1) & 0xff0000) >> 16) +#define WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask) \ + do { \ + (msdu_flow_config1) &= ~0xff0000; \ + (msdu_flow_config1) |= ((mask) << 16); \ + } while(0) + +#define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1) \ + ((msdu_flow_config1 & 0xff000000) >> 24) +#define WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask) \ + do { \ + (msdu_flow_config1) &= ~0xff000000; \ + (msdu_flow_config1) |= ((mask) << 24); \ + } while(0) + #define WMI_RSRC_CFG_FLAG_SET(word32, flag, value) \ do { \ (word32) &= ~WMI_RSRC_CFG_FLAG_ ## flag ## _M; \ @@ -3594,7 +3791,7 @@ typedef struct { /** * TLV (tag length value) parameters follow the scan_cmd * structure. The TLV's are: - * A_UINT32 channel_list[num_chan]; + * A_UINT32 channel_list[num_chan]; // in MHz * wmi_ssid ssid_list[num_ssids]; * wmi_mac_addr bssid_list[num_bssid]; * A_UINT8 ie_data[ie_len]; @@ -3731,6 +3928,7 @@ typedef struct { #define MAX_NUM_CHAN_PER_WMI_CMD 58 /* each WMI cmd can hold 58 channel entries at most */ #define APPEND_TO_EXISTING_CHAN_LIST 1 +#define CHANNEL_MAX_BANDWIDTH_VALID 2 typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_scan_chan_list_cmd_fixed_param */ @@ -4072,7 +4270,7 @@ typedef struct { typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_rx_hdr */ - /** channel on which this frame is received. */ + /** channel on which this frame is received (channel number) */ A_UINT32 channel; /** snr information used to cal rssi */ A_UINT32 snr; @@ -4115,6 +4313,9 @@ typedef struct { */ A_UINT32 pdev_id; + /** freq in MHz of the channel on which this frame was received */ + A_UINT32 chan_freq; + /* This TLV is followed by array of bytes: * A_UINT8 bufp[]; <-- management frame buffer */ @@ -4518,6 +4719,9 @@ typedef struct { #define WMI_TX_SEND_PARAM_FRAME_TYPE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 20, 1) #define WMI_TX_SEND_PARAM_FRAME_TYPE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 20, 1, value) +#define WMI_TX_SEND_PARAM_CFR_CAPTURE_GET(tx_param_dword1) WMI_GET_BITS(tx_param_dword1, 21, 1) +#define WMI_TX_SEND_PARAM_CFR_CAPTURE_SET(tx_param_dword1, value) WMI_SET_BITS(tx_param_dword1, 21, 1, value) + typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_tx_send_params */ @@ -4618,7 +4822,7 @@ typedef struct { /* chain_mask - specify which chains to transmit from * If not set, target will choose what chain_mask to use. */ - chain_mask: 8, + chain_mask: 8, /* The bits in this mask correspond to the values as below * bit 0 -> 5MHz @@ -4630,7 +4834,7 @@ typedef struct { * bit 6 -> 80_80MHz * If no bits are set, target can choose what BW to use. */ - bw_mask: 7, + bw_mask: 7, /* preamble_type_mask - * Specify which preamble types (CCK, OFDM, HT, VHT) the target @@ -4643,15 +4847,19 @@ typedef struct { * bit 4: if set, HE * If no bits are set, target can choose what preamble type to use. */ - preamble_type: 5, + preamble_type: 5, /* Data:1 Mgmt:0 */ - frame_type: 1, + frame_type: 1, - reserved1_31_21: 11; - }; - A_UINT32 tx_param_dword1; + /* Capture CFR when bit is set + */ + cfr_capture: 1, + + reserved1_31_22: 10; + }; + A_UINT32 tx_param_dword1; }; } wmi_tx_send_params; @@ -5895,6 +6103,23 @@ typedef enum { */ WMI_PDEV_PARAM_SET_CMD_OBSS_PD_THRESHOLD, + /* Parameter used for enabling/disabling non wlan coex from boot */ + WMI_PDEV_PARAM_ENABLE_NON_WLAN_COEX_FROM_BOOT, + + /* Parameter used to configure OBSS Packet Detection per Access Category + * for Spatial Reuse feature. + * Based on the bits set, the corresponding Access Category Queues will have + * spatial reuse enabled / disabled. + * bit | AC + * ----------- + * 0 | BK + * 1 | BE + * 2 | VI + * 3 | VO + * 4 - 31 | Reserved + */ + WMI_PDEV_PARAM_SET_CMD_OBSS_PD_PER_AC, + } WMI_PDEV_PARAM; #define WMI_PDEV_ONLY_BSR_TRIG_IS_ENABLED(trig_type) WMI_GET_BITS(trig_type, 0, 1) @@ -6652,6 +6877,7 @@ typedef enum { WMI_REQUEST_BCN_STAT = 0x0800, WMI_REQUEST_BCN_STAT_RESET = 0x1000, WMI_REQUEST_PEER_EXTD2_STAT = 0x2000, + WMI_REQUEST_MIB_EXTD_STAT = 0x4000, } wmi_stats_id; /* @@ -6848,6 +7074,7 @@ typedef enum { WMI_CHAN_WIDTH_80P80 = 4, WMI_CHAN_WIDTH_5 = 5, WMI_CHAN_WIDTH_10 = 6, + WMI_CHAN_WIDTH_165 = 7, } wmi_channel_width; /*Clear stats*/ @@ -7344,6 +7571,8 @@ typedef struct { * indicate this is the final WMI_STATS_EVENT in a series. */ A_UINT32 last_event; + /** number of extended MIB stats event structures (wmi_mib_extd_stats) */ + A_UINT32 num_mib_extd_stats; /* This TLV is followed by another TLV of array of bytes * A_UINT8 data[]; @@ -7360,6 +7589,11 @@ typedef struct { * the data[] array also contains num_peer_stats * size of wmi_peer_extd_stats * following the information elements listed above. */ +/* If WMI_REQUEST_MIB_EXTD_STAT is set in stats_id, + * the data[] array also contains + * num_mib_extd_stats * size of(struct wmi_mib_extd_stats) + * following the information elements listed above. + */ } wmi_stats_event_fixed_param; /* WLAN channel CCA stats bitmap */ @@ -7894,6 +8128,14 @@ typedef struct { A_UINT32 last_rx_bitrate_kbps; /** combined RSSI of the last received PPDU, in unit of dBm */ A_INT32 peer_rssi; + /** number of succeed transmissions (MPDUs) (ACK) */ + A_UINT32 tx_succeed; + /** + * The RSSI values are in dBm units, and are exponentially time-averaged. + * The averaging is performed on the dB values (rather than the linear + * values). + */ + A_INT32 peer_rssi_per_chain[WMI_MAX_CHAINS]; } wmi_peer_stats_info; typedef struct { @@ -8137,6 +8379,9 @@ typedef struct { A_UINT32 rx_duration_us; } wmi_chan_stats; +/** + * MIB statistics. See 802.11 spec for the meaning of each field. + */ typedef struct { A_UINT32 tx_mpdu_grp_frag_cnt; /*dot11TransmittedFragmentCount */ A_UINT32 tx_msdu_grp_frm_cnt; /*dot11GroupTransmittedFrameCount */ @@ -8189,6 +8434,20 @@ typedef struct { A_UINT32 reserved_4; } wmi_mib_stats; +/** + * MIB extension statistics. + */ +typedef struct { + A_UINT32 tx_msdu_multi_retry_cnt; /*dot11MultipleRetryCount*/ + A_UINT32 tx_ack_fail_cnt; /*dot11ACKFailureCount*/ + A_UINT32 tx_qos_msdu_multi_retry_up; /*dot11QosMultipleRetryCount*/ + A_UINT32 tx_qos_ack_fail_cnt_up; /*dot11QosACKFailureCount*/ + A_UINT32 rsna_cmac_icv_err_cnt; /*dot11RSNAStatsCMACICVErrors*/ + A_UINT32 rsna_cmac_replay_err_cnt; /*dot11RSNAStatsCMACReplays*/ + A_UINT32 rx_ampdu_deli_crc_err_cnt; /*dot11AMPDUDelimiterCRCErrorCount*/ + A_UINT32 reserved[8]; /* Reserve more fields for future extension */ +} wmi_mib_extd_stats; + typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_rssi_stats */ A_UINT32 vdev_id; @@ -8321,6 +8580,11 @@ typedef struct { * added to AST table for traffic flow between mesh stations */ #define WMI_UNIFIED_VDEV_SUBTYPE_MESH_11S 0x6 +/* Subtype to indicate that the AP VAP is in smart monitor mode + * This is needed to differentiate in firmware betweem normal AP mode + * with smart monitor AP mode + */ +#define WMI_UNIFIED_VDEV_SUBTYPE_SMART_MON 0x7 /** values for vdev_start_request flags */ /** Indicates that AP VDEV uses hidden ssid. only valid for @@ -9832,6 +10096,33 @@ typedef enum { */ WMI_VDEV_PARAM_PACKET_CAPTURE_MODE, /* 0x93 */ + /** + * To configure duration of how many seconds without tx unicast traffic is + * considered stale for mcast rate adaptation + */ + WMI_VDEV_PARAM_MCAST_RC_STALE_PERIOD, /* 0x94 */ + + /* + * Bits 3:0 - AST0_FLOW_MASK(4) + * Bits 7:4 - AST1_FLOW_MASK(4) + * Bits 11:8 - AST2_FLOW_MASK(4) + * Bits 15:12 - AST3_FLOW_MASK(4) + * Bits 23:16 - TID_VALID_HI_PRI(8) + * Bits 31:24 - TID_VALID_LOW_PRI(8) + * + * The below macros can be used to set/get the relevent fields. + * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_GET(msdu_flow_config1, ast_x) + * WMI_MSDU_FLOW_ASTX_MSDU_FLOW_MASKS_SET(msdu_flow_config1, ast_x, mask) + * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_GET(msdu_flow_config1) + * WMI_MSDU_FLOW_TID_VALID_HI_MASKS_SET(msdu_flow_config1, mask) + * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_GET(msdu_flow_config1) + * WMI_MSDU_FLOW_TID_VALID_LOW_MASKS_SET(msdu_flow_config1, mask) + */ + WMI_VDEV_PARAM_MSDU_FLOW_OVERRIDE_CONFIG, /* 0x95 */ + + /* Enable/Disable using NULL frame for leaky AP */ + WMI_VDEV_PARAM_ENABLE_NULL_FOR_LEAKY_AP, /* 0x96 */ + /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE === * The below vdev param types are used for prototyping, and are @@ -10055,6 +10346,12 @@ WMI_VDEV_PARAM_ROAM_FW_OFFLOAD WMI_VDEV_PARAM **/ #define WMI_ROAM_FW_OFFLOAD_ENABLE_FLAG 0x1 /* Enable Roaming module in FW to do scan based on Final BMISS */ #define WMI_ROAM_BMISS_FINAL_SCAN_ENABLE_FLAG 0x2 +/** + * To enable/disable EAPOL_4WAY_HANDSHAKE process while roaming. + * param value = 0 --> Enable EAPOL 4way handshake + * param value = 1 --> Skip EAPOL 4way handshake + */ +#define WMI_VDEV_PARAM_SKIP_ROAM_EAPOL_4WAY_HANDSHAKE 0x4 /** slot time long */ #define WMI_VDEV_SLOT_TIME_LONG 0x1 @@ -10126,6 +10423,7 @@ typedef struct { #define WMI_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2 /** unsupported VDEV combination */ #define WMI_VDEV_START_RESPONSE_DFS_VIOLATION 0x3 /** DFS_VIOLATION since channel in the NOL is selected */ #define WMI_VDEV_START_RESPONSE_INVALID_REGDOMAIN 0x4 /** Invalid regulatory domain in VDEV start */ +#define WMI_VDEV_START_RESPONSE_INVALID_BAND 0x5 /** Band unsupported by current hw mode in VDEV start */ /** Beacon processing related command and event structures */ typedef struct { @@ -10622,8 +10920,18 @@ typedef enum { WMI_AP_PS_EGAP_FLAG_MAX = 0x8000 } wmi_ap_ps_egap_flag_type; +#define WMI_EGAP_GET_REDUCED_2G_TX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 0, 8) +#define WMI_EGAP_GET_REDUCED_2G_RX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 8, 8) +#define WMI_EGAP_GET_REDUCED_5G_TX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 16, 8) +#define WMI_EGAP_GET_REDUCED_5G_RX_CHM(txrx_chm) WMI_GET_BITS(txrx_chm, 24, 8) + +#define WMI_EGAP_SET_REDUCED_2G_TX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 0, 8, val) +#define WMI_EGAP_SET_REDUCED_2G_RX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 8, 8, val) +#define WMI_EGAP_SET_REDUCED_5G_TX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 16, 8, val) +#define WMI_EGAP_SET_REDUCED_5G_RX_CHM(txrx_chm, val) WMI_SET_BITS(txrx_chm, 24, 8, val) + /** - * configure ehanced green ap parameters + * configure enhanced green ap parameters */ typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_ap_powersave_egap_param_cmd_fixed_param */ @@ -10643,6 +10951,13 @@ typedef struct { /** The param is used to turn on/off some functions within E-GAP. */ A_UINT32 flags; /* wmi_ap_ps_egap_flag_type bitmap */ + /** Reduced_txrx_chainmask + * [7:0] - 2G band tx chain mask + * [15:8] - 2G band rx chain mask + * [23:16] - 5G band tx chain mask + * [31:24] - 5G band rx chain mask + */ + A_UINT32 reduced_txrx_chainmask; } wmi_ap_ps_egap_param_cmd_fixed_param; typedef enum { @@ -10950,6 +11265,12 @@ typedef struct { } wmi_peer_delete_cmd_fixed_param; typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_delete_all_peer_cmd_fixed_param */ + /** unique id identifying the VDEV, generated by the caller */ + A_UINT32 vdev_id; +} wmi_vdev_delete_all_peer_cmd_fixed_param; + +typedef struct { /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_unmap_response_cmd_fixed_param */ A_UINT32 tlv_header; /* @@ -11964,7 +12285,7 @@ typedef struct { * Default value: 300 will be set if invalid value is given */ A_UINT32 stick_time_seconds; - /* Disassoc time threshold in milli seconds + /* Disassoc time threshold in milliseconds * This time threshold allows the target to judge whether the STA * should can move to another AP immediately, or if the STA has time * to calculate roaming candidates. @@ -12013,15 +12334,17 @@ typedef struct { /** unique id identifying the VDEV, generated by the caller */ A_UINT32 vdev_id; /** roam scan period value */ - A_UINT32 roam_scan_period; + A_UINT32 roam_scan_period; /* units = milliseconds */ /** Aging for Roam scans */ A_UINT32 roam_scan_age; /** Inactivity monitoring time to consider device is in inactive state with data count is less than roam_inactive_count */ - A_UINT32 inactivity_time_period; /* units = milli seconds */ + A_UINT32 inactivity_time_period; /* units = milliseconds */ /** Maximum allowed data packets count during inactivity_time_period */ A_UINT32 roam_inactive_count; /** New roam scan period after device is in inactivity state */ - A_UINT32 roam_scan_period_after_inactivity; /* units = milli seconds */ + A_UINT32 roam_scan_period_after_inactivity; /* units = milliseconds */ + /** roam full scan period value */ + A_UINT32 roam_full_scan_period; /* units = milliseconds */ } wmi_roam_scan_period_fixed_param; /** @@ -12059,7 +12382,7 @@ typedef struct { /** * TLV (tag length value) parameters follow the wmi_roam_chan_list * structure. The TLV's are: - * A_UINT32 channel_list[]; + * A_UINT32 channel_list[]; // in MHz **/ } wmi_roam_chan_list_fixed_param; @@ -12092,6 +12415,8 @@ enum { WMI_AUTH_FT_RSNA_SUITE_B_8021X_SHA384, WMI_AUTH_FT_RSNA_FILS_SHA256, WMI_AUTH_FT_RSNA_FILS_SHA384, + WMI_AUTH_WPA3_SAE, + WMI_AUTH_WPA3_OWE, }; typedef enum { @@ -12699,7 +13024,7 @@ typedef struct { A_UINT32 tlv_header; /** Blaclisted AP mac address */ wmi_mac_addr bssid; - /** How much time in milli seconds to keep AP in blacklist */ + /** How much time in milliseconds to keep AP in blacklist */ A_UINT32 timeout; } wmi_roam_blacklist_with_timeout_tlv_param; @@ -12715,6 +13040,21 @@ typedef struct { */ } wmi_roam_blacklist_event_fixed_param; +typedef struct { + A_UINT32 tlv_header; + /** candidate AP mac address */ + wmi_mac_addr bssid; +} wmi_roam_pmkid_request_tlv_param; + +/** WMI_ROAM_PMKID_REQUEST_EVENT: generated whenever FW needs the PMKID while roaming **/ +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_pmkid_request_event_fixed_param */ + A_UINT32 vdev_id; + /* This TLV is followed by further TLVs: + * wmi_roam_pmkid_request_tlv_param pmkid_request[] + */ +} wmi_roam_pmkid_request_event_fixed_param; + /** WMI_ROAM_EVENT: roam event triggering the host roam logic. * generated when ever a better AP is found in the recent roam scan (or) * when beacon miss is detected (or) when a DEAUTH/DISASSOC is received @@ -12903,7 +13243,7 @@ typedef struct { /** * TLV (tag length value) parameters follows roam_invoke_req * The TLV's are: - * A_UINT32 channel_list[]; + * A_UINT32 channel_list[]; // in MHz * wmi_mac_addr bssid_list[]; * wmi_tlv_buf_len_param bcn_prb_buf_list[]; * A_UINT8 bcn_prb_frm[]; @@ -13037,6 +13377,23 @@ typedef struct { **/ } wmi_roam_subnet_change_config_fixed_param; +/** + * WMI_ROAM_ENABLE_DISABLE_TRIGGER_REASON: + * Enable or disable roaming triggers in FW. + */ +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_enable_disable_trigger_reason_fixed_param */ + /** unique id identifying the VDEV, generated by the caller */ + A_UINT32 vdev_id; + /** + * Bitmask (with enum WMI_ROAM_TRIGGER_REASON_ID identifying the bit + * positions) showing for which roam_trigger_reasons are enabled by + * bit value equal 0x1, and which roam_trigger_reasons are disabled by + * bit value equal 0x0. + */ + A_UINT32 trigger_reason_bitmask; +} wmi_roam_enable_disable_trigger_reason_fixed_param; + /** WMI_PROFILE_MATCH_EVENT: offload scan * generated when ever atleast one of the matching profiles is found * in recent NLO scan. no data is carried with the event. @@ -13142,13 +13499,13 @@ typedef struct { A_UINT32 disc_type; /* p2p find perodic */ A_UINT32 perodic; - /* p2p find listen channel */ + /* p2p find listen channel in MHz */ A_UINT32 listen_channel; /* p2p find full channel number */ A_UINT32 num_scan_chans; /** * TLV (tag length value) paramerters follow the pattern structure. - * TLV contain channel list + * TLV contain channel list in MHz */ } wmi_p2p_disc_offload_config_cmd; @@ -13423,6 +13780,8 @@ typedef enum event_type_e { WOW_SAP_OBSS_DETECTION_EVENT, WOW_BSS_COLOR_COLLISION_DETECT_EVENT, WOW_TKIP_MIC_ERR_FRAME_RECVD_EVENT, + WOW_ROAM_PREAUTH_START_EVENT, + WOW_ROAM_PMKID_REQUEST_EVENT, } WOW_WAKE_EVENT_TYPE; typedef enum wake_reason_e { @@ -13486,6 +13845,9 @@ typedef enum wake_reason_e { WOW_REASON_WLAN_BL, /* baselining done */ WOW_REASON_NTH_BCN_OFLD, /* nth beacon forward to host */ WOW_REASON_PKT_CAPTURE_MODE_WAKE, + WOW_REASON_PAGE_FAULT, /* Host wake up due to page fault */ + WOW_REASON_ROAM_PREAUTH_START, + WOW_REASON_ROAM_PMKID_REQUEST, /* add new WOW_REASON_ defs before this line */ WOW_REASON_MAX, @@ -14415,7 +14777,7 @@ typedef struct wmi_nlo_config { A_UINT32 num_cnlo_band_pref; /* The TLVs will follow. * nlo_configured_parameters nlo_list[]; - * A_UINT32 channel_list[num_of_channels]; + * A_UINT32 channel_list[num_of_channels]; // in MHz * nlo_channel_prediction_cfg ch_prediction_cfg; * enlo_candidate_score_params candidate_score_params; * wmi_vendor_oui vendor_oui[num_vendor_oui]; @@ -14930,6 +15292,10 @@ typedef struct { A_UINT32 off_duration; /* uint in mill seconds, channel off duraiton for path loss frame sending */ wmi_mac_addr dest_mac; /* multicast DA, for path loss frame */ A_UINT32 num_chans; +/* + * This fixed_param TLV is followed by other TLVs: + * A_UINT32 channel_list[num_chans]; // in MHz + */ } wmi_vdev_plmreq_start_cmd_fixed_param; typedef struct { @@ -15499,6 +15865,8 @@ typedef struct { A_UINT32 pref_offchan_num; /* Preferred off channel bandwidth as configured by user */ A_UINT32 pref_offchan_bw; + /* Preferred off channel frequency in MHz as configured by user */ + A_UINT32 pref_offchan_freq; /** Followed by the variable length TLV peer_chan_list: * wmi_channel peer_chan_list[]. @@ -15636,14 +16004,16 @@ typedef struct { A_UINT32 offchan_mode; /** peer MAC address */ wmi_mac_addr peer_macaddr; - /* Is peer initiator or responder of TDLS setup request */ + /* Is peer initiator or responder of TDLS setup request */ A_UINT32 is_peer_responder; /* off channel number*/ A_UINT32 offchan_num; /* off channel bandwidth bitmap, e.g. WMI_OFFCHAN_20MHZ */ A_UINT32 offchan_bw_bitmap; - /* operating class for offchan */ - A_UINT32 offchan_oper_class; + /* operating class for offchan */ + A_UINT32 offchan_oper_class; + /* off channel frequency in MHz */ + A_UINT32 offchan_freq; } wmi_tdls_set_offchan_mode_cmd_fixed_param; @@ -16104,10 +16474,11 @@ typedef struct A_UINT32 tlv_header; wmi_mac_addr bssid; /* BSSID */ wmi_ssid ssid; /* SSID */ - A_UINT32 ch; /* Channel */ + A_UINT32 ch; /* Channel number */ A_UINT32 rssi; /* RSSI or Level */ /* Timestamp when Network was found. Used to calculate age based on timestamp in GET_RSP msg header */ A_UINT32 timestamp; + A_UINT32 ch_freq; /* Channel frequency in MHz */ } wmi_batch_scan_result_network_info; typedef struct @@ -16225,7 +16596,7 @@ typedef struct { /** * TLV (tag length value) parameters follow the scan_cmd * structure. The TLV's are: - * A_UINT32 channel_list[]; + * A_UINT32 channel_list[]; // in MHz * wmi_ssid ssid_list[]; * wmi_mac_addr bssid_list[]; * A_UINT8 ie_data[]; @@ -16710,6 +17081,8 @@ typedef enum { typedef enum { /* Send null frame on the requested bw and capture CFR on ACK */ WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME = 0, + WMI_PEER_CFR_CAPTURE_METHOD_NULL_FRAME_WITH_PHASE = 1, + WMI_PEER_CFR_CAPTURE_METHOD_PROBE_RESP = 2, /* New methods to be added here */ WMI_PEER_CFR_CAPTURE_METHOD_MAX, } WMI_PEER_CFR_CAPTURE_METHOD; @@ -17345,6 +17718,27 @@ typedef struct { } wmi_oem_dma_buf_release_entry; typedef struct { + /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_oem_data_cmd_fixed_param */ + A_UINT32 tlv_header; + /** Unique id identifying the VDEV */ + A_UINT32 vdev_id; + /** Actual length in byte of data[]. */ + A_UINT32 data_len; +/** This structure is used to send OEM DATA binary blobs from + * application/service to firmware where Host driver is pass through. + * The OEM-specific commands from OEM-specific userspace applications + * are passed to OEM-specific feature handlers in firmware as OEM DATA + * binary blobs. The format of the data is per agreement between FW and + * userspace applications, with the binary blob beginning with a header + * that identifies to the FW the nature of the remaining data within the + * blob. + * + * Following this structure is the TLV: + * A_UINT8 data[]; <-- actual length in byte given by field data_len. + */ +} wmi_oem_data_cmd_fixed_param; + +typedef struct { A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_nan_cmd_param */ A_UINT32 data_len; /** length in byte of data[]. */ /* This structure is used to send REQ binary blobs @@ -18070,6 +18464,7 @@ enum wmi_sar_feature_state_flags { WMI_SAR_FEATURE_NO_CHANGE, WMI_SAR_FEATURE_ON_USER_DEFINED, WMI_SAR_FEATURE_ON_SAR_V2_0, + WMI_SAR_FEATURE_ON_SAR_V3, }; typedef struct { @@ -18364,6 +18759,20 @@ typedef struct { } wmi_peer_delete_resp_event_fixed_param; typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_delete_all_peer_resp_event_fixed_param */ + /** unique id identifying the VDEV, generated by the caller */ + A_UINT32 vdev_id; + /* Status of peer delete all command */ + /* + * Values for Status: + * 0 - OK; command successful + * 1 - EINVAL; Requested invalid vdev_id + * 2 - EFAILED; Delete all peer failed + */ + A_UINT32 status; +} wmi_vdev_delete_all_peer_resp_event_fixed_param; + +typedef struct { /* TLV tag and len; tag equals WMITLV_TAG_STRUC_ wmi_peer_state_event_fixed_param */ A_UINT32 tlv_header; A_UINT32 vdev_id; /* vdev ID */ @@ -18427,10 +18836,17 @@ typedef struct { /** following two parameters used by FW to fill IEs when sending 20/40 coexistence action frame to AP */ A_UINT32 forty_mhz_intolerant; /** STA 40M bandwidth intolerant capability */ A_UINT32 current_operating_class; /** STA current operating class */ - /** length of 2.4GHz channel list to scan at, channel list in tlv->channels[] */ + /** length of 2.4GHz channel list to scan at, channel number list in tlv->channels[] */ A_UINT32 channel_len; /** length of optional ie data to append to probe reqest when active scan, ie data in tlv->ie_field[] */ A_UINT32 ie_len; + +/** + * TLV (tag length value) parameters following the fixed param structure + * A_UINT8 channels[channel_len]; // channel numbers + * A_UINT8 ie_field[ie_len]; + * A_UINT32 chan_freqs[channel_len] // in MHz + */ } wmi_obss_scan_enable_cmd_fixed_param; typedef struct { @@ -18546,7 +18962,7 @@ typedef struct { typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ - /** channel number */ + /** channel in MHz */ A_UINT32 channel; /** dwell time in msec - use defaults if 0 */ @@ -18732,13 +19148,13 @@ typedef struct { typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ - /**bssid */ + /** bssid */ wmi_mac_addr bssid; - /**channel number */ + /** channel in MHz */ A_UINT32 channel; - /**upper RSSI limit */ + /** upper RSSI limit */ A_UINT32 upper_rssi_limit; - /**lower RSSI limit */ + /** lower RSSI limit */ A_UINT32 lower_rssi_limit; } wmi_extscan_wlan_change_bssid_param; @@ -18777,11 +19193,11 @@ typedef struct { typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ - /**bssid */ + /** bssid */ wmi_mac_addr bssid; - /**RSSI min threshold for reporting */ + /** RSSI min threshold for reporting */ A_UINT32 min_rssi; - /**Deprecated entry - channel number */ + /** Deprecated entry - channel in MHz */ A_UINT32 channel; /** RSSI max threshold for reporting */ A_UINT32 max_rssi; @@ -19010,25 +19426,25 @@ typedef struct { typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_ARRAY_STRUC */ - /**bssid */ + /** bssid */ wmi_mac_addr bssid; - /**ssid */ + /** ssid */ wmi_ssid ssid; - /**channel number */ + /** channel in MHz */ A_UINT32 channel; - /* capabilities */ + /** capabilities */ A_UINT32 capabilities; - /* beacon interval in TUs */ + /** beacon interval in TUs */ A_UINT32 beacon_interval; - /**time stamp in milliseconds - time last seen */ + /** time stamp in milliseconds - time last seen */ A_UINT32 tstamp; - /**flags - _tExtScanEntryFlags */ + /** flags - _tExtScanEntryFlags */ A_UINT32 flags; - /**RTT in ns */ + /** RTT in ns */ A_UINT32 rtt; - /**rtt standard deviation */ + /** rtt standard deviation */ A_UINT32 rtt_sd; - /* rssi information */ + /** rssi information */ A_UINT32 number_rssi_samples; /** IE length */ A_UINT32 ie_length; /* length of IE data */ @@ -21726,12 +22142,24 @@ typedef struct { typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_peer_smart_ant_set_train_antenna_param */ /* rate array */ - A_UINT32 train_rate_series; + union { + /* train_rate_series: + * original name, used for 8-bit rate-code implementations + */ + A_UINT32 train_rate_series; + /* train_rate_series_lo: + * Contains the lower 32 bits of rate array, for larger rate-code + * implementations. This field is paired with train_rate_series_hi. + */ + A_UINT32 train_rate_series_lo; + }; /* antenna array */ A_UINT32 train_antenna_series; /* Rate flags */ /* TODO: For future use? */ A_UINT32 rc_flags; + /* rate array -- continued */ + A_UINT32 train_rate_series_hi; /* Higher 32 bits of rate array */ } wmi_peer_smart_ant_set_train_antenna_param; typedef struct { @@ -22689,6 +23117,18 @@ typedef enum wmi_coex_config_type { * config msw mute duration (ms units) after MPTA interrupt fired */ WMI_COEX_CONFIG_MPTA_HELPER_WLAN_MUTE_DURATION = 41, + /* WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN + * allow WLAN scan on 2.4G channel when BT SCO connectivity is alive + */ + WMI_COEX_CONFIG_BT_SCO_ALLOW_WLAN_2G_SCAN = 42, + /* WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR + * config to enable(1)/disable(0) WAR of BT 2nd harmonic issue function + */ + WMI_COEX_CONFIG_ENABLE_2ND_HARMONIC_WAR = 43, + /* WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE + * config BTC separate chain mode or shared mode + */ + WMI_COEX_CONFIG_BTCOEX_SEPARATE_CHAIN_MODE = 44, } WMI_COEX_CONFIG_TYPE; typedef struct { @@ -23092,6 +23532,12 @@ typedef struct { * Refer to WMI_HE_CAP_xx_LTF_xxx_SUPPORT_GET/SET macros */ A_UINT32 he_cap_info_internal; + + A_UINT32 wireless_modes; /* REGDMN MODE, see REGDMN_MODE_ enum */ + A_UINT32 low_2ghz_chan_freq; /* units = MHz */ + A_UINT32 high_2ghz_chan_freq; /* units = MHz */ + A_UINT32 low_5ghz_chan_freq; /* units = MHz */ + A_UINT32 high_5ghz_chan_freq; /* units = MHz */ } WMI_MAC_PHY_CAPABILITIES; typedef struct { @@ -23221,10 +23667,10 @@ typedef struct { A_UINT32 regcap2; /* REGDMN MODE, see REGDMN_MODE_ enum */ A_UINT32 wireless_modes; - A_UINT32 low_2ghz_chan; - A_UINT32 high_2ghz_chan; - A_UINT32 low_5ghz_chan; - A_UINT32 high_5ghz_chan; + A_UINT32 low_2ghz_chan; /* freq in MHz */ + A_UINT32 high_2ghz_chan; /* freq in MHz */ + A_UINT32 low_5ghz_chan; /* freq in MHz */ + A_UINT32 high_5ghz_chan; /* freq in MHz */ } WMI_HAL_REG_CAPABILITIES_EXT; typedef struct { @@ -23482,6 +23928,8 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command) WMI_RETURN_STRING(WMI_PEER_CREATE_CMDID); /** delete a peer */ WMI_RETURN_STRING(WMI_PEER_DELETE_CMDID); + /** delete all peer (excluding bss peer) */ + WMI_RETURN_STRING(WMI_VDEV_DELETE_ALL_PEER_CMDID); /** flush specific tid queues of a peer */ WMI_RETURN_STRING(WMI_PEER_FLUSH_TIDS_CMDID); /** set a parameter of a peer */ @@ -23609,7 +24057,7 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command) /* AP power save specific config * set AP power save specific param */ WMI_RETURN_STRING(WMI_AP_PS_PEER_PARAM_CMDID); - /* set AP UAPSD coex pecific param */ + /* set AP UAPSD coex specific param */ WMI_RETURN_STRING(WMI_AP_PS_PEER_UAPSD_COEX_CMDID); /* Rate-control specific commands */ @@ -24042,6 +24490,17 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command) WMI_RETURN_STRING(WMI_ROAM_IDLE_CONFIG_CMDID); WMI_RETURN_STRING(WMI_IDLE_TRIGGER_MONITOR_CMDID); WMI_RETURN_STRING(WMI_PDEV_DSM_FILTER_CMDID); + WMI_RETURN_STRING(WMI_TWT_BTWT_INVITE_STA_CMDID); + WMI_RETURN_STRING(WMI_TWT_BTWT_REMOVE_STA_CMDID); + WMI_RETURN_STRING(WMI_OEM_DATA_CMDID); + WMI_RETURN_STRING(WMI_ROAM_PREAUTH_STATUS_CMDID); + WMI_RETURN_STRING(WMI_SET_ELNA_BYPASS_CMDID); + WMI_RETURN_STRING(WMI_GET_ELNA_BYPASS_CMDID); + WMI_RETURN_STRING(WMI_AUDIO_AGGR_ENABLE_CMDID); + WMI_RETURN_STRING(WMI_AUDIO_AGGR_ADD_GROUP_CMDID); + WMI_RETURN_STRING(WMI_AUDIO_AGGR_DEL_GROUP_CMDID); + WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RATE_CMDID); + WMI_RETURN_STRING(WMI_AUDIO_AGGR_SET_GROUP_RETRY_CMDID); } return "Invalid WMI cmd"; @@ -24780,6 +25239,10 @@ typedef enum _WMI_TWT_COMMAND_T { #define TWT_FLAGS_GET_PROTECTION(flag) WMI_GET_BITS(flag, 11, 1) #define TWT_FLAGS_SET_PROTECTION(flag, val) WMI_SET_BITS(flag, 11, 1, val) +/* B-TWT ID 0: 0 means non-0 B-TWT ID or I-TWT, 1 means B-TWT ID 0 */ +#define TWT_FLAGS_GET_BTWT_ID0(flag) WMI_GET_BITS(flag, 12, 1) +#define TWT_FLAGS_SET_BTWT_ID0(flag, val) WMI_SET_BITS(flag, 12, 1, val) + typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_add_dialog_cmd_fixed_param */ A_UINT32 vdev_id; /* VDEV identifier */ @@ -24807,6 +25270,11 @@ typedef struct { * Refer to 11ax spec session "9.4.2.199 TWT element" for more info. */ A_UINT32 b_twt_persistence; + + /* Broadcast TWT(B-TWT) Recommendation, refer to section + * "9.4.2.199 TWT element" of latest 11ax draft + */ + A_UINT32 b_twt_recommendation; } wmi_twt_add_dialog_cmd_fixed_param; /* status code of adding TWT dialog */ @@ -24918,6 +25386,60 @@ typedef struct { A_UINT32 status; /* refer to WMI_RESUME_TWT_STATUS_T */ } wmi_twt_resume_dialog_complete_event_fixed_param; +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_btwt_invite_sta_cmd_fixed_param */ + A_UINT32 vdev_id; /* VDEV identifier */ + wmi_mac_addr peer_macaddr; /* peer MAC address */ + A_UINT32 dialog_id; /* TWT dialog ID */ +} wmi_twt_btwt_invite_sta_cmd_fixed_param; + +/* status code of inviting STA to B-TWT dialog */ +typedef enum _WMI_TWT_BTWT_INVITE_STA_STATUS_T { + WMI_TWT_BTWT_INVITE_STA_STATUS_OK, /* inviting STA to B-TWT successfully completed */ + WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */ + WMI_TWT_BTWT_INVITE_STA_STATUS_INVALID_PARAM, /* invalid parameters */ + WMI_TWT_BTWT_INVITE_STA_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */ + WMI_TWT_BTWT_INVITE_STA_STATUS_ALREADY_JOINED, /* peer STA already joined the session */ + WMI_TWT_BTWT_INVITE_STA_STATUS_NO_RESOURCE, /* FW resource exhausted */ + WMI_TWT_BTWT_INVITE_STA_STATUS_NO_ACK, /* peer STA did not ACK the request/response frame */ + WMI_TWT_BTWT_INVITE_STA_STATUS_UNKNOWN_ERROR, /* failed with an unknown reason */ +} WMI_TWT_BTWT_INVITE_STA_STATUS_T; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_invite_sta_complete_event_fixed_param */ + A_UINT32 vdev_id; /* VDEV identifier */ + wmi_mac_addr peer_macaddr; /* peer MAC address */ + A_UINT32 dialog_id; /* TWT dialog ID */ + A_UINT32 status; /* refer to WMI_TWT_BTWT_INVITE_STA_STATUS_T */ +} wmi_twt_btwt_invite_sta_complete_event_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_cmd_fixed_param */ + A_UINT32 vdev_id; /* VDEV identifier */ + wmi_mac_addr peer_macaddr; /* peer MAC address */ + A_UINT32 dialog_id; /* TWT dialog ID */ +} wmi_twt_btwt_remove_sta_cmd_fixed_param; + +/* status code of removing STA from B-TWT dialog */ +typedef enum _WMI_TWT_BTWT_REMOVE_STA_STATUS_T { + WMI_TWT_BTWT_REMOVE_STA_STATUS_OK, /* removing STA from B-TWT successfully completed */ + WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_NOT_EXIST, /* TWT dialog ID not exists */ + WMI_TWT_BTWT_REMOVE_STA_STATUS_INVALID_PARAM, /* invalid parameters */ + WMI_TWT_BTWT_REMOVE_STA_STATUS_DIALOG_ID_BUSY, /* FW is in the process of handling this dialog */ + WMI_TWT_BTWT_REMOVE_STA_STATUS_NOT_JOINED, /* peer STA not joined yet */ + WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_RESOURCE, /* FW resource exhausted */ + WMI_TWT_BTWT_REMOVE_STA_STATUS_NO_ACK, /* peer STA did not ACK the request/response frame */ + WMI_TWT_BTWT_REMOVE_STA_STATUS_UNKNOWN_ERROR, /* failed with an unknown reason */ +} WMI_TWT_BTWT_REMOVE_STA_STATUS_T; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_twt_btwt_remove_sta_complete_event_fixed_param */ + A_UINT32 vdev_id; /* VDEV identifier */ + wmi_mac_addr peer_macaddr; /* peer MAC address */ + A_UINT32 dialog_id; /* TWT dialog ID */ + A_UINT32 status; /* refer to WMI_TWT_BTWT_REMOVE_STA_STATUS_T */ +} wmi_twt_btwt_remove_sta_complete_event_fixed_param; + typedef enum { WMI_DMA_RING_CONFIG_MODULE_SPECTRAL, WMI_DMA_RING_CONFIG_MODULE_RTT, @@ -24939,15 +25461,7 @@ typedef struct { * [7:0] : channel metric - 0 = unusable, 1 = worst, 100 = best * [11:8] : channel BW - This bit-field uses values compatible with * enum definitions used internally within the target's - * halphy code. These values are specified below. - * BW_20MHZ = 0, - * BW_40MHZ = 1, - * BW_80MHZ = 2, - * BW_160MHZ = 3, - * BW_80P80MHZ = 4, - * BW_5MHZ = 5, - * BW_10MHZ = 6, - * BW_165MHZ = 7, + * halphy code. This bit field uses wmi_channel_width. * [15:12]: Reserved * [31:16]: Frequency - Center frequency of the channel for which * the RF characterisation info applies (MHz) @@ -25100,6 +25614,18 @@ typedef struct { * in HOST. */ A_UINT32 reset_delay; + /** + * Current center freq1 (MHz units) + */ + A_UINT32 freq1; + /** + * Current center freq2 (MHz units) + */ + A_UINT32 freq2; + /** + * Channel Width (MHz units) + */ + A_UINT32 ch_width; } wmi_dma_buf_release_spectral_meta_data; typedef enum { @@ -25343,6 +25869,35 @@ typedef enum { */ #define WLAN_PDEV_MAX_NUM_BSSID_DISALLOW_LIST 28 +/** Roam Pre-Authentication completion status */ +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_status_cmd_fixed_param */ + A_UINT32 vdev_id; + /* preauth_status, 0 - Success, Non Zero - Failure + * Refer to IEEE Std 802.11-2016 Table 9-46 for meaning of status values. + */ + A_UINT32 preauth_status; + /* AP BSSID for which pre-authentication is completed */ + wmi_mac_addr candidate_ap_bssid; + /** + * This fixed_param TLV is followed by the below TLVs: + * + * PMKID computed after successful pre-authentication. This is valid only if preauth_status is success + * A_UINT8 pmkid[]; + * + * PMK computed after successful pre-authentication. This is valid only if preauth_status is success + * A_UINT8 pmk[]; + */ +} wmi_roam_preauth_status_cmd_fixed_param; + +/** Roam Pre-Authentication start event */ +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_preauth_start_event_fixed_param */ + A_UINT32 vdev_id; + /* AP BSSID for which host needs to start pre-authentication */ + wmi_mac_addr candidate_ap_bssid; +} wmi_roam_preauth_start_event_fixed_param; + typedef struct { /* * The timestamp is in units of ticks of a 19.2MHz clock. @@ -25640,6 +26195,37 @@ typedef struct { A_UINT32 pulse_width; /** Duration of pulse in micro seconds */ } wmi_hpcs_pulse_start_cmd_fixed_param; +typedef struct { + /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_muedca_params_config_event_fixed_param */ + A_UINT32 tlv_header; /** TLV Header */ + A_UINT32 pdev_id; + /* + * The following per-AC arrays are indexed using the + * WMI_AC_xxx / wmi_traffic_ac enum values. + */ + /* aifsn + * Arbitration inter frame spacing number (AIFSN) + * Values are integers used for back off computation. + */ + A_UINT32 aifsn[WMI_AC_MAX]; + /* ecwmin + * Exponent form of ContentionWindow min (ECWmin) + * Values are integers used for back off computation. + */ + A_UINT32 ecwmin[WMI_AC_MAX]; + /* ecwmax + * Exponent form of ContentionWindow max (ECWmax) + * Values are integers used for back off computation. + */ + A_UINT32 ecwmax[WMI_AC_MAX]; + /* muedca_expiration_time + * MU EDCA Expiration time refers to the length of time after the most + * recent UL trigger time. The MU EDCA Timer field indicates the time + * limit, in units of 8 TUs + */ + A_UINT32 muedca_expiration_time[WMI_AC_MAX]; + } wmi_muedca_params_config_event_fixed_param; + /* Default PE Duration subfield indicates the PE duration in units of 4 us */ #define WMI_HEOPS_DEFPE_GET_D3(he_ops) WMI_GET_BITS(he_ops, 0, 3) #define WMI_HEOPS_DEFPE_SET_D3(he_ops, value) WMI_SET_BITS(he_ops, 0, 3, value) @@ -26487,8 +27073,8 @@ typedef struct { #define WMI_HEOPS_DEFPE_SET WMI_HEOPS_DEFPE_SET_D2 #define WMI_HEOPS_TWT_REQUIRED_GET WMI_HEOPS_TWT_REQUIRED_GET_D2 #define WMI_HEOPS_TWT_REQUIRED_SET WMI_HEOPS_TWT_REQUIRED_SET_D2 - #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_GET_D2 /* Depricated */ - #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_SET_D2 /* Depricated */ + #define WMI_HEOPS_TWT_GET WMI_HEOPS_TWT_GET_D2 /* Deprecated */ + #define WMI_HEOPS_TWT_SET WMI_HEOPS_TWT_SET_D2 /* Deprecated */ #define WMI_HEOPS_RTSTHLD_GET WMI_HEOPS_RTSTHLD_GET_D2 #define WMI_HEOPS_RTSTHLD_SET WMI_HEOPS_RTSTHLD_SET_D2 #define WMI_HEOPS_PARTBSSCOLOR_GET WMI_HEOPS_PARTBSSCOLOR_GET_D2 @@ -26749,9 +27335,40 @@ typedef struct { A_UINT32 chain_rssi[WMI_MAX_CHAINS]; } wmi_peer_cfr_capture_event_fixed_param; +#define WMI_UNIFIED_CHAIN_PHASE_MASK 0x0000ffff +#define WMI_UNIFIED_CHAIN_PHASE_GET(tlv, chain_idx) \ + ((A_UINT16) ((tlv)->chain_phase[chain_idx] & WMI_UNIFIED_CHAIN_PHASE_MASK)) +#define WMI_UNIFIED_CHAIN_PHASE_SET(tlv, chain_idx, value) \ + (tlv)->chain_phase[chain_idx] = (WMI_UNIFIED_CHAIN_PHASE_MASK & (value)) + +typedef struct { + /** TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_peer_cfr_capture_event_phase_fixed_param */ + A_UINT32 tlv_header; + + /* Per chain AoA phase data of the Peer, for up to WMI_MAX_CHAINS. + * USE WMI_UNIFIED_CHAIN_PHASE_GET to extract the phase value for + * a particular chain. + * Only lower 2 bytes will contain phase data for a particular chain. + * The values in phase data will be from 0 1023 as mapping of + * 0-359 degrees using the formula - + * phase data = phase in degrees * 1024 / 360 + * + * Target will set 0xFFFF for all invalid chains. + * + * The WMI_UNIFIED_CHAIN_PHASE_GET/SET macros can be used to access + * the valid portion of the 4-byte word containing the chain phase data. + */ + A_UINT32 chain_phase[WMI_MAX_CHAINS]; +} wmi_peer_cfr_capture_event_phase_fixed_param; + #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK 0x80000000 #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_OK_S 31 +/* Failed to capture CFR as peer is in power save mode */ +#define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED 0x40000000 +#define WMI_PEER_CFR_CAPTURE_EVT_STATUS_PS_FAILED_S 30 + #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX 0x00000003 #define WMI_PEER_CFR_CAPTURE_EVT_STATUS_TX_S 0 @@ -26936,6 +27553,72 @@ typedef struct { A_UINT32 valid_fields; } wlanfw_iface_combination; +typedef struct { + /** TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_set_elna_bypass_cmd_fixed_param */ + A_UINT32 tlv_header; + /* VDEV identifier */ + A_UINT32 vdev_id; + /** 1-Enable, 0-Disable */ + A_UINT32 en_dis; +} wmi_set_elna_bypass_cmd_fixed_param; + +typedef struct { + /** TLV tag and len; tag equals + * WMITLV_TAG_STRUC_wmi_get_elna_bypass_cmd_fixed_param */ + A_UINT32 tlv_header; + /* VDEV identifier */ + A_UINT32 vdev_id; +} wmi_get_elna_bypass_cmd_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_get_elna_bypass_event_fixed_param */ + /* VDEV identifier */ + A_UINT32 vdev_id; + /** 1-Enable, 0-Disable */ + A_UINT32 en_dis; +} wmi_get_elna_bypass_event_fixed_param; + +/* This command is to specify to enable/disable audio frame aggr */ +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_enable_cmd_fixed_param */ + A_UINT32 aggr_enable; /* enable aggregation for audio frame */ + A_UINT32 tbd_enable; /* enable time_based discarding for audio frame */ +} wmi_audio_aggr_enable_cmd_fixed_param; + +typedef struct wmi_audio_aggr_rate_set_s { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_audio_aggr_rate_set */ + A_UINT32 mcs; + A_UINT32 bandwidth; /* 0 for 20M, 1 for 40M and 2 for 80M, etc. */ +} WMI_AUDIO_AGGR_RATE_SET_T; + +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_add_group */ + A_UINT32 group_id; /* id of audio group */ + wmi_mac_addr multicast_addr; /* multicast address of audio group */ +} wmi_audio_aggr_add_group_cmd_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_del_group */ + A_UINT32 group_id; +} wmi_audio_aggr_del_group_cmd_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_rate */ + A_UINT32 group_id; + /** + * TLV (tag length value) parameters follow the + * structure. The TLV's are: + * WMI_AUDIO_AGGR_RATE_SET_T rate_set[]; + **/ +} wmi_audio_aggr_set_group_rate_cmd_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_audio_aggr_set_group_retry */ + A_UINT32 group_id; + A_UINT32 retry_thresh; +} wmi_audio_aggr_set_group_retry_cmd_fixed_param; + /* ADD NEW DEFS HERE */ diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 4829b69bc694..451b73066860 100755 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -36,7 +36,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_ 671 +#define __WMI_REVISION_ 714 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work |
