From b7a823a2f651dfb1c790d704c015c9bab3508b5a Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 19 Apr 2019 15:16:00 -0700 Subject: fw-api: CL 6965019 - update fw common interface files [FR55236]: Interface changes for Adaptive 11r and Add WMI_ROAM_REASON_DEAUTH and corresponding notification/reason Change-Id: I235e3951fe6b9abec34857b13dc9588812fadbbc CRs-Fixed: 2262693 --- fw/wmi_services.h | 2 +- fw/wmi_unified.h | 5 ++++- fw/wmi_version.h | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fw/wmi_services.h b/fw/wmi_services.h index c87b61838db1..bb019d036cbe 100755 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -389,7 +389,7 @@ typedef enum { WMI_SERVICE_TX_PWR_PER_PEER = 204, /* target supports per-peer tx pwr spec via WMI_PEER_USE_FIXED_PWR */ WMI_SERVICE_STA_PLUS_STA_SUPPORT = 205, /* indicates target supports STA + STA concurrency */ WMI_SERVICE_WPA3_FT_FILS = 206, - + WMI_SERVICE_ADAPTIVE_11R_ROAM = 207, /* Indicates FW supports adaptive 11r roaming */ /******* ADD NEW SERVICES HERE *******/ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 85c11642be34..ec09831add0e 100755 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -12514,6 +12514,7 @@ typedef struct { A_UINT32 psk_msk_len; /**length of psk_msk*/ A_UINT32 psk_msk_ext_len; /**length of psk_msk_ext*/ A_UINT32 psk_msk_ext[ROAM_OFFLOAD_PSK_MSK_BYTES>>2]; + A_UINT32 adaptive_11r; /* FW needs to perform adaptive 11r roaming */ } wmi_roam_11r_offload_tlv_param; /* This TLV will be filled only in case of ESE */ @@ -12570,7 +12571,6 @@ typedef struct { #define WMI_ROAM_REASON_INVALID 0x0 /** invalid reason. Do not interpret reason field */ #define WMI_ROAM_REASON_BETTER_AP 0x1 /** found a better AP */ #define WMI_ROAM_REASON_BMISS 0x2 /** beacon miss detected */ -#define WMI_ROAM_REASON_DEAUTH 0x2 /** deauth/disassoc received */ #define WMI_ROAM_REASON_LOW_RSSI 0x3 /** connected AP's low rssi condition detected */ #define WMI_ROAM_REASON_SUITABLE_AP 0x4 /** found another AP that matches SSID and Security profile in @@ -12587,6 +12587,7 @@ typedef struct { #define WMI_ROAM_REASON_INVOKE_ROAM_FAIL 0x6 #define WMI_ROAM_REASON_RSO_STATUS 0x7 #define WMI_ROAM_REASON_BTM 0x8 /** Roaming because of BTM request received */ +#define WMI_ROAM_REASON_DEAUTH 0x9 /** deauth/disassoc received */ /* reserved up through 0xF */ /* subnet status: bits 4-5 */ @@ -12635,6 +12636,8 @@ typedef enum #define WMI_ROAM_NOTIF_DISCONNECT 0x6 /** indicate that roaming not allowed due BTM req */ #define WMI_ROAM_NOTIF_SUBNET_CHANGED 0x7 /** indicate that subnet has changed */ #define WMI_ROAM_NOTIF_SCAN_START 0x8 /** indicate roam scan start, notif_params to be sent as WMI_ROAM_TRIGGER_REASON_ID */ +#define WMI_ROAM_NOTIF_DEAUTH_RECV 0x9 /** indicate deauth received, notif_params to be sent as reason code */ +#define WMI_ROAM_NOTIF_DISASSOC_RECV 0xa /** indicate disassoc received, notif_params to be sent as reason code */ /**whenever RIC request information change, host driver should pass all ric related information to firmware (now only support tsepc) * Once, 11r roaming happens, firmware can generate RIC request in reassoc request based on these informations diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 7c37323f7d03..fe03cdda3a40 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_ 653 +#define __WMI_REVISION_ 654 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work -- cgit v1.2.3 From 0840e667459cf1dd0895cc6bb9467b43b83d434e Mon Sep 17 00:00:00 2001 From: spuligil Date: Mon, 22 Apr 2019 12:01:18 -0700 Subject: fw-api: CL 6980046 - update fw common interface files Add WLAN_MODULE_QUIET_IE def Change-Id: I130b48362002521dc4223f5003b9933929b41d50 CRs-Fixed: 2262693 --- fw/wlan_module_ids.h | 1 + 1 file changed, 1 insertion(+) diff --git a/fw/wlan_module_ids.h b/fw/wlan_module_ids.h index f4a0e290ffcc..1bb9d0196a69 100755 --- a/fw/wlan_module_ids.h +++ b/fw/wlan_module_ids.h @@ -113,6 +113,7 @@ typedef enum { WLAN_MODULE_UL_OFDMA, /* 0x4f */ WLAN_MODULE_HPCS_PULSE, /* 0x50 */ WLAN_MODULE_DTF, /* 0x51 */ /* Deterministic Test Framework */ + WLAN_MODULE_QUIET_IE, /* 0x52 */ WLAN_MODULE_ID_MAX, WLAN_MODULE_ID_INVALID = WLAN_MODULE_ID_MAX, -- cgit v1.2.3 From ad4dbc4c8816e51b3863da0d33f0cd791f12296b Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 23 Apr 2019 00:00:59 -0700 Subject: fw-api: CL 6984222 - update fw common interface files Change-Id: I47794dfca4c7d7cca7cd524b252d9752bf6d6c73 WMI: report chan RF scores during WMI boot-up handshake CRs-Fixed: 2262693 --- fw/wmi_services.h | 1 + fw/wmi_tlv_defs.h | 5 +++-- fw/wmi_unified.h | 13 +++++++++++++ fw/wmi_version.h | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/fw/wmi_services.h b/fw/wmi_services.h index bb019d036cbe..c11f066b73b6 100755 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -390,6 +390,7 @@ typedef enum { WMI_SERVICE_STA_PLUS_STA_SUPPORT = 205, /* indicates target supports STA + STA concurrency */ WMI_SERVICE_WPA3_FT_FILS = 206, WMI_SERVICE_ADAPTIVE_11R_ROAM = 207, /* Indicates FW supports adaptive 11r roaming */ + WMI_SERVICE_CHAN_RF_CHARACTERIZATION_INFO = 208, /* FW provides RF scores for chans in the service ready extension msg */ /******* ADD NEW SERVICES HERE *******/ diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 14922014440c..16e80cab80fc 100755 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -977,6 +977,7 @@ typedef enum { WMITLV_TAG_STRUC_wmi_stats_interference, WMITLV_TAG_STRUC_wmi_roam_score_delta_param, WMITLV_TAG_STRUC_wmi_roam_cnd_min_rssi_param, + WMITLV_TAG_STRUC_wmi_chan_rf_characterization_info, } WMITLV_TAG_ID; /* @@ -3992,8 +3993,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_SERVICE_AVAILABLE_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, WMI_OEM_DMA_RING_CAPABILITIES, oem_dma_ring_caps, WMITLV_SIZE_VAR) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_WMI_SAR_CAPABILITIES, WMI_SAR_CAPABILITIES, sar_caps, 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_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_spectral_bin_scaling_params, wmi_bin_scaling_params, WMITLV_SIZE_VAR) \ + 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); /* Ready event */ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index ec09831add0e..62f21ee3a3c6 100755 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -2472,6 +2472,13 @@ typedef struct { /* 2nd DWORD of HE MAC Capabilities */ A_UINT32 he_cap_info_ext; + + /* + * 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_service_ready_ext_event_fixed_param; typedef enum { @@ -24719,6 +24726,12 @@ typedef struct { A_UINT32 min_buf_align; /* minimum alignment in bytes of each buffer in the DMA ring */ } WMI_DMA_RING_CAPABILITIES; +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_ wmi_chan_rf_characterization_info */ + A_UINT32 freq; /* channel frequency of rf characteristic info (MHz) */ + A_UINT32 chan_metric; /* 0 = unusable, 1 = worst, 10 = best */ +} WMI_CHAN_RF_CHARACTERIZATION_INFO; + #define WMI_DMA_RING_PADDR_LO_S 0 #define WMI_DMA_RING_PADDR_LO 0xffffffff diff --git a/fw/wmi_version.h b/fw/wmi_version.h index fe03cdda3a40..e71d0e3aa983 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_ 654 +#define __WMI_REVISION_ 655 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work -- cgit v1.2.3 From ccf5b8b01d61ad04563e561ad39f5266a79a300a Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 23 Apr 2019 00:01:09 -0700 Subject: fw-api: CL 6985139 - update fw common interface files Change MODE_UNKNOWN assert for cases with 11AX ed but not 160 MHz supported Change-Id: I5b87d5ae02a1f7515d301250a7ca6266e6e2ad5c CRs-Fixed: 2262693 --- fw/wlan_defs.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/fw/wlan_defs.h b/fw/wlan_defs.h index beeb87b17a75..9c878dc41fe3 100755 --- a/fw/wlan_defs.h +++ b/fw/wlan_defs.h @@ -172,11 +172,23 @@ typedef enum { #endif } WLAN_PHY_MODE; -#ifndef CONFIG_160MHZ_SUPPORT +#if (!defined(CONFIG_160MHZ_SUPPORT)) && (!defined(SUPPORT_11AX)) A_COMPILE_TIME_ASSERT( mode_unknown_value_consistency_Check, MODE_UNKNOWN == MODE_UNKNOWN_NO_160MHZ_SUPPORT); #else +/* + * If SUPPORT_11AX is defined but CONFIG_160MHZ_SUPPORT is not defined, + * there will be a gap in the mode values, with 14 and 15 being unused. + * But MODE_UNKNOWN_NO_160MHZ_SUPPORT will have an invalid value, since + * mode values 16 through 23 will be used for 11AX modes. + * Thus, MODE_UNKNOWN would still be MODE_UNKNOWN_160MHZ_SUPPORT, for + * cases where 160 MHz is not supported by 11AX is supported. + * (Ideally, MODE_UNKNOWN_160MHZ_SUPPORT and NO_160MHZ_SUPPORT should be + * renamed to cover the 4 permutations of support or no support for + * 11AX and 160 MHZ, but that is impractical, due to backwards + * compatibility concerns.) + */ A_COMPILE_TIME_ASSERT( mode_unknown_value_consistency_Check, MODE_UNKNOWN == MODE_UNKNOWN_160MHZ_SUPPORT); -- cgit v1.2.3 From d96e9153e101c5b4f0a4b6555349753cf7f88ef2 Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 24 Apr 2019 12:01:26 -0700 Subject: fw-api: CL 6990100 - update fw common interface files HTT: move sa_ant_matrix from htt_rx_ind_hl_rx_desc_t to htt_rx_ppdu_desc_t This change is backwards-incompatible, but is needed because the recent change it reverts had a fundamental problem of attempting to extend a non-TLV struct. Change-Id: Ib9898de1e9c889423d06b4e37eb9b69eea656b3b CRs-Fixed: 2262693 --- fw/htt.h | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/fw/htt.h b/fw/htt.h index 3779453095e7..295776d15a1e 100644 --- a/fw/htt.h +++ b/fw/htt.h @@ -176,7 +176,7 @@ * 3.59 Add HTT_RXDMA_HOST_BUF_RING2 def * 3.60 Add HTT_T2H_MSG_TYPE_PEER_STATS_IND def * 3.61 Add rx offset fields to HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG msg - * 3.62 Add antenna mask to reserved space in htt_rx_ind_hl_rx_desc_t + * 3.62 Add antenna mask to reserved space in htt_rx_ppdu_desc_t */ #define HTT_CURRENT_VERSION_MAJOR 3 #define HTT_CURRENT_VERSION_MINOR 62 @@ -6173,9 +6173,17 @@ PREPACK struct htt_rx_ppdu_desc_t preamble_type: 8; #define HTT_RX_IND_PPDU_OFFSET_WORD_VHT_SIG_A2 8 + #define HTT_RX_IND_PPDU_OFFSET_WORD_SA_ANT_MATRIX 8 A_UINT32 /* word 8 */ vht_sig_a2: 24, - reserved0: 8; + /* sa_ant_matrix + * For cases where a single rx chain has options to be connected to + * different rx antennas, show which rx antennas were in use during + * receipt of a given PPDU. + * This sa_ant_matrix provides a bitmask of the antennas used while + * receiving this frame. + */ + sa_ant_matrix: 8; } POSTPACK; #define HTT_RX_PPDU_DESC_BYTES (sizeof(struct htt_rx_ppdu_desc_t)) @@ -6667,6 +6675,8 @@ A_COMPILE_TIME_ASSERT(HTT_RX_IND_hdr_size_quantum, #define HTT_RX_IND_PREAMBLE_TYPE_S 24 #define HTT_RX_IND_SERVICE_M 0xff000000 #define HTT_RX_IND_SERVICE_S 24 +#define HTT_RX_IND_SA_ANT_MATRIX_M 0xff000000 +#define HTT_RX_IND_SA_ANT_MATRIX_S 24 /* rx MSDU descriptor fields */ #define HTT_RX_IND_FW_RX_DESC_BYTES_M 0xffff @@ -6911,6 +6921,14 @@ A_COMPILE_TIME_ASSERT(HTT_RX_IND_hdr_size_quantum, (((word) & HTT_RX_IND_SERVICE_M) >> \ HTT_RX_IND_SERVICE_S) +#define HTT_RX_IND_SA_ANT_MATRIX_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_IND_SA_ANT_MATRIX, value); \ + (word) |= (value) << HTT_RX_IND_SA_ANT_MATRIX_S; \ + } while (0) +#define HTT_RX_IND_SA_ANT_MATRIX_GET(word) \ + (((word) & HTT_RX_IND_SA_ANT_MATRIX_M) >> \ + HTT_RX_IND_SA_ANT_MATRIX_S) #define HTT_RX_IND_MPDU_COUNT_SET(word, value) \ do { \ @@ -6951,7 +6969,9 @@ PREPACK struct hl_htt_rx_ind_base { /* * HTT_RX_IND_HL_RX_DESC_BASE_OFFSET * Currently, we use a resv field in hl_htt_rx_ind_base to store some - * HL host needed info. The field is just after the msdu fw rx desc. + * HL host needed info; refer to fw_rx_desc_base in wal_rx_desc.h. + * The field is just after the MSDU FW rx desc, and 1 byte ahead of + * htt_rx_ind_hl_rx_desc_t. */ #define HTT_RX_IND_HL_RX_DESC_BASE_OFFSET (HTT_RX_IND_FW_RX_DESC_BYTE_OFFSET + 1) struct htt_rx_ind_hl_rx_desc_t { @@ -6968,14 +6988,7 @@ struct htt_rx_ind_hl_rx_desc_t { udp: 1, reserved: 1; } flags; - /* sa_ant_matrix - * For cases where a single rx chain has options to be connected to - * different rx antennas, show which rx antennas were in use during - * receipt of a given PPDU. - * This sa_ant_matrix provides a bitmask of the antennas used while - * receiving this frame. - */ - A_UINT8 sa_ant_matrix; + /* NOTE: no reserved space - don't append any new fields here */ }; #define HTT_RX_IND_HL_RX_DESC_VER_OFFSET \ @@ -6991,10 +7004,6 @@ struct htt_rx_ind_hl_rx_desc_t { (HTT_RX_IND_HL_RX_DESC_BASE_OFFSET \ + offsetof(struct htt_rx_ind_hl_rx_desc_t, flags)) -#define HTT_RX_IND_HL_SA_ANT_MATRIX_OFFSET \ - (HTT_RX_IND_HL_RX_DESC_BASE_OFFSET \ - + offsetof(struct htt_rx_ind_hl_rx_desc_t, sa_ant_matrix)) - #define HTT_RX_IND_HL_FLAG_FIRST_MSDU (0x01 << 0) #define HTT_RX_IND_HL_FLAG_LAST_MSDU (0x01 << 1) #define HTT_RX_IND_HL_FLAG_C3_FAILED (0x01 << 2) /* L3 checksum failed */ -- cgit v1.2.3 From 7d054b5e47b6e205d8b5ba626115c8caabec016d Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 24 Apr 2019 12:01:36 -0700 Subject: fw-api: CL 6999938 - update fw common interface files HTT stats: add fields for several debug/error counters Change-Id: Iee76739038903d03ccb05577c2022aa77f3be002 CRs-Fixed: 2262693 --- fw/htt_stats.h | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/fw/htt_stats.h b/fw/htt_stats.h index d093f25b4de6..1de7ec053c4a 100644 --- a/fw/htt_stats.h +++ b/fw/htt_stats.h @@ -361,6 +361,7 @@ typedef enum { HTT_STATS_SCHED_TXQ_SCHED_ORDER_SU_TAG = 86, /* htt_sched_txq_sched_order_su_tlv */ HTT_STATS_SCHED_TXQ_SCHED_INELIGIBILITY_TAG = 87, /* htt_sched_txq_sched_eligibility_tlv */ HTT_STATS_PDEV_OBSS_PD_TAG = 88, /* htt_pdev_obss_pd_stats_tlv */ + HTT_STATS_HW_WAR_TAG = 89, /* htt_hw_war_stats_tlv */ HTT_STATS_MAX_TAG, } htt_tlv_tag_t; @@ -572,6 +573,26 @@ typedef struct { A_UINT32 tx_active_dur_us_high; /* Number of MPDUs dropped after max retries */ A_UINT32 remove_mpdus_max_retries; + /* Num HTT cookies dispatched */ + A_UINT32 comp_delivered; + /* successful ppdu transmissions */ + A_UINT32 ppdu_ok; + /* Scheduler self triggers */ + A_UINT32 self_triggers; + /* FES duration of last tx data PPDU in us (sch_eval_end - ppdu_start) */ + A_UINT32 tx_time_dur_data; + /* Num of times sequence terminated due to ppdu duration < burst limit */ + A_UINT32 seq_qdepth_repost_stop; + /* Num of times MU sequence terminated due to MSDUs reaching threshold */ + A_UINT32 mu_seq_min_msdu_repost_stop; + /* Num of times SU sequence terminated due to MSDUs reaching threshold */ + A_UINT32 seq_min_msdu_repost_stop; + /* Num of times sequence terminated due to no TXOP available */ + A_UINT32 seq_txop_repost_stop; + /* Num of times the next sequence got cancelled */ + A_UINT32 next_seq_cancel; + /* Num of times fes offset was misaligned */ + A_UINT32 fes_offsets_err_cnt; } htt_tx_pdev_stats_cmn_tlv; #define HTT_TX_PDEV_STATS_URRN_TLV_SZ(_num_elems) (sizeof(A_UINT32) * (_num_elems)) @@ -750,12 +771,37 @@ typedef struct { A_UINT32 sch_rx_sifs_resp_trigger; } htt_hw_stats_whal_tx_tlv; +typedef struct { + htt_tlv_hdr_t tlv_hdr; + /* BIT [ 7 : 0] :- mac_id + * BIT [31 : 8] :- reserved + */ + union { + struct { + A_UINT32 mac_id: 8, + reserved: 24; + }; + A_UINT32 mac_id__word; + }; + + /* + * hw_wars is a variable-length array, with each element counting + * the number of occurrences of the corresponding type of HW WAR. + * That is, hw_wars[0] indicates how many times HW WAR 0 occurred, + * hw_wars[1] indicates how many times HW WAR 1 occurred, etc. + * The target has an internal HW WAR mapping that it uses to keep + * track of which HW WAR is WAR 0, which HW WAR is WAR 1, etc. + */ + A_UINT32 hw_wars[1/*or more*/]; +} htt_hw_war_stats_tlv; + /* STATS_TYPE: HTT_DBG_EXT_STATS_PDEV_ERROR * TLV_TAGS: * - HTT_STATS_HW_PDEV_ERRS_TAG * - HTT_STATS_HW_INTR_MISC_TAG (multiple) * - HTT_STATS_HW_WD_TIMEOUT_TAG (multiple) * - HTT_STATS_WHAL_TX_TAG + * - HTT_STATS_HW_WAR_TAG */ /* NOTE: * This structure is for documentation, and cannot be safely used directly. @@ -766,6 +812,7 @@ typedef struct _htt_pdev_err_stats { htt_hw_stats_intr_misc_tlv misc_stats[1]; htt_hw_stats_wd_timeout_tlv wd_timeout[1]; htt_hw_stats_whal_tx_tlv whal_tx_stats; + htt_hw_war_stats_tlv hw_war; } htt_hw_err_stats_t; /* ============ PEER STATS ============ */ @@ -1850,6 +1897,16 @@ typedef struct { A_UINT32 notify_sched; /* Duration based sendn termination */ A_UINT32 dur_based_sendn_term; + /* scheduled via NOTIFY2 */ + A_UINT32 su_notify2_sched; + /* schedule if queued packets are greater than avg MSDUs in PPDU */ + A_UINT32 su_optimal_queued_msdus_sched; + /* schedule due to timeout */ + A_UINT32 su_delay_timeout_sched; + /* delay if txtime is less than 500us */ + A_UINT32 su_min_txtime_sched_delay; + /* scheduled via no delay */ + A_UINT32 su_no_delay; } htt_tx_pdev_stats_sched_per_txq_tlv; #define HTT_STATS_TX_SCHED_CMN_MAC_ID_M 0x000000ff @@ -2006,6 +2063,8 @@ typedef struct { A_UINT32 q_not_empty; A_UINT32 drop_notification; A_UINT32 desc_threshold; + A_UINT32 hwsch_tqm_invalid_status; + A_UINT32 missed_tqm_gen_mpdus; } htt_tx_tqm_cmn_stats_tlv; typedef struct { @@ -2113,6 +2172,11 @@ typedef struct { A_UINT32 m4_packets; A_UINT32 g1_packets; A_UINT32 g2_packets; + A_UINT32 rc4_packets; + A_UINT32 eap_packets; + A_UINT32 eapol_start_packets; + A_UINT32 eapol_logoff_packets; + A_UINT32 eapol_encap_asf_packets; } htt_tx_de_eapol_packets_stats_tlv; typedef struct { @@ -2130,6 +2194,12 @@ typedef struct { A_UINT32 fse_tid_override; A_UINT32 ipv6_jumbogram_zero_length; A_UINT32 qos_to_non_qos_in_prog; + A_UINT32 ap_bcast_mcast_eapol; + A_UINT32 unicast_on_ap_bss_peer; + A_UINT32 ap_vdev_invalid; + A_UINT32 incomplete_llc; + A_UINT32 eapol_duplicate_m3; + A_UINT32 eapol_duplicate_m4; } htt_tx_de_classify_failed_stats_tlv; typedef struct { @@ -2253,6 +2323,9 @@ typedef struct { A_UINT32 tcl_res_invalid_addrx; A_UINT32 wbm2fw_entry_count; A_UINT32 invalid_pdev; + A_UINT32 tcl_res_addrx_timeout; + A_UINT32 invalid_vdev; + A_UINT32 invalid_tcl_exp_frame_desc; } htt_tx_de_cmn_stats_tlv; /* STATS_TYPE : HTT_DBG_EXT_STATS_TX_DE_INFO @@ -2877,6 +2950,7 @@ typedef struct { A_UINT32 ax_mu_mimo_tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS]; A_UINT32 ofdma_tx_gi[HTT_TX_PDEV_STATS_NUM_GI_COUNTERS][HTT_TX_PDEV_STATS_NUM_MCS_COUNTERS]; A_UINT32 trigger_type_11ax[HTT_TX_PDEV_STATS_NUM_11AX_TRIGGER_TYPES]; + A_UINT32 tx_11ax_su_ext; } htt_tx_pdev_rate_stats_tlv; /* STATS_TYPE : HTT_DBG_EXT_STATS_PDEV_TX_RATE -- cgit v1.2.3 From 5c889a331162b4abe2d87eb1888b90749cefb33e Mon Sep 17 00:00:00 2001 From: spuligil Date: Thu, 25 Apr 2019 00:01:01 -0700 Subject: fw-api: CL 7004110 - update fw common interface files HTT backpressure messages Change-Id: I26a4f708f3028294fcf58a0583a12afe2e5eb3ee CRs-Fixed: 2262693 --- fw/htt.h | 182 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++- fw/htt_stats.h | 53 +++++++++++++++++ 2 files changed, 234 insertions(+), 1 deletion(-) diff --git a/fw/htt.h b/fw/htt.h index 295776d15a1e..7a091598aea7 100644 --- a/fw/htt.h +++ b/fw/htt.h @@ -177,9 +177,10 @@ * 3.60 Add HTT_T2H_MSG_TYPE_PEER_STATS_IND def * 3.61 Add rx offset fields to HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG msg * 3.62 Add antenna mask to reserved space in htt_rx_ppdu_desc_t + * 3.63 Add HTT_HTT_T2H_MSG_TYPE_BKPRESSURE_EVENT_IND def */ #define HTT_CURRENT_VERSION_MAJOR 3 -#define HTT_CURRENT_VERSION_MINOR 62 +#define HTT_CURRENT_VERSION_MINOR 63 #define HTT_NUM_TX_FRAG_DESC 1024 @@ -5755,6 +5756,7 @@ enum htt_t2h_msg_type { 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_BKPRESSURE_EVENT_IND = 0x24, HTT_T2H_MSG_TYPE_TEST, /* keep this last */ @@ -11432,4 +11434,182 @@ PREPACK struct htt_cfr_dump_compl_ind { * @tx_duration : Tx duration for the PPDU (microsecond units) */ + +/** + * @brief HTT_T2H_MSG_TYPE_BKPRESSURE_EVENTID Message + * + * @details + * HTT_T2H_MSG_TYPE_BKPRESSURE_EVENTID message is sent by the target when + * continuous backpressure is seen in the LMAC/ UMAC rings software rings. + * This message will only be sent if the backpressure condition has existed + * continuously for an initial period (100 ms). + * Repeat messages with updated information will be sent after each + * subsequent period (100 ms) as long as the backpressure remains unabated. + * This message indicates the ring id along with current head and tail index + * locations (i.e. write and read indices). + * The backpressure time indicates the time in ms for which continous + * backpressure has been observed in the ring. + * + * The message format is as follows: + * + * |31 24|23 16|15 8|7 0| + * |----------------+----------------+----------------+----------------| + * | ring_id | ring_type | pdev_id | msg_type | + * |-------------------------------------------------------------------| + * | tail_idx | head_idx | + * |-------------------------------------------------------------------| + * | backpressure_time_ms | + * |-------------------------------------------------------------------| + * + * The message is interpreted as follows: + * dword0 - b'0:7 - msg_type: This will be set to + * HTT_T2H_MSG_TYPE_BKPRESSURE_EVENT_IND + * b'8:15 - pdev_id: 0 indicates msg is for UMAC ring. + * 1, 2, 3 indicates pdev_id 0,1,2 and + the msg is for LMAC ring. + * b'16:23 - ring_type: Refer to enum htt_backpressure_ring_type. + * b'24:31 - ring_id: Refer enum htt_backpressure_umac_ring_id/ + * htt_backpressure_lmac_ring_id. This represents + * the ring id for which continous backpressure is seen + * + * dword1 - b'0:15 - head_idx: This indicates the current head index of + * the ring indicated by the ring_id + * + * dword1 - b'16:31 - tail_idx: This indicates the current tail index of + * the ring indicated by the ring id + * + * dword2 - b'0:31 - backpressure_time_ms: Indicates how long continous + * backpressure has been seen in the ring + * indicated by the ring_id. + * Units = milliseconds + */ +#define HTT_T2H_RX_BKPRESSURE_PDEV_ID_M 0x0000ff00 +#define HTT_T2H_RX_BKPRESSURE_PDEV_ID_S 8 +#define HTT_T2H_RX_BKPRESSURE_RING_TYPE_M 0x00ff0000 +#define HTT_T2H_RX_BKPRESSURE_RING_TYPE_S 16 +#define HTT_T2H_RX_BKPRESSURE_RINGID_M 0xff000000 +#define HTT_T2H_RX_BKPRESSURE_RINGID_S 24 +#define HTT_T2H_RX_BKPRESSURE_HEAD_IDX_M 0x0000ffff +#define HTT_T2H_RX_BKPRESSURE_HEAD_IDX_S 0 +#define HTT_T2H_RX_BKPRESSURE_TAIL_IDX_M 0xffff0000 +#define HTT_T2H_RX_BKPRESSURE_TAIL_IDX_S 16 +#define HTT_T2H_RX_BKPRESSURE_TIME_MS_M 0xffffffff +#define HTT_T2H_RX_BKPRESSURE_TIME_MS_S 0 + +#define HTT_T2H_RX_BKPRESSURE_PDEV_ID_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_RX_BKPRESSURE_PDEV_ID, value); \ + (word) |= (value) << HTT_T2H_RX_BKPRESSURE_PDEV_ID_S; \ + } while (0) +#define HTT_T2H_RX_BKPRESSURE_PDEV_ID_GET(word) \ + (((word) & HTT_T2H_RX_BKPRESSURE_PDEV_ID_M) >> \ + HTT_T2H_RX_BKPRESSURE_PDEV_ID_S) + +#define HTT_T2H_RX_BKPRESSURE_RING_TYPE_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_RX_BKPRESSURE_RING_TYPE, value); \ + (word) |= (value) << HTT_T2H_RX_BKPRESSURE_RING_TYPE_S; \ + } while (0) +#define HTT_T2H_RX_BKPRESSURE_RING_TYPE_GET(word) \ + (((word) & HTT_T2H_RX_BKPRESSURE_RING_TYPE_M) >> \ + HTT_T2H_RX_BKPRESSURE_RING_TYPE_S) + +#define HTT_T2H_RX_BKPRESSURE_RINGID_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_RX_BKPRESSURE_RINGID, value); \ + (word) |= (value) << HTT_T2H_RX_BKPRESSURE_RINGID_S; \ + } while (0) +#define HTT_T2H_RX_BKPRESSURE_RINGID_GET(word) \ + (((word) & HTT_T2H_RX_BKPRESSURE_RINGID_M) >> \ + HTT_T2H_RX_BKPRESSURE_RINGID_S) + +#define HTT_T2H_RX_BKPRESSURE_HEAD_IDX_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_RX_BKPRESSURE_HEAD_IDX, value); \ + (word) |= (value) << HTT_T2H_RX_BKPRESSURE_HEAD_IDX_S; \ + } while (0) +#define HTT_T2H_RX_BKPRESSURE_HEAD_IDX_GET(word) \ + (((word) & HTT_T2H_RX_BKPRESSURE_HEAD_IDX_M) >> \ + HTT_T2H_RX_BKPRESSURE_HEAD_IDX_S) + +#define HTT_T2H_RX_BKPRESSURE_TAIL_IDX_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_RX_BKPRESSURE_TAIL_IDX, value); \ + (word) |= (value) << HTT_T2H_RX_BKPRESSURE_TAIL_IDX_S; \ + } while (0) +#define HTT_T2H_RX_BKPRESSURE_TAIL_IDX_GET(word) \ + (((word) & HTT_T2H_RX_BKPRESSURE_TAIL_IDX_M) >> \ + HTT_T2H_RX_BKPRESSURE_TAIL_IDX_S) + +#define HTT_T2H_RX_BKPRESSURE_TIME_MS_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_T2H_RX_BKPRESSURE_TIME_MS, value); \ + (word) |= (value) << HTT_T2H_RX_BKPRESSURE_TIME_MS_S; \ + } while (0) +#define HTT_T2H_RX_BKPRESSURE_TIME_MS_GET(word) \ + (((word) & HTT_T2H_RX_BKPRESSURE_TIME_MS_M) >> \ + HTT_T2H_RX_BKPRESSURE_TIME_MS_S) + +enum htt_backpressure_ring_type { + HTT_SW_RING_TYPE_UMAC, + HTT_SW_RING_TYPE_LMAC, + HTT_SW_RING_TYPE_MAX, +}; + +/* Ring id for which the message is sent to host */ +enum htt_backpressure_umac_ringid { + HTT_SW_RING_IDX_REO_REO2SW1_RING, + HTT_SW_RING_IDX_REO_REO2SW2_RING, + HTT_SW_RING_IDX_REO_REO2SW3_RING, + HTT_SW_RING_IDX_REO_REO2SW4_RING, + HTT_SW_RING_IDX_REO_WBM2REO_LINK_RING, + HTT_SW_RING_IDX_REO_REO2TCL_RING, + HTT_SW_RING_IDX_REO_REO2FW_RING, + HTT_SW_RING_IDX_REO_REO_RELEASE_RING, + HTT_SW_RING_IDX_WBM_PPE_RELEASE_RING, + HTT_SW_RING_IDX_TCL_TCL2TQM_RING, + HTT_SW_RING_IDX_WBM_TQM_RELEASE_RING, + HTT_SW_RING_IDX_WBM_REO_RELEASE_RING, + HTT_SW_RING_IDX_WBM_WBM2SW0_RELEASE_RING, + HTT_SW_RING_IDX_WBM_WBM2SW1_RELEASE_RING, + HTT_SW_RING_IDX_WBM_WBM2SW2_RELEASE_RING, + HTT_SW_RING_IDX_WBM_WBM2SW3_RELEASE_RING, + HTT_SW_RING_IDX_REO_REO_CMD_RING, + HTT_SW_RING_IDX_REO_REO_STATUS_RING, + HTT_SW_UMAC_RING_IDX_MAX, +}; + +enum htt_backpressure_lmac_ringid { + HTT_SW_RING_IDX_FW2RXDMA_BUF_RING, + HTT_SW_RING_IDX_FW2RXDMA_STATUS_RING, + HTT_SW_RING_IDX_FW2RXDMA_LINK_RING, + HTT_SW_RING_IDX_SW2RXDMA_BUF_RING, + HTT_SW_RING_IDX_WBM2RXDMA_LINK_RING, + HTT_SW_RING_IDX_RXDMA2FW_RING, + HTT_SW_RING_IDX_RXDMA2SW_RING, + HTT_SW_RING_IDX_RXDMA2RELEASE_RING, + HTT_SW_RING_IDX_RXDMA2REO_RING, + HTT_SW_RING_IDX_MONITOR_STATUS_RING, + HTT_SW_RING_IDX_MONITOR_BUF_RING, + HTT_SW_RING_IDX_MONITOR_DESC_RING, + HTT_SW_RING_IDX_MONITOR_DEST_RING, + HTT_SW_LMAC_RING_IDX_MAX, +}; + +PREPACK struct htt_t2h_msg_bkpressure_event_ind_t { + A_UINT32 msg_type: 8, /* HTT_T2H_MSG_TYPE_BKPRESSURE_EVENT_IND */ + pdev_id: 8, + ring_type: 8, /* htt_backpressure_ring_type */ + /* + * ring_id holds an enum value from either + * htt_backpressure_umac_ringid or + * htt_backpressure_lmac_ringid, based on + * the ring_type setting. + */ + ring_id: 8; + A_UINT16 head_idx; + A_UINT16 tail_idx; + A_UINT32 backpressure_time_ms; /* Time in milliseconds for which backpressure is seen continuously */ +} POSTPACK; + #endif diff --git a/fw/htt_stats.h b/fw/htt_stats.h index 1de7ec053c4a..924434b40344 100644 --- a/fw/htt_stats.h +++ b/fw/htt_stats.h @@ -267,6 +267,15 @@ enum htt_dbg_ext_stats_type { */ HTT_DBG_EXT_STATS_PDEV_OBSS_PD_STATS = 23, + /* HTT_DBG_EXT_STATS_RING_BACKPRESSURE_STATS + * PARAMS: + * - config_param0: + * No params + * RESP MSG: + * - htt_stats_ring_backpressure_stats_t + */ + HTT_DBG_EXT_STATS_RING_BACKPRESSURE_STATS = 24, + /* keep this last */ HTT_DBG_NUM_EXT_STATS = 256, }; @@ -362,6 +371,7 @@ typedef enum { HTT_STATS_SCHED_TXQ_SCHED_INELIGIBILITY_TAG = 87, /* htt_sched_txq_sched_eligibility_tlv */ HTT_STATS_PDEV_OBSS_PD_TAG = 88, /* htt_pdev_obss_pd_stats_tlv */ HTT_STATS_HW_WAR_TAG = 89, /* htt_hw_war_stats_tlv */ + HTT_STATS_RING_BACKPRESSURE_STATS_TAG = 90, /* htt_ring_backpressure_stats_tlv */ HTT_STATS_MAX_TAG, } htt_tlv_tag_t; @@ -3782,4 +3792,47 @@ typedef struct { htt_pdev_obss_pd_stats_tlv obss_pd_stat; } htt_pdev_obss_pd_stats_t; +typedef struct { + htt_tlv_hdr_t tlv_hdr; + A_UINT32 pdev_id; + A_UINT32 current_head_idx; + A_UINT32 current_tail_idx; + A_UINT32 num_htt_msgs_sent; + /* + * Time in milliseconds for which the ring has been in + * its current backpressure condition + */ + A_UINT32 backpressure_time_ms; + /* backpressure_hist - histogram showing how many times different degrees + * of backpressure duration occurred: + * Index 0 indicates the number of times ring was + * continously in backpressure state for 100 - 200ms. + * Index 1 indicates the number of times ring was + * continously in backpressure state for 200 - 300ms. + * Index 2 indicates the number of times ring was + * continously in backpressure state for 300 - 400ms. + * Index 3 indicates the number of times ring was + * continously in backpressure state for 400 - 500ms. + * Index 4 indicates the number of times ring was + * continously in backpressure state beyond 500ms. + */ + A_UINT32 backpressure_hist[5]; +} htt_ring_backpressure_stats_tlv; + +/* STATS_TYPE : HTT_STATS_RING_BACKPRESSURE_STATS_INFO + * TLV_TAGS: + * - HTT_STATS_RING_BACKPRESSURE_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_sring_cmn_tlv cmn_tlv; + struct { + htt_stats_string_tlv sring_str_tlv; + htt_ring_backpressure_stats_tlv backpressure_stats_tlv; + } r[1]; /* variable-length array */ +} htt_ring_backpressure_stats_t; + #endif /* __HTT_STATS_H__ */ -- cgit v1.2.3 From b4c89c68efed938f6f93073c98ae92174e298427 Mon Sep 17 00:00:00 2001 From: spuligil Date: Thu, 25 Apr 2019 00:01:13 -0700 Subject: fw-api: CL 7005037 - update fw common interface files Change-Id: I8fd221fac7f6a9c1109f497cfc490057daf6a8ee WMI: specify supported combinations of vdev numbers and types CRs-Fixed: 2262693 --- fw/wmi_services.h | 1 + fw/wmi_tlv_defs.h | 11 ++++ fw/wmi_unified.h | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ fw/wmi_version.h | 2 +- 4 files changed, 171 insertions(+), 1 deletion(-) diff --git a/fw/wmi_services.h b/fw/wmi_services.h index c11f066b73b6..1b478c3f0cd4 100755 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -391,6 +391,7 @@ typedef enum { WMI_SERVICE_WPA3_FT_FILS = 206, WMI_SERVICE_ADAPTIVE_11R_ROAM = 207, /* Indicates FW supports adaptive 11r roaming */ WMI_SERVICE_CHAN_RF_CHARACTERIZATION_INFO = 208, /* FW provides RF scores for chans in the service ready extension msg */ + WMI_SERVICE_FW_IFACE_COMBINATION_SUPPORT = 209, /* FW sends WMI_IFACE_COMBINATION_IND_EVENT msg immediately after WMI_SERVICE_READY_EXT_EVENT msg */ /******* ADD NEW SERVICES HERE *******/ diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 16e80cab80fc..286a720d0fbb 100755 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -978,6 +978,9 @@ typedef enum { WMITLV_TAG_STRUC_wmi_roam_score_delta_param, WMITLV_TAG_STRUC_wmi_roam_cnd_min_rssi_param, WMITLV_TAG_STRUC_wmi_chan_rf_characterization_info, + WMITLV_TAG_STRUC_wmi_wlanfw_iface_cmb_ind_event_fixed_param, + WMITLV_TAG_STRUC_wmi_wlanfw_iface_combination_param, + WMITLV_TAG_STRUC_wmi_wlanfw_iface_limit_param, } WMITLV_TAG_ID; /* @@ -1601,6 +1604,7 @@ typedef enum { OP(WMI_PEER_CFR_CAPTURE_EVENTID) \ OP(WMI_PDEV_COLD_BOOT_CAL_DATA_EVENTID) \ OP(WMI_PDEV_RAP_INFO_EVENTID) \ + OP(WMI_IFACE_COMBINATION_IND_EVENTID) \ /* add new EVT_LIST elements above this line */ @@ -3997,6 +4001,13 @@ 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); +/* 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) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wlanfw_iface_combination, combinations, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wlanfw_iface_limit, limits, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_IFACE_COMBINATION_IND_EVENTID); + /* Ready event */ #define WMITLV_TABLE_WMI_READY_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_ready_event_fixed_param, wmi_ready_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 62f21ee3a3c6..ea7819e2001a 100755 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -1230,6 +1230,11 @@ typedef enum { */ WMI_SERVICE_AVAILABLE_EVENTID, + /** Specify what numbers and kinds of interfaces (a.k.a. vdevs) + * the target supports + */ + WMI_IFACE_COMBINATION_IND_EVENTID, + /** Scan specific events */ WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN), @@ -26473,6 +26478,159 @@ typedef struct { wmi_mac_addr bssid; /** bssid of the rogue ap */ } wmi_pdev_rap_info_event_fixed_param; +/* + * WMI API for Firmware to indicate iface combinations which Firmware + * support to Host + */ +typedef struct { + A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_cmb_ind_event_fixed_param */ + + /* common part */ + /* Consider DBS/DBDC for this new implementation */ + A_UINT32 pdev_n; + + /* iface combinations part - + * Use subsequent TLV arrays to list supported combinations of interfaces. + */ + +/* + * The TLVs listing interface combinations, will follow this TLV. + * The number of combinations can be calculated by dividing the + * TLV array length by the TLV array element length. + * + * The fixed_param TLV is directly followed by a list of + * wlanfw_iface_combination elements: + * wlanfw_iface_combination combinations[0]; + * wlanfw_iface_combination combinations[1]; + * ... + * wlanfw_iface_combination combinations[N]; + * + * After the list of wlanfw_iface_combinations is a list of interface limits. + * The cmb_limits field of each wlanfw_iface_combination show which of the + * limits within the "wlanfw_ifact_limit limits" list belong to that + * iface_combination: + * limits[0] <- cmb 0, limit 0 + * ... + * limits[cmb[0].cmb_limits-1] <- cmb 0, limit N + * limits[cmb[0].cmb_limits] <- cmb 1, limit 0 + * ... + * limits[cmb[0].cmb_limits+cmb[1].cmb_limits-1] <- cmb 1, limit N + * limits[cmb[0].cmb_limits+cmb[1].cmb_limits] <- cmb 2, limit 0 + * ... + */ +} wmi_wlanfw_iface_cmb_ind_event_fixed_param; + +typedef struct { + A_UINT32 tlv_header; /* tag = WMITLV_TAG_STRUC_wmi_wlanfw_iface_limit_param */ + /* + * How many vdevs can work as below vdev_type/vdev_subtype + * in one combination. + */ + A_UINT32 vdev_limit_n; + /* + * Indicate what role above vdevs can work as. + * Refer to "WMI_VDEV_TYPE_xx, WMI_UNIFIED_VDEV_SUBTYPE_xx" + * for roles definition. + */ + A_UINT32 vdev_type; + A_UINT32 vdev_subtype; +} wlanfw_iface_limit; + +/** + * @brief specific configuration of valid_fields for host. + * These flags are used for indicating which fields in wlanfw_iface_combination + * contains valid value for Host Driver. + * 0: Host can ignore this field + * 1: field contains valid value for Host Driver + */ + +#define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_S 0 +#define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_M 0x1 + +#define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_S 1 +#define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_M 0x2 + +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_S 2 +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_M 0x4 + +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_S 3 +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_M 0x8 + +#define WMI_CMB_VALID_FIELDS_FLAG_SET(word32, flag, value) \ + do { \ + (word32) &= ~WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \ + (word32) |= ((value) << WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S) & \ + WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M; \ + } while (0) + +#define WMI_CMB_VALID_FIELDS_FLAG_GET(word32, flag) \ + (((word32) & WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _M) >> \ + WMI_CMB_VALID_FIELDS_FLAG_ ## flag ## _S) + +#define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_SET(word32, value) \ + WMI_CMB_VALID_FIELDS_FLAG_SET((word32), PEER_MAX, (value)) +#define WMI_CMB_VALID_FIELDS_FLAG_PEER_MAX_GET(word32) \ + WMI_CMB_VALID_FIELDS_FLAG_GET((word32), PEER_MAX) + +#define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_SET(word32, value) \ + WMI_CMB_VALID_FIELDS_FLAG_SET((word32), STA_AP_BCN_INT_MATCH, (value)) +#define WMI_CMB_VALID_FIELDS_FLAG_STA_AP_BCN_INT_MATCH_GET(word32) \ + WMI_CMB_VALID_FIELDS_FLAG_GET((word32), STA_AP_BCN_INT_MATCH) + +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_SET(word32, value) \ + WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_MIN, (value)) +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_MIN_GET(word32) \ + WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_MIN) + +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_SET(word32, value) \ + WMI_CMB_VALID_FIELDS_FLAG_SET((word32), BCN_INT_N, (value)) +#define WMI_CMB_VALID_FIELDS_FLAG_BCN_INT_N_GET(word32) \ + WMI_CMB_VALID_FIELDS_FLAG_GET((word32), BCN_INT_N) + +typedef struct { + A_UINT32 tlv_header; + /* + * Max num Peers can be supported in this combination. + * It excludes the self-peers associated with each vdev. + * It's the number of real remote peers. + * eg: when working as AP mode, indicating how many clients can be + * supported to connect with this AP. + */ + A_UINT32 peer_max; + /* Home Channels supported on one single phy concurrently */ + A_UINT32 channel_n; + /* + * The number of "wlanfw_iface_limit" for a specified combination. + * eg: there is 2 vdev, including 1 AP vdev and 1 STA vdev, then this + * cmb_limits will be 2 for this combination. + */ + A_UINT32 cmb_limits; + /* + * Beacon intervals for STA and AP types need to be match or not. + * 1: need to be match + * 0: not need + */ + A_UINT32 sta_ap_bcn_int_match; + /* + * This combination supports different beacon intervals or not. + * 0: Beacon interval is same for all interface + * !0: STA Beacon interval AND GCD of AP Beacon intervals + * should be greater or equal to this value. + */ + A_UINT32 bcn_int_min; + /* + * Number of different Beacon intervals + */ + A_UINT32 bcn_int_n; + + /* + * This indicates which field in this struct + * contains valid value for Host Driver. + * Refer to definitions for "WMI_CMB_VALID_FIELDS_FLAG_xx". + */ + A_UINT32 valid_fields; +} wlanfw_iface_combination; + /* ADD NEW DEFS HERE */ diff --git a/fw/wmi_version.h b/fw/wmi_version.h index e71d0e3aa983..35cb09beb8be 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_ 655 +#define __WMI_REVISION_ 656 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work -- cgit v1.2.3 From e212d7bab575e255e4fedf40e6773aa69ea2cfb8 Mon Sep 17 00:00:00 2001 From: spuligil Date: Thu, 25 Apr 2019 12:00:47 -0700 Subject: fw-api: CL 7009697 - update fw common interface files HTT stats: add per-chain ack rssi and other fields to htt_tx_ppdu_stats_info Change-Id: Ic15830753a43b51bbb1df992b1d02fb6ce0e1752 CRs-Fixed: 2262693 --- fw/htt_ppdu_stats.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/fw/htt_ppdu_stats.h b/fw/htt_ppdu_stats.h index 992c2740ed88..bdb6737c65b2 100644 --- a/fw/htt_ppdu_stats.h +++ b/fw/htt_ppdu_stats.h @@ -221,8 +221,27 @@ PREPACK struct htt_tx_ppdu_stats_info { * If bit 2 is set, tx_retry_bytes is valid * ... * If bit 14 is set, tx_duration is valid + * If bit 15 is set, all of ack_rssi_chain are valid, + * for each validation of chain, need to check value in field + * If bit 16 is set, tx_timestamp is valid + * If bit 16 is set, sa_ant_matrix is valid + * If bit 17 is set, tid is valid */ A_UINT32 valid_bitmap; + A_UINT32 ext_valid_bitmap; /* reserved for future extension valid bitmap */ + /* ack rssi for each chain */ + A_UINT32 ack_rssi_chain0: 8, /* Units: dB w.r.t noise floor, RSSI of Ack of all active chains. Value of 0x80 indicates invalid.*/ + ack_rssi_chain1: 8, /* same as above */ + ack_rssi_chain2: 8, /* same as above */ + ack_rssi_chain3: 8; /* same as above */ + A_UINT32 ack_rssi_chain4: 8, /* same as above */ + ack_rssi_chain5: 8, /* same as above */ + ack_rssi_chain6: 8, /* same as above */ + ack_rssi_chain7: 8; /* same as above */ + A_UINT32 tx_timestamp; /* HW assigned timestamp with microsecond unit */ + A_UINT32 sa_ant_matrix: 8, /* This sa_ant_matrix provides a bitmask of the antennas used while frame transmit */ + tid: 8, + reserved_1: 16; } POSTPACK; typedef struct { -- cgit v1.2.3 From 96792e9e59002f2ebfad1e3a4cf3d999780a3a80 Mon Sep 17 00:00:00 2001 From: spuligil Date: Fri, 26 Apr 2019 18:00:47 -0700 Subject: fw-api: CL 7018038 - update fw common interface files Change-Id: If34965f823157c473db5a64ae57c1b7d285672b4 HTT: add optional per-MSDU tx timestamp to tx completion ind CRs-Fixed: 2262693 --- fw/htt.h | 71 ++++++++++++++++++++++++++++++++++++++++++------------- fw/wmi_services.h | 1 + fw/wmi_unified.h | 17 +++++++++++++ fw/wmi_version.h | 2 +- 4 files changed, 73 insertions(+), 18 deletions(-) diff --git a/fw/htt.h b/fw/htt.h index 7a091598aea7..e7fdc5a0951a 100644 --- a/fw/htt.h +++ b/fw/htt.h @@ -178,9 +178,11 @@ * 3.61 Add rx offset fields to HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG msg * 3.62 Add antenna mask to reserved space in htt_rx_ppdu_desc_t * 3.63 Add HTT_HTT_T2H_MSG_TYPE_BKPRESSURE_EVENT_IND def + * 3.64 Add struct htt_tx_compl_ind_append_tx_tsf64 and add tx_tsf64 + * array to the end of HTT_T2H TX_COMPL_IND msg */ #define HTT_CURRENT_VERSION_MAJOR 3 -#define HTT_CURRENT_VERSION_MINOR 63 +#define HTT_CURRENT_VERSION_MINOR 64 #define HTT_NUM_TX_FRAG_DESC 1024 @@ -8245,27 +8247,36 @@ PREPACK struct htt_txq_group { * The following diagram shows the format of the TX completion indication sent * from the target to the host * - * |31 28|27|26|25|24|23 16| 15 |14 11|10 8|7 0| - * |-------------------------------------------------------------| - * header: |rsvd |A2|TP|A1|A0| num | t_i| tid |status| msg_type | - * |-------------------------------------------------------------| - * payload: | MSDU1 ID | MSDU0 ID | - * |-------------------------------------------------------------| - * : MSDU3 ID : MSDU2 ID : - * |-------------------------------------------------------------| - * | struct htt_tx_compl_ind_append_retries | - * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| - * | struct htt_tx_compl_ind_append_tx_tstamp | - * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| - * | MSDU1 ACK RSSI | MSDU0 ACK RSSI | - * |-------------------------------------------------------------| - * : MSDU3 ACK RSSI : MSDU2 ACK RSSI : - * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| + * |31 29|28|27|26|25|24|23 16| 15 |14 11|10 8|7 0| + * |----------------------------------------------------------------| + * header: |rsvd |A3|A2|TP|A1|A0| num | t_i| tid |status| msg_type | + * |----------------------------------------------------------------| + * payload: | MSDU1 ID | MSDU0 ID | + * |----------------------------------------------------------------| + * : MSDU3 ID | MSDU2 ID : + * |----------------------------------------------------------------| + * | struct htt_tx_compl_ind_append_retries | + * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | + * | struct htt_tx_compl_ind_append_tx_tstamp | + * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | + * | MSDU1 ACK RSSI | MSDU0 ACK RSSI | + * |----------------------------------------------------------------| + * : MSDU3 ACK RSSI | MSDU2 ACK RSSI : + * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | + * | MSDU0 tx_tsf64_low | + * |----------------------------------------------------------------| + * | MSDU0 tx_tsf64_high | + * |----------------------------------------------------------------| + * | MSDU1 tx_tsf64_low | + * |----------------------------------------------------------------| + * | MSDU1 tx_tsf64_high | + * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | * Where: * A0 = append (a.k.a. append0) * A1 = append1 * TP = MSDU tx power presence * A2 = append2 + * A3 = append3 * * The following field definitions describe the format of the TX completion * indication sent from the target to the host @@ -8332,6 +8343,18 @@ PREPACK struct htt_txq_group { * dB above the noise floor. * Value: 0 indicates MSDU ACK RSSI values are not appended, * 1 indicates MSDU ACK RSSI values are appended. + * - append3 + * Bits 28:28 + * Purpose: Append the struct htt_tx_compl_ind_append_tx_tsf64 which + * contains the tx tsf info based on wlan global TSF for + * each TX msdu id in payload. + * The order of the tx tsf matches the order of the MSDU IDs. + * The struct htt_tx_compl_ind_append_tx_tsf64 contains two 32-bits + * values to indicate the the lower 32 bits and higher 32 bits of + * the tx tsf. + * The tx_tsf64 here represents the time MSDU was acked and the + * tx_tsf64 has microseconds units. + * Value: 0 indicates no appending; 1 indicates appending * Payload fields: * - hmsdu_id * Bits 15:0 @@ -8355,6 +8378,8 @@ PREPACK struct htt_txq_group { #define HTT_TX_COMPL_IND_TX_POWER_M 0x04000000 #define HTT_TX_COMPL_IND_APPEND2_S 27 #define HTT_TX_COMPL_IND_APPEND2_M 0x08000000 +#define HTT_TX_COMPL_IND_APPEND3_S 28 +#define HTT_TX_COMPL_IND_APPEND3_M 0x10000000 #define HTT_TX_COMPL_IND_STATUS_SET(_info, _val) \ do { \ @@ -8413,6 +8438,13 @@ PREPACK struct htt_txq_group { } while (0) #define HTT_TX_COMPL_IND_APPEND2_GET(_info) \ (((_info) & HTT_TX_COMPL_IND_APPEND2_M) >> HTT_TX_COMPL_IND_APPEND2_S) +#define HTT_TX_COMPL_IND_APPEND3_SET(_info, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_TX_COMPL_IND_APPEND3, _val); \ + ((_info) |= ((_val) << HTT_TX_COMPL_IND_APPEND3_S)); \ + } while (0) +#define HTT_TX_COMPL_IND_APPEND3_GET(_info) \ + (((_info) & HTT_TX_COMPL_IND_APPEND3_M) >> HTT_TX_COMPL_IND_APPEND3_S) #define HTT_TX_COMPL_INV_TX_POWER 0xffff @@ -8472,6 +8504,11 @@ PREPACK struct htt_tx_compl_ind_append_tx_tstamp { A_UINT32 timestamp[1/*or more*/]; } POSTPACK; +PREPACK struct htt_tx_compl_ind_append_tx_tsf64 { + A_UINT32 tx_tsf64_low; + A_UINT32 tx_tsf64_high; +} POSTPACK; + /** * @brief target -> host rate-control update indication message * diff --git a/fw/wmi_services.h b/fw/wmi_services.h index 1b478c3f0cd4..cdaf035e7d31 100755 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -392,6 +392,7 @@ typedef enum { WMI_SERVICE_ADAPTIVE_11R_ROAM = 207, /* Indicates FW supports adaptive 11r roaming */ WMI_SERVICE_CHAN_RF_CHARACTERIZATION_INFO = 208, /* FW provides RF scores for chans in the service ready extension msg */ WMI_SERVICE_FW_IFACE_COMBINATION_SUPPORT = 209, /* FW sends WMI_IFACE_COMBINATION_IND_EVENT msg immediately after WMI_SERVICE_READY_EXT_EVENT msg */ + WMI_SERVICE_TX_COMPL_TSF64 = 210, /* FW supports 64-bit tx TSF in HTT_T2H TX_COMPL_IND msg */ /******* ADD NEW SERVICES HERE *******/ diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index ea7819e2001a..4177d50104dc 100755 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -3031,6 +3031,14 @@ typedef struct { #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_S 25 #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_M 0x2000000 + /* + * If the TX_COMPLETION_TX_TSF64 flag is set, the target should + * populate the htt_tx_compl_ind_append_tx_tsf64 array within the + * HTT_T2H TX_COMPL_IND message. + */ + #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_S 26 + #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_M 0x4000000 + A_UINT32 flag1; /** @brief smart_ant_cap - Smart Antenna capabilities information @@ -3299,6 +3307,11 @@ typedef struct { #define WMI_RSRC_CFG_FLAG_THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT_GET(word32) \ WMI_RSRC_CFG_FLAG_GET((word32), THREE_WAY_COEX_CONFIG_OVERRIDE_SUPPORT) +#define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_SET(word32, value) \ + WMI_RSRC_CFG_FLAG_SET((word32), TX_COMPLETION_TX_TSF64_ENABLE, (value)) +#define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_GET(word32) \ + WMI_RSRC_CFG_FLAG_GET((word32), TX_COMPLETION_TX_TSF64_ENABLE) + typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */ @@ -20380,6 +20393,10 @@ typedef struct { */ A_UINT32 mac_id; A_UINT32 mac_id_valid; + /* low 32 bits of wlan global tsf */ + A_UINT32 wlan_global_tsf_low; + /* high 32 bits of wlan global tsf */ + A_UINT32 wlan_global_tsf_high; } wmi_vdev_tsf_report_event_fixed_param; /* ie_id values: diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 35cb09beb8be..ca95261c504b 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_ 656 +#define __WMI_REVISION_ 657 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work -- cgit v1.2.3 From daf80cedf5d39a1a3c59b27b6509d8f6a4275a48 Mon Sep 17 00:00:00 2001 From: spuligil Date: Sat, 27 Apr 2019 00:00:50 -0700 Subject: fw-api: CL 7019532 - update fw common interface files Change-Id: Id46aa3c0292a1662edcd6887e9fe5289880b811a WMI: TWT broadcast persistence and MBSSID flags CRs-Fixed: 2262693 --- fw/wmi_unified.h | 27 ++++++++++++++++++++++++--- fw/wmi_version.h | 2 +- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 4177d50104dc..3cf2743ee434 100755 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -24513,13 +24513,21 @@ typedef struct { #define TWT_EN_DIS_FLAGS_GET_BTWT(flag) WMI_GET_BITS(flag, 0, 1) #define TWT_EN_DIS_FLAGS_SET_BTWT(flag, val) WMI_SET_BITS(flag, 0, 1, val) +/* legacy MBSSID enable/disable */ +#define TWT_EN_DIS_FLAGS_GET_L_MBSSID(flag) WMI_GET_BITS(flag, 1, 1) +#define TWT_EN_DIS_FLAGS_SET_L_MBSSID(flag, val) WMI_SET_BITS(flag, 1, 1, val) + +/* 11ax MBSSID enable/disable */ +#define TWT_EN_DIS_FLAGS_GET_AX_MBSSID(flag) WMI_GET_BITS(flag, 2, 1) +#define TWT_EN_DIS_FLAGS_SET_AX_MBSSID(flag, val) WMI_SET_BITS(flag, 2, 1, val) + typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_twt_enable_cmd_fixed_param */ /** pdev_id for identifying the MAC. See macros starting with WMI_PDEV_ID_ for values. In non-DBDC case host should set it to 0 */ A_UINT32 pdev_id; A_UINT32 sta_cong_timer_ms; /* STA TWT congestion timer TO value in terms of ms */ - A_UINT32 mbss_support; /* Flag indicating if AP TWT feature supported in MBSS mode or not */ + A_UINT32 mbss_support; /* Reserved */ A_UINT32 default_slot_size; /* This is the default value for the TWT slot setup by AP (units = microseconds) */ A_UINT32 congestion_thresh_setup; /* Minimum congestion required to start setting up TWT sessions */ /* @@ -24613,7 +24621,7 @@ 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 */ wmi_mac_addr peer_macaddr; /* peer MAC address */ - A_UINT32 dialog_id; /* TWT dialog_id is per peer */ + A_UINT32 dialog_id; /* TWT dialog_id (< 0xFF) is per peer, I-TWT & B-TWT use different diaglog ID */ /* 1. wake_intvl_mantis must be <= 0xFFFF * 2. wake_intvl_us must be divided evenly by wake_intvl_mantis, @@ -24625,10 +24633,17 @@ typedef struct { A_UINT32 wake_intvl_mantis; /* TWT Wake Interval Mantissa */ /* wake_dura_us must be divided evenly by 256, i.e., wake_dura_us % 256 == 0 */ - A_UINT32 wake_dura_us; /* TWT Wake Duration in units of us, must be <= 0xFFFF */ + A_UINT32 wake_dura_us; /* TWT Wake Duration in units of us, must be <= 65280 (0xFF00) */ A_UINT32 sp_offset_us; /* this long time after TWT setup the 1st SP will start */ A_UINT32 flags; /* TWT flags, refer to MACROs TWT_FLAGS_*(TWT_FLAGS_GET_CMD etc) */ + + /* Broadcast TWT(B-TWT) Persistence, when used in Add/update Dialog, + * indicates for how long(in units of TBTTs) current B-TWT session + * parameters will not be changed. + * Refer to 11ax spec session "9.4.2.199 TWT element" for more info. + */ + A_UINT32 b_twt_persistence; } wmi_twt_add_dialog_cmd_fixed_param; /* status code of adding TWT dialog */ @@ -24658,6 +24673,12 @@ typedef struct { A_UINT32 vdev_id; /* VDEV identifier */ wmi_mac_addr peer_macaddr; /* peer MAC address */ A_UINT32 dialog_id; /* TWT dialog ID */ + /* Broadcast TWT(B-TWT) Persistence, when used in Del Dialog, + * indicates for how long(in units of TBTTs) current B-TWT session + * parameters will be present. + * Refer to 11ax spec session "9.4.2.199 TWT element" for more info. + */ + A_UINT32 b_twt_persistence; } wmi_twt_del_dialog_cmd_fixed_param; /* status code of deleting TWT dialog */ diff --git a/fw/wmi_version.h b/fw/wmi_version.h index ca95261c504b..28c147f250e0 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_ 657 +#define __WMI_REVISION_ 658 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work -- cgit v1.2.3 From 8006b529b12822d9d0c7d135d20594ada9b77ee9 Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 30 Apr 2019 12:31:59 -0700 Subject: fw-api: CL 7028997 - update fw common interface files Add WMI_VDEV_TYPE_MESH_POINT def Change-Id: Ic315264464796522096355aeff7f2f7215493464 CRs-Fixed: 2262693 --- fw/wmi_unified.h | 2 ++ fw/wmi_version.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 3cf2743ee434..c8c4b5be0914 100755 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -8155,6 +8155,8 @@ typedef struct { /* NAN Data Interface */ #define WMI_VDEV_TYPE_NDI 0x7 +#define WMI_VDEV_TYPE_MESH_POINT 0x8 + /* * Param values to be sent for WMI_VDEV_PARAM_SGI command * which are used in 11ax systems diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 28c147f250e0..737269108623 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_ 658 +#define __WMI_REVISION_ 659 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work -- cgit v1.2.3 From 700b8b703dcde14999b4b866790e0793641cbebe Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 30 Apr 2019 18:01:35 -0700 Subject: fw-api: CL 7040955 - update fw common interface files WMI: combine freq + chan_metric fields in CHAN_RF_CHARACTERIZATION_INFO This is a backwards-incompatible change, but is accepable because the definitions being modified are new and have not been used yet. Change-Id: I5fd7dcc1dc4acedb5340818c03cb58d6557a900a CRs-Fixed: 2262693 --- fw/wmi_unified.h | 46 ++++++++++++++++++++++++++++++++++++++++++++-- fw/wmi_version.h | 2 +- 2 files changed, 45 insertions(+), 3 deletions(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index c8c4b5be0914..6145f76cb8b4 100755 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -24773,10 +24773,52 @@ typedef struct { typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_ wmi_chan_rf_characterization_info */ - A_UINT32 freq; /* channel frequency of rf characteristic info (MHz) */ - A_UINT32 chan_metric; /* 0 = unusable, 1 = worst, 10 = best */ + + /** + * [3:0] : channel metric - 0 = unusable, 1 = worst, 10 = best + * [4:7] : channel BW - + * 0 = 20MHz + * 1 = 40MHz + * 2 = 80MHz + * 3 = 160MHz + * (4-10 unused) + * 11 = 5MHz + * 12 = 10MHz + * (13-15 unused) + * [15:8 ]: Reserved + * [31:16]: Frequency - channel frequency of RF characteristic info (MHz) + */ + A_UINT32 freq_info; } WMI_CHAN_RF_CHARACTERIZATION_INFO; +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC 0x0000000f +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC_S 0 +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW 0x000000f0 +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW_S 4 +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ 0xffff0000 +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ_S 16 + +#define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_SET(dword,val) \ + WMI_F_RMW((dword)->freq_info,(val) & 0xff, \ + WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC) +#define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_GET(dword) \ + WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC) + +#define WMI_CHAN_RF_CHARACTERIZATION_BW_SET(dword, val) \ + WMI_F_RMW((dword)->freq_info,(val) & 0xf0, \ + WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW) +#define WMI_CHAN_RF_CHARACTERIZATION_BW_GET(dword) \ + WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW) + +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_SET(dword, val) \ + WMI_F_RMW((dword)->freq_info,(val) & 0xffff, \ + WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ) + +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_GET(dword) \ + WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ) + + + #define WMI_DMA_RING_PADDR_LO_S 0 #define WMI_DMA_RING_PADDR_LO 0xffffffff diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 737269108623..24911af21ed3 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_ 659 +#define __WMI_REVISION_ 660 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work -- cgit v1.2.3 From 48f2b9b1da3e4e74d8a9947f5a811a5e8be03daa Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 30 Apr 2019 18:01:45 -0700 Subject: fw-api: CL 7040979 - update fw common interface files Change-Id: Id06d725c59178a7420ec2f82e41f1ac7cfc90957 HTT: extend tx_msdu_desc_ext2; stats: add cookie field in PPDU user_common CRs-Fixed: 2262693 --- fw/htt.h | 72 ++++++++++++++++++++++++++--- fw/htt_ppdu_stats.h | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 193 insertions(+), 7 deletions(-) diff --git a/fw/htt.h b/fw/htt.h index e7fdc5a0951a..f2d60669e3c5 100644 --- a/fw/htt.h +++ b/fw/htt.h @@ -180,9 +180,12 @@ * 3.63 Add HTT_HTT_T2H_MSG_TYPE_BKPRESSURE_EVENT_IND def * 3.64 Add struct htt_tx_compl_ind_append_tx_tsf64 and add tx_tsf64 * array to the end of HTT_T2H TX_COMPL_IND msg + * 3.65 Add fields in htt_tx_msdu_desc_ext2_t to allow the host to provide + * a "cookie" to identify a MSDU, and to specify to not apply aggregation + * for a MSDU. */ #define HTT_CURRENT_VERSION_MAJOR 3 -#define HTT_CURRENT_VERSION_MINOR 64 +#define HTT_CURRENT_VERSION_MINOR 65 #define HTT_NUM_TX_FRAG_DESC 1024 @@ -1660,18 +1663,34 @@ PREPACK struct htt_tx_msdu_desc_ext2_t { /* DWORD 4: tx expiry time (TSF) MSBs */ A_UINT32 expire_tsf_hi; - /* DWORD 5: reserved - * This structure can be expanded further up to 60 bytes - * by adding further DWORDs as needed. - */ + /* DWORD 5: flags to control routing / processing of the MSDU */ A_UINT32 /* learning_frame * When this flag is set, this frame will be dropped by FW * rather than being enqueued to the Transmit Queue Manager (TQM) HW. */ - learning_frame : 1, - rsvd0 : 31; + learning_frame : 1, + /* send_as_standalone + * This will indicate if the msdu needs to be sent as a singleton PPDU, + * i.e. with no A-MSDU or A-MPDU aggregation. + * The scope is extended to other use-cases. + */ + send_as_standalone : 1, + /* is_host_opaque_valid + * Host should set this bit to 1 if the host_opaque_cookie is populated + * with valid information. + */ + is_host_opaque_valid : 1, + rsvd0 : 29; + + /* DWORD 6 : Host opaque cookie for special frames */ + A_UINT32 host_opaque_cookie : 16, /* see is_host_opaque_valid */ + rsvd1 : 16; + /* + * This structure can be expanded further up to 40 bytes + * by adding further DWORDs as needed. + */ } POSTPACK; /* DWORD 0 */ @@ -1739,6 +1758,15 @@ PREPACK struct htt_tx_msdu_desc_ext2_t { /* DWORD 5 */ #define HTT_TX_MSDU_EXT2_DESC_FLAG_LEARNING_FRAME_M 0x00000001 #define HTT_TX_MSDU_EXT2_DESC_FLAG_LEARNING_FRAME_S 0 +#define HTT_TX_MSDU_EXT2_DESC_FLAG_SEND_AS_STANDALONE_M 0x00000002 +#define HTT_TX_MSDU_EXT2_DESC_FLAG_SEND_AS_STANDALONE_S 1 +#define HTT_TX_MSDU_EXT2_DESC_FLAG_HOST_OPAQUE_VALID_M 0x00000004 +#define HTT_TX_MSDU_EXT2_DESC_FLAG_HOST_OPAQUE_VALID_S 2 + +/* DWORD 6 */ +#define HTT_TX_MSDU_EXT2_DESC_HOST_OPAQUE_COOKIE_M 0x0000FFFF +#define HTT_TX_MSDU_EXT2_DESC_HOST_OPAQUE_COOKIE_S 0 + /* DWORD 0 */ #define HTT_TX_MSDU_EXT2_DESC_FLAG_VALID_PWR_GET(_var) \ @@ -2010,6 +2038,36 @@ PREPACK struct htt_tx_msdu_desc_ext2_t { ((_var) |= ((_val) << HTT_TX_MSDU_EXT2_DESC_FLAG_LEARNING_FRAME_S)); \ } while (0) +#define HTT_TX_MSDU_EXT2_DESC_FLAG_SEND_AS_STANDALONE_GET(_var) \ + (((_var) & HTT_TX_MSDU_EXT2_DESC_FLAG_SEND_AS_STANDALONE_M) >> \ + HTT_TX_MSDU_EXT2_DESC_FLAG_SEND_AS_STANDALONE_S) + +#define HTT_TX_MSDU_EXT2_DESC_FLAG_SEND_AS_STANDALONE_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_TX_MSDU_EXT2_DESC_FLAG_SEND_AS_STANDALONE, _val); \ + ((_var) |= ((_val) << HTT_TX_MSDU_EXT2_DESC_FLAG_SEND_AS_STANDALONE_S)); \ + } while (0) + +#define HTT_TX_MSDU_EXT2_DESC_FLAG_HOST_OPAQUE_VALID_GET(_var) \ + (((_var) & HTT_TX_MSDU_EXT2_DESC_FLAG_HOST_OPAQUE_VALID_M) >> \ + HTT_TX_MSDU_EXT2_DESC_FLAG_HOST_OPAQUE_VALID_S) +#define HTT_TX_MSDU_EXT2_DESC_FLAG_HOST_OPAQUE_VALID_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_TX_MSDU_EXT2_DESC_FLAG_HOST_OPAQUE_VALID, _val); \ + ((_var) |= ((_val) << HTT_TX_MSDU_EXT2_DESC_FLAG_HOST_OPAQUE_VALID_S)); \ + } while (0) + +/* DWORD 6 */ +#define HTT_TX_MSDU_EXT2_DESC_HOST_OPAQUE_COOKIE_GET(_var) \ + (((_var) & HTT_TX_MSDU_EXT2_DESC_HOST_OPAQUE_COOKIE_M) >> \ + HTT_TX_MSDU_EXT2_DESC_HOST_OPAQUE_COOKIE_S) +#define HTT_TX_MSDU_EXT2_DESC_HOST_OPAQUE_COOKIE_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_TX_MSDU_EXT2_DESC_HOST_OPAQUE_COOKIE, _val); \ + ((_var) |= ((_val) << HTT_TX_MSDU_EXT2_DESC_HOST_OPAQUE_COOKIE_S)); \ + } while (0) + + typedef enum { HTT_TCL_METADATA_TYPE_PEER_BASED = 0, HTT_TCL_METADATA_TYPE_VDEV_BASED = 1, diff --git a/fw/htt_ppdu_stats.h b/fw/htt_ppdu_stats.h index bdb6737c65b2..b3fb65efcdc8 100644 --- a/fw/htt_ppdu_stats.h +++ b/fw/htt_ppdu_stats.h @@ -724,6 +724,36 @@ typedef struct { }; }; + /* + * Data fields containing the physical address info of a MSDU buffer + * as well as the owner and a SW cookie info that can be used by the host + * to look up the virtual address of the MSDU buffer. + * These fields are only valid if is_buffer_addr_info_valid is set to 1. + */ + A_UINT32 buffer_paddr_31_0 : 32; + A_UINT32 buffer_paddr_39_32 : 8, + return_buffer_manager : 3, + sw_buffer_cookie : 21; + + /* + * host_opaque_cookie : Host can send upto 2 bytes of opaque + * cookie in TCL_DATA_CMD and FW will replay this back in + * HTT PPDU stats. Valid only if sent to FW through + * exception mechanism. + * + * is_standalone : This msdu was sent as a single MSDU/MPDU + * PPDU as indicated by host via TCL_DATA_CMD using + * the send_as_standalone bit. + * + * is_buffer_addr_info_valid : This will be set whenever a MSDU is sent as + * a singleton (single-MSDU PPDU) for FW use-cases or as indicated by host + * via send_as_standalone in TCL_DATA_CMD. + */ + A_UINT32 host_opaque_cookie: 16, + is_host_opaque_valid: 1, + is_standalone: 1, + is_buffer_addr_info_valid: 1, + reserved1: 13; } htt_ppdu_stats_user_common_tlv; #define HTT_PPDU_STATS_USER_RATE_TLV_TID_NUM_M 0x000000ff @@ -821,6 +851,104 @@ typedef struct { ((_var) |= ((_val) << HTT_PPDU_STATS_USER_RATE_TLV_RESP_TYPE_VALID_S)); \ } while (0) + +#define HTT_PPDU_STATS_BUF_ADDR_39_32_M 0x000000ff +#define HTT_PPDU_STATS_BUF_ADDR_39_32_S 0 + +#define HTT_PPDU_STATS_BUF_ADDR_39_32__GET(_var) \ + (((_var) & HTT_PPDU_STATS_BUF_ADDR_39_32_M) >> \ + HTT_PPDU_STATS_BUF_ADDR_39_32_S) + +#define HTT_PPDU_STATS_BUF_ADDR_39_32_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_BUF_ADDR_39_32, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_BUF_ADDR_39_32_S)); \ + } while (0) + + +#define HTT_PPDU_STATS_RETURN_BUF_MANAGER_M 0x00000700 +#define HTT_PPDU_STATS_RETURN_BUF_MANAGER_S 8 + +#define HTT_PPDU_STATS_RETURN_BUF_MANAGER_GET(_var) \ + (((_var) & HTT_PPDU_STATS_RETURN_BUF_MANAGER_M) >> \ + HTT_PPDU_STATS_RETURN_BUF_MANAGER_S) + +#define HTT_PPDU_STATS_RETURN_BUF_MANAGER_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_RETURN_BUF_MANAGER, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_RETURN_BUF_MANAGER_S)); \ + } while (0) + + +#define HTT_PPDU_STATS_SW_BUFFER_COOKIE_M 0xfffff800 +#define HTT_PPDU_STATS_SW_BUFFER_COOKIE_S 11 + +#define HTT_PPDU_STATS_SW_BUFFER_COOKIE_GET(_var) \ + (((_var) & HTT_PPDU_STATS_SW_BUFFER_COOKIE_M) >> \ + HTT_PPDU_STATS_SW_BUFFER_COOKIE_S) + +#define HTT_PPDU_STATS_SW_BUFFER_COOKIE_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_SW_BUFFER_COOKIE, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_SW_BUFFER_COOKIE_S)); \ + } while (0) + + +#define HTT_PPDU_STATS_HOST_OPAQUE_COOKIE_M 0x0000FFFF +#define HTT_PPDU_STATS_HOST_OPAQUE_COOKIE_S 0 + +#define HTT_PPDU_STATS_HOST_OPAQUE_COOKIE_GET(_var) \ + (((_var) & HTT_PPDU_STATS_HOST_OPAQUE_COOKIE_M) >> \ + HTT_PPDU_STATS_HOST_OPAQUE_COOKIE_S) + +#define HTT_PPDU_STAT_HOST_OPAQUE_COOKIE_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_HOST_OPAQUE_COOKIE, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_HOST_OPAQUE_COOKIE_S)); \ + } while (0) + + +#define HTT_PPDU_STATS_IS_OPAQUE_VALID_M 0x00010000 +#define HTT_PPDU_STATS_IS_OPAQUE_VALID_S 16 + +#define HTT_PPDU_STATS_IS_OPAQUE_VALID_GET(_var) \ + (((_var) & HTT_PPDU_STATS_IS_OPAQUE_VALID_M) >> \ + HTT_PPDU_STATS_IS_OPAQUE_VALID_S) + +#define HTT_PPDU_STATS_IS_OPAQUE_VALID_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_IS_OPAQUE_VALID, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_IS_OPAQUE_VALID_S)); \ + } while (0) + + +#define HTT_PPDU_STATS_IS_STANDALONE_M 0x00020000 +#define HTT_PPDU_STATS_IS_STANDALONE_S 17 + +#define HTT_PPDU_STATS_IS_STANDALONE_GET(_var) \ + (((_var) & HTT_PPDU_STATS_IS_STANDALONE_M) >> \ + HTT_PPDU_STATS_IS_OPAQUE_VALID_S) + +#define HTT_PPDU_STATS_IS_STANDALONE_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_IS_STANDALONE, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_IS_STANDALONE_S)); \ + } while (0) + + +#define HTT_PPDU_STATS_IS_BUFF_INFO_VALID_M 0x000400000 +#define HTT_PPDU_STATS_IS_BUFF_INFO_VALID_S 18 + +#define HTT_PPDU_STATS_IS_BUFF_INFO_VALID_GET(_var) \ + (((_var) & HTT_PPDU_STATS_IS_BUFF_INFO_VALID_M) >> \ + HTT_PPDU_STATS_IS_BUFF_INFO_VALID_S) + +#define HTT_PPDU_STATS_IS_BUFF_INFO_VALID_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_PPDU_STATS_IS_BUFF_INFO_VALID, _val); \ + ((_var) |= ((_val) << HTT_PPDU_STATS_IS_BUFF_INFO_VALID_S)); \ + } while (0) + enum HTT_PPDU_STATS_PPDU_TYPE { HTT_PPDU_STATS_PPDU_TYPE_SU, HTT_PPDU_STATS_PPDU_TYPE_MU_MIMO, -- cgit v1.2.3 From e77f29529093fa52c01d465d16acf1f0a1338a0e Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 7 May 2019 13:53:28 -0700 Subject: fw-api: CL 7056399 - update fw common interface files Add WMI_ROAM_DSM_FILTER_CMD msg def Change-Id: If5dbc53a16d18bf70e7b54a99716261b7431286d CRs-Fixed: 2262693 --- fw/wmi_services.h | 1 + fw/wmi_tlv_defs.h | 9 +++++++++ fw/wmi_unified.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- fw/wmi_version.h | 2 +- 4 files changed, 70 insertions(+), 2 deletions(-) diff --git a/fw/wmi_services.h b/fw/wmi_services.h index cdaf035e7d31..20cee6aaf0d2 100755 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -393,6 +393,7 @@ typedef enum { WMI_SERVICE_CHAN_RF_CHARACTERIZATION_INFO = 208, /* FW provides RF scores for chans in the service ready extension msg */ WMI_SERVICE_FW_IFACE_COMBINATION_SUPPORT = 209, /* FW sends WMI_IFACE_COMBINATION_IND_EVENT msg immediately after WMI_SERVICE_READY_EXT_EVENT msg */ 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 */ /******* ADD NEW SERVICES HERE *******/ diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index 286a720d0fbb..bbb23a98d771 100755 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -981,6 +981,8 @@ typedef enum { WMITLV_TAG_STRUC_wmi_wlanfw_iface_cmb_ind_event_fixed_param, WMITLV_TAG_STRUC_wmi_wlanfw_iface_combination_param, WMITLV_TAG_STRUC_wmi_wlanfw_iface_limit_param, + WMITLV_TAG_STRUC_wmi_roam_dsm_filter_fixed_param, + WMITLV_TAG_STRUC_wmi_roam_bssid_disallow_list_config_param, } WMITLV_TAG_ID; /* @@ -1379,6 +1381,7 @@ typedef enum { OP(WMI_ROAM_DEAUTH_CONFIG_CMDID) \ OP(WMI_ROAM_IDLE_CONFIG_CMDID) \ OP(WMI_IDLE_TRIGGER_MONITOR_CMDID) \ + OP(WMI_ROAM_DSM_FILTER_CMDID) \ /* add new CMD_LIST elements above this line */ @@ -3050,6 +3053,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_IDLE_CONFIG_CMDID); 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); +/* DSM roam filter parameters */ +#define WMITLV_TABLE_WMI_ROAM_DSM_FILTER_CMDID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_dsm_filter_fixed_param, wmi_roam_dsm_filter_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_bssid_disallow_list_config_param, bssid_disallow_list, WMITLV_SIZE_VAR) +WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_DSM_FILTER_CMDID); + #define WMITLV_TABLE_WMI_ROAM_BLACKLIST_EVENTID(id,op,buf,len) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_blacklist_event_fixed_param, wmi_roam_blacklist_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_blacklist_with_timeout_tlv_param, blacklist_with_timeout, WMITLV_SIZE_VAR) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 6145f76cb8b4..158e39132f6d 100755 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -697,6 +697,8 @@ typedef enum { WMI_ROAM_DEAUTH_CONFIG_CMDID, /** Configure idle roam trigger parameters */ WMI_ROAM_IDLE_CONFIG_CMDID, + /** roaming filter cmd with DSM filters along with existing roam filters */ + WMI_ROAM_DSM_FILTER_CMDID, /** offload scan specific commands */ /** set offload scan AP profile */ @@ -23889,6 +23891,7 @@ static INLINE A_UINT8 *wmi_id_to_name(A_UINT32 wmi_command) WMI_RETURN_STRING(WMI_ROAM_DEAUTH_CONFIG_CMDID); WMI_RETURN_STRING(WMI_ROAM_IDLE_CONFIG_CMDID); WMI_RETURN_STRING(WMI_IDLE_TRIGGER_MONITOR_CMDID); + WMI_RETURN_STRING(WMI_ROAM_DSM_FILTER_CMDID); } return "Invalid WMI cmd"; @@ -24786,7 +24789,8 @@ typedef struct { * 12 = 10MHz * (13-15 unused) * [15:8 ]: Reserved - * [31:16]: Frequency - channel frequency of RF characteristic info (MHz) + * [31:16]: Frequency - Center frequency of the channel for which + * the RF characterisation info applies (MHz) */ A_UINT32 freq_info; } WMI_CHAN_RF_CHARACTERIZATION_INFO; @@ -25120,6 +25124,60 @@ typedef enum { WMI_IDLE_TRIGGER_MONITOR_OFF, } WMI_SCREEN_STATUS_NOTIFY_ID; +typedef struct { + /** TLV tag and len; tag equals wmi_roam_dsm_filter_fixed_param */ + A_UINT32 tlv_header; + /** Unique id identifying the VDEV on which new roaming filter(data stall AP mitigation) is adopted */ + A_UINT32 vdev_id; + /** + * TLV (tag length value) parameter's following roam_dsm_filter_cmd are, + * + * wmi_roam_bssid_disallow_list_config_param bssid_disallow_list[]; i.e array containing + * all roam filter lists including the new DSM lists(avoidlist/driver_blacklist) and + * existing roam lists(supplicant_blacklist/rssi_rejectlist etc.) + */ +} wmi_roam_dsm_filter_fixed_param; + +typedef struct { + /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_bssid_disallow_list_config_param */ + A_UINT32 tlv_header; + /** bssid type i.e whether bssid falls in avoid list or driver_blacklist etc. + see WMI_BSSID_DISALLOW_LIST_TYPE **/ + A_UINT32 bssid_type; + /** mac address of disallow BSSID */ + wmi_mac_addr bssid; + /** Disallow AP for certain duration, in units of milliseconds */ + A_UINT32 remaining_disallow_duration; + /** AP will be allowed for candidate, when AP RSSI better than expected RSSI units in dBm */ + A_INT32 expected_rssi; +} wmi_roam_bssid_disallow_list_config_param; + +typedef enum { + /* USER_SPACE_BLACK_LIST + * Black Listed AP's by host's user space + */ + WMI_BSSID_DISALLOW_USER_SPACE_BLACK_LIST = 0, + /* DRIVER_BLACK_LIST + * Black Listed AP's by host driver + * used for data stall migitation + */ + WMI_BSSID_DISALLOW_DRIVER_BLACK_LIST, + /* USER_SPACE_AVOID_LIST + * Avoid List AP's by host's user space + * used for data stall migitation + */ + WMI_BSSID_DISALLOW_USER_SPACE_AVOID_LIST, + /* DRIVER_AVOID_LIST + * Avoid List AP's by host driver + * used for data stall migitation + */ + WMI_BSSID_DISALLOW_DRIVER_AVOID_LIST, + /* RSSI_REJECT_LIST + * OCE AP's + */ + WMI_BSSID_DISALLOW_RSSI_REJECT_LIST, +} WMI_BSSID_DISALLOW_LIST_TYPE; + typedef struct { /* * The timestamp is in units of ticks of a 19.2MHz clock. diff --git a/fw/wmi_version.h b/fw/wmi_version.h index 24911af21ed3..a84cdfb0772e 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_ 660 +#define __WMI_REVISION_ 661 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work -- cgit v1.2.3 From 38447ada67645898d013682efb94fe5baed397b4 Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 7 May 2019 19:11:21 -0700 Subject: fw-api: CL 7076837 - update fw common interface files Add WOW_REASON_MAX def Change-Id: If05ca81ab3c652689ea7d0c9bc78c4f9b0f3d1d7 CRs-Fixed: 2262693 --- fw/wmi_unified.h | 2 ++ fw/wmi_version.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 158e39132f6d..eef3fc157607 100755 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -13340,6 +13340,8 @@ typedef enum wake_reason_e { WOW_REASON_WLAN_BL, /* baselining done */ WOW_REASON_NTH_BCN_OFLD, /* nth beacon forward to host */ + /* add new WOW_REASON_ defs before this line */ + WOW_REASON_MAX, WOW_REASON_DEBUG_TEST = 0xFF, } WOW_WAKE_REASON_TYPE; diff --git a/fw/wmi_version.h b/fw/wmi_version.h index a84cdfb0772e..a96cda980607 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_ 661 +#define __WMI_REVISION_ 662 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work -- cgit v1.2.3 From f93a7f538e10faeb969e6a96cf68982ae5364087 Mon Sep 17 00:00:00 2001 From: spuligil Date: Tue, 7 May 2019 19:11:34 -0700 Subject: fw-api: CL 7083994 - update fw common interface files Change-Id: Ia273fce8f188919bf115237971e1cb7d0a2d1592 WMI: add info re mgmt frames, HTT: provide HT/VHT SIG info CRs-Fixed: 2262693 --- fw/htt.h | 629 +++++++++++++++++++++++++++++++++++++++++++++++++++--- fw/wmi_services.h | 1 + fw/wmi_tlv_defs.h | 14 +- fw/wmi_unified.h | 102 ++++++++- fw/wmi_version.h | 2 +- 5 files changed, 718 insertions(+), 30 deletions(-) diff --git a/fw/htt.h b/fw/htt.h index f2d60669e3c5..e7833c6393cc 100644 --- a/fw/htt.h +++ b/fw/htt.h @@ -183,9 +183,11 @@ * 3.65 Add fields in htt_tx_msdu_desc_ext2_t to allow the host to provide * a "cookie" to identify a MSDU, and to specify to not apply aggregation * for a MSDU. + * 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. */ #define HTT_CURRENT_VERSION_MAJOR 3 -#define HTT_CURRENT_VERSION_MINOR 65 +#define HTT_CURRENT_VERSION_MINOR 66 #define HTT_NUM_TX_FRAG_DESC 1024 @@ -5817,6 +5819,11 @@ enum htt_t2h_msg_type { HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND = 0x22, HTT_T2H_MSG_TYPE_PEER_STATS_IND = 0x23, HTT_T2H_MSG_TYPE_BKPRESSURE_EVENT_IND = 0x24, + /* TX_OFFLOAD_DELIVER_IND: + * Forward the target's locally-generated packets to the host, + * to provide to the monitor mode interface. + */ + HTT_T2H_MSG_TYPE_TX_OFFLOAD_DELIVER_IND = 0x25, HTT_T2H_MSG_TYPE_TEST, /* keep this last */ @@ -5962,7 +5969,22 @@ struct htt_rx_in_ord_paddr_ind_hdr_t A_UINT32 /* word 1 */ vap_id: 8, - reserved_1: 8, + /* NOTE: + * This reserved_1 field is not truly reserved - certain targets use + * this field internally to store debug information, and do not zero + * out the contents of the field before uploading the message to the + * host. Thus, any host-target communication supported by this field + * is limited to using values that are never used by the debug + * information stored by certain targets in the reserved_1 field. + * In particular, the targets in question don't use the value 0x3 + * within bits 7:6 of this field (i.e. bits 15:14 of the A_UINT32), + * so this previously-unused value within these bits is available to + * use as the host / target PKT_CAPTURE_MODE flag. + */ + reserved_1: 8, /* reserved_1a: 6, pkt_capture_mode: 2, */ + /* if pkt_capture_mode == 0x3, host should + * send rx frames to monitor mode interface + */ msdu_cnt: 16; }; @@ -6013,6 +6035,8 @@ struct htt_rx_in_ord_paddr_ind_msdu64_t #define HTT_RX_IN_ORD_PADDR_IND_PEER_ID_S 16 #define HTT_RX_IN_ORD_PADDR_IND_VAP_ID_M 0x000000ff #define HTT_RX_IN_ORD_PADDR_IND_VAP_ID_S 0 +#define HTT_RX_IN_ORD_PADDR_IND_PKT_CAPTURE_MODE_M 0x0000c000 +#define HTT_RX_IN_ORD_PADDR_IND_PKT_CAPTURE_MODE_S 14 #define HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_M 0xffff0000 #define HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_S 16 /* for systems using 64-bit format for bus addresses */ @@ -6055,6 +6079,24 @@ struct htt_rx_in_ord_paddr_ind_msdu64_t #define HTT_RX_IN_ORD_PADDR_IND_VAP_ID_GET(word) \ (((word) & HTT_RX_IN_ORD_PADDR_IND_VAP_ID_M) >> HTT_RX_IN_ORD_PADDR_IND_VAP_ID_S) +/* + * If the PKT_CAPTURE_MODE flags value is MONITOR (0x3), the host should + * deliver the rx frames to the monitor mode interface. + * The HTT_RX_IN_ORD_PADDR_IND_PKT_CAPTURE_MODE_MONITOR_SET macro + * sets the PKT_CAPTURE_MODE flags value to MONITOR, and the + * HTT_RX_IN_ORD_PADDR_IND_PKT_CAPTURE_MODE_IS_MONITOR_SET macro + * checks whether the PKT_CAPTURE_MODE flags value is MONITOR. + */ +#define HTT_RX_IN_ORD_PADDR_IND_PKT_CAPTURE_MODE_MONITOR 0x3 +#define HTT_RX_IN_ORD_PADDR_IND_PKT_CAPTURE_MODE_MONITOR_SET(word) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_PKT_CAPTURE_MODE, HTT_RX_IN_ORD_PADDR_IND_PKT_CAPTURE_MODE_MONITOR); \ + (word) |= (value) << HTT_RX_IN_ORD_PADDR_IND_PKT_CAPTURE_MODE_S; \ + } while (0) +#define HTT_RX_IN_ORD_PADDR_IND_PKT_CAPTURE_MODE_IS_MONITOR_SET(word) \ + ((((word) & HTT_RX_IN_ORD_PADDR_IND_PKT_CAPTURE_MODE_M) >> HTT_RX_IN_ORD_PADDR_IND_PKT_CAPTURE_MODE_S) == \ + HTT_RX_IN_ORD_PADDR_IND_PKT_CAPTURE_MODE_MONITOR) + #define HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT_SET(word, value) \ do { \ HTT_CHECK_SET_VAL(HTT_RX_IN_ORD_PADDR_IND_MSDU_CNT, value); \ @@ -7187,6 +7229,319 @@ PREPACK struct htt_chan_info_t #define HTT_CHAN_INFO_PHY_MODE_GET(word) \ (((word) & HTT_CHAN_INFO_PHY_MODE_M) >> HTT_CHAN_INFO_PHY_MODE_S) +/* + * HTT_T2H_MSG_TYPE_TX_OFFLOAD_DELIVER_IND + * @brief target -> host message definition for FW offloaded pkts + * + * @details + * The following field definitions describe the format of the firmware + * offload deliver message sent from the target to the host. + * + * definition for struct htt_tx_offload_deliver_ind_hdr_t + * + * |31 20|19 16|15 13|12 8|7 5|4|3|2 0| + * |----------------------------+--------+-----+---------------+-----+-+-+----| + * | reserved_1 | msg type | + * |--------------------------------------------------------------------------| + * | phy_timestamp_l32 | + * |--------------------------------------------------------------------------| + * | WORD2 (see below) | + * |--------------------------------------------------------------------------| + * | seqno | framectrl | + * |--------------------------------------------------------------------------| + * | reserved_3 | vdev_id | tid_num| + * |--------------------------------------------------------------------------| + * | reserved_4 | tx_mpdu_bytes |F|STAT| + * |--------------------------------------------------------------------------| + * + * where: + * STAT = status + * F = format (802.3 vs. 802.11) + * + * definition for word 2 + * + * |31 26|25| 24 |23 | 22 |21 19|18 17|16 9|8 6|5 2|1 0| + * |--------+--+----+---+----+-----+-----+---------------------+----+-----+---| + * |reserv_2|BF|LDPC|SGI|STBC| BW | NSS | RSSI |RATE| MCS |PR | + * |--------------------------------------------------------------------------| + * + * where: + * PR = preamble + * BF = beamformed + */ + +PREPACK struct htt_tx_offload_deliver_ind_hdr_t +{ + A_UINT32 /* word 0 */ + msg_type:8, /* [ 7: 0] */ + reserved_1:24; /* [31: 8] */ + A_UINT32 phy_timestamp_l32; /* word 1 [31:0] */ + A_UINT32 /* word 2 */ + /* preamble: + * 0-OFDM, + * 1-CCk, + * 2-HT, + * 3-VHT + */ + preamble: 2, /* [1:0] */ + /* mcs: + * In case of HT preamble interpret + * MCS along with NSS. + * Valid values for HT are 0 to 7. + * HT mcs 0 with NSS 2 is mcs 8. + * Valid values for VHT are 0 to 9. + */ + mcs: 4, /* [5:2] */ + /* rate: + * This is applicable only for + * CCK and OFDM preamble type + * rate 0: OFDM 48 Mbps, + * 1: OFDM 24 Mbps, + * 2: OFDM 12 Mbps + * 3: OFDM 6 Mbps + * 4: OFDM 54 Mbps + * 5: OFDM 36 Mbps + * 6: OFDM 18 Mbps + * 7: OFDM 9 Mbps + * rate 0: CCK 11 Mbps Long + * 1: CCK 5.5 Mbps Long + * 2: CCK 2 Mbps Long + * 3: CCK 1 Mbps Long + * 4: CCK 11 Mbps Short + * 5: CCK 5.5 Mbps Short + * 6: CCK 2 Mbps Short + */ + rate : 3, /* [ 8: 6] */ + rssi : 8, /* [16: 9] units=dBm */ + nss : 2, /* [18:17] if nss 1 means 1ss and 2 means 2ss */ + bw : 3, /* [21:19] (0=>20MHz, 1=>40MHz, 2=>80MHz, 3=>160MHz) */ + stbc : 1, /* [22] */ + sgi : 1, /* [23] */ + ldpc : 1, /* [24] */ + beamformed: 1, /* [25] */ + reserved_2: 6; /* [31:26] */ + A_UINT32 /* word 3 */ + framectrl:16, /* [15: 0] */ + seqno:16; /* [31:16] */ + A_UINT32 /* word 4 */ + tid_num:5, /* [ 4: 0] actual TID number */ + vdev_id:8, /* [12: 5] */ + reserved_3:19; /* [31:13] */ + A_UINT32 /* word 5 */ + /* status: + * 0: tx_ok + * 1: retry + * 2: drop + * 3: filtered + * 4: abort + * 5: tid delete + * 6: sw abort + * 7: dropped by peer migration + */ + status:3, /* [2:0] */ + format:1, /* [3] 0: 802.3 format, 1: 802.11 format */ + tx_mpdu_bytes:16, /* [19:4] */ + reserved_4:12; /* [31:20] */ +} POSTPACK; + +/* FW offload deliver ind message header fields */ + +/* DWORD one */ +#define HTT_FW_OFFLOAD_IND_PHY_TIMESTAMP_L32_M 0xffffffff +#define HTT_FW_OFFLOAD_IND_PHY_TIMESTAMP_L32_S 0 + +/* DWORD two */ +#define HTT_FW_OFFLOAD_IND_PREAMBLE_M 0x00000003 +#define HTT_FW_OFFLOAD_IND_PREAMBLE_S 0 +#define HTT_FW_OFFLOAD_IND_MCS_M 0x0000003c +#define HTT_FW_OFFLOAD_IND_MCS_S 2 +#define HTT_FW_OFFLOAD_IND_RATE_M 0x000001c0 +#define HTT_FW_OFFLOAD_IND_RATE_S 6 +#define HTT_FW_OFFLOAD_IND_RSSI_M 0x0001fe00 +#define HTT_FW_OFFLOAD_IND_RSSI_S 9 +#define HTT_FW_OFFLOAD_IND_NSS_M 0x00060000 +#define HTT_FW_OFFLOAD_IND_NSS_S 17 +#define HTT_FW_OFFLOAD_IND_BW_M 0x00380000 +#define HTT_FW_OFFLOAD_IND_BW_S 19 +#define HTT_FW_OFFLOAD_IND_STBC_M 0x00400000 +#define HTT_FW_OFFLOAD_IND_STBC_S 22 +#define HTT_FW_OFFLOAD_IND_SGI_M 0x00800000 +#define HTT_FW_OFFLOAD_IND_SGI_S 23 +#define HTT_FW_OFFLOAD_IND_LDPC_M 0x01000000 +#define HTT_FW_OFFLOAD_IND_LDPC_S 24 +#define HTT_FW_OFFLOAD_IND_BEAMFORMED_M 0x02000000 +#define HTT_FW_OFFLOAD_IND_BEAMFORMED_S 25 + +/* DWORD three*/ +#define HTT_FW_OFFLOAD_IND_FRAMECTRL_M 0x0000ffff +#define HTT_FW_OFFLOAD_IND_FRAMECTRL_S 0 +#define HTT_FW_OFFLOAD_IND_SEQNO_M 0xffff0000 +#define HTT_FW_OFFLOAD_IND_SEQNO_S 16 + + /* DWORD four */ +#define HTT_FW_OFFLOAD_IND_TID_NUM_M 0x0000001f +#define HTT_FW_OFFLOAD_IND_TID_NUM_S 0 +#define HTT_FW_OFFLOAD_IND_VDEV_ID_M 0x00001fe0 +#define HTT_FW_OFFLOAD_IND_VDEV_ID_S 5 + +/* DWORD five */ +#define HTT_FW_OFFLOAD_IND_STATUS_M 0x00000007 +#define HTT_FW_OFFLOAD_IND_STATUS_S 0 +#define HTT_FW_OFFLOAD_IND_FORMAT_M 0x00000008 +#define HTT_FW_OFFLOAD_IND_FORMAT_S 3 +#define HTT_FW_OFFLOAD_IND_TX_MPDU_BYTES_M 0x000ffff0 +#define HTT_FW_OFFLOAD_IND_TX_MPDU_BYTES_S 4 + +#define HTT_FW_OFFLOAD_IND_PHY_TIMESTAMP_L32_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_PHY_TIMESTAMP_L32, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_PHY_TIMESTAMP_L32_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_PHY_TIMESTAMP_L32_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_PHY_TIMESTAMP_L32_M) >> HTT_FW_OFFLOAD_IND_PHY_TIMESTAMP_L32_S) + +#define HTT_FW_OFFLOAD_IND_PREAMBLE_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_PREAMBLE, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_PREAMBLE_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_PREAMBLE_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_PREAMBLE_M) >> HTT_FW_OFFLOAD_IND_PREAMBLE_S) + +#define HTT_FW_OFFLOAD_IND_MCS_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_MCS, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_MCS_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_MCS_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_MCS_M) >> HTT_FW_OFFLOAD_IND_MCS_S) + +#define HTT_FW_OFFLOAD_IND_RATE_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_RATE, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_RATE_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_RATE_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_RATE_M) >> HTT_FW_OFFLOAD_IND_RATE_S) + +#define HTT_FW_OFFLOAD_IND_RSSI_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_RSSI, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_RSSI_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_RSSI_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_RSSI_M) >> HTT_FW_OFFLOAD_IND_RSSI_S) + + +#define HTT_FW_OFFLOAD_IND_NSS_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_NSS, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_NSS_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_NSS_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_NSS_M) >> HTT_FW_OFFLOAD_IND_NSS_S) + +#define HTT_FW_OFFLOAD_IND_BW_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_BW, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_BW_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_BW_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_BW_M) >> HTT_FW_OFFLOAD_IND_BW_S) + + +#define HTT_FW_OFFLOAD_IND_STBC_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_STBC, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_STBC_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_STBC_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_STBC_M) >> HTT_FW_OFFLOAD_IND_STBC_S) + + +#define HTT_FW_OFFLOAD_IND_SGI_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_SGI, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_SGI_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_SGI_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_SGI_M) >> HTT_FW_OFFLOAD_IND_SGI_S) + +#define HTT_FW_OFFLOAD_IND_LDPC_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_LDPC, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_LDPC_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_LDPC_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_LDPC_M) >> HTT_FW_OFFLOAD_IND_LDPC_S) + +#define HTT_FW_OFFLOAD_IND_BEAMFORMED_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_BEAMFORMED, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_BEAMFORMED_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_BEAMFORMED_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_BEAMFORMED_M) >> HTT_FW_OFFLOAD_IND_BEAMFORMED_S) + +#define HTT_FW_OFFLOAD_IND_FRAMECTRL_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_FRAMECTRL, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_FRAMECTRL_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_FRAMECTRL_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_FRAMECTRL_M) >> HTT_FW_OFFLOAD_IND_FRAMECTRL_S) + + +#define HTT_FW_OFFLOAD_IND_SEQNO_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_SEQNO, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_SEQNO_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_SEQNO_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_SEQNO_M) >> HTT_FW_OFFLOAD_IND_SEQNO_S) + +#define HTT_FW_OFFLOAD_IND_TID_NUM_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_TID_NUM, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_TID_NUM_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_TID_NUM_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_TID_NUM_M) >> HTT_FW_OFFLOAD_IND_TID_NUM_S) + +#define HTT_FW_OFFLOAD_IND_VDEV_ID_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_VDEV_ID, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_VDEV_ID_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_VDEV_ID_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_VDEV_ID_M) >> HTT_FW_OFFLOAD_IND_VDEV_ID_S) + +#define HTT_FW_OFFLOAD_IND_STATUS_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_STATUS, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_STATUS_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_STATUS_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_STATUS_M) >> HTT_FW_OFFLOAD_IND_STATUS_M) + + +#define HTT_FW_OFFLOAD_IND_FORMAT_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_FORMAT, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_FORMAT_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_FORMAT_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_FORMAT_M) >> HTT_FW_OFFLOAD_IND_FORMAT_S) + + +#define HTT_FW_OFFLOAD_IND_TX_MPDU_BYTES_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_OFFLOAD_IND_TX_MPDU_BYTES, value); \ + (word) |= (value) << HTT_FW_OFFLOAD_IND_TX_MPDU_BYTES_S; \ + } while (0) +#define HTT_FW_OFFLOAD_IND_TX_MPDU_BYTES_GET(word) \ + (((word) & HTT_FW_OFFLOAD_IND_TX_MPDU_BYTES_M) >> HTT_FW_OFFLOAD_IND_TX_MPDU_BYTES_S) + /* * @brief target -> host rx reorder flush message definition @@ -8305,36 +8660,43 @@ PREPACK struct htt_txq_group { * The following diagram shows the format of the TX completion indication sent * from the target to the host * - * |31 29|28|27|26|25|24|23 16| 15 |14 11|10 8|7 0| - * |----------------------------------------------------------------| - * header: |rsvd |A3|A2|TP|A1|A0| num | t_i| tid |status| msg_type | - * |----------------------------------------------------------------| - * payload: | MSDU1 ID | MSDU0 ID | - * |----------------------------------------------------------------| - * : MSDU3 ID | MSDU2 ID : - * |----------------------------------------------------------------| - * | struct htt_tx_compl_ind_append_retries | - * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | - * | struct htt_tx_compl_ind_append_tx_tstamp | - * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | - * | MSDU1 ACK RSSI | MSDU0 ACK RSSI | - * |----------------------------------------------------------------| - * : MSDU3 ACK RSSI | MSDU2 ACK RSSI : - * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | - * | MSDU0 tx_tsf64_low | - * |----------------------------------------------------------------| - * | MSDU0 tx_tsf64_high | - * |----------------------------------------------------------------| - * | MSDU1 tx_tsf64_low | - * |----------------------------------------------------------------| - * | MSDU1 tx_tsf64_high | - * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | + * |31 30|29|28|27|26|25|24|23 16| 15 |14 11|10 8|7 0| + * |-------------------------------------------------------------------| + * header: |rsvd |A4|A3|A2|TP|A1|A0| num | t_i| tid |status| msg_type | + * |-------------------------------------------------------------------| + * payload:| MSDU1 ID | MSDU0 ID | + * |-------------------------------------------------------------------| + * : MSDU3 ID | MSDU2 ID : + * |-------------------------------------------------------------------| + * | struct htt_tx_compl_ind_append_retries | + * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| + * | struct htt_tx_compl_ind_append_tx_tstamp | + * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| + * | MSDU1 ACK RSSI | MSDU0 ACK RSSI | + * |-------------------------------------------------------------------| + * : MSDU3 ACK RSSI | MSDU2 ACK RSSI : + * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| + * | MSDU0 tx_tsf64_low | + * |-------------------------------------------------------------------| + * | MSDU0 tx_tsf64_high | + * |-------------------------------------------------------------------| + * | MSDU1 tx_tsf64_low | + * |-------------------------------------------------------------------| + * | MSDU1 tx_tsf64_high | + * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| + * | phy_timestamp | + * |-------------------------------------------------------------------| + * | rate specs (see below) | + * |-------------------------------------------------------------------| + * | seqctrl | framectrl | + * |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| * Where: * A0 = append (a.k.a. append0) * A1 = append1 * TP = MSDU tx power presence * A2 = append2 * A3 = append3 + * A4 = append4 * * The following field definitions describe the format of the TX completion * indication sent from the target to the host @@ -8413,6 +8775,16 @@ PREPACK struct htt_txq_group { * The tx_tsf64 here represents the time MSDU was acked and the * tx_tsf64 has microseconds units. * Value: 0 indicates no appending; 1 indicates appending + * - append4 + * Bits 29:29 + * Purpose: Indicate whether data frame control fields and fields required + * for radio tap header are appended for each MSDU in TX_COMP_IND + * message. The order of the this message matches the order of + * the MSDU IDs. + * Value: 0 indicates frame control fields and fields required for + * radio tap header values are not appended, + * 1 indicates frame control fields and fields required for + * radio tap header values are appended. * Payload fields: * - hmsdu_id * Bits 15:0 @@ -8420,6 +8792,58 @@ PREPACK struct htt_txq_group { * Value: 0 to "size of host MSDU descriptor pool - 1" */ +PREPACK struct htt_tx_data_hdr_information { + A_UINT32 phy_timestamp_l32; /* word 0 [31:0] */ + A_UINT32 /* word 1 */ + /* preamble: + * 0-OFDM, + * 1-CCk, + * 2-HT, + * 3-VHT + */ + preamble: 2, /* [1:0] */ + /* mcs: + * In case of HT preamble interpret + * MCS along with NSS. + * Valid values for HT are 0 to 7. + * HT mcs 0 with NSS 2 is mcs 8. + * Valid values for VHT are 0 to 9. + */ + mcs: 4, /* [5:2] */ + /* rate: + * This is applicable only for + * CCK and OFDM preamble type + * rate 0: OFDM 48 Mbps, + * 1: OFDM 24 Mbps, + * 2: OFDM 12 Mbps + * 3: OFDM 6 Mbps + * 4: OFDM 54 Mbps + * 5: OFDM 36 Mbps + * 6: OFDM 18 Mbps + * 7: OFDM 9 Mbps + * rate 0: CCK 11 Mbps Long + * 1: CCK 5.5 Mbps Long + * 2: CCK 2 Mbps Long + * 3: CCK 1 Mbps Long + * 4: CCK 11 Mbps Short + * 5: CCK 5.5 Mbps Short + * 6: CCK 2 Mbps Short + */ + rate : 3, /* [ 8: 6] */ + rssi : 8, /* [16: 9] units=dBm */ + nss : 2, /* [18:17] if nss 1 means 1ss and 2 means 2ss */ + bw : 3, /* [21:19] (0=>20MHz, 1=>40MHz, 2=>80MHz, 3=>160MHz) */ + stbc : 1, /* [22] */ + sgi : 1, /* [23] */ + ldpc : 1, /* [24] */ + beamformed: 1, /* [25] */ + reserved_1: 6; /* [31:26] */ + A_UINT32 /* word 2 */ + framectrl:16, /* [15: 0] */ + seqno:16; /* [31:16] */ +} POSTPACK; + + #define HTT_TX_COMPL_IND_STATUS_S 8 #define HTT_TX_COMPL_IND_STATUS_M 0x00000700 #define HTT_TX_COMPL_IND_TID_S 11 @@ -8438,6 +8862,8 @@ PREPACK struct htt_txq_group { #define HTT_TX_COMPL_IND_APPEND2_M 0x08000000 #define HTT_TX_COMPL_IND_APPEND3_S 28 #define HTT_TX_COMPL_IND_APPEND3_M 0x10000000 +#define HTT_TX_COMPL_IND_APPEND4_S 29 +#define HTT_TX_COMPL_IND_APPEND4_M 0x20000000 #define HTT_TX_COMPL_IND_STATUS_SET(_info, _val) \ do { \ @@ -8503,6 +8929,13 @@ PREPACK struct htt_txq_group { } while (0) #define HTT_TX_COMPL_IND_APPEND3_GET(_info) \ (((_info) & HTT_TX_COMPL_IND_APPEND3_M) >> HTT_TX_COMPL_IND_APPEND3_S) +#define HTT_TX_COMPL_IND_APPEND4_SET(_info, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_TX_COMPL_IND_APPEND4, _val); \ + ((_info) |= ((_val) << HTT_TX_COMPL_IND_APPEND4_S)); \ + } while (0) +#define HTT_TX_COMPL_IND_APPEND4_GET(_info) \ + (((_info) & HTT_TX_COMPL_IND_APPEND4_M) >> HTT_TX_COMPL_IND_APPEND4_S) #define HTT_TX_COMPL_INV_TX_POWER 0xffff @@ -8567,6 +9000,150 @@ PREPACK struct htt_tx_compl_ind_append_tx_tsf64 { A_UINT32 tx_tsf64_high; } POSTPACK; +/* htt_tx_data_hdr_information payload extension fields: */ + +/* DWORD zero */ +#define HTT_FW_TX_DATA_HDR_PHY_TIMESTAMP_L32_M 0xffffffff +#define HTT_FW_TX_DATA_HDR_PHY_TIMESTAMP_L32_S 0 + +/* DWORD one */ +#define HTT_FW_TX_DATA_HDR_PREAMBLE_M 0x00000003 +#define HTT_FW_TX_DATA_HDR_PREAMBLE_S 0 +#define HTT_FW_TX_DATA_HDR_MCS_M 0x0000003c +#define HTT_FW_TX_DATA_HDR_MCS_S 2 +#define HTT_FW_TX_DATA_HDR_RATE_M 0x000001c0 +#define HTT_FW_TX_DATA_HDR_RATE_S 6 +#define HTT_FW_TX_DATA_HDR_RSSI_M 0x0001fe00 +#define HTT_FW_TX_DATA_HDR_RSSI_S 9 +#define HTT_FW_TX_DATA_HDR_NSS_M 0x00060000 +#define HTT_FW_TX_DATA_HDR_NSS_S 17 +#define HTT_FW_TX_DATA_HDR_BW_M 0x00380000 +#define HTT_FW_TX_DATA_HDR_BW_S 19 +#define HTT_FW_TX_DATA_HDR_STBC_M 0x00400000 +#define HTT_FW_TX_DATA_HDR_STBC_S 22 +#define HTT_FW_TX_DATA_HDR_SGI_M 0x00800000 +#define HTT_FW_TX_DATA_HDR_SGI_S 23 +#define HTT_FW_TX_DATA_HDR_LDPC_M 0x01000000 +#define HTT_FW_TX_DATA_HDR_LDPC_S 24 +#define HTT_FW_TX_DATA_HDR_BEAMFORMED_M 0x02000000 +#define HTT_FW_TX_DATA_HDR_BEAMFORMED_S 25 + +/* DWORD two */ +#define HTT_FW_TX_DATA_HDR_FRAMECTRL_M 0x0000ffff +#define HTT_FW_TX_DATA_HDR_FRAMECTRL_S 0 +#define HTT_FW_TX_DATA_HDR_SEQNO_M 0xffff0000 +#define HTT_FW_TX_DATA_HDR_SEQNO_S 16 + + +#define HTT_FW_TX_DATA_HDR_PHY_TIMESTAMP_L32_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_TX_DATA_HDR_PHY_TIMESTAMP_L32, value); \ + (word) |= (value) << HTT_FW_TX_DATA_HDR_PHY_TIMESTAMP_L32_S; \ + } while (0) +#define HTT_FW_TX_DATA_HDR_PHY_TIMESTAMP_L32_GET(word) \ + (((word) & HTT_FW_TX_DATA_HDR_PHY_TIMESTAMP_L32_M) >> HTT_FW_TX_DATA_HDR_PHY_TIMESTAMP_L32_S) + +#define HTT_FW_TX_DATA_HDR_PREAMBLE_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_TX_DATA_HDR_PREAMBLE, value); \ + (word) |= (value) << HTT_FW_TX_DATA_HDR_PREAMBLE_S; \ + } while (0) +#define HTT_FW_TX_DATA_HDR_PREAMBLE_GET(word) \ + (((word) & HTT_FW_TX_DATA_HDR_PREAMBLE_M) >> HTT_FW_TX_DATA_HDR_PREAMBLE_S) + +#define HTT_FW_TX_DATA_HDR_MCS_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_TX_DATA_HDR_MCS, value); \ + (word) |= (value) << HTT_FW_TX_DATA_HDR_MCS_S; \ + } while (0) +#define HTT_FW_TX_DATA_HDR_MCS_GET(word) \ + (((word) & HTT_FW_TX_DATA_HDR_MCS_M) >> HTT_FW_TX_DATA_HDR_MCS_S) + +#define HTT_FW_TX_DATA_HDR_RATE_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_TX_DATA_HDR_RATE, value); \ + (word) |= (value) << HTT_FW_TX_DATA_HDR_RATE_S; \ + } while (0) +#define HTT_FW_TX_DATA_HDR_RATE_GET(word) \ + (((word) & HTT_FW_TX_DATA_HDR_RATE_M) >> HTT_FW_TX_DATA_HDR_RATE_S) + +#define HTT_FW_TX_DATA_HDR_RSSI_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_TX_DATA_HDR_RSSI, value); \ + (word) |= (value) << HTT_FW_TX_DATA_HDR_RSSI_S; \ + } while (0) +#define HTT_FW_TX_DATA_HDR_RSSI_GET(word) \ + (((word) & HTT_FW_TX_DATA_HDR_RSSI_M) >> HTT_FW_TX_DATA_HDR_RSSI_S) + + +#define HTT_FW_TX_DATA_HDR_NSS_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_TX_DATA_HDR_NSS, value); \ + (word) |= (value) << HTT_FW_TX_DATA_HDR_NSS_S; \ + } while (0) +#define HTT_FW_TX_DATA_HDR_NSS_GET(word) \ + (((word) & HTT_FW_TX_DATA_HDR_NSS_M) >> HTT_FW_TX_DATA_HDR_NSS_S) + +#define HTT_FW_TX_DATA_HDR_BW_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_TX_DATA_HDR_BW, value); \ + (word) |= (value) << HTT_FW_TX_DATA_HDR_BW_S; \ + } while (0) +#define HTT_FW_TX_DATA_HDR_BW_GET(word) \ + (((word) & HTT_FW_TX_DATA_HDR_BW_M) >> HTT_FW_TX_DATA_HDR_BW_S) + + +#define HTT_FW_TX_DATA_HDR_STBC_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_TX_DATA_HDR_STBC, value); \ + (word) |= (value) << HTT_FW_TX_DATA_HDR_STBC_S; \ + } while (0) +#define HTT_FW_TX_DATA_HDR_STBC_GET(word) \ + (((word) & HTT_FW_TX_DATA_HDR_STBC_M) >> HTT_FW_TX_DATA_HDR_STBC_S) + + +#define HTT_FW_TX_DATA_HDR_SGI_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_TX_DATA_HDR_SGI, value); \ + (word) |= (value) << HTT_FW_TX_DATA_HDR_SGI_S; \ + } while (0) +#define HTT_FW_TX_DATA_HDR_SGI_GET(word) \ + (((word) & HTT_FW_TX_DATA_HDR_SGI_M) >> HTT_FW_TX_DATA_HDR_SGI_S) + +#define HTT_FW_TX_DATA_HDR_LDPC_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_TX_DATA_HDR_LDPC, value); \ + (word) |= (value) << HTT_FW_TX_DATA_HDR_LDPC_S; \ + } while (0) +#define HTT_FW_TX_DATA_HDR_LDPC_GET(word) \ + (((word) & HTT_FW_TX_DATA_HDR_LDPC_M) >> HTT_FW_TX_DATA_HDR_LDPC_S) + +#define HTT_FW_TX_DATA_HDR_BEAMFORMED_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_TX_DATA_HDR_BEAMFORMED, value); \ + (word) |= (value) << HTT_FW_TX_DATA_HDR_BEAMFORMED_S; \ + } while (0) +#define HTT_FW_TX_DATA_HDR_BEAMFORMED_GET(word) \ + (((word) & HTT_FW_TX_DATA_HDR_BEAMFORMED_M) >> HTT_FW_TX_DATA_HDR_BEAMFORMED_S) + +#define HTT_FW_TX_DATA_HDR_FRAMECTRL_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_TX_DATA_HDR_FRAMECTRL, value); \ + (word) |= (value) << HTT_FW_TX_DATA_HDR_FRAMECTRL_S; \ + } while (0) +#define HTT_FW_TX_DATA_HDR_FRAMECTRL_GET(word) \ + (((word) & HTT_FW_TX_DATA_HDR_FRAMECTRL_M) >> HTT_FW_TX_DATA_HDR_FRAMECTRL_S) + + +#define HTT_FW_TX_DATA_HDR_SEQNO_SET(word, value) \ + do { \ + HTT_CHECK_SET_VAL(HTT_FW_TX_DATA_HDR_SEQNO, value); \ + (word) |= (value) << HTT_FW_TX_DATA_HDR_SEQNO_S; \ + } while (0) +#define HTT_FW_TX_DATA_HDR_SEQNO_GET(word) \ + (((word) & HTT_FW_TX_DATA_HDR_SEQNO_M) >> HTT_FW_TX_DATA_HDR_SEQNO_S) + + /** * @brief target -> host rate-control update indication message * diff --git a/fw/wmi_services.h b/fw/wmi_services.h index 20cee6aaf0d2..4ea1de4d45b6 100755 --- a/fw/wmi_services.h +++ b/fw/wmi_services.h @@ -394,6 +394,7 @@ typedef enum { WMI_SERVICE_FW_IFACE_COMBINATION_SUPPORT = 209, /* FW sends WMI_IFACE_COMBINATION_IND_EVENT msg immediately after WMI_SERVICE_READY_EXT_EVENT msg */ 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) */ /******* ADD NEW SERVICES HERE *******/ diff --git a/fw/wmi_tlv_defs.h b/fw/wmi_tlv_defs.h index bbb23a98d771..c2ede2040022 100755 --- a/fw/wmi_tlv_defs.h +++ b/fw/wmi_tlv_defs.h @@ -983,6 +983,7 @@ typedef enum { WMITLV_TAG_STRUC_wmi_wlanfw_iface_limit_param, WMITLV_TAG_STRUC_wmi_roam_dsm_filter_fixed_param, WMITLV_TAG_STRUC_wmi_roam_bssid_disallow_list_config_param, + WMITLV_TAG_STRUC_wmi_mgmt_hdr, } WMITLV_TAG_ID; /* @@ -1608,6 +1609,7 @@ typedef enum { OP(WMI_PDEV_COLD_BOOT_CAL_DATA_EVENTID) \ OP(WMI_PDEV_RAP_INFO_EVENTID) \ OP(WMI_IFACE_COMBINATION_IND_EVENTID) \ + OP(WMI_VDEV_MGMT_OFFLOAD_EVENTID) \ /* add new EVT_LIST elements above this line */ @@ -4139,7 +4141,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_TX_PAUSE_EVENTID); /* Mgmt TX completion event */ #define WMITLV_TABLE_WMI_MGMT_TX_COMPLETION_EVENTID(id,op,buf,len) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_mgmt_tx_compl_event_fixed_param, wmi_mgmt_tx_compl_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_mgmt_tx_compl_event_fixed_param, wmi_mgmt_tx_compl_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_mgmt_hdr, mgmt_hdr, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_MGMT_TX_COMPLETION_EVENTID); /* offchan data TX completion event */ @@ -4153,7 +4156,8 @@ WMITLV_CREATE_PARAM_STRUC(WMI_OFFCHAN_DATA_TX_COMPLETION_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, desc_ids, WMITLV_SIZE_VAR) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, status, WMITLV_SIZE_VAR) \ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, ppdu_id, WMITLV_SIZE_VAR) \ - WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, ack_rssi, WMITLV_SIZE_VAR) + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, ack_rssi, WMITLV_SIZE_VAR) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_mgmt_hdr, mgmt_hdr, WMITLV_SIZE_VAR) WMITLV_CREATE_PARAM_STRUC(WMI_MGMT_TX_BUNDLE_COMPLETION_EVENTID); /* VDEV Start response Event */ @@ -5368,6 +5372,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_COLD_BOOT_CAL_DATA_EVENTID); WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_pdev_rap_info_event_fixed_param, wmi_pdev_rap_info_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) WMITLV_CREATE_PARAM_STRUC(WMI_PDEV_RAP_INFO_EVENTID); +/* Offload TX mgmt frames */ +#define WMITLV_TABLE_WMI_VDEV_MGMT_OFFLOAD_EVENTID(id,op,buf,len) \ + WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_mgmt_hdr, wmi_mgmt_hdr, fixed_param, WMITLV_SIZE_FIX) \ + 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); + #ifdef __cplusplus } #endif diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index eef3fc157607..20e902ff0b83 100755 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -1378,6 +1378,9 @@ typedef enum { /* provide LTE-Coex antenna sharing info */ WMI_VDEV_GET_MWS_COEX_ANTENNA_SHARING_STATE_EVENTID, + /* Event to handle FW offloaded mgmt packets */ + WMI_VDEV_MGMT_OFFLOAD_EVENTID, + /* peer specific events */ /** FW reauet to kick out the station for reasons like inactivity,lack of response ..etc */ @@ -3041,6 +3044,12 @@ typedef struct { #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_S 26 #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_M 0x4000000 + /* + * If this BIT is set, then the target should support Packet capture(SMART MU FR) + */ + #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_S 27 + #define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_M 0x8000000 + A_UINT32 flag1; /** @brief smart_ant_cap - Smart Antenna capabilities information @@ -3314,6 +3323,11 @@ typedef struct { #define WMI_RSRC_CFG_FLAG_TX_COMPLETION_TX_TSF64_ENABLE_GET(word32) \ WMI_RSRC_CFG_FLAG_GET((word32), TX_COMPLETION_TX_TSF64_ENABLE) +#define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_SET(word32, value) \ + WMI_RSRC_CFG_FLAG_SET((word32), PACKET_CAPTURE_SUPPORT, (value)) +#define WMI_RSRC_CFG_FLAG_PACKET_CAPTURE_SUPPORT_GET(word32) \ + WMI_RSRC_CFG_FLAG_GET((word32), PACKET_CAPTURE_SUPPORT) + typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_init_cmd_fixed_param */ @@ -4038,7 +4052,7 @@ typedef struct { /** length of the frame */ A_UINT32 buf_len; /** rx status */ - A_UINT32 status; + A_UINT32 status; /* capture mode indication */ /** RSSI of PRI 20MHz for each chain. */ A_UINT32 rssi_ctl[ATH_MAX_ANTENNA]; /** information about the management frame e.g. can give a scan source for a scan result mgmt frame */ @@ -4078,6 +4092,83 @@ typedef struct { */ } wmi_mgmt_rx_hdr; +typedef enum { + PKT_CAPTURE_MODE_DISABLE = 0, + PKT_CAPTURE_MODE_MGMT_ONLY, + PKT_CAPTURE_MODE_DATA_ONLY, + PKT_CAPTURE_MODE_DATA_MGMT, +} WMI_PKT_CAPTURE_MODE_CONFIG; + +/* This information sending to host during offloaded MGMT local TX and host TX */ +typedef struct { + A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_mgmt_hdr */ + /* channel frequency in MHz */ + A_UINT32 chan_freq; + /** snr information used to cal rssi in dB */ + A_UINT32 snr; + /** Rate kbps */ + A_UINT32 rate_kbps; + /** phy mode WLAN_PHY_MODE */ + A_UINT32 phy_mode; + /** length of the frame in bytes */ + A_UINT32 buf_len; + /** status: + * 0x00: CRC ERR + * 0x08: DECRYPT ERR + * 0x10: MIC ERR + * 0x20: KEY CACHE MISS + */ + A_UINT32 status; + /** flags: + * Information about the management frame e.g. can give a scan source + * for a scan result mgmt frame + * Refer to WMI_MGMT_RX_HDR_ definitions. + * ex: WMI_MGMT_RX_HDR_EXTSCAN,WMI_MGMT_RX_HDR_ENLO + */ + A_UINT32 flags; + /** combined RSSI, i.e. the sum of the snr + noise floor (dBm units) */ + A_INT32 rssi; + /** delta between local TSF (TSF timestamp when frame was RXd) + * and remote TSF (TSF timestamp in the IE for mgmt frame - + * beacon, proberesp for example). If remote TSF is not available, + * delta is set to 0. + * Although tsf_delta is stored as A_UINT32, it can be negative, + * and thus would need to be sign-extended if added to a value + * larger than 32 bits. + */ + A_UINT32 tsf_delta; + + /* The lower 32 bits of the TSF (tsf_l32) is copied by FW from + * TSF timestamp in the TX MAC descriptor provided by HW. + */ + A_UINT32 tsf_l32; + + /* The upper 32 bits of the TSF (tsf_u32) is copied by FW from + * TSF timestamp in the TX MAC descriptor provided by HW. + */ + A_UINT32 tsf_u32; + + /** pdev_id for identifying the MAC the tx mgmt frame transmitted. + * See macros starting with WMI_PDEV_ID_ for values. + */ + A_UINT32 pdev_id; + + A_UINT32 direction; /* tx:0,rx:1*/ + + /** tx_status: + * 0: xmit ok + * 1: excessive retries + * 2: blocked by tx filtering + * 4: fifo underrun + * 8: swabort + */ + A_UINT32 tx_status; + +/* This TLV may be followed by array of bytes: + * A_UINT8 bufp[]; <-- management frame buffer + */ +} wmi_mgmt_hdr; + /* * Instead of universally increasing the RX_HDR_HEADROOM size which may cause problems for older targets, * this new ext_hdr can be used for extending the header and will be only applicable for new targets. @@ -9696,6 +9787,13 @@ typedef enum { */ WMI_VDEV_PARAM_NTH_BEACON_TO_HOST, /* 0x92 */ + /** + * To capture the MGMT OR DATA OR BOTH packets. + * Refer to enum WMI_PKT_CAPTURE_MODE_CONFIG for specifications of + * which parameter value enables which kind of packet captures. + */ + WMI_VDEV_PARAM_PACKET_CAPTURE_MODE, /* 0x93 */ + /*=== ADD NEW VDEV PARAM TYPES ABOVE THIS LINE === * The below vdev param types are used for prototyping, and are @@ -13339,6 +13437,7 @@ typedef enum wake_reason_e { WOW_REASON_WLAN_MD, /* motion detected */ WOW_REASON_WLAN_BL, /* baselining done */ WOW_REASON_NTH_BCN_OFLD, /* nth beacon forward to host */ + WOW_REASON_PKT_CAPTURE_MODE_WAKE, /* add new WOW_REASON_ defs before this line */ WOW_REASON_MAX, @@ -13796,6 +13895,7 @@ typedef struct { #define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */ #define WMI_RXERR_MIC 0x10 /* Michael MIC decrypt error */ #define WMI_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */ +#define WMI_RX_OFFLOAD_MON_MODE 0x40 /* Offload dropped mgmt pkt's for only in capture mode*/ typedef enum { PKT_PWR_SAVE_PAID_MATCH = 0x00000001, diff --git a/fw/wmi_version.h b/fw/wmi_version.h index a96cda980607..c001120a7b89 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_ 662 +#define __WMI_REVISION_ 663 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work -- cgit v1.2.3 From 76d7723c81a071c56ec40973807e1b8f561b7bcc Mon Sep 17 00:00:00 2001 From: spuligil Date: Wed, 8 May 2019 12:01:40 -0700 Subject: fw-api: CL 7097994 - update fw common interface files Change-Id: Idab12c52ec630538770750b6f1fa03a7943f108d HTT: add cfg specs for handling backpressure in rx rings CRs-Fixed: 2262693 --- fw/htt.h | 51 +++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/fw/htt.h b/fw/htt.h index e7833c6393cc..6a2884deeb71 100644 --- a/fw/htt.h +++ b/fw/htt.h @@ -185,9 +185,10 @@ * for a MSDU. * 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. */ #define HTT_CURRENT_VERSION_MAJOR 3 -#define HTT_CURRENT_VERSION_MINOR 66 +#define HTT_CURRENT_VERSION_MINOR 67 #define HTT_NUM_TX_FRAG_DESC 1024 @@ -4793,9 +4794,9 @@ enum htt_srng_ring_id { * * The message would appear as follows: * - * |31 27|26|25|24|23 16|15 8|7 0| - * |-----------------+----------------+----------------+---------------| - * | rsvd1 |OV|PS|SS| ring_id | pdev_id | msg_type | + * |31 28|27|26|25|24|23 16|15 |9 8|7 0| + * |-----+--+--+--+--+----------------+------------+---+---------------| + * |rsvd1|DT|OV|PS|SS| ring_id | pdev_id | msg_type | * |-------------------------------------------------------------------| * | rsvd2 | ring_buffer_size | * |-------------------------------------------------------------------| @@ -4817,10 +4818,13 @@ enum htt_srng_ring_id { * |-------------------------------------------------------------------| * | rsvd3 | rx_attention_offset | * |-------------------------------------------------------------------| + * | rsvd4 | rx_drop_threshold | + * |-------------------------------------------------------------------| * Where: * PS = pkt_swap * SS = status_swap * OV = rx_offsets_valid + * DT = drop_thresh_valid * The message is interpreted as follows: * dword0 - b'0:7 - msg_type: This will be set to * HTT_H2T_MSG_TYPE_RX_RING_SELECTION_CFG @@ -4837,7 +4841,9 @@ enum htt_srng_ring_id { * e.g. wmac_top_reg_seq_hwioreg.h * b'26 - rx_offset_valid (OV): flag to indicate rx offsets * configuration fields are valid - * b'27:31 - rsvd1: reserved for future use + * b'27 - drop_thresh_valid (DT): flag to indicate if the + * rx_drop_threshold field is valid + * b'28:31 - rsvd1: reserved for future use * dword1 - b'0:16 - ring_buffer_size: size of bufferes referenced by rx ring, * in byte units. * Valid only for HW_TO_SW_RING and SW_TO_HW_RING @@ -4896,12 +4902,16 @@ enum htt_srng_ring_id { * A value of 0 will be considered as ignore this config. * Refer to BUF_RING_CFG_3 defs within HW .h files, * e.g. wmac_top_reg_seq_hwioreg.h - * dword10 - b'0:15 - rx_attention_offset: rx_attention_offset in byte units + * dword10- b'0:15 - rx_attention_offset: rx_attention_offset in byte units * Valid only for HW_TO_SW_RING and SW_TO_HW_RING * A value of 0 will be considered as ignore this config. * Refer to BUF_RING_CFG_4 defs within HW .h files, * e.g. wmac_top_reg_seq_hwioreg.h - * - b'16-31 - rsvd3 for future use + * - b'16:31 - rsvd3 for future use + * dword11- b'9:0 - rx_drop_threshold: Threshold configured in monitor mode + * to source rings. Consumer drops packets if the available + * words in the ring falls below the configured threshold + * value. */ PREPACK struct htt_rx_ring_selection_cfg_t { A_UINT32 msg_type: 8, @@ -4910,7 +4920,8 @@ PREPACK struct htt_rx_ring_selection_cfg_t { status_swap: 1, pkt_swap: 1, rx_offsets_valid: 1, - rsvd1: 5; + drop_thresh_valid: 1, + rsvd1: 4; A_UINT32 ring_buffer_size: 16, rsvd2: 16; A_UINT32 packet_type_enable_flags_0; @@ -4926,6 +4937,8 @@ PREPACK struct htt_rx_ring_selection_cfg_t { rx_msdu_start_offset: 16; A_UINT32 rx_attn_offset: 16, rsvd3: 16; + A_UINT32 rx_drop_threshold: 10, + rsvd4: 22; } POSTPACK; #define HTT_RX_RING_SELECTION_CFG_SZ (sizeof(struct htt_rx_ring_selection_cfg_t)) @@ -4985,6 +4998,17 @@ PREPACK struct htt_rx_ring_selection_cfg_t { ((_var) |= ((_val) << HTT_RX_RING_SELECTION_CFG_RX_OFFSETS_VALID_S)); \ } while (0) +#define HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID_M 0x08000000 +#define HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID_S 27 +#define HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID_GET(_var) \ + (((_var) & HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID_M) >> \ + HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID_S) +#define HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID, _val); \ + ((_var) |= ((_val) << HTT_RX_RING_SELECTION_CFG_DROP_THRESHOLD_VALID_S)); \ + } while (0) + #define HTT_RX_RING_SELECTION_CFG_RING_BUFFER_SIZE_M 0x0000ffff #define HTT_RX_RING_SELECTION_CFG_RING_BUFFER_SIZE_S 0 #define HTT_RX_RING_SELECTION_CFG_RING_BUFFER_SIZE_GET(_var) \ @@ -5128,6 +5152,17 @@ PREPACK struct htt_rx_ring_selection_cfg_t { ((_var) |= ((_val) << HTT_RX_RING_SELECTION_CFG_RX_ATTENTION_OFFSET_S)); \ } while (0) +#define HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD_M 0x000003ff +#define HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD_S 0 +#define HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD_GET(_var) \ + (((_var) & HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD_M) >> \ + HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD_S) +#define HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD_SET(_var, _val) \ + do { \ + HTT_CHECK_SET_VAL(HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD, _val); \ + ((_var) |= ((_val) << HTT_RX_RING_SELECTION_CFG_RX_DROP_THRESHOLD_S)); \ + } while (0) + /* * Subtype based MGMT frames enable bits. * FP: Filter_Pass, MD: Monitor_Direct MO: Monitor_Other -- cgit v1.2.3 From e11a4fa7776c5552cb2fd48e080a8eccbdcd57de Mon Sep 17 00:00:00 2001 From: spuligil Date: Mon, 13 May 2019 08:10:21 -0700 Subject: fw-api: CL 7122573 - update fw common interface files HTT stats: latency profiling Change-Id: Iaeab8d51d653020e75879cf2492fe85d33afee6e CRs-Fixed: 2262693 --- fw/htt.h | 2 +- fw/htt_stats.h | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) diff --git a/fw/htt.h b/fw/htt.h index 6a2884deeb71..3e7bcd4300d1 100644 --- a/fw/htt.h +++ b/fw/htt.h @@ -4911,7 +4911,7 @@ enum htt_srng_ring_id { * dword11- b'9:0 - rx_drop_threshold: Threshold configured in monitor mode * to source rings. Consumer drops packets if the available * words in the ring falls below the configured threshold - * value. + * value. */ PREPACK struct htt_rx_ring_selection_cfg_t { A_UINT32 msg_type: 8, diff --git a/fw/htt_stats.h b/fw/htt_stats.h index 924434b40344..c764ee5c8725 100644 --- a/fw/htt_stats.h +++ b/fw/htt_stats.h @@ -276,6 +276,15 @@ enum htt_dbg_ext_stats_type { */ HTT_DBG_EXT_STATS_RING_BACKPRESSURE_STATS = 24, + /* HTT_DBG_EXT_STATS_LATENCY_PROF_STATS + * PARAMS: + * + * RESP MSG: + * - htt_soc_latency_prof_t + */ + HTT_DBG_EXT_STATS_LATENCY_PROF_STATS = 25, + + /* keep this last */ HTT_DBG_NUM_EXT_STATS = 256, }; @@ -372,6 +381,9 @@ typedef enum { HTT_STATS_PDEV_OBSS_PD_TAG = 88, /* htt_pdev_obss_pd_stats_tlv */ HTT_STATS_HW_WAR_TAG = 89, /* htt_hw_war_stats_tlv */ HTT_STATS_RING_BACKPRESSURE_STATS_TAG = 90, /* htt_ring_backpressure_stats_tlv */ + 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_MAX_TAG, } htt_tlv_tag_t; @@ -3835,4 +3847,68 @@ typedef struct { } r[1]; /* variable-length array */ } htt_ring_backpressure_stats_t; +#define HTT_LATENCY_PROFILE_MAX_HIST 3 +#define HTT_STATS_MAX_PROF_STATS_NAME_LEN 32 +typedef struct { + htt_tlv_hdr_t tlv_hdr; + /* print_header: + * This field suggests whether the host should print a header when + * displaying the TLV (because this is the first latency_prof_stats + * TLV within a series), or if only the TLV contents should be displayed + * without a header (because this is not the first TLV within the series). + */ + A_UINT32 print_header; + A_UINT8 latency_prof_name[HTT_STATS_MAX_PROF_STATS_NAME_LEN]; + A_UINT32 cnt; /* number of data values included in the tot sum */ + A_UINT32 min; /* time in us */ + A_UINT32 max; /* time in us */ + A_UINT32 last; + A_UINT32 tot; /* time in us */ + A_UINT32 avg; /* time in us */ + /* hist_intvl: + * Histogram interval, i.e. the latency range covered by each + * bin of the histogram, in microsecond units. + * hist[0] counts how many latencies were between 0 to hist_intvl + * hist[1] counts how many latencies were between hist_intvl to 2*hist_intvl + * hist[2] counts how many latencies were more than 2*hist_intvl + */ + A_UINT32 hist_intvl; + A_UINT32 hist[HTT_LATENCY_PROFILE_MAX_HIST]; +} htt_latency_prof_stats_tlv; + +typedef struct { + htt_tlv_hdr_t tlv_hdr; + /* duration: + * Time period over which counts were gathered, units = microseconds. + */ + A_UINT32 duration; + A_UINT32 tx_msdu_cnt; + A_UINT32 tx_mpdu_cnt; + A_UINT32 tx_ppdu_cnt; + A_UINT32 rx_msdu_cnt; + A_UINT32 rx_mpdu_cnt; +} htt_latency_prof_ctx_tlv; + +typedef struct { + htt_tlv_hdr_t tlv_hdr; + A_UINT32 prof_enable_cnt; /* count of enabled profiles */ +} htt_latency_prof_cnt_tlv; + +/* STATS_TYPE : HTT_DBG_EXT_STATS_LATENCY_PROF_STATS + * TLV_TAGS: + * HTT_STATS_LATENCY_PROF_STATS_TAG / htt_latency_prof_stats_tlv + * HTT_STATS_LATENCY_CTX_TAG / htt_latency_prof_ctx_tlv + * HTT_STATS_LATENCY_CNT_TAG / htt_latency_prof_cnt_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_latency_prof_stats_tlv latency_prof_stat; + htt_latency_prof_ctx_tlv latency_ctx_stat; + htt_latency_prof_cnt_tlv latency_cnt_stat; +} htt_soc_latency_stats_t; + + #endif /* __HTT_STATS_H__ */ -- cgit v1.2.3 From d7df4dabff8dfa1b2001e14fba016511db64c74b Mon Sep 17 00:00:00 2001 From: spuligil Date: Mon, 13 May 2019 08:10:30 -0700 Subject: fw-api: CL 7132419 - update fw common interface files Change-Id: I24de5e3e14dd59a837f19f6bef64a6c3a15b96d8 WMI: change channel metric size+units in WMI_CHAN_RF_CHARACTERIZATION_INFO CRs-Fixed: 2262693 --- fw/wmi_unified.h | 24 ++++++++++++------------ fw/wmi_version.h | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/fw/wmi_unified.h b/fw/wmi_unified.h index 20e902ff0b83..0b69dd9c7757 100755 --- a/fw/wmi_unified.h +++ b/fw/wmi_unified.h @@ -24880,8 +24880,8 @@ typedef struct { A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUCT_ wmi_chan_rf_characterization_info */ /** - * [3:0] : channel metric - 0 = unusable, 1 = worst, 10 = best - * [4:7] : channel BW - + * [7:0] : channel metric - 0 = unusable, 1 = worst, 100 = best + * [11:8] : channel BW - * 0 = 20MHz * 1 = 40MHz * 2 = 80MHz @@ -24890,37 +24890,37 @@ typedef struct { * 11 = 5MHz * 12 = 10MHz * (13-15 unused) - * [15:8 ]: Reserved + * [15:12]: Reserved * [31:16]: Frequency - Center frequency of the channel for which * the RF characterisation info applies (MHz) */ A_UINT32 freq_info; } WMI_CHAN_RF_CHARACTERIZATION_INFO; -#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC 0x0000000f +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC 0x000000ff #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC_S 0 -#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW 0x000000f0 -#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW_S 4 +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW 0x00000f00 +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW_S 8 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ 0xffff0000 #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ_S 16 #define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_SET(dword,val) \ - WMI_F_RMW((dword)->freq_info,(val) & 0xff, \ + WMI_F_RMW((dword)->freq_info,(val), \ WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC) -#define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_GET(dword) \ +#define WMI_CHAN_RF_CHARACTERIZATION_CHAN_METRIC_GET(dword) \ WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_CHAN_METRIC) #define WMI_CHAN_RF_CHARACTERIZATION_BW_SET(dword, val) \ - WMI_F_RMW((dword)->freq_info,(val) & 0xf0, \ + WMI_F_RMW((dword)->freq_info,(val), \ WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW) -#define WMI_CHAN_RF_CHARACTERIZATION_BW_GET(dword) \ +#define WMI_CHAN_RF_CHARACTERIZATION_BW_GET(dword) \ WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_BW) #define WMI_CHAN_RF_CHARACTERIZATION_FREQ_SET(dword, val) \ - WMI_F_RMW((dword)->freq_info,(val) & 0xffff, \ + WMI_F_RMW((dword)->freq_info,(val), \ WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ) -#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_GET(dword) \ +#define WMI_CHAN_RF_CHARACTERIZATION_FREQ_GET(dword) \ WMI_F_MS((dword)->freq_info,WMI_CHAN_RF_CHARACTERIZATION_FREQ_INFO_FREQ) diff --git a/fw/wmi_version.h b/fw/wmi_version.h index c001120a7b89..14dce9c23f1d 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_ 663 +#define __WMI_REVISION_ 664 /** The Version Namespace should not be normally changed. Only * host and firmware of the same WMI namespace will work -- cgit v1.2.3 From 0da2b18f8a49ca2c93c9cb6428546b3729f7af0f Mon Sep 17 00:00:00 2001 From: spuligil Date: Mon, 13 May 2019 18:00:45 -0700 Subject: fw-api: CL 7134963 - update fw common interface files HTT stats: partly remove target_type field from htt_ppdu_stats_sch_cmd TLV The target_type field is not actually present in the HTT messages produced by the FW. However, it cannot be fully removed (yet), due to FW code that refers to this field.As a workaround, this target_type field is being moved into a union with the hw field that actually is present in the message.This makes the message definitions become consistent with the actual message contents, while not breaking the compilation of code that refers to the target_type field.Overlaying the memory for target_type and hw does not cause problems, because the FW code that refers to target_type first writes a value into the target_type field, then writes data into the hw field.Once all FW references to the target_type field have been removed, the target_type field def and the encapsulating anonymous union will be removed from the htt_ppdu_stats_sch_cmd_tlv_v struct def. Change-Id: Ibd789e350e392591b12edb0478c224c737b0fe3e CRs-Fixed: 2262693 --- fw/htt_ppdu_stats.h | 52 +++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/fw/htt_ppdu_stats.h b/fw/htt_ppdu_stats.h index b3fb65efcdc8..a3594eec8652 100644 --- a/fw/htt_ppdu_stats.h +++ b/fw/htt_ppdu_stats.h @@ -256,36 +256,34 @@ typedef struct { struct htt_tx_ppdu_stats_info tx_ppdu_stats_info[1/*number_of_ppdu_stats*/]; } htt_ppdu_stats_usr_common_array_tlv_v; -#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; - 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 - */ + htt_tlv_hdr_t tlv_hdr; union { - htt_ppdu_stats_sch_cmd_tlv_hdr_t hdr; - HTT_PPDU_STATS_SCH_CMD_TLV_HDR_STRUCT; + /* DEPRECATED (target_type) + * The target_type field is not actually present in the HTT messages + * produced by the FW. However, it cannot be removed (yet), due to + * FW code that refers to this field. + * As a workaround, this target_type field is being moved into a + * union with the "hw" field that actually is present in the message. + * This makes the message definitions become consistent with the + * actual message contents, while not breaking the compilation of + * code that refers to the target_type field. + * Overlaying the memory for "target_type" and "hw" does not cause + * problems, because the FW code that refers to target_type first + * writes a value into the target_type field, then writes data into + * the hw field. + * Once all FW references to the target_type field have been removed, + * the target_type field def and the encapsulating anonymous union + * will be removed from this htt_ppdu_stats_sch_cmd_tlv_v struct def. + */ + A_UINT32 target_type; + + /* + * The hw portion of this struct contains a scheduler_command_status + * struct, whose definition is different for different target HW types. + */ + A_UINT32 hw[1]; }; - /* - * 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 -- cgit v1.2.3