diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2019-02-28 01:06:27 -0800 |
|---|---|---|
| committer | Linux Build Service Account <lnxbuild@localhost> | 2019-02-28 01:06:27 -0800 |
| commit | 46c4d89ee3ca15c8a375d124d8b34523258cda72 (patch) | |
| tree | 716800570bc7bdaf899b37144bbcf24e17809e97 | |
| parent | 01f1999fdcfe28f8a807f9dc563c77a544afdae6 (diff) | |
| parent | d8432efd659005bb160f74e0673f7a2f9e3f2e68 (diff) | |
Merge d8432efd659005bb160f74e0673f7a2f9e3f2e68 on remote branch
Change-Id: I3ed67d763edc67c525efcfe3b41a1571d971d2f8
| -rw-r--r-- | fw/htt.h | 121 | ||||
| -rw-r--r-- | fw/htt_ppdu_stats.h | 133 | ||||
| -rw-r--r-- | fw/htt_stats.h | 48 | ||||
| -rwxr-xr-x | fw/targaddrs.h | 10 | ||||
| -rwxr-xr-x | fw/wlan_defs.h | 56 | ||||
| -rwxr-xr-x | fw/wmi_services.h | 12 | ||||
| -rwxr-xr-x | fw/wmi_tlv_defs.h | 63 | ||||
| -rwxr-xr-x | fw/wmi_unified.h | 660 | ||||
| -rwxr-xr-x | fw/wmi_version.h | 4 |
9 files changed, 1056 insertions, 51 deletions
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -174,9 +174,10 @@ * 3.57 Add support for in-band data within HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND * 3.58 Add optional MSDU ack RSSI array to end of HTT_T2H TX_COMPL_IND msg * 3.59 Add HTT_RXDMA_HOST_BUF_RING2 def + * 3.60 Add HTT_T2H_MSG_TYPE_PEER_STATS_IND def */ #define HTT_CURRENT_VERSION_MAJOR 3 -#define HTT_CURRENT_VERSION_MINOR 59 +#define HTT_CURRENT_VERSION_MINOR 60 #define HTT_NUM_TX_FRAG_DESC 1024 @@ -5603,6 +5604,7 @@ enum htt_t2h_msg_type { HTT_T2H_MSG_TYPE_MONITOR_MAC_HEADER_IND = 0x20, HTT_T2H_MSG_TYPE_FLOW_POOL_RESIZE = 0x21, HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND = 0x22, + HTT_T2H_MSG_TYPE_PEER_STATS_IND = 0x23, HTT_T2H_MSG_TYPE_TEST, /* keep this last */ @@ -10331,6 +10333,27 @@ enum htt_dbg_ext_stats_status { (((word) & HTT_T2H_PPDU_STATS_PPDU_ID_M) >> \ HTT_T2H_PPDU_STATS_PPDU_ID_S) +/* htt_t2h_ppdu_stats_ind_hdr_t + * This struct contains the fields within the header of the + * HTT_T2H_PPDU_STATS_IND message, preceding the type-specific + * stats info. + * This struct assumes little-endian layout, and thus is only + * suitable for use within processors known to be little-endian + * (such as the target). + * In contrast, the above macros provide endian-portable methods + * to get and set the bitfields within this PPDU_STATS_IND header. + */ +typedef struct { + A_UINT32 msg_type: 8, /* bits 7:0 */ + mac_id: 2, /* bits 9:8 */ + pdev_id: 2, /* bits 11:10 */ + reserved1: 4, /* bits 15:12 */ + payload_size: 16; /* bits 31:16 */ + A_UINT32 ppdu_id; + A_UINT32 timestamp_us; + A_UINT32 reserved2; +} htt_t2h_ppdu_stats_ind_hdr_t; + /** * @brief target -> host extended statistics upload * @@ -11144,4 +11167,98 @@ PREPACK struct htt_cfr_dump_compl_ind { (((word) & HTT_T2H_CFR_DUMP_TYPE1_VDEV_ID_M) >> \ HTT_T2H_CFR_DUMP_TYPE1_VDEV_ID_S) + +/** + * @brief target -> host peer (PPDU) stats message + * HTT_T2H_MSG_TYPE_PEER_STATS_IND + * @details + * This message is generated by FW when FW is sending stats to host + * about one or more PPDUs that the FW has transmitted to one or more peers. + * This message is sent autonomously by the target rather than upon request + * by the host. + * The following field definitions describe the format of the HTT target + * to host peer stats indication message. + * + * The HTT_T2H PPDU_STATS_IND message has a header followed by one + * or more PPDU stats records. + * Each PPDU stats record uses a htt_tx_ppdu_stats_info TLV. + * If the details of N PPDUS are sent in one PEER_STATS_IND message, + * then the message would start with the + * header, followed by N htt_tx_ppdu_stats_info structures, as depicted + * below. + * + * |31 16|15|14|13 11|10 9|8|7 0| + * |-------------------------------------------------------------| + * | reserved |MSG_TYPE | + * |-------------------------------------------------------------| + * rec 0 | TLV header | + * rec 0 |-------------------------------------------------------------| + * rec 0 | ppdu successful bytes | + * rec 0 |-------------------------------------------------------------| + * rec 0 | ppdu retry bytes | + * rec 0 |-------------------------------------------------------------| + * rec 0 | ppdu failed bytes | + * rec 0 |-------------------------------------------------------------| + * rec 0 | peer id | S|SG| BW | BA |A|rate code| + * rec 0 |-------------------------------------------------------------| + * rec 0 | retried MSDUs | successful MSDUs | + * rec 0 |-------------------------------------------------------------| + * rec 0 | TX duration | failed MSDUs | + * rec 0 |-------------------------------------------------------------| + * ... + * |-------------------------------------------------------------| + * rec N | TLV header | + * rec N |-------------------------------------------------------------| + * rec N | ppdu successful bytes | + * rec N |-------------------------------------------------------------| + * rec N | ppdu retry bytes | + * rec N |-------------------------------------------------------------| + * rec N | ppdu failed bytes | + * rec N |-------------------------------------------------------------| + * rec N | peer id | S|SG| BW | BA |A|rate code| + * rec N |-------------------------------------------------------------| + * rec N | retried MSDUs | successful MSDUs | + * rec N |-------------------------------------------------------------| + * rec N | TX duration | failed MSDUs | + * rec N |-------------------------------------------------------------| + * + * where: + * A = is A-MPDU flag + * BA = block-ack failure flags + * BW = bandwidth spec + * SG = SGI enabled spec + * S = skipped rate ctrl + * One htt_tx_ppdu_stats_info instance will have stats for one PPDU + * + * Header + * ------ + * dword0 - b'0:7 - msg_type : HTT_T2H_MSG_TYPE_PEER_STATS_IND + * dword0 - b'8:31 - reserved : Reserved for future use + * + * payload include below peer_stats information + * -------------------------------------------- + * @TLV : HTT_PPDU_STATS_INFO_TLV + * @tx_success_bytes : total successful bytes in the PPDU. + * @tx_retry_bytes : total retried bytes in the PPDU. + * @tx_failed_bytes : total failed bytes in the PPDU. + * @tx_ratecode : rate code used for the PPDU. + * @is_ampdu : Indicates PPDU is AMPDU or not. + * @ba_ack_failed : BA/ACK failed for this PPDU + * b00 -> BA received + * b01 -> BA failed once + * b10 -> BA failed twice, when HW retry is enabled. + * @bw : BW + * b00 -> 20 MHz + * b01 -> 40 MHz + * b10 -> 80 MHz + * b11 -> 160 MHz (or 80+80) + * @sg : SGI enabled + * @s : skipped ratectrl + * @peer_id : peer id + * @tx_success_msdus : successful MSDUs + * @tx_retry_msdus : retried MSDUs + * @tx_failed_msdus : MSDUs dropped in FW after max retry + * @tx_duration : Tx duration for the PPDU (microsecond units) + */ + #endif diff --git a/fw/htt_ppdu_stats.h b/fw/htt_ppdu_stats.h index e88fcc3abeef..992c2740ed88 100644 --- a/fw/htt_ppdu_stats.h +++ b/fw/htt_ppdu_stats.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -114,6 +114,19 @@ typedef enum htt_ppdu_stats_tlv_tag htt_ppdu_stats_tlv_tag_t; ((_var) |= ((_val) << HTT_PPDU_STATS_ARRAY_ITEM_TLV_SGI_S)); \ } while (0) +#define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_M 0x00008000 +#define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_S 15 + +#define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_GET(_var) \ + (((_var) & HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_M) >> \ + HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_S) + +#define HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_ARRAY_ITEM_TLV_SR_S)); \ + } while (0) + #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_PEERID_M 0xffff0000 #define HTT_PPDU_STATS_ARRAY_ITEM_TLV_PEERID_S 16 @@ -193,13 +206,23 @@ PREPACK struct htt_tx_ppdu_stats_info { 3: 160 MHz or 80+80 MHz */ bw: 3, sgi: 1, - reserved0: 1, + skipped_rate_ctrl: 1, peer_id: 16; A_UINT32 tx_success_msdus: 16, tx_retry_msdus: 16; A_UINT32 tx_failed_msdus: 16, /* united in us */ tx_duration: 16; + /* + * 1 in bit 0 of valid_bitmap represents that bitmap itself is valid. + * If the bitmap is valid (i.e. bit 0 is set), then check the other bits + * of bitmap to know which fields within htt_tx_ppdu_stats_info are valid. + * If bit 1 is set, tx_success_bytes is valid + * If bit 2 is set, tx_retry_bytes is valid + * ... + * If bit 14 is set, tx_duration is valid + */ + A_UINT32 valid_bitmap; } POSTPACK; typedef struct { @@ -211,15 +234,39 @@ typedef struct { * tx_ppdu_stats_info is variable length, with length = * number_of_ppdu_stats * sizeof (struct htt_tx_ppdu_stats_info) */ - A_UINT32 tx_ppdu_stats_info[1/*number_of_ppdu_stats*/]; + struct htt_tx_ppdu_stats_info tx_ppdu_stats_info[1/*number_of_ppdu_stats*/]; } htt_ppdu_stats_usr_common_array_tlv_v; -typedef struct { - htt_tlv_hdr_t tlv_hdr; +#define HTT_PPDU_STATS_SCH_CMD_TLV_HDR_STRUCT \ + struct { \ + htt_tlv_hdr_t tlv_hdr; \ + /* Refer bmi_msg.h */ \ + A_UINT32 target_type; \ + } + +typedef HTT_PPDU_STATS_SCH_CMD_TLV_HDR_STRUCT htt_ppdu_stats_sch_cmd_tlv_hdr_t; - /* Refer bmi_msg.h */ - A_UINT32 target_type; - A_UINT32 hw[1]; /* Variable length, refer to struct scheduler_cmd_status */ +typedef struct { + /* + * Use a union to allow the HW-independent header portion of this struct + * to be accessed either within a hdr struct, or directly within the + * htt_ppdu_stats_sch_cmd_tlv_v struct. + * For example, the target_type field can be accessed either as + * htt_ppdu_stats_sch_cmd_tlv_v.target_type + * or + * htt_ppdu_stats_sch_cmd_tlv_v.hdr.target_type + */ + union { + htt_ppdu_stats_sch_cmd_tlv_hdr_t hdr; + HTT_PPDU_STATS_SCH_CMD_TLV_HDR_STRUCT; + }; + /* + * The hw portion of this struct contains a scheduler_command_status + * struct, whose definition is different for different target HW types. + * The target_type field within the header can, if set correctly, + * clarify which definition of scheduler_command_status is being used. + */ + A_UINT32 hw[1]; } htt_ppdu_stats_sch_cmd_tlv_v; #define HTT_PPDU_STATS_COMMON_TLV_SCH_CMDID_M 0x0000ffff @@ -345,6 +392,33 @@ enum HTT_PPDU_STATS_BW { }; typedef enum HTT_PPDU_STATS_BW HTT_PPDU_STATS_BW; +enum HTT_PPDU_STATS_SEQ_TYPE { + HTT_SEQTYPE_UNSPECIFIED = 0, + HTT_SEQTYPE_SU = 1, + HTT_SEQTYPE_AC_MU_MIMO = 2, + HTT_SEQTYPE_AX_MU_MIMO = 3, + HTT_SEQTYPE_MU_OFDMA = 4, + HTT_SEQTYPE_UL_TRIG = 5, + HTT_SEQTYPE_BURST_BCN = 6, + HTT_SEQTYPE_UL_BSR_RESP = 7, + HTT_SEQTYPE_UL_BSR_TRIG = 8, + HTT_SEQTYPE_UL_RESP = 9, +}; +typedef enum HTT_PPDU_STATS_SEQ_TYPE HTT_PPDU_STATS_SEQ_TYPE; + +#define HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE_M 0x00ff0000 +#define HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE_S 16 + +#define HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE_GET(_var) \ + (((_var) & HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE_M) >> \ + HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE_S) + +#define HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_COMMON_TLV_PPDU_SEQ_TYPE_S)); \ + } while (0) + #define HTT_PPDU_STATS_COMMON_TLV_BW_M 0x000f0000 #define HTT_PPDU_STATS_COMMON_TLV_BW_S 16 @@ -403,15 +477,18 @@ typedef struct { /* BIT [ 7 : 0] :- frame_type - HTT_STATS_FTYPE * BIT [ 15: 8] :- queue_type - HTT_TX_QUEUE_TYPE * BIT [ 19: 16] :- bw - HTT_PPDU_STATS_BW - * BIT [ 31: 20] :- reserved + * BIT [ 27: 20] :- ppdu_seq_type - HTT_PPDU_STATS_SEQ_TYPE + * BIT [ 31: 28] :- reserved */ union { A_UINT32 bw__queue_type__frame_type; + A_UINT32 ppdu_seq_type__bw__queue_type__frame_type; struct { A_UINT32 frame_type: 8, queue_type: 8, bw: 4, - reserved0: 12; + ppdu_seq_type: 8, + reserved0: 4; }; }; A_UINT32 chain_mask; @@ -429,6 +506,42 @@ typedef struct { chan_mhz: 16; }; }; + + /* + * The cca_delta_time_us reports the time the tx PPDU in question + * was waiting in the HW tx queue for the clear channel assessment + * to indicate that the transmission could start. + * If this CCA delta time is zero or small, this indicates that the + * air interface was unused prior to the transmission, and thus it's + * improbable that there was a collision with some other transceiver's + * transmission. + * In contrast, a large CCA delta time means that this transceiver had + * to wait a long time for the air interface to be available; it's + * possible that other transceivers were also waiting for the air + * interface to become available, and if the other waiting transceiver's + * CW backoff aligned with this one, to have a transmit collision. + */ + A_UINT32 cca_delta_time_us; + + /* + * The rxfrm_delta_time_us reports the time the tx PPDU in question + * was waiting in the HW tx queue while there was an ongoing rx, + * either because the rx was already ongoing at the time the tx PPDU + * was enqueued, or because the rx (i.e. the peer's tx) won the air + * interface contention over the local vdev's tx. + */ + A_UINT32 rxfrm_delta_time_us; + + /* + * The txfrm_delta_time_us reports the time from when the tx PPDU + * in question was enqueued into the HW tx queue until the time the + * tx completion interrupt for the PPDU occurred. + * Thus, the txfrm_delta_time_us incorporates any time the tx PPDU + * had to wait for the air interface to become available, the PPDU + * duration, the block ack reception, and the tx completion interrupt + * latency. + */ + A_UINT32 txfrm_delta_time_us; } htt_ppdu_stats_common_tlv; #define HTT_PPDU_STATS_USER_COMMON_TLV_TID_NUM_M 0x000000ff diff --git a/fw/htt_stats.h b/fw/htt_stats.h index 47986513df79..d2c8b03a8d5d 100644 --- a/fw/htt_stats.h +++ b/fw/htt_stats.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -393,11 +393,25 @@ typedef enum { } while (0) typedef struct { - /* BIT [11 : 0] :- tag - * BIT [23 : 12] :- length - * BIT [31 : 24] :- reserved - */ - A_UINT32 tag__length; + union { + /* BIT [11 : 0] :- tag + * BIT [23 : 12] :- length + * BIT [31 : 24] :- reserved + */ + A_UINT32 tag__length; + /* + * The following struct is not endian-portable. + * It is suitable for use within the target, which is known to be + * little-endian. + * The host should use the above endian-portable macros to access + * the tag and length bitfields in an endian-neutral manner. + */ + struct { + A_UINT32 tag: 12, /* BIT [11 : 0] */ + length: 12, /* BIT [23 : 12] */ + reserved: 8; /* BIT [31 : 24] */ + }; + }; } htt_tlv_hdr_t; #define HTT_STATS_MAX_STRING_SZ32 4 @@ -1120,6 +1134,16 @@ typedef struct _htt_rx_peer_rate_stats_tlv { 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_INT8 rx_ul_fd_rssi[HTT_RX_PEER_STATS_NUM_SPATIAL_STREAMS];/* dBm unit */ + /* per_chain_rssi_pkt_type: + * This field shows what type of rx frame the per-chain RSSI was computed + * on, by recording the frame type and sub-type as bit-fields within this + * field: + * BIT [3 : 0] :- IEEE80211_FC0_TYPE + * BIT [7 : 4] :- IEEE80211_FC0_SUBTYPE + * BIT [31 : 8] :- Reserved + */ + A_UINT32 per_chain_rssi_pkt_type; } htt_rx_peer_rate_stats_tlv; typedef enum { @@ -2943,7 +2967,17 @@ typedef struct { * EVM mean across pilots, computed as * mean(10*log10(rx_pilot_evm_linear)) = mean(rx_pilot_evm_dB) */ - A_INT32 rx_pilot_evm_dB_mean[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS]; + A_INT32 rx_pilot_evm_dB_mean[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS]; + A_INT8 rx_ul_fd_rssi[HTT_RX_PDEV_STATS_NUM_SPATIAL_STREAMS][HTT_RX_PDEV_MAX_OFDMA_NUM_USER]; /* dBm units */ + /* per_chain_rssi_pkt_type: + * This field shows what type of rx frame the per-chain RSSI was computed + * on, by recording the frame type and sub-type as bit-fields within this + * field: + * BIT [3 : 0] :- IEEE80211_FC0_TYPE + * BIT [7 : 4] :- IEEE80211_FC0_SUBTYPE + * BIT [31 : 8] :- Reserved + */ + A_UINT32 per_chain_rssi_pkt_type; } htt_rx_pdev_rate_stats_tlv; diff --git a/fw/targaddrs.h b/fw/targaddrs.h index 25b493685040..774a3c9fc732 100755 --- a/fw/targaddrs.h +++ b/fw/targaddrs.h @@ -378,6 +378,16 @@ PREPACK64 struct host_interest_s { #define HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_HOST 0x400 /* HOST to support using BMI dump FW memory when hit assert */ #define HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_FW 0x800 /* FW to support using BMI dump FW memory when hit assert */ +/* USB_RESET_RESUME + * The host will set this flag, based on platform configuration specs. + * The target will check this flag at the time USB becomes suspended. + * If the flag is set, the target will invoke its reset / resume code. + * If the flag is not set, the target will do nothing, other than wait. + */ +#define HI_OPTION_USB_RESET_RESUME 0x1000 +#define USB_RESET_RESUME() \ + (HOST_INTEREST->hi_option_flag2 & HI_OPTION_USB_RESET_RESUME) + #define GPIO_WAKEUP_ENABLED() \ (HOST_INTEREST->hi_option_flag2 & HT_OPTION_GPIO_WAKEUP_SUPPORT) diff --git a/fw/wlan_defs.h b/fw/wlan_defs.h index e0010c92f924..d2cd217c4196 100755 --- a/fw/wlan_defs.h +++ b/fw/wlan_defs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2016, 2018 The Linux Foundation. All rights reserved.* + * Copyright (c) 2013-2016, 2018-2019 The Linux Foundation. All rights reserved.* * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -206,6 +206,7 @@ typedef enum { ((mode) == MODE_11AC_VHT80)) #endif +#if SUPPORT_11AX #define IS_MODE_HE(mode) (((mode) == MODE_11AX_HE20) || \ ((mode) == MODE_11AX_HE40) || \ ((mode) == MODE_11AX_HE80) || \ @@ -214,6 +215,10 @@ typedef enum { ((mode) == MODE_11AX_HE20_2G) || \ ((mode) == MODE_11AX_HE40_2G) || \ ((mode) == MODE_11AX_HE80_2G)) +#define IS_MODE_HE_2G(mode) (((mode) == MODE_11AX_HE20_2G) || \ + ((mode) == MODE_11AX_HE40_2G) || \ + ((mode) == MODE_11AX_HE80_2G)) +#endif /* SUPPORT_11AX */ #define IS_MODE_VHT_2G(mode) (((mode) == MODE_11AC_VHT20_2G) || \ ((mode) == MODE_11AC_VHT40_2G) || \ @@ -235,6 +240,40 @@ typedef enum { ((mode) == MODE_11NG_HT40)) #define IS_MODE_11GONLY(mode) ((mode) == MODE_11GONLY) +#define IS_MODE_LEGACY(phymode) ((phymode == MODE_11A) || \ + (phymode == MODE_11G) || \ + (phymode == MODE_11B) || \ + (phymode == MODE_11GONLY)) + +#define IS_MODE_11N(phymode) ((phymode >= MODE_11NA_HT20) && \ + (phymode <= MODE_11NG_HT40)) +#ifdef CONFIG_160MHZ_SUPPORT + #define IS_MODE_11AC(phymode) ((phymode >= MODE_11AC_VHT20) && \ + (phymode <= MODE_11AC_VHT160)) +#else + #define IS_MODE_11AC(phymode) ((phymode >= MODE_11AC_VHT20) && \ + (phymode <= MODE_11AC_VHT80_2G)) +#endif /* CONFIG_160MHZ_SUPPORT */ + +#if SUPPORT_11AX + #define IS_MODE_80MHZ(phymode) ((phymode == MODE_11AC_VHT80_2G) || \ + (phymode == MODE_11AC_VHT80) || \ + (phymode == MODE_11AX_HE80) || \ + (phymode == MODE_11AX_HE80_2G)) + #define IS_MODE_40MHZ(phymode) ((phymode == MODE_11AC_VHT40_2G) || \ + (phymode == MODE_11AC_VHT40) || \ + (phymode == MODE_11NG_HT40) || \ + (phymode == MODE_11NA_HT40) || \ + (phymode == MODE_11AX_HE40) || \ + (phymode == MODE_11AX_HE40_2G)) +#else + #define IS_MODE_80MHZ(phymode) ((phymode == MODE_11AC_VHT80_2G) || \ + (phymode == MODE_11AC_VHT80)) + #define IS_MODE_40MHZ(phymode) ((phymode == MODE_11AC_VHT40_2G) || \ + (phymode == MODE_11AC_VHT40) || \ + (phymode == MODE_11NG_HT40) || \ + (phymode == MODE_11NA_HT40)) +#endif /* SUPPORT_11AX */ enum { REGDMN_MODE_11A = 0x00000001, /* 11a channels */ @@ -318,12 +357,13 @@ typedef struct { * In host-based implementation of the rate-control feature, this struture is used to * create the payload for HTT message/s from target to host. */ - -#if (NUM_SPATIAL_STREAM > 3) - #define A_RATEMASK A_UINT64 -#else - #define A_RATEMASK A_UINT32 -#endif +#ifndef CONFIG_MOVE_RC_STRUCT_TO_MACCORE + #if (NUM_SPATIAL_STREAM > 3) + #define A_RATEMASK A_UINT64 + #else + #define A_RATEMASK A_UINT32 + #endif +#endif /* CONFIG_MOVE_RC_STRUCT_TO_MACCORE */ typedef A_UINT8 A_RATE; typedef A_UINT8 A_RATECODE; @@ -425,6 +465,7 @@ typedef struct { * because the host should have no references to these target-only data * structures. */ +#ifndef CONFIG_MOVE_RC_STRUCT_TO_MACCORE #if !((NUM_SPATIAL_STREAM > 4) || SUPPORT_11AX) #if defined(CONFIG_AR900B_SUPPORT) || defined(AR900B) typedef struct{ @@ -494,6 +535,7 @@ typedef struct { A_UINT8 dd_profile; } RC_TX_RATE_INFO; #endif /* !((NUM_SPATIAL_STREAM > 4) || SUPPORT_11AX) */ +#endif /* CONFIG_MOVE_RC_STRUCT_TO_MACCORE */ #endif /* diff --git a/fw/wmi_services.h b/fw/wmi_services.h index fce99b263c87..ce14e075b74c 100755 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -367,6 +367,16 @@ typedef enum { WMI_SERVICE_PEER_UNMAP_RESPONSE_SUPPORT = 182, /* support peer ids unmap response from host */ WMI_SERVICE_TX_PER_PEER_AMPDU_SIZE = 183, /* indicate FW support per peer TX AMPDU size */ WMI_SERVICE_BSS_COLOR_SWITCH_COUNT = 184, /* Firmware supports bss-color switch count handling */ + WMI_SERVICE_HTT_PEER_STATS_SUPPORT = 185, /* Supports the feature where FW sends peer stats autonomously to Host via the HTT_T2H PEER_STATS_IND message */ + WMI_SERVICE_UL_RU26_ALLOWED = 186, /* indicates support for RU26 in UL OFDMA */ + WMI_SERVICE_GET_MWS_COEX_STATE = 187, /* FW provides MWS Coex info */ + WMI_SERVICE_GET_MWS_DPWB_STATE = 188, /* FW provides LTE-Coex Dynamic Power Back-off info */ + WMI_SERVICE_GET_MWS_TDM_STATE = 189, /* FW provides LTE-Coex TDM info */ + WMI_SERVICE_GET_MWS_IDRX_STATE = 190, /* FW provides LTE-Coex IDRx info */ + WMI_SERVICE_GET_MWS_ANTENNA_SHARING_STATE = 191, /* FW provides LTE-Coex Antenna sharing info */ + WMI_SERVICE_ENHANCED_TPC_CONFIG_EVENT = 192, /* FW provides enhanced tx power control configuration dump */ + WMI_SERVICE_WLM_STATS_REQUEST = 193, /* FW supports WLAN latency manager stats request */ + WMI_SERVICE_EXT_PEER_TID_CONFIGS_SUPPORT = 194, /* Extended Peer Tid configuration support for QoS related settings */ /******* ADD NEW SERVICES HERE *******/ diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 80684dc61656..41d8354932ed 100755 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2010-2019 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -955,6 +955,15 @@ typedef enum { WMITLV_TAG_STRUC_wmi_pdev_csc_switch_count_status_event_fixed_param, WMITLV_TAG_STRUC_wmi_roam_bss_load_config_cmd_fixed_param, WMITLV_TAG_STRUC_wmi_roam_blacklist_event_fixed_param, + WMITLV_TAG_STRUC_wmi_csc_vdev_list, + WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_info_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_fixed_param, + WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_dpwb_state_fixed_param, + WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_tdm_state_fixed_param, + WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_idrx_state_fixed_param, + WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param, + WMITLV_TAG_STRUC_wmi_request_wlm_stats_cmd_fixed_param, + WMITLV_TAG_STRUC_wmi_wlm_stats_event_fixed_param, } WMITLV_TAG_ID; /* @@ -1346,6 +1355,8 @@ typedef enum { OP(WMI_PEER_TX_PN_REQUEST_CMDID) \ OP(WMI_PEER_UNMAP_RESPONSE_CMDID) \ OP(WMI_ROAM_BSS_LOAD_CONFIG_CMDID) \ + OP(WMI_VDEV_GET_MWS_COEX_INFO_CMDID) \ + OP(WMI_REQUEST_WLM_STATS_CMDID) \ /* add new CMD_LIST elements above this line */ @@ -1562,6 +1573,12 @@ typedef enum { OP(WMI_PEER_TX_PN_RESPONSE_EVENTID) \ OP(WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID) \ OP(WMI_ROAM_BLACKLIST_EVENTID) \ + OP(WMI_VDEV_GET_MWS_COEX_STATE_EVENTID) \ + OP(WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID) \ + OP(WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID) \ + OP(WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID) \ + OP(WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID) \ + OP(WMI_WLM_STATS_EVENTID) \ /* add new EVT_LIST elements above this line */ @@ -2197,6 +2214,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_CLEAR_LINK_STATS_CMDID); WMITLV_CREATE_PARAM_STRUC(WMI_REQUEST_LINK_STATS_CMDID); +/* Request wlm stats Cmd */ +#define WMITLV_TABLE_WMI_REQUEST_WLM_STATS_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_request_wlm_stats_cmd_fixed_param, wmi_request_wlm_stats_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) + +WMITLV_CREATE_PARAM_STRUC(WMI_REQUEST_WLM_STATS_CMDID); + /* Network list offload config Cmd */ #define WMITLV_TABLE_WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_nlo_config_cmd_fixed_param, wmi_nlo_config_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ @@ -3644,6 +3667,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_MNT_FILTER_CMDID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_get_chip_power_stats_cmd_fixed_param, wmi_pdev_get_chip_power_stats_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_GET_CHIP_POWER_STATS_CMDID); +/* WLAN GET mws conflict */ +#define WMITLV_TABLE_WMI_VDEV_GET_MWS_COEX_INFO_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_info_cmd_fixed_param, wmi_vdev_get_mws_coex_info_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_MWS_COEX_INFO_CMDID); + /* WLAN GET beacon reception Stats*/ #define WMITLV_TABLE_WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_get_bcn_recv_stats_fixed_param, wmi_vdev_get_bcn_recv_stats_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) @@ -4394,6 +4422,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PEER_LINK_STATS_EVENTID); WMITLV_CREATE_PARAM_STRUC(WMI_RADIO_LINK_STATS_EVENTID); +/* Update WLM stats event */ +#define WMITLV_TABLE_WMI_WLM_STATS_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_wlm_stats_event_fixed_param, wmi_wlm_stats_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, data, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_WLM_STATS_EVENTID); + /* PDEV QVIT Event */ #define WMITLV_TABLE_WMI_PDEV_QVIT_EVENTID(id,op,buf,len)\ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, data, WMITLV_SIZE_VAR) @@ -4903,6 +4937,31 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_CHIP_POWER_STATS_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_bcn_recv_stats_event_fixed_param, wmi_vdev_bcn_recv_stats_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_BCN_RECEPTION_STATS_EVENTID); +/* WLAN GET mws coex state */ +#define WMITLV_TABLE_WMI_VDEV_GET_MWS_COEX_STATE_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_fixed_param, wmi_vdev_get_mws_coex_state_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_MWS_COEX_STATE_EVENTID); + +/* WLAN GET Dynamic power back-off state */ +#define WMITLV_TABLE_WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_dpwb_state_fixed_param, wmi_vdev_get_mws_coex_dpwb_state_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID); + +/* WLAN GET TDM state */ +#define WMITLV_TABLE_WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_tdm_state_fixed_param, wmi_vdev_get_mws_coex_tdm_state_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID); + +/* WLAN GET Idrx state */ +#define WMITLV_TABLE_WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_idrx_state_fixed_param, wmi_vdev_get_mws_coex_idrx_state_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID); + +/* WLAN GET antenna sharing state */ +#define WMITLV_TABLE_WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param, wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param, fixed_param, WMITLV_SIZE_FIX) +WMITLV_CREATE_PARAM_STRUC(WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID); + #define WMITLV_TABLE_WMI_PDEV_ANI_OFDM_LEVEL_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_ani_ofdm_event_fixed_param, wmi_ani_ofdm_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_ANI_OFDM_LEVEL_EVENTID); @@ -5110,7 +5169,7 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_CSA_SWITCH_COUNT_STATUS_EVENTID); #define WMITLV_TABLE_WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_csc_switch_count_status_event_fixed_param, wmi_pdev_csc_switch_count_status_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, vdev_ids, WMITLV_SIZE_VAR) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_csc_vdev_list, vdev_info, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_CSC_SWITCH_COUNT_STATUS_EVENTID); /* cal version response event */ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 7620bb91c01d..f512f588eef5 100755 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2010-2019 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -474,6 +474,8 @@ typedef enum { WMI_VDEV_CHAINMASK_CONFIG_CMDID, WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID, + /* request LTE-Coex info */ + WMI_VDEV_GET_MWS_COEX_INFO_CMDID, /* peer specific commands */ @@ -829,6 +831,10 @@ typedef enum { /** One time request for radio channel stats */ WMI_REQUEST_RADIO_CHAN_STATS_CMDID, + /** request for WLM (wlan latency manager) stats */ + WMI_REQUEST_WLM_STATS_CMDID, + + /** ARP OFFLOAD REQUEST*/ WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP_START_ID(WMI_GRP_ARP_NS_OFL), @@ -1321,6 +1327,22 @@ typedef enum { WMI_VDEV_BCN_RECEPTION_STATS_EVENTID, + /* provide LTE-Coex state */ + WMI_VDEV_GET_MWS_COEX_STATE_EVENTID, + + /* provide LTE-Coex Dynamic Power Back-off info */ + WMI_VDEV_GET_MWS_COEX_DPWB_STATE_EVENTID, + + /* provide LTE-Coex TDM info */ + WMI_VDEV_GET_MWS_COEX_TDM_STATE_EVENTID, + + /* provide LTE-Coex IDRx info */ + WMI_VDEV_GET_MWS_COEX_IDRX_STATE_EVENTID, + + /* provide LTE-Coex antenna sharing info */ + WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID, + + /* peer specific events */ /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */ WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER), @@ -1523,6 +1545,11 @@ typedef enum { * and report radio channel stats to host */ WMI_RADIO_CHAN_STATS_EVENTID, + /** This event is used to respond to WMI_REQUEST_WLM_STATS_CMDID + * and report WLM (WLAN latency manager) stats info to host */ + WMI_WLM_STATS_EVENTID, + + /* NLO specific events */ /** NLO match event after the first match */ WMI_NLO_MATCH_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_NLO_OFL), @@ -1977,6 +2004,10 @@ typedef enum { #define WMI_VHT_MAX_MCS_EXT_SS_GET(vht_mcs_map, index) WMI_GET_BITS(vht_mcs_map, 16 + index, 1) #define WMI_VHT_MAX_MCS_EXT_SS_SET(vht_mcs_map, index, value) WMI_SET_BITS(vht_mcs_map, 16 + index, 1, value) +/* Notification bit for Ext MCS 10/11 support */ +#define WMI_VHT_MCS_NOTIFY_EXT_SS_GET(vht_mcs_map) WMI_GET_BITS(vht_mcs_map, 24, 1) +#define WMI_VHT_MCS_NOTIFY_EXT_SS_SET(vht_mcs_map, value) WMI_SET_BITS(vht_mcs_map, 24, 1, value) + #define WMI_VHT_MAX_MCS_4_SS_MASK(r,ss) ((3 & (r)) << (((ss) - 1) << 1)) #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000 #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16 @@ -2530,6 +2561,14 @@ typedef struct { * Peer ID can be up to num_total_peers + num_extra_peers. */ A_UINT32 num_extra_peers; + /* + * max_ast_index - max AST index that Firmware can generate + * max_ast_index = (ast_table_size-1), ast_table_size is dynamically chosen + * based on num_peers configutation from Host. Hence Host needs to know the + * max_ast_index that Firmware can generate. + * A 0x0 value for max_ast_index means the target has not specified a limit. + */ + A_UINT32 max_ast_index; /* * This fixed_param TLV is followed by these additional TLVs: @@ -2895,6 +2934,21 @@ typedef struct { #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_S 20 #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_M 0x100000 + /* + * If this HTT_PEER_STATS is set, then the target should use the + * the HTT_T2H_MSG_TYPE_PEER_STATS_IND message to upload peer stats; + * else the target should avoid sending the PEER_STATS_IND message. + */ + #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_S 21 + #define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_M 0x200000 + + /* + * If this BIT is set, then the target should use peer_tid_ext to analyze + * per peer per tid extended configurations + */ + #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_S 22 + #define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_M 0x400000 + A_UINT32 flag1; /** @brief smart_ant_cap - Smart Antenna capabilities information @@ -3138,6 +3192,16 @@ typedef struct { #define WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_GET(word32) \ WMI_RSRC_CFG_FLAG_GET((word32), PEER_UNMAP_RESPONSE_SUPPORT) +#define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_SET(word32, value) \ + WMI_RSRC_CFG_FLAG_SET((word32), HTT_PEER_STATS, (value)) +#define WMI_RSRC_CFG_FLAG_HTT_PEER_STATS_GET(word32) \ + WMI_RSRC_CFG_FLAG_GET((word32), HTT_PEER_STATS) + +#define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_SET(word32, value) \ + WMI_RSRC_CFG_FLAG_SET((word32), PEER_TID_EXT, (value)) +#define WMI_RSRC_CFG_FLAG_PEER_TID_EXT_GET(word32) \ + WMI_RSRC_CFG_FLAG_GET((word32), PEER_TID_EXT) + typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */ @@ -5456,6 +5520,43 @@ typedef enum { */ WMI_PDEV_PARAM_SUB_CHANNEL_MARKING, + /* + * Enable/Disable/Set MGMT_TTL in milliseconds. + * non_zero - Enable, with the specified value + * 0 - Disable + */ + WMI_PDEV_PARAM_SET_MGMT_TTL, + + /* + * Enable/Disable/Set PROBE_RESP_TTL in milliseconds. + * non_zero - Enable, with the specified value + * 0 - Disable + */ + WMI_PDEV_PARAM_SET_PROBE_RESP_TTL, + + /* + * TBTT_CTRL_CFG + * BITS 0 - 2 (refer to WMI_TBTT_CTRL_CFG enum) + * 0 - DEFAULT -> HW_TBTT + * 1 - SW_TBTT -> HW_TBTT disabled, + * software would truncate BURST near TBTT + * 2 - IGNORE_TBTT + * + * BITS 3 - 31 Reserved, must be set to 0x0 + */ + WMI_PDEV_PARAM_SET_TBTT_CTRL, + + /* + * BITS0 ~1 (refer to enum) + * 0 - default --> always update + * 1 - ignore to update + * 2 - update if larger than threshould + * 3 - update if less or equal than threshould + * + * BITS 2 ~ 31 Threshould + */ + WMI_PDEV_PARAM_NAV_OVERRIDE_CONFIG, + } WMI_PDEV_PARAM; typedef struct { @@ -5470,6 +5571,28 @@ typedef struct { A_UINT32 param_value; } wmi_pdev_set_param_cmd_fixed_param; +/* param values for WMI_PDEV_PARAM_SET_TBTT_CTRL's TBTT_CTRL_CFG bit-field */ +typedef enum { + WMI_TBTT_CTRL_HW_TRUNCATE = 0, + WMI_TBTT_CTRL_SW_TRUNCATE, + WMI_TBTT_CTRL_IGNORE_TBTT, + + WMI_TBTT_CTRL_MAX = 0x7, +} WMI_TBTT_CTRL_CFG; + +/** MACRO to set / get TBTT_CTRL_CFG bit-field within + * WMI_PDEV_PARAM_SET_TBTT_CTRL: + * bits 0~2 : TBTT_CTRL_CFG + * bits 3~31: Reserved (set to 0x0) + */ +#define WMI_PDEV_PARAM_TBTT_CTRL_CFG_S 0 +#define WMI_PDEV_PARAM_TBTT_CTRL_CFG 0x00000007 + +#define WMI_PDEV_PARAM_GET_TBTT_CTRL_CFG(word32) \ + WMI_F_MS(word32, WMI_PDEV_PARAM_TBTT_CTRL_CFG) +#define WMI_PDEV_PARAM_SET_TBTT_CTRL_CFG(word32, value) \ + WMI_F_RMW(word32,value,WMI_PDEV_PARAM_TBTT_CTRL_CFG) + /** MACRO define to set / get 11b and 11ag mode TX chain number: * bit 0~15 : 11b mode TX chain number. * bit 16~31: 11ag mode TX chain number. @@ -5720,9 +5843,14 @@ typedef struct { #define WMI_TPC_TX_NUM_CHAIN 4 typedef enum { - WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1, + /* bits 0-7 for table flags */ + WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1, WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2, WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4, + + /* bits 8-11 for interface version flags */ + WMI_TPC_CONFIG_EVENT_FLAG_IF_MASK = 0x0F00, + WMI_TPC_CONFIG_EVENT_FLAG_IF_V1 = 0x0100, } WMI_TPC_CONFIG_EVENT_FLAG; typedef struct { @@ -5776,6 +5904,8 @@ typedef struct { A_UINT32 ant_id[WMI_MAX_CHAINS]; /** mac address of diversity peer */ wmi_mac_addr macaddr; + /* EVM value for stream0 and stream1 20Mhz, dB units */ + A_INT32 chain_evm[WMI_MAX_CHAINS]; } wmi_pdev_div_rssi_antid_event_fixed_param; typedef struct { @@ -6353,6 +6483,18 @@ typedef struct { wmi_mac_addr peer_macaddr; } wmi_request_link_stats_cmd_fixed_param; +#define WLM_STATS_REQ_LINK 0x00000001 +typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_request_wlm_stats_cmd_fixed_param */ + /** unique id identifying the VDEV, generated by the caller */ + A_UINT32 vdev_id; + /** WLM event request bitmask + * Used by host to customize the wlm stats report. + * Filled with a combination of WLM_STATS_xxx values. + */ + A_UINT32 request_bitmask; +} wmi_request_wlm_stats_cmd_fixed_param; + /* channel statistics */ typedef struct { A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_channel_stats */ @@ -6676,6 +6818,36 @@ typedef struct { */ } wmi_iface_link_stats_event_fixed_param; +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_wlm_stats_event_fixed_param */ + /** bitmask listing which WLM stats are provided. + * Copied from wlm_stats_cmd_fixed_param. + * (This field is provided for convenience rather than necessity, since + * the recipient can directly check which TLV arrays have non-zero length.) + */ + A_UINT32 request_bitmask; + /** unique id identifying the VDEV, generated by the caller */ + A_UINT32 vdev_id; + /** + * timestamp of event report, in microseconds units + * This timestamp is for debugging purposes only. + * It can be used to correlate this WLM stats event data with + * other WLM information uploaded through other means. + */ + A_UINT32 timestamp; + /** + * Interval between two consecutive WLM stats query requests, + * in microseconds units. + * This interval is used for converting the scan_period and pwr_on_period + * values from within wmi_wlm_link_stats from percentage units to time + * units. + */ + A_UINT32 req_interval; +/* + * This TLV is followed by an A_UINT32 array TLV carrying an opaque payload. + */ +} wmi_wlm_stats_event_fixed_param; + /** Suspend option */ enum { WMI_PDEV_SUSPEND, /* suspend */ @@ -6765,6 +6937,12 @@ typedef struct { A_UINT32 num_peer_extd_stats; /** number of extd2 peer stats event structures (wmi_peer_extd2_stats) */ A_UINT32 num_peer_extd2_stats; + /** last_event + * The most significant bit is set to 1 to indicate whether the last_event + * field contains valid data. The least significant bit is set to 1 to + * indicate this is the final WMI_STATS_EVENT in a series. + */ + A_UINT32 last_event; /* This TLV is followed by another TLV of array of bytes * A_UINT8 data[]; @@ -7473,7 +7651,7 @@ typedef struct { typedef struct { /** peer MAC address */ wmi_mac_addr peer_macaddr; - /* rx duration in microseconds*/ + /* lower 32 bits of rx duration in microseconds */ A_UINT32 rx_duration; /** Total TX bytes (including dot11 header) sent to peer */ A_UINT32 peer_tx_bytes; @@ -7486,7 +7664,9 @@ typedef struct { /* Total number of received multicast & broadcast data frames corresponding to this peer */ A_UINT32 rx_mc_bc_cnt; /* 1 in the MSB of rx_mc_bc_cnt represents a valid data */ - A_UINT32 reserved[3]; /** for future use - add new peer stats here */ + /* upper 32 bits of rx duration in microseconds */ + A_UINT32 rx_duration_u32; /* 1 in the most significant bit indicates this field contains valid data */ + A_UINT32 reserved[2]; /** for future use - add new peer stats here */ } wmi_peer_extd_stats; typedef struct { @@ -7507,6 +7687,14 @@ typedef struct { A_UINT32 rx_fcs_err; /** Number of MPDUs(both data and non data) received from this peer */ A_UINT32 rx_mpdus; + /** nss of last tx data to peer */ + A_UINT32 last_tx_nss; + /** nss of last rx data from peer */ + A_UINT32 last_rx_nss; + /** chain mask used for last tx data to peer */ + A_UINT32 last_tx_chain_mask; + /** chain mask used for last rx data from peer */ + A_UINT32 last_rx_chain_mask; } wmi_peer_extd2_stats; typedef struct { @@ -8317,6 +8505,23 @@ typedef struct { #define WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2(he_cap_phy) WMI_GET_BITS(he_cap_phy[1], 8, 3) #define WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[1], 8, 3, value) +/* + * Indicates the spatial multiplexing power save mode after receiving a + * Trigger frame that is in operation immediately after (re)association. + */ +#define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2(he_cap2) (0) +#define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2(he_cap2, value) {;} + +/* Indicates support for Punctured Sounding */ +#define WMI_HECAP_MAC_PUNCSOUNDING_GET_D2(he_cap2) (0) +#define WMI_HECAP_MAC_PUNCSOUNDING_SET_D2(he_cap2, value) {;} + +/* + * Indicates support for receiving a Trigger frame in an HT PPDU and + * receiving a Trigger frame in a VHT PPDU + */ +#define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2(he_cap2) (0) +#define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2(he_cap2, value) {;} #define WMI_GET_HW_RATECODE_PREAM_V1(_rcode) (((_rcode) >> 8) & 0x7) #define WMI_GET_HW_RATECODE_NSS_V1(_rcode) (((_rcode) >> 5) & 0x7) @@ -10620,6 +10825,14 @@ typedef struct { /* Disable burst and assist */ #define WMI_PEER_PARAM_DISABLE_AGGRESSIVE_TX 0x1d +/* Enable 11r FT Roaming */ +#define WMI_PEER_PARAM_ENABLE_FT 0x1e +/* update peer flag for ptk 4 way handshake */ +#define WMI_PEER_PARAM_NEED_PTK_4_WAY 0x1f +/* update peer flag for gtk 2 way handshake */ +#define WMI_PEER_PARAM_NEED_GTK_2_WAY 0x20 +/* update peer flag for M4 sent */ +#define WMI_PEER_PARAM_M4_SENT 0x21 /** mimo ps values for the parameter WMI_PEER_MIMO_PS_STATE */ #define WMI_PEER_MIMO_PS_NONE 0x0 @@ -10735,11 +10948,15 @@ typedef struct { A_UINT32 rx_max_rate; /* Max Rx data rate */ A_UINT32 rx_mcs_set; /* Negotiated RX VHT rates */ A_UINT32 tx_max_rate; /* Max Tx data rate */ + /* + * bit [15:0] indicates MCS 0 to 9 + * bit [23:16] indicates MCS 10 & 11 + * bit [24] indicates whether MCS 10 & 11 is notified in bit [23:16] + */ A_UINT32 tx_mcs_set; /* Negotiated TX VHT rates */ A_UINT32 tx_max_mcs_nss; /* b0-b3: max mcs idx; b4-b7: max nss */ } wmi_vht_rate_set; - /* NOTE: It would bea good idea to represent the Tx MCS * info in one word and Rx in another word. This is split * into multiple words for convenience @@ -11235,18 +11452,18 @@ typedef struct { * BIT 8 : BTM query preference over 11k neighbor report request * BIT 9-31 : Reserved */ -#define WMI_ROAM_BTM_SET_ENABLE(flags, val) WMI_SET_BITS(flags, 0, 1, val) -#define WMI_ROAM_BTM_GET_ENABLE(flags) WMI_GET_BITS(flags, 0, 1) -#define WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION(flags, val) WMI_SET_BITS(flags, 1, 2, val) -#define WMI_ROAM_BTM_GET_NON_MATCHING_CND_ACTION(flags) WMI_GET_BITS(flags, 1, 2) -#define WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION(flags, val) WMI_SET_BITS(flags, 3, 3, val) -#define WMI_ROAM_BTM_GET_CNDS_MATCH_CONDITION(flags) WMI_GET_BITS(flags, 3, 3) -#define WMI_ROAM_BTM_SET_SOLICITED_BTM_ENABLE(flags, val) WMI_SET_BITS(flags, 6, 1, val) -#define WMI_ROAM_BTM_GET_SOLICITED_BTM_ENABLE(flags) WMI_GET_BITS(flags, 6, 1) -#define WMI_ROAM_BTM_SET_CNDS_SELECT_BASED_ON_SCORE(flags) WMI_SET_BITS(flags, 7, 1, val) -#define WMI_ROAM_BTM_GET_CNDS_SELECT_BASED_ON_SCORE(flags) WMI_GET_BITS(flags, 7, 1) -#define WMI_ROAM_BTM_SET_BTM_QUERY_PREFERENCE_OVER_11K(flags) WMI_SET_BITS(flags, 8, 1, val) -#define WMI_ROAM_BTM_GET_BTM_QUERY_PREFERENCE_OVER_11K(flags) WMI_GET_BITS(flags, 8, 1) +#define WMI_ROAM_BTM_SET_ENABLE(flags, val) WMI_SET_BITS(flags, 0, 1, val) +#define WMI_ROAM_BTM_GET_ENABLE(flags) WMI_GET_BITS(flags, 0, 1) +#define WMI_ROAM_BTM_SET_NON_MATCHING_CND_ACTION(flags, val) WMI_SET_BITS(flags, 1, 2, val) +#define WMI_ROAM_BTM_GET_NON_MATCHING_CND_ACTION(flags) WMI_GET_BITS(flags, 1, 2) +#define WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION(flags, val) WMI_SET_BITS(flags, 3, 3, val) +#define WMI_ROAM_BTM_GET_CNDS_MATCH_CONDITION(flags) WMI_GET_BITS(flags, 3, 3) +#define WMI_ROAM_BTM_SET_SOLICITED_BTM_ENABLE(flags, val) WMI_SET_BITS(flags, 6, 1, val) +#define WMI_ROAM_BTM_GET_SOLICITED_BTM_ENABLE(flags) WMI_GET_BITS(flags, 6, 1) +#define WMI_ROAM_BTM_SET_CNDS_SELECT_BASED_ON_SCORE(flags, val) WMI_SET_BITS(flags, 7, 1, val) +#define WMI_ROAM_BTM_GET_CNDS_SELECT_BASED_ON_SCORE(flags) WMI_GET_BITS(flags, 7, 1) +#define WMI_ROAM_BTM_SET_BTM_QUERY_PREFERENCE_OVER_11K(flags, val) WMI_SET_BITS(flags, 8, 1, val) +#define WMI_ROAM_BTM_GET_BTM_QUERY_PREFERENCE_OVER_11K(flags) WMI_GET_BITS(flags, 8, 1) /** WMI_ROAM_BTM_SET_NON_MATCHING_CNDS_ACTION definition: When BTM candidate is not matched with cache by WMI_ROAM_BTM_SET_CNDS_MATCH_CONDITION, determine what to do */ #define WMI_ROAM_BTM_NON_MATCHING_CNDS_SCAN_CONSUME 0 /** Invoke roam scan and consume within firmware. Applicable only when ROAM_SCAN_MODE is enabled. If ROAM_SCAN_MODE is disabled, firmware won't scan and forward it to host */ @@ -15853,6 +16070,16 @@ typedef enum { WMI_PEER_TID_CONFIG_RATE_CONTROL_AUTO, /** Fixed rate control */ WMI_PEER_TID_CONFIG_RATE_CONTROL_FIXED_RATE, + /** Set the Default lowest rate (6Mbps in 5GHZ and 1Mbps in 2GHZ) */ + WMI_PEER_TID_CONFIG_RATE_CONTROL_DEFAULT_LOWEST_RATE, + /** + * Set the highest rate cap allowed for this TID. + * Rate cap is specified in rate code format, + * i.e. NSS and MCS combined as shown below: + * b'5-b'4 indicate the NSS (0 - 1x1, 1 - 2x2, 2 - 3x3, 3 - 4x4) + * b'3-b'0 indicate the MCS + */ + WMI_PEER_TID_CONFIG_RATE_UPPER_CAP, } WMI_PEER_TID_CONFIG_RATE_CONTROL; /** @@ -15867,6 +16094,15 @@ typedef enum { WMI_PEER_TID_SW_RETRY_NO_RETRY = 0xFFFFFFFF, } WMI_PEER_TID_CONFIG_SW_RETRY_THRESHOLD; +/* + * values for tid_config_supported_bitmap field, + * in wmi_peer_tid_configurations_cmd structure. + */ +typedef enum { + /* Used to indicate that disable_rts_cts field is valid */ + WMI_PEER_TID_DISABLE_RTS_CTS_VALID = 0x00000001, +} WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP; + /** * Command format for the TID configuration */ @@ -15910,6 +16146,15 @@ typedef struct { * tx rate to use during each retransmission. */ A_UINT32 sw_retry_threshold; + + /*--- Start of extended structure ---*/ + /* Bitmap to indicate which fields in the extended structure are valid. + * Bitmap values correspond to enum WMI_PEER_TID_EXT_CONFIG_VALID_BITMAP + */ + A_UINT32 tid_config_supported_bitmap; + + /* Knob to enable/disable RTS/CTS per TID */ + A_UINT32 disable_rts_cts; } wmi_peer_tid_configurations_cmd_fixed_param; /* The below enable/disable macros are used for both per peer CFR capture @@ -19750,6 +19995,18 @@ typedef struct { A_UINT32 qtimer_low; /* high 32 bits of qtimer */ A_UINT32 qtimer_high; + /* + * tsf_id: TSF ID for the current vdev + * This field should be ignored unless the tsf_id_valid flag is set. + */ + A_UINT32 tsf_id; + A_UINT32 tsf_id_valid; + /* + * mac_id: MAC identifier + * This field should be ignored unless the mac_id_valid flag is set. + */ + A_UINT32 mac_id; + A_UINT32 mac_id_valid; } wmi_vdev_tsf_report_event_fixed_param; /* ie_id values: @@ -21300,6 +21557,25 @@ typedef struct { A_UINT32 vdev_id; } wmi_vdev_get_bcn_recv_stats_cmd_fixed_param; +/* + * wmi mws-coex command IDs + */ +typedef enum { + WMI_MWS_COEX_STATE = 0x01, + WMI_MWS_COEX_DPWB_STATE, + WMI_MWS_COEX_TDM_STATE, + WMI_MWS_COEX_IDRX_STATE, + WMI_MWS_COEX_ANTENNA_SHARING_STATE, +} wmi_mws_coex_cmd_id; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_cmd_fixed_param */ + /** VDEV identifier */ + A_UINT32 vdev_id; + /** Command ID (type: wmi_mws_coex_cmd_id) */ + A_UINT32 cmd_id; +} wmi_vdev_get_mws_coex_info_cmd_fixed_param; + typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_tpc_event_fixed_param */ /** pdev_id for identifying the MAC @@ -21417,6 +21693,292 @@ typedef struct { A_UINT32 bmiss_bitmap[8]; } wmi_vdev_bcn_recv_stats_fixed_param; +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_state_fixed_param */ + A_UINT32 vdev_id; + + /* LTE-WLAN coexistence scheme bitmap + * Indicates the final schemes applied for the currrent Coex scenario. + * Bit 0 - TDM policy + * Bit 1 - Forced TDM policy + * Bit 2 - Dynamic Power Back-off policy + * Bit 3 - Channel Avoidance policy + * Bit 4 - Static Power Back-off policy + */ + A_UINT32 coex_scheme_bitmap; + + /* Active conflict count + * Indicates the number of Active conflicts for the current WLAN and LTE frequency combinations. + */ + A_UINT32 active_conflict_count; + + /* Potential conflict count + * Indicates the number of Potential conflicts for the current WLAN and LTE frequency combinations. + */ + A_UINT32 potential_conflict_count; + + /* Bitmap of the group-0 WLAN channels to be avoided during LTE-WLAN coex operation. + * Indicates the WLAN channels to be avoided in b/w WLAN CH-1 and WLAN CH-14. + */ + A_UINT32 chavd_group0_bitmap; + + /* Bitmap of the group-1 WLAN channels to be avoided during LTE-WLAN coex operation. + * Indicates the WLAN channels to be avoided in b/w WLAN CH-36 and WLAN CH-64. + */ + A_UINT32 chavd_group1_bitmap; + + /* Bitmap of the group-2 WLAN channels to be avoided during LTE-WLAN coex operation. + * Indicates the WLAN channels to be avoided in b/w WLAN CH-100 and WLAN CH-140. + */ + A_UINT32 chavd_group2_bitmap; + + /* Bitmap of the group-3 WLAN channels to be avoided during LTE-WLAN coex operation. + * Indicates the WLAN channels to be avoided in b/w WLAN CH-149 and WLAN CH-165. + */ + A_UINT32 chavd_group3_bitmap; +} wmi_vdev_get_mws_coex_state_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_dpwb_state_fixed_param */ + A_UINT32 vdev_id; + + /* Current state of the Dynamic Power Back-off state machine + * MWSCOEX_PWB_UNINIT_STATE = 0, PWB state machine is in un-intialized state. + * MWSCOEX_PWB_WLAN_ON_SINR_START_STATE = 1, SINR measurement starts when WLAN is on + * MWSCOEX_PWB_WLAN_ON_WAIT_RESP_STATE = 2, Waiting for SINR response when WLAN is on + * MWSCOEX_PWB_WLAN_OFF_AWAIT_STATE = 3, WLAN off state for buffer between SINR on/off measurement. + * MWSCOEX_PWB_WLAN_OFF_SINR_START_STATE = 4, SINR measurement starts when WLAN is off + * MWSCOEX_PWB_WLAN_OFF_WAIT_RESP_STATE = 5, Waiting for SINR response when WLAN is off + * MWSCOEX_PWB_WLAN_OFF_SINR_STOP_STATE = 6, SINR measurement stops when WLAN is off + * MWSCOEX_PWB_FORCED_TDM_STATE = 7, Entered Forced TDM state. + * MWSCOEX_PWB_HALTED_STATE = 8, Power back-off algorithm halted. + * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_START_STATE = 9, SINR measurement starts in WLAN always on state. + * MWSCOEX_PWB_WLAN_ALWAYS_ON_SINR_STOP_STATE = 10, SINR measurement stops in WLAN always on state. + */ + A_UINT32 current_dpwb_state; + + /* P(N+1) value in dBm i.e. Tx power to be applied in the next Dynamic Power Back-off cycle, + * where P(N) is the power applied during current cycle. + * ranges from 3dBm to 21 dBM + */ + A_INT32 pnp1_value; + + /* Indicates the duty cycle of current LTE frame. + * Duty cycle: Number of UL slots with uplink data and allocated RBs. + */ + A_UINT32 lte_dutycycle; + + /* LTE SINR value in dB, when WLAN is ON. */ + A_INT32 sinr_wlan_on; + + /* LTE SINR value in dB, when WLAN is OFF. */ + A_INT32 sinr_wlan_off; + + /* LTE blocks with error for the current bler report. + * Number of LTE blocks with error for a given number (block_count) of LTE blocks. + */ + A_UINT32 bler_count; + + /* Number of LTE blocks considered for bler count report. + * Bler repot will be generated after the reception of every "block_count" number of blocks. + */ + A_UINT32 block_count; + + /* WLAN RSSI level + * WLAN RSSI is devided in to 3 levels i.e. Good/Moderate/Low (configurable inside f/w) + * 0-Good, 1-Moderate, 2-Low + */ + A_UINT32 wlan_rssi_level; + + /* WLAN RSSI value in dBm considered in Dynamic Power back-off algorithm + * Dynamic power back-off algorithm considers either Rx data frame RSSI/Beacon RSSI based on some constraints. + */ + A_INT32 wlan_rssi; + + /* Indicates whether any TDM policy triggered from Dynamic power back-off policy. + * 1 - TDM triggered. + * 0 - TDM not triggered. + */ + A_UINT32 is_tdm_running; +} wmi_vdev_get_mws_coex_dpwb_state_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_tdm_state_fixed_param */ + A_UINT32 vdev_id; + /* Time Division Multiplexing (TDM) LTE-Coex Policy type. + * There are totally 4 types of TDM policies(1-SINR TDM, 2-RSSI TDM, 3-LOW RX RATE TDM, 4-STICKY TDM) + * Bit 0 - SINR TDM policy. + * Bit 1 - RSSI TDM policy. + * Bit 2 - Low Rx rate TDM policy + * Bit 3 - Sticky TDM policy + */ + A_UINT32 tdm_policy_bitmap; + + /* TDM LTE/WLAN sub-frame bitmap + * Indicates the bitmap of LTE/WLAN sub-frames. + * value 0: WLAN slot. + * value 1: LTE slot. + */ + A_UINT32 tdm_sf_bitmap; +} wmi_vdev_get_mws_coex_tdm_state_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_idrx_state_fixed_param */ + A_UINT32 vdev_id; + + /* SUB0 LTE-coex tech. + *------------------------ + * TECH TECH_ID + *------------------------ + * LTE 0 + * TDSCDMA 1 + * GSM1 2 + * ONEX 3 + * HDR 4 + * WCDMA 5 + * GSM2 6 + * GSM3 7 + * WCDMA2 8 + * LTE2 9 + * Indicates the type of WWAN technology used as SUB0 i.e. SIM slot 1 + */ + A_UINT32 sub0_techid; + + /* SUB0 mitigation policy. + * Indicates the mitigation policy used to coexist with WLAN. + * 1 - Tx blanking + * 2 - Static power back-off + */ + A_UINT32 sub0_policy; + + /* Set if SUB0 is in link critical state. + * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side. + */ + A_UINT32 sub0_is_link_critical; + + /* LTE SUB0 imposed static power applied to WLAN due to LTE-WLAN coex. + * Value of static power applied during LTE page cycle ranges from 3-21 dBm. + */ + A_INT32 sub0_static_power; + + /* LTE SUB0 RSSI value in dBm */ + A_INT32 sub0_rssi; + + /* SUB1 LTE-coex tech. + *------------------------ + * TECH TECH_ID + *------------------------ + * LTE 0 + * TDSCDMA 1 + * GSM1 2 + * ONEX 3 + * HDR 4 + * WCDMA 5 + * GSM2 6 + * GSM3 7 + * WCDMA2 8 + * LTE2 9 + * Indicates the type of WWAN technology used as SUB1 i.e. SIM slot 2 + */ + A_UINT32 sub1_techid; + + /* SUB1 mitigation policy. + * Indicates the mitigation policy used to coexist with WLAN. + * 1 - Tx blanking + * 2 - Static power back-off + */ + A_UINT32 sub1_policy; + + /* Set if SUB1 is in link critical state. + * Link critical will be set, if continuous page miss happens or RSSI is below -100 dBm at LTE side. + */ + A_UINT32 sub1_is_link_critical; + + /* LTE SUB1 imposed static power applied to WLAN due to LTE-WLAN coex. + * Value of static power applied during LTE page cycle ranges from 3-21 dBm. + */ + A_INT32 sub1_static_power; + + /* LTE SUB1 RSSI value in dBm */ + A_INT32 sub1_rssi; +} wmi_vdev_get_mws_coex_idrx_state_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param */ + A_UINT32 vdev_id; + + /* BDF values of Coex flags. + * coexflag 0x1 = MWS Coex enabled + * coexflag 0x3 = MWS Coex enabled + Antenna sharing enabled for WLAN operating in 2.4GHz band. + */ + A_UINT32 coex_flags; + + /* BDF values of Coex Antenna sharing config + * coex_config 0x0 = no Antenna sharing + * coexconfig 0x1 = switched based Antenna sharing + * coexconfig 0x2 = splitter based Antenna sharing + */ + A_UINT32 coex_config; + + /* Tx Chain mask value + * Bit 0: Tx chain-0 + * Bit 1: Tx Chain-1 + * value: 0x1 - Operating in 1X1 + * value: 0x3 - Operating in 2X2 + */ + A_UINT32 tx_chain_mask; + + /* Rx Chain mask value + * Bit 0: Rx chain-0 + * Bit 1: Rx Chain-1 + * value: 0x1 - Operating in 1X1 + * value: 0x3 - Operating in 2X2 + */ + A_UINT32 rx_chain_mask; + + /* Currently active Rx Spatial streams + * Bit 0: Rx Spatial Stream-0 + * Bit 1: Rx Spatial Stream-1 + */ + A_UINT32 rx_nss; + + /* Forced MRC policy type + * BTC_FORCED (0x01) + * RSSI_FORCED (0x02) + * MODEM_ACQ_FORCED (0x04) + */ + A_UINT32 force_mrc; + + /* RSSI value considered for MRC + * 1: Data RSSI + * 2: Beacon RSSI + */ + A_UINT32 rssi_type; + + /* RSSI value measured at Chain-0 in dBm */ + A_INT32 chain0_rssi; + + /* RSSI value measured at Chain-1 in dBm */ + A_INT32 chain1_rssi; + + /* RSSI value of two chains combined in dBm */ + A_INT32 combined_rssi; + + /* Absolute imbalance between two Rx chains in dB */ + A_UINT32 imbalance; + + /* RSSI threshold defined for the above imbalance value in dBm. + * Based on the degree of imbalance between the rx chains, different + * RSSI thresholds are used to determine whether MRC (Maximum-Ratio + * Combining) use of multiple rx chains is suitable. + * This field shows the RSSI threshold below which MRC is used. + */ + A_INT32 mrc_threshold; + + /* Antenna grant duration to WLAN, in milliseconds */ + A_UINT32 grant_duration; +} wmi_vdev_get_mws_coex_antenna_sharing_state_fixed_param; + typedef enum wmi_chip_power_save_failure_reason_code_type { WMI_PROTOCOL_POWER_SAVE_FAILURE_REASON, WMI_HW_POWER_SAVE_FAILURE_REASON, @@ -21523,6 +22085,20 @@ typedef enum wmi_coex_config_type { WMI_COEX_CONFIG_WLAN_CONN_OVER_LE = 30, /* config to elevate Wifi priority over BLE during WLAN association */ WMI_COEX_CONFIG_LE_OVER_WLAN_TRAFFIC = 31, /* config to elevate BLE traffic over WiFi traffic */ WMI_COEX_CONFIG_THREE_WAY_COEX_RESET = 32, /* config to reset the weights to default */ + /* WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA + * config to T_PRIO T_DELAY parameter for each case + * arg1 - wlan/bt state + * 0: beacon tx + * 1: wlan connecting + * 2: wlan in dhcp + * 3: a2dp critical + * 4: eSCO + * arg2 - t_prio for low priority traffic (microsecond units) + * arg3 - t_delay for low priority traffic (microsecond units) + * arg4 - t_prio for high priority traffic (microsecond units) + * arg5 - t_delay for high priority traffic (microsecond units) + */ + WMI_COEX_CONFIG_THREE_WAY_DELAY_PARA = 33, } WMI_COEX_CONFIG_TYPE; typedef struct { @@ -21834,6 +22410,8 @@ typedef struct { * - . * - . * - bit 23 - for NSS 8 + * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16 + * are valid * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros. */ A_UINT32 vht_supp_mcs_2G; @@ -21876,6 +22454,8 @@ typedef struct { * - . * - . * - bit 23 - for NSS 8 + * - bit 24 - indicate whether the VHT-MCS 10-11 specs in bits 23:16 + * are valid * Refer to the WMI_VHT_MAX_MCS_EXT_SS_GET/SET macros. */ A_UINT32 vht_supp_mcs_5G; @@ -22864,6 +23444,8 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command) WMI_RETURN_STRING(WMI_VDEV_GET_BCN_RECEPTION_STATS_CMDID); WMI_RETURN_STRING(WMI_PEER_TX_PN_REQUEST_CMDID); WMI_RETURN_STRING(WMI_ROAM_BSS_LOAD_CONFIG_CMDID); + WMI_RETURN_STRING(WMI_VDEV_GET_MWS_COEX_INFO_CMDID); + WMI_RETURN_STRING(WMI_REQUEST_WLM_STATS_CMDID); } return "Invalid WMI cmd"; @@ -23164,6 +23746,12 @@ typedef struct { } wmi_pdev_csa_switch_count_status_event_fixed_param; typedef struct { + A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_csc_vdev_list */ + A_UINT32 vdev_id; + A_UINT32 current_switch_count; /** CSC switch count value in the last transmitted beacon */ +} wmi_csc_vdev_list; + +typedef struct { /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_pdev_csc_switch_count_status_event_fixed_param */ A_UINT32 tlv_header; /** pdev_id for identifying the MAC @@ -23175,7 +23763,7 @@ typedef struct { A_UINT32 current_switch_count; /* The TLVs follows this structure: - * A_UINT32 vdev_ids[]; // IDs of vdevs whose color-switch countdown expired + * struct wmi_csc_vdev_list vdev_info[]; // IDs of vdevs and their current switch countdown values */ } wmi_pdev_csc_switch_count_status_event_fixed_param; @@ -23989,7 +24577,7 @@ typedef struct { */ A_UINT32 mode; A_UINT32 rate; /* rate index */ - A_UINT32 nss; /* number of spacial stream */ + A_UINT32 nss; /* number of spatial stream */ A_UINT32 beamforming; /* beamforming parameter 0:disabled, 1:enabled */ A_UINT32 chain_mask; /* mask for the antenna set to get power */ A_UINT32 chain_index; /* index for the antenna */ @@ -24312,7 +24900,11 @@ typedef struct { #define WMI_HECAP_PHY_LTFGIFORNDP_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 17, 1) #define WMI_HECAP_PHY_LTFGIFORNDP_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 17, 1, value) -/* indicates support for the transmission of HE PPDUs using STBC with one spatial stream for <= 80MHz Tx */ +/* + * indicates support for the transmission of an HE TB PPDU that has a + * bandwidth less than or equal to 80 MHz and is using STBC and with + * one spatial stream + */ #define WMI_HECAP_PHY_TXSTBC_GET_D3(he_cap_phy) WMI_GET_BITS(he_cap_phy[0], 18, 1) #define WMI_HECAP_PHY_TXSTBC_SET_D3(he_cap_phy, value) WMI_SET_BITS(he_cap_phy[0], 18, 1, value) @@ -24799,6 +25391,22 @@ typedef struct { #define WMI_HECAP_MAC_OMCULMUDDIS_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 12, 1) #define WMI_HECAP_MAC_OMCULMUDDIS_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 12, 1, value) +/* Indicates the spatial multiplexing power save mode after receiving a + * Trigger frame that is in operation immediately after (re)association. + */ +#define WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 13, 1) +#define WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 13, 1, value) + +/* Indicates support for Punctured Sounding */ +#define WMI_HECAP_MAC_PUNCSOUNDING_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 14, 1) +#define WMI_HECAP_MAC_PUNCSOUNDING_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 14, 1, value) + +/* Indicates support for receiving a Trigger frame in an HT PPDU and + * receiving a Trigger frame in a VHT PPDU + */ +#define WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3(he_cap2) WMI_GET_BITS(he_cap2, 15, 1) +#define WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3(he_cap2, value) WMI_SET_BITS(he_cap2, 15, 1, value) + /* * The following conditionally-defined macros can be used in systems * which only support either 802.11ax draft 2 or 802.11ax draft 3, @@ -25019,6 +25627,12 @@ typedef struct { #define WMI_HECAP_MAC_HELKAD_SET(he_cap, value) /* DEPRECATED, DO NOT USE */ #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_GET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_GET_D3 /* DEPRECATED - DO NOT USE */ #define WMI_HECAP_PHY_MIDAMBLERXMAXNSTS_SET WMI_HECAP_PHY_MIDAMBLETXRXMAXNSTS_SET_D3 /* DEPRECATED - DO NOT USE */ + #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D3 + #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D3 + #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D3 + #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D3 + #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D3 + #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D3 #else /* SUPPORT_11AX_D3 vs. D2 */ /* D2 and D2- */ #define WMI_HEOPS_COLOR_GET WMI_HEOPS_COLOR_GET_D2 @@ -25221,6 +25835,12 @@ typedef struct { #define WMI_HECAP_PHY_NSTSLT80MHZ_SET WMI_HECAP_PHY_NSTSLT80MHZ_SET_D2 #define WMI_HECAP_PHY_NSTSGT80MHZ_GET WMI_HECAP_PHY_NSTSGT80MHZ_GET_D2 #define WMI_HECAP_PHY_NSTSGT80MHZ_SET WMI_HECAP_PHY_NSTSGT80MHZ_SET_D2 + #define WMI_HECAP_MAC_DYNSMPWRSAVE_GET WMI_HECAP_MAC_DYNSMPWRSAVE_GET_D2 + #define WMI_HECAP_MAC_DYNSMPWRSAVE_SET WMI_HECAP_MAC_DYNSMPWRSAVE_SET_D2 + #define WMI_HECAP_MAC_PUNCSOUNDING_GET WMI_HECAP_MAC_PUNCSOUNDING_GET_D2 + #define WMI_HECAP_MAC_PUNCSOUNDING_SET WMI_HECAP_MAC_PUNCSOUNDING_SET_D2 + #define WMI_HECAP_MAC_HTVHTTRIGRX_GET WMI_HECAP_MAC_HTVHTTRIGRX_GET_D2 + #define WMI_HECAP_MAC_HTVHTTRIGRX_SET WMI_HECAP_MAC_HTVHTTRIGRX_SET_D2 #endif /* SUPPORT_11AX_D3 */ diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 2cf3bd89fb9c..2b31f8be96c5 100755 --- a/fw/wmi_version.h +++ b/fw/wmi_version.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -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_ 608 +#define __WMI_REVISION_ 628 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work |
