162306a36Sopenharmony_ci/* SPDX-License-Identifier: BSD-3-Clause-Clear */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. 462306a36Sopenharmony_ci * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. 562306a36Sopenharmony_ci */ 662306a36Sopenharmony_ci#include "core.h" 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#ifndef ATH12K_HAL_DESC_H 962306a36Sopenharmony_ci#define ATH12K_HAL_DESC_H 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#define BUFFER_ADDR_INFO0_ADDR GENMASK(31, 0) 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci#define BUFFER_ADDR_INFO1_ADDR GENMASK(7, 0) 1462306a36Sopenharmony_ci#define BUFFER_ADDR_INFO1_RET_BUF_MGR GENMASK(11, 8) 1562306a36Sopenharmony_ci#define BUFFER_ADDR_INFO1_SW_COOKIE GENMASK(31, 12) 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_cistruct ath12k_buffer_addr { 1862306a36Sopenharmony_ci __le32 info0; 1962306a36Sopenharmony_ci __le32 info1; 2062306a36Sopenharmony_ci} __packed; 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci/* ath12k_buffer_addr 2362306a36Sopenharmony_ci * 2462306a36Sopenharmony_ci * buffer_addr_31_0 2562306a36Sopenharmony_ci * Address (lower 32 bits) of the MSDU buffer or MSDU_EXTENSION 2662306a36Sopenharmony_ci * descriptor or Link descriptor 2762306a36Sopenharmony_ci * 2862306a36Sopenharmony_ci * buffer_addr_39_32 2962306a36Sopenharmony_ci * Address (upper 8 bits) of the MSDU buffer or MSDU_EXTENSION 3062306a36Sopenharmony_ci * descriptor or Link descriptor 3162306a36Sopenharmony_ci * 3262306a36Sopenharmony_ci * return_buffer_manager (RBM) 3362306a36Sopenharmony_ci * Consumer: WBM 3462306a36Sopenharmony_ci * Producer: SW/FW 3562306a36Sopenharmony_ci * Indicates to which buffer manager the buffer or MSDU_EXTENSION 3662306a36Sopenharmony_ci * descriptor or link descriptor that is being pointed to shall be 3762306a36Sopenharmony_ci * returned after the frame has been processed. It is used by WBM 3862306a36Sopenharmony_ci * for routing purposes. 3962306a36Sopenharmony_ci * 4062306a36Sopenharmony_ci * Values are defined in enum %HAL_RX_BUF_RBM_ 4162306a36Sopenharmony_ci * 4262306a36Sopenharmony_ci * sw_buffer_cookie 4362306a36Sopenharmony_ci * Cookie field exclusively used by SW. HW ignores the contents, 4462306a36Sopenharmony_ci * accept that it passes the programmed value on to other 4562306a36Sopenharmony_ci * descriptors together with the physical address. 4662306a36Sopenharmony_ci * 4762306a36Sopenharmony_ci * Field can be used by SW to for example associate the buffers 4862306a36Sopenharmony_ci * physical address with the virtual address. 4962306a36Sopenharmony_ci * 5062306a36Sopenharmony_ci * NOTE1: 5162306a36Sopenharmony_ci * The three most significant bits can have a special meaning 5262306a36Sopenharmony_ci * in case this struct is embedded in a TX_MPDU_DETAILS STRUCT, 5362306a36Sopenharmony_ci * and field transmit_bw_restriction is set 5462306a36Sopenharmony_ci * 5562306a36Sopenharmony_ci * In case of NON punctured transmission: 5662306a36Sopenharmony_ci * Sw_buffer_cookie[19:17] = 3'b000: 20 MHz TX only 5762306a36Sopenharmony_ci * Sw_buffer_cookie[19:17] = 3'b001: 40 MHz TX only 5862306a36Sopenharmony_ci * Sw_buffer_cookie[19:17] = 3'b010: 80 MHz TX only 5962306a36Sopenharmony_ci * Sw_buffer_cookie[19:17] = 3'b011: 160 MHz TX only 6062306a36Sopenharmony_ci * Sw_buffer_cookie[19:17] = 3'b101: 240 MHz TX only 6162306a36Sopenharmony_ci * Sw_buffer_cookie[19:17] = 3'b100: 320 MHz TX only 6262306a36Sopenharmony_ci * Sw_buffer_cookie[19:18] = 2'b11: reserved 6362306a36Sopenharmony_ci * 6462306a36Sopenharmony_ci * In case of punctured transmission: 6562306a36Sopenharmony_ci * Sw_buffer_cookie[19:16] = 4'b0000: pattern 0 only 6662306a36Sopenharmony_ci * Sw_buffer_cookie[19:16] = 4'b0001: pattern 1 only 6762306a36Sopenharmony_ci * Sw_buffer_cookie[19:16] = 4'b0010: pattern 2 only 6862306a36Sopenharmony_ci * Sw_buffer_cookie[19:16] = 4'b0011: pattern 3 only 6962306a36Sopenharmony_ci * Sw_buffer_cookie[19:16] = 4'b0100: pattern 4 only 7062306a36Sopenharmony_ci * Sw_buffer_cookie[19:16] = 4'b0101: pattern 5 only 7162306a36Sopenharmony_ci * Sw_buffer_cookie[19:16] = 4'b0110: pattern 6 only 7262306a36Sopenharmony_ci * Sw_buffer_cookie[19:16] = 4'b0111: pattern 7 only 7362306a36Sopenharmony_ci * Sw_buffer_cookie[19:16] = 4'b1000: pattern 8 only 7462306a36Sopenharmony_ci * Sw_buffer_cookie[19:16] = 4'b1001: pattern 9 only 7562306a36Sopenharmony_ci * Sw_buffer_cookie[19:16] = 4'b1010: pattern 10 only 7662306a36Sopenharmony_ci * Sw_buffer_cookie[19:16] = 4'b1011: pattern 11 only 7762306a36Sopenharmony_ci * Sw_buffer_cookie[19:18] = 2'b11: reserved 7862306a36Sopenharmony_ci * 7962306a36Sopenharmony_ci * Note: a punctured transmission is indicated by the presence 8062306a36Sopenharmony_ci * of TLV TX_PUNCTURE_SETUP embedded in the scheduler TLV 8162306a36Sopenharmony_ci * 8262306a36Sopenharmony_ci * Sw_buffer_cookie[20:17]: Tid: The TID field in the QoS control 8362306a36Sopenharmony_ci * field 8462306a36Sopenharmony_ci * 8562306a36Sopenharmony_ci * Sw_buffer_cookie[16]: Mpdu_qos_control_valid: This field 8662306a36Sopenharmony_ci * indicates MPDUs with a QoS control field. 8762306a36Sopenharmony_ci * 8862306a36Sopenharmony_ci */ 8962306a36Sopenharmony_ci 9062306a36Sopenharmony_cienum hal_tlv_tag { 9162306a36Sopenharmony_ci HAL_MACTX_CBF_START = 0 /* 0x0 */, 9262306a36Sopenharmony_ci HAL_PHYRX_DATA = 1 /* 0x1 */, 9362306a36Sopenharmony_ci HAL_PHYRX_CBF_DATA_RESP = 2 /* 0x2 */, 9462306a36Sopenharmony_ci HAL_PHYRX_ABORT_REQUEST = 3 /* 0x3 */, 9562306a36Sopenharmony_ci HAL_PHYRX_USER_ABORT_NOTIFICATION = 4 /* 0x4 */, 9662306a36Sopenharmony_ci HAL_MACTX_DATA_RESP = 5 /* 0x5 */, 9762306a36Sopenharmony_ci HAL_MACTX_CBF_DATA = 6 /* 0x6 */, 9862306a36Sopenharmony_ci HAL_MACTX_CBF_DONE = 7 /* 0x7 */, 9962306a36Sopenharmony_ci HAL_PHYRX_LMR_DATA_RESP = 8 /* 0x8 */, 10062306a36Sopenharmony_ci HAL_RXPCU_TO_UCODE_START = 9 /* 0x9 */, 10162306a36Sopenharmony_ci HAL_RXPCU_TO_UCODE_DELIMITER_FOR_FULL_MPDU = 10 /* 0xa */, 10262306a36Sopenharmony_ci HAL_RXPCU_TO_UCODE_FULL_MPDU_DATA = 11 /* 0xb */, 10362306a36Sopenharmony_ci HAL_RXPCU_TO_UCODE_FCS_STATUS = 12 /* 0xc */, 10462306a36Sopenharmony_ci HAL_RXPCU_TO_UCODE_MPDU_DELIMITER = 13 /* 0xd */, 10562306a36Sopenharmony_ci HAL_RXPCU_TO_UCODE_DELIMITER_FOR_MPDU_HEADER = 14 /* 0xe */, 10662306a36Sopenharmony_ci HAL_RXPCU_TO_UCODE_MPDU_HEADER_DATA = 15 /* 0xf */, 10762306a36Sopenharmony_ci HAL_RXPCU_TO_UCODE_END = 16 /* 0x10 */, 10862306a36Sopenharmony_ci HAL_MACRX_CBF_READ_REQUEST = 32 /* 0x20 */, 10962306a36Sopenharmony_ci HAL_MACRX_CBF_DATA_REQUEST = 33 /* 0x21 */, 11062306a36Sopenharmony_ci HAL_MACRXXPECT_NDP_RECEPTION = 34 /* 0x22 */, 11162306a36Sopenharmony_ci HAL_MACRX_FREEZE_CAPTURE_CHANNEL = 35 /* 0x23 */, 11262306a36Sopenharmony_ci HAL_MACRX_NDP_TIMEOUT = 36 /* 0x24 */, 11362306a36Sopenharmony_ci HAL_MACRX_ABORT_ACK = 37 /* 0x25 */, 11462306a36Sopenharmony_ci HAL_MACRX_REQ_IMPLICIT_FB = 38 /* 0x26 */, 11562306a36Sopenharmony_ci HAL_MACRX_CHAIN_MASK = 39 /* 0x27 */, 11662306a36Sopenharmony_ci HAL_MACRX_NAP_USER = 40 /* 0x28 */, 11762306a36Sopenharmony_ci HAL_MACRX_ABORT_REQUEST = 41 /* 0x29 */, 11862306a36Sopenharmony_ci HAL_PHYTX_OTHER_TRANSMIT_INFO16 = 42 /* 0x2a */, 11962306a36Sopenharmony_ci HAL_PHYTX_ABORT_ACK = 43 /* 0x2b */, 12062306a36Sopenharmony_ci HAL_PHYTX_ABORT_REQUEST = 44 /* 0x2c */, 12162306a36Sopenharmony_ci HAL_PHYTX_PKT_END = 45 /* 0x2d */, 12262306a36Sopenharmony_ci HAL_PHYTX_PPDU_HEADER_INFO_REQUEST = 46 /* 0x2e */, 12362306a36Sopenharmony_ci HAL_PHYTX_REQUEST_CTRL_INFO = 47 /* 0x2f */, 12462306a36Sopenharmony_ci HAL_PHYTX_DATA_REQUEST = 48 /* 0x30 */, 12562306a36Sopenharmony_ci HAL_PHYTX_BF_CV_LOADING_DONE = 49 /* 0x31 */, 12662306a36Sopenharmony_ci HAL_PHYTX_NAP_ACK = 50 /* 0x32 */, 12762306a36Sopenharmony_ci HAL_PHYTX_NAP_DONE = 51 /* 0x33 */, 12862306a36Sopenharmony_ci HAL_PHYTX_OFF_ACK = 52 /* 0x34 */, 12962306a36Sopenharmony_ci HAL_PHYTX_ON_ACK = 53 /* 0x35 */, 13062306a36Sopenharmony_ci HAL_PHYTX_SYNTH_OFF_ACK = 54 /* 0x36 */, 13162306a36Sopenharmony_ci HAL_PHYTX_DEBUG16 = 55 /* 0x37 */, 13262306a36Sopenharmony_ci HAL_MACTX_ABORT_REQUEST = 56 /* 0x38 */, 13362306a36Sopenharmony_ci HAL_MACTX_ABORT_ACK = 57 /* 0x39 */, 13462306a36Sopenharmony_ci HAL_MACTX_PKT_END = 58 /* 0x3a */, 13562306a36Sopenharmony_ci HAL_MACTX_PRE_PHY_DESC = 59 /* 0x3b */, 13662306a36Sopenharmony_ci HAL_MACTX_BF_PARAMS_COMMON = 60 /* 0x3c */, 13762306a36Sopenharmony_ci HAL_MACTX_BF_PARAMS_PER_USER = 61 /* 0x3d */, 13862306a36Sopenharmony_ci HAL_MACTX_PREFETCH_CV = 62 /* 0x3e */, 13962306a36Sopenharmony_ci HAL_MACTX_USER_DESC_COMMON = 63 /* 0x3f */, 14062306a36Sopenharmony_ci HAL_MACTX_USER_DESC_PER_USER = 64 /* 0x40 */, 14162306a36Sopenharmony_ci HAL_XAMPLE_USER_TLV_16 = 65 /* 0x41 */, 14262306a36Sopenharmony_ci HAL_XAMPLE_TLV_16 = 66 /* 0x42 */, 14362306a36Sopenharmony_ci HAL_MACTX_PHY_OFF = 67 /* 0x43 */, 14462306a36Sopenharmony_ci HAL_MACTX_PHY_ON = 68 /* 0x44 */, 14562306a36Sopenharmony_ci HAL_MACTX_SYNTH_OFF = 69 /* 0x45 */, 14662306a36Sopenharmony_ci HAL_MACTXXPECT_CBF_COMMON = 70 /* 0x46 */, 14762306a36Sopenharmony_ci HAL_MACTXXPECT_CBF_PER_USER = 71 /* 0x47 */, 14862306a36Sopenharmony_ci HAL_MACTX_PHY_DESC = 72 /* 0x48 */, 14962306a36Sopenharmony_ci HAL_MACTX_L_SIG_A = 73 /* 0x49 */, 15062306a36Sopenharmony_ci HAL_MACTX_L_SIG_B = 74 /* 0x4a */, 15162306a36Sopenharmony_ci HAL_MACTX_HT_SIG = 75 /* 0x4b */, 15262306a36Sopenharmony_ci HAL_MACTX_VHT_SIG_A = 76 /* 0x4c */, 15362306a36Sopenharmony_ci HAL_MACTX_VHT_SIG_B_SU20 = 77 /* 0x4d */, 15462306a36Sopenharmony_ci HAL_MACTX_VHT_SIG_B_SU40 = 78 /* 0x4e */, 15562306a36Sopenharmony_ci HAL_MACTX_VHT_SIG_B_SU80 = 79 /* 0x4f */, 15662306a36Sopenharmony_ci HAL_MACTX_VHT_SIG_B_SU160 = 80 /* 0x50 */, 15762306a36Sopenharmony_ci HAL_MACTX_VHT_SIG_B_MU20 = 81 /* 0x51 */, 15862306a36Sopenharmony_ci HAL_MACTX_VHT_SIG_B_MU40 = 82 /* 0x52 */, 15962306a36Sopenharmony_ci HAL_MACTX_VHT_SIG_B_MU80 = 83 /* 0x53 */, 16062306a36Sopenharmony_ci HAL_MACTX_VHT_SIG_B_MU160 = 84 /* 0x54 */, 16162306a36Sopenharmony_ci HAL_MACTX_SERVICE = 85 /* 0x55 */, 16262306a36Sopenharmony_ci HAL_MACTX_HE_SIG_A_SU = 86 /* 0x56 */, 16362306a36Sopenharmony_ci HAL_MACTX_HE_SIG_A_MU_DL = 87 /* 0x57 */, 16462306a36Sopenharmony_ci HAL_MACTX_HE_SIG_A_MU_UL = 88 /* 0x58 */, 16562306a36Sopenharmony_ci HAL_MACTX_HE_SIG_B1_MU = 89 /* 0x59 */, 16662306a36Sopenharmony_ci HAL_MACTX_HE_SIG_B2_MU = 90 /* 0x5a */, 16762306a36Sopenharmony_ci HAL_MACTX_HE_SIG_B2_OFDMA = 91 /* 0x5b */, 16862306a36Sopenharmony_ci HAL_MACTX_DELETE_CV = 92 /* 0x5c */, 16962306a36Sopenharmony_ci HAL_MACTX_MU_UPLINK_COMMON = 93 /* 0x5d */, 17062306a36Sopenharmony_ci HAL_MACTX_MU_UPLINK_USER_SETUP = 94 /* 0x5e */, 17162306a36Sopenharmony_ci HAL_MACTX_OTHER_TRANSMIT_INFO = 95 /* 0x5f */, 17262306a36Sopenharmony_ci HAL_MACTX_PHY_NAP = 96 /* 0x60 */, 17362306a36Sopenharmony_ci HAL_MACTX_DEBUG = 97 /* 0x61 */, 17462306a36Sopenharmony_ci HAL_PHYRX_ABORT_ACK = 98 /* 0x62 */, 17562306a36Sopenharmony_ci HAL_PHYRX_GENERATED_CBF_DETAILS = 99 /* 0x63 */, 17662306a36Sopenharmony_ci HAL_PHYRX_RSSI_LEGACY = 100 /* 0x64 */, 17762306a36Sopenharmony_ci HAL_PHYRX_RSSI_HT = 101 /* 0x65 */, 17862306a36Sopenharmony_ci HAL_PHYRX_USER_INFO = 102 /* 0x66 */, 17962306a36Sopenharmony_ci HAL_PHYRX_PKT_END = 103 /* 0x67 */, 18062306a36Sopenharmony_ci HAL_PHYRX_DEBUG = 104 /* 0x68 */, 18162306a36Sopenharmony_ci HAL_PHYRX_CBF_TRANSFER_DONE = 105 /* 0x69 */, 18262306a36Sopenharmony_ci HAL_PHYRX_CBF_TRANSFER_ABORT = 106 /* 0x6a */, 18362306a36Sopenharmony_ci HAL_PHYRX_L_SIG_A = 107 /* 0x6b */, 18462306a36Sopenharmony_ci HAL_PHYRX_L_SIG_B = 108 /* 0x6c */, 18562306a36Sopenharmony_ci HAL_PHYRX_HT_SIG = 109 /* 0x6d */, 18662306a36Sopenharmony_ci HAL_PHYRX_VHT_SIG_A = 110 /* 0x6e */, 18762306a36Sopenharmony_ci HAL_PHYRX_VHT_SIG_B_SU20 = 111 /* 0x6f */, 18862306a36Sopenharmony_ci HAL_PHYRX_VHT_SIG_B_SU40 = 112 /* 0x70 */, 18962306a36Sopenharmony_ci HAL_PHYRX_VHT_SIG_B_SU80 = 113 /* 0x71 */, 19062306a36Sopenharmony_ci HAL_PHYRX_VHT_SIG_B_SU160 = 114 /* 0x72 */, 19162306a36Sopenharmony_ci HAL_PHYRX_VHT_SIG_B_MU20 = 115 /* 0x73 */, 19262306a36Sopenharmony_ci HAL_PHYRX_VHT_SIG_B_MU40 = 116 /* 0x74 */, 19362306a36Sopenharmony_ci HAL_PHYRX_VHT_SIG_B_MU80 = 117 /* 0x75 */, 19462306a36Sopenharmony_ci HAL_PHYRX_VHT_SIG_B_MU160 = 118 /* 0x76 */, 19562306a36Sopenharmony_ci HAL_PHYRX_HE_SIG_A_SU = 119 /* 0x77 */, 19662306a36Sopenharmony_ci HAL_PHYRX_HE_SIG_A_MU_DL = 120 /* 0x78 */, 19762306a36Sopenharmony_ci HAL_PHYRX_HE_SIG_A_MU_UL = 121 /* 0x79 */, 19862306a36Sopenharmony_ci HAL_PHYRX_HE_SIG_B1_MU = 122 /* 0x7a */, 19962306a36Sopenharmony_ci HAL_PHYRX_HE_SIG_B2_MU = 123 /* 0x7b */, 20062306a36Sopenharmony_ci HAL_PHYRX_HE_SIG_B2_OFDMA = 124 /* 0x7c */, 20162306a36Sopenharmony_ci HAL_PHYRX_OTHER_RECEIVE_INFO = 125 /* 0x7d */, 20262306a36Sopenharmony_ci HAL_PHYRX_COMMON_USER_INFO = 126 /* 0x7e */, 20362306a36Sopenharmony_ci HAL_PHYRX_DATA_DONE = 127 /* 0x7f */, 20462306a36Sopenharmony_ci HAL_COEX_TX_REQ = 128 /* 0x80 */, 20562306a36Sopenharmony_ci HAL_DUMMY = 129 /* 0x81 */, 20662306a36Sopenharmony_ci HALXAMPLE_TLV_32_NAME = 130 /* 0x82 */, 20762306a36Sopenharmony_ci HAL_MPDU_LIMIT = 131 /* 0x83 */, 20862306a36Sopenharmony_ci HAL_NA_LENGTH_END = 132 /* 0x84 */, 20962306a36Sopenharmony_ci HAL_OLE_BUF_STATUS = 133 /* 0x85 */, 21062306a36Sopenharmony_ci HAL_PCU_PPDU_SETUP_DONE = 134 /* 0x86 */, 21162306a36Sopenharmony_ci HAL_PCU_PPDU_SETUP_END = 135 /* 0x87 */, 21262306a36Sopenharmony_ci HAL_PCU_PPDU_SETUP_INIT = 136 /* 0x88 */, 21362306a36Sopenharmony_ci HAL_PCU_PPDU_SETUP_START = 137 /* 0x89 */, 21462306a36Sopenharmony_ci HAL_PDG_FES_SETUP = 138 /* 0x8a */, 21562306a36Sopenharmony_ci HAL_PDG_RESPONSE = 139 /* 0x8b */, 21662306a36Sopenharmony_ci HAL_PDG_TX_REQ = 140 /* 0x8c */, 21762306a36Sopenharmony_ci HAL_SCH_WAIT_INSTR = 141 /* 0x8d */, 21862306a36Sopenharmony_ci HAL_TQM_FLOWMPTY_STATUS = 143 /* 0x8f */, 21962306a36Sopenharmony_ci HAL_TQM_FLOW_NOTMPTY_STATUS = 144 /* 0x90 */, 22062306a36Sopenharmony_ci HAL_TQM_GEN_MPDU_LENGTH_LIST = 145 /* 0x91 */, 22162306a36Sopenharmony_ci HAL_TQM_GEN_MPDU_LENGTH_LIST_STATUS = 146 /* 0x92 */, 22262306a36Sopenharmony_ci HAL_TQM_GEN_MPDUS = 147 /* 0x93 */, 22362306a36Sopenharmony_ci HAL_TQM_GEN_MPDUS_STATUS = 148 /* 0x94 */, 22462306a36Sopenharmony_ci HAL_TQM_REMOVE_MPDU = 149 /* 0x95 */, 22562306a36Sopenharmony_ci HAL_TQM_REMOVE_MPDU_STATUS = 150 /* 0x96 */, 22662306a36Sopenharmony_ci HAL_TQM_REMOVE_MSDU = 151 /* 0x97 */, 22762306a36Sopenharmony_ci HAL_TQM_REMOVE_MSDU_STATUS = 152 /* 0x98 */, 22862306a36Sopenharmony_ci HAL_TQM_UPDATE_TX_MPDU_COUNT = 153 /* 0x99 */, 22962306a36Sopenharmony_ci HAL_TQM_WRITE_CMD = 154 /* 0x9a */, 23062306a36Sopenharmony_ci HAL_OFDMA_TRIGGER_DETAILS = 155 /* 0x9b */, 23162306a36Sopenharmony_ci HAL_TX_DATA = 156 /* 0x9c */, 23262306a36Sopenharmony_ci HAL_TX_FES_SETUP = 157 /* 0x9d */, 23362306a36Sopenharmony_ci HAL_RX_PACKET = 158 /* 0x9e */, 23462306a36Sopenharmony_ci HALXPECTED_RESPONSE = 159 /* 0x9f */, 23562306a36Sopenharmony_ci HAL_TX_MPDU_END = 160 /* 0xa0 */, 23662306a36Sopenharmony_ci HAL_TX_MPDU_START = 161 /* 0xa1 */, 23762306a36Sopenharmony_ci HAL_TX_MSDU_END = 162 /* 0xa2 */, 23862306a36Sopenharmony_ci HAL_TX_MSDU_START = 163 /* 0xa3 */, 23962306a36Sopenharmony_ci HAL_TX_SW_MODE_SETUP = 164 /* 0xa4 */, 24062306a36Sopenharmony_ci HAL_TXPCU_BUFFER_STATUS = 165 /* 0xa5 */, 24162306a36Sopenharmony_ci HAL_TXPCU_USER_BUFFER_STATUS = 166 /* 0xa6 */, 24262306a36Sopenharmony_ci HAL_DATA_TO_TIME_CONFIG = 167 /* 0xa7 */, 24362306a36Sopenharmony_ci HALXAMPLE_USER_TLV_32 = 168 /* 0xa8 */, 24462306a36Sopenharmony_ci HAL_MPDU_INFO = 169 /* 0xa9 */, 24562306a36Sopenharmony_ci HAL_PDG_USER_SETUP = 170 /* 0xaa */, 24662306a36Sopenharmony_ci HAL_TX_11AH_SETUP = 171 /* 0xab */, 24762306a36Sopenharmony_ci HAL_REO_UPDATE_RX_REO_QUEUE_STATUS = 172 /* 0xac */, 24862306a36Sopenharmony_ci HAL_TX_PEER_ENTRY = 173 /* 0xad */, 24962306a36Sopenharmony_ci HAL_TX_RAW_OR_NATIVE_FRAME_SETUP = 174 /* 0xae */, 25062306a36Sopenharmony_ci HALXAMPLE_USER_TLV_44 = 175 /* 0xaf */, 25162306a36Sopenharmony_ci HAL_TX_FLUSH = 176 /* 0xb0 */, 25262306a36Sopenharmony_ci HAL_TX_FLUSH_REQ = 177 /* 0xb1 */, 25362306a36Sopenharmony_ci HAL_TQM_WRITE_CMD_STATUS = 178 /* 0xb2 */, 25462306a36Sopenharmony_ci HAL_TQM_GET_MPDU_QUEUE_STATS = 179 /* 0xb3 */, 25562306a36Sopenharmony_ci HAL_TQM_GET_MSDU_FLOW_STATS = 180 /* 0xb4 */, 25662306a36Sopenharmony_ci HALXAMPLE_USER_CTLV_44 = 181 /* 0xb5 */, 25762306a36Sopenharmony_ci HAL_TX_FES_STATUS_START = 182 /* 0xb6 */, 25862306a36Sopenharmony_ci HAL_TX_FES_STATUS_USER_PPDU = 183 /* 0xb7 */, 25962306a36Sopenharmony_ci HAL_TX_FES_STATUS_USER_RESPONSE = 184 /* 0xb8 */, 26062306a36Sopenharmony_ci HAL_TX_FES_STATUS_END = 185 /* 0xb9 */, 26162306a36Sopenharmony_ci HAL_RX_TRIG_INFO = 186 /* 0xba */, 26262306a36Sopenharmony_ci HAL_RXPCU_TX_SETUP_CLEAR = 187 /* 0xbb */, 26362306a36Sopenharmony_ci HAL_RX_FRAME_BITMAP_REQ = 188 /* 0xbc */, 26462306a36Sopenharmony_ci HAL_RX_FRAME_BITMAP_ACK = 189 /* 0xbd */, 26562306a36Sopenharmony_ci HAL_COEX_RX_STATUS = 190 /* 0xbe */, 26662306a36Sopenharmony_ci HAL_RX_START_PARAM = 191 /* 0xbf */, 26762306a36Sopenharmony_ci HAL_RX_PPDU_START = 192 /* 0xc0 */, 26862306a36Sopenharmony_ci HAL_RX_PPDU_END = 193 /* 0xc1 */, 26962306a36Sopenharmony_ci HAL_RX_MPDU_START = 194 /* 0xc2 */, 27062306a36Sopenharmony_ci HAL_RX_MPDU_END = 195 /* 0xc3 */, 27162306a36Sopenharmony_ci HAL_RX_MSDU_START = 196 /* 0xc4 */, 27262306a36Sopenharmony_ci HAL_RX_MSDU_END = 197 /* 0xc5 */, 27362306a36Sopenharmony_ci HAL_RX_ATTENTION = 198 /* 0xc6 */, 27462306a36Sopenharmony_ci HAL_RECEIVED_RESPONSE_INFO = 199 /* 0xc7 */, 27562306a36Sopenharmony_ci HAL_RX_PHY_SLEEP = 200 /* 0xc8 */, 27662306a36Sopenharmony_ci HAL_RX_HEADER = 201 /* 0xc9 */, 27762306a36Sopenharmony_ci HAL_RX_PEER_ENTRY = 202 /* 0xca */, 27862306a36Sopenharmony_ci HAL_RX_FLUSH = 203 /* 0xcb */, 27962306a36Sopenharmony_ci HAL_RX_RESPONSE_REQUIRED_INFO = 204 /* 0xcc */, 28062306a36Sopenharmony_ci HAL_RX_FRAMELESS_BAR_DETAILS = 205 /* 0xcd */, 28162306a36Sopenharmony_ci HAL_TQM_GET_MPDU_QUEUE_STATS_STATUS = 206 /* 0xce */, 28262306a36Sopenharmony_ci HAL_TQM_GET_MSDU_FLOW_STATS_STATUS = 207 /* 0xcf */, 28362306a36Sopenharmony_ci HAL_TX_CBF_INFO = 208 /* 0xd0 */, 28462306a36Sopenharmony_ci HAL_PCU_PPDU_SETUP_USER = 209 /* 0xd1 */, 28562306a36Sopenharmony_ci HAL_RX_MPDU_PCU_START = 210 /* 0xd2 */, 28662306a36Sopenharmony_ci HAL_RX_PM_INFO = 211 /* 0xd3 */, 28762306a36Sopenharmony_ci HAL_RX_USER_PPDU_END = 212 /* 0xd4 */, 28862306a36Sopenharmony_ci HAL_RX_PRE_PPDU_START = 213 /* 0xd5 */, 28962306a36Sopenharmony_ci HAL_RX_PREAMBLE = 214 /* 0xd6 */, 29062306a36Sopenharmony_ci HAL_TX_FES_SETUP_COMPLETE = 215 /* 0xd7 */, 29162306a36Sopenharmony_ci HAL_TX_LAST_MPDU_FETCHED = 216 /* 0xd8 */, 29262306a36Sopenharmony_ci HAL_TXDMA_STOP_REQUEST = 217 /* 0xd9 */, 29362306a36Sopenharmony_ci HAL_RXPCU_SETUP = 218 /* 0xda */, 29462306a36Sopenharmony_ci HAL_RXPCU_USER_SETUP = 219 /* 0xdb */, 29562306a36Sopenharmony_ci HAL_TX_FES_STATUS_ACK_OR_BA = 220 /* 0xdc */, 29662306a36Sopenharmony_ci HAL_TQM_ACKED_MPDU = 221 /* 0xdd */, 29762306a36Sopenharmony_ci HAL_COEX_TX_RESP = 222 /* 0xde */, 29862306a36Sopenharmony_ci HAL_COEX_TX_STATUS = 223 /* 0xdf */, 29962306a36Sopenharmony_ci HAL_MACTX_COEX_PHY_CTRL = 224 /* 0xe0 */, 30062306a36Sopenharmony_ci HAL_COEX_STATUS_BROADCAST = 225 /* 0xe1 */, 30162306a36Sopenharmony_ci HAL_RESPONSE_START_STATUS = 226 /* 0xe2 */, 30262306a36Sopenharmony_ci HAL_RESPONSEND_STATUS = 227 /* 0xe3 */, 30362306a36Sopenharmony_ci HAL_CRYPTO_STATUS = 228 /* 0xe4 */, 30462306a36Sopenharmony_ci HAL_RECEIVED_TRIGGER_INFO = 229 /* 0xe5 */, 30562306a36Sopenharmony_ci HAL_COEX_TX_STOP_CTRL = 230 /* 0xe6 */, 30662306a36Sopenharmony_ci HAL_RX_PPDU_ACK_REPORT = 231 /* 0xe7 */, 30762306a36Sopenharmony_ci HAL_RX_PPDU_NO_ACK_REPORT = 232 /* 0xe8 */, 30862306a36Sopenharmony_ci HAL_SCH_COEX_STATUS = 233 /* 0xe9 */, 30962306a36Sopenharmony_ci HAL_SCHEDULER_COMMAND_STATUS = 234 /* 0xea */, 31062306a36Sopenharmony_ci HAL_SCHEDULER_RX_PPDU_NO_RESPONSE_STATUS = 235 /* 0xeb */, 31162306a36Sopenharmony_ci HAL_TX_FES_STATUS_PROT = 236 /* 0xec */, 31262306a36Sopenharmony_ci HAL_TX_FES_STATUS_START_PPDU = 237 /* 0xed */, 31362306a36Sopenharmony_ci HAL_TX_FES_STATUS_START_PROT = 238 /* 0xee */, 31462306a36Sopenharmony_ci HAL_TXPCU_PHYTX_DEBUG32 = 239 /* 0xef */, 31562306a36Sopenharmony_ci HAL_TXPCU_PHYTX_OTHER_TRANSMIT_INFO32 = 240 /* 0xf0 */, 31662306a36Sopenharmony_ci HAL_TX_MPDU_COUNT_TRANSFERND = 241 /* 0xf1 */, 31762306a36Sopenharmony_ci HAL_WHO_ANCHOR_OFFSET = 242 /* 0xf2 */, 31862306a36Sopenharmony_ci HAL_WHO_ANCHOR_VALUE = 243 /* 0xf3 */, 31962306a36Sopenharmony_ci HAL_WHO_CCE_INFO = 244 /* 0xf4 */, 32062306a36Sopenharmony_ci HAL_WHO_COMMIT = 245 /* 0xf5 */, 32162306a36Sopenharmony_ci HAL_WHO_COMMIT_DONE = 246 /* 0xf6 */, 32262306a36Sopenharmony_ci HAL_WHO_FLUSH = 247 /* 0xf7 */, 32362306a36Sopenharmony_ci HAL_WHO_L2_LLC = 248 /* 0xf8 */, 32462306a36Sopenharmony_ci HAL_WHO_L2_PAYLOAD = 249 /* 0xf9 */, 32562306a36Sopenharmony_ci HAL_WHO_L3_CHECKSUM = 250 /* 0xfa */, 32662306a36Sopenharmony_ci HAL_WHO_L3_INFO = 251 /* 0xfb */, 32762306a36Sopenharmony_ci HAL_WHO_L4_CHECKSUM = 252 /* 0xfc */, 32862306a36Sopenharmony_ci HAL_WHO_L4_INFO = 253 /* 0xfd */, 32962306a36Sopenharmony_ci HAL_WHO_MSDU = 254 /* 0xfe */, 33062306a36Sopenharmony_ci HAL_WHO_MSDU_MISC = 255 /* 0xff */, 33162306a36Sopenharmony_ci HAL_WHO_PACKET_DATA = 256 /* 0x100 */, 33262306a36Sopenharmony_ci HAL_WHO_PACKET_HDR = 257 /* 0x101 */, 33362306a36Sopenharmony_ci HAL_WHO_PPDU_END = 258 /* 0x102 */, 33462306a36Sopenharmony_ci HAL_WHO_PPDU_START = 259 /* 0x103 */, 33562306a36Sopenharmony_ci HAL_WHO_TSO = 260 /* 0x104 */, 33662306a36Sopenharmony_ci HAL_WHO_WMAC_HEADER_PV0 = 261 /* 0x105 */, 33762306a36Sopenharmony_ci HAL_WHO_WMAC_HEADER_PV1 = 262 /* 0x106 */, 33862306a36Sopenharmony_ci HAL_WHO_WMAC_IV = 263 /* 0x107 */, 33962306a36Sopenharmony_ci HAL_MPDU_INFO_END = 264 /* 0x108 */, 34062306a36Sopenharmony_ci HAL_MPDU_INFO_BITMAP = 265 /* 0x109 */, 34162306a36Sopenharmony_ci HAL_TX_QUEUE_EXTENSION = 266 /* 0x10a */, 34262306a36Sopenharmony_ci HAL_SCHEDULER_SELFGEN_RESPONSE_STATUS = 267 /* 0x10b */, 34362306a36Sopenharmony_ci HAL_TQM_UPDATE_TX_MPDU_COUNT_STATUS = 268 /* 0x10c */, 34462306a36Sopenharmony_ci HAL_TQM_ACKED_MPDU_STATUS = 269 /* 0x10d */, 34562306a36Sopenharmony_ci HAL_TQM_ADD_MSDU_STATUS = 270 /* 0x10e */, 34662306a36Sopenharmony_ci HAL_TQM_LIST_GEN_DONE = 271 /* 0x10f */, 34762306a36Sopenharmony_ci HAL_WHO_TERMINATE = 272 /* 0x110 */, 34862306a36Sopenharmony_ci HAL_TX_LAST_MPDU_END = 273 /* 0x111 */, 34962306a36Sopenharmony_ci HAL_TX_CV_DATA = 274 /* 0x112 */, 35062306a36Sopenharmony_ci HAL_PPDU_TX_END = 275 /* 0x113 */, 35162306a36Sopenharmony_ci HAL_PROT_TX_END = 276 /* 0x114 */, 35262306a36Sopenharmony_ci HAL_MPDU_INFO_GLOBAL_END = 277 /* 0x115 */, 35362306a36Sopenharmony_ci HAL_TQM_SCH_INSTR_GLOBAL_END = 278 /* 0x116 */, 35462306a36Sopenharmony_ci HAL_RX_PPDU_END_USER_STATS = 279 /* 0x117 */, 35562306a36Sopenharmony_ci HAL_RX_PPDU_END_USER_STATS_EXT = 280 /* 0x118 */, 35662306a36Sopenharmony_ci HAL_REO_GET_QUEUE_STATS = 281 /* 0x119 */, 35762306a36Sopenharmony_ci HAL_REO_FLUSH_QUEUE = 282 /* 0x11a */, 35862306a36Sopenharmony_ci HAL_REO_FLUSH_CACHE = 283 /* 0x11b */, 35962306a36Sopenharmony_ci HAL_REO_UNBLOCK_CACHE = 284 /* 0x11c */, 36062306a36Sopenharmony_ci HAL_REO_GET_QUEUE_STATS_STATUS = 285 /* 0x11d */, 36162306a36Sopenharmony_ci HAL_REO_FLUSH_QUEUE_STATUS = 286 /* 0x11e */, 36262306a36Sopenharmony_ci HAL_REO_FLUSH_CACHE_STATUS = 287 /* 0x11f */, 36362306a36Sopenharmony_ci HAL_REO_UNBLOCK_CACHE_STATUS = 288 /* 0x120 */, 36462306a36Sopenharmony_ci HAL_TQM_FLUSH_CACHE = 289 /* 0x121 */, 36562306a36Sopenharmony_ci HAL_TQM_UNBLOCK_CACHE = 290 /* 0x122 */, 36662306a36Sopenharmony_ci HAL_TQM_FLUSH_CACHE_STATUS = 291 /* 0x123 */, 36762306a36Sopenharmony_ci HAL_TQM_UNBLOCK_CACHE_STATUS = 292 /* 0x124 */, 36862306a36Sopenharmony_ci HAL_RX_PPDU_END_STATUS_DONE = 293 /* 0x125 */, 36962306a36Sopenharmony_ci HAL_RX_STATUS_BUFFER_DONE = 294 /* 0x126 */, 37062306a36Sopenharmony_ci HAL_TX_DATA_SYNC = 297 /* 0x129 */, 37162306a36Sopenharmony_ci HAL_PHYRX_CBF_READ_REQUEST_ACK = 298 /* 0x12a */, 37262306a36Sopenharmony_ci HAL_TQM_GET_MPDU_HEAD_INFO = 299 /* 0x12b */, 37362306a36Sopenharmony_ci HAL_TQM_SYNC_CMD = 300 /* 0x12c */, 37462306a36Sopenharmony_ci HAL_TQM_GET_MPDU_HEAD_INFO_STATUS = 301 /* 0x12d */, 37562306a36Sopenharmony_ci HAL_TQM_SYNC_CMD_STATUS = 302 /* 0x12e */, 37662306a36Sopenharmony_ci HAL_TQM_THRESHOLD_DROP_NOTIFICATION_STATUS = 303 /* 0x12f */, 37762306a36Sopenharmony_ci HAL_TQM_DESCRIPTOR_THRESHOLD_REACHED_STATUS = 304 /* 0x130 */, 37862306a36Sopenharmony_ci HAL_REO_FLUSH_TIMEOUT_LIST = 305 /* 0x131 */, 37962306a36Sopenharmony_ci HAL_REO_FLUSH_TIMEOUT_LIST_STATUS = 306 /* 0x132 */, 38062306a36Sopenharmony_ci HAL_REO_DESCRIPTOR_THRESHOLD_REACHED_STATUS = 307 /* 0x133 */, 38162306a36Sopenharmony_ci HAL_SCHEDULER_RX_SIFS_RESPONSE_TRIGGER_STATUS = 308 /* 0x134 */, 38262306a36Sopenharmony_ci HALXAMPLE_USER_TLV_32_NAME = 309 /* 0x135 */, 38362306a36Sopenharmony_ci HAL_RX_PPDU_START_USER_INFO = 310 /* 0x136 */, 38462306a36Sopenharmony_ci HAL_RX_RING_MASK = 311 /* 0x137 */, 38562306a36Sopenharmony_ci HAL_COEX_MAC_NAP = 312 /* 0x138 */, 38662306a36Sopenharmony_ci HAL_RXPCU_PPDU_END_INFO = 313 /* 0x139 */, 38762306a36Sopenharmony_ci HAL_WHO_MESH_CONTROL = 314 /* 0x13a */, 38862306a36Sopenharmony_ci HAL_PDG_SW_MODE_BW_START = 315 /* 0x13b */, 38962306a36Sopenharmony_ci HAL_PDG_SW_MODE_BW_END = 316 /* 0x13c */, 39062306a36Sopenharmony_ci HAL_PDG_WAIT_FOR_MAC_REQUEST = 317 /* 0x13d */, 39162306a36Sopenharmony_ci HAL_PDG_WAIT_FOR_PHY_REQUEST = 318 /* 0x13e */, 39262306a36Sopenharmony_ci HAL_SCHEDULER_END = 319 /* 0x13f */, 39362306a36Sopenharmony_ci HAL_RX_PPDU_START_DROPPED = 320 /* 0x140 */, 39462306a36Sopenharmony_ci HAL_RX_PPDU_END_DROPPED = 321 /* 0x141 */, 39562306a36Sopenharmony_ci HAL_RX_PPDU_END_STATUS_DONE_DROPPED = 322 /* 0x142 */, 39662306a36Sopenharmony_ci HAL_RX_MPDU_START_DROPPED = 323 /* 0x143 */, 39762306a36Sopenharmony_ci HAL_RX_MSDU_START_DROPPED = 324 /* 0x144 */, 39862306a36Sopenharmony_ci HAL_RX_MSDU_END_DROPPED = 325 /* 0x145 */, 39962306a36Sopenharmony_ci HAL_RX_MPDU_END_DROPPED = 326 /* 0x146 */, 40062306a36Sopenharmony_ci HAL_RX_ATTENTION_DROPPED = 327 /* 0x147 */, 40162306a36Sopenharmony_ci HAL_TXPCU_USER_SETUP = 328 /* 0x148 */, 40262306a36Sopenharmony_ci HAL_RXPCU_USER_SETUP_EXT = 329 /* 0x149 */, 40362306a36Sopenharmony_ci HAL_CMD_PART_0_END = 330 /* 0x14a */, 40462306a36Sopenharmony_ci HAL_MACTX_SYNTH_ON = 331 /* 0x14b */, 40562306a36Sopenharmony_ci HAL_SCH_CRITICAL_TLV_REFERENCE = 332 /* 0x14c */, 40662306a36Sopenharmony_ci HAL_TQM_MPDU_GLOBAL_START = 333 /* 0x14d */, 40762306a36Sopenharmony_ci HALXAMPLE_TLV_32 = 334 /* 0x14e */, 40862306a36Sopenharmony_ci HAL_TQM_UPDATE_TX_MSDU_FLOW = 335 /* 0x14f */, 40962306a36Sopenharmony_ci HAL_TQM_UPDATE_TX_MPDU_QUEUE_HEAD = 336 /* 0x150 */, 41062306a36Sopenharmony_ci HAL_TQM_UPDATE_TX_MSDU_FLOW_STATUS = 337 /* 0x151 */, 41162306a36Sopenharmony_ci HAL_TQM_UPDATE_TX_MPDU_QUEUE_HEAD_STATUS = 338 /* 0x152 */, 41262306a36Sopenharmony_ci HAL_REO_UPDATE_RX_REO_QUEUE = 339 /* 0x153 */, 41362306a36Sopenharmony_ci HAL_TQM_MPDU_QUEUEMPTY_STATUS = 340 /* 0x154 */, 41462306a36Sopenharmony_ci HAL_TQM_2_SCH_MPDU_AVAILABLE = 341 /* 0x155 */, 41562306a36Sopenharmony_ci HAL_PDG_TRIG_RESPONSE = 342 /* 0x156 */, 41662306a36Sopenharmony_ci HAL_TRIGGER_RESPONSE_TX_DONE = 343 /* 0x157 */, 41762306a36Sopenharmony_ci HAL_ABORT_FROM_PHYRX_DETAILS = 344 /* 0x158 */, 41862306a36Sopenharmony_ci HAL_SCH_TQM_CMD_WRAPPER = 345 /* 0x159 */, 41962306a36Sopenharmony_ci HAL_MPDUS_AVAILABLE = 346 /* 0x15a */, 42062306a36Sopenharmony_ci HAL_RECEIVED_RESPONSE_INFO_PART2 = 347 /* 0x15b */, 42162306a36Sopenharmony_ci HAL_PHYRX_TX_START_TIMING = 348 /* 0x15c */, 42262306a36Sopenharmony_ci HAL_TXPCU_PREAMBLE_DONE = 349 /* 0x15d */, 42362306a36Sopenharmony_ci HAL_NDP_PREAMBLE_DONE = 350 /* 0x15e */, 42462306a36Sopenharmony_ci HAL_SCH_TQM_CMD_WRAPPER_RBO_DROP = 351 /* 0x15f */, 42562306a36Sopenharmony_ci HAL_SCH_TQM_CMD_WRAPPER_CONT_DROP = 352 /* 0x160 */, 42662306a36Sopenharmony_ci HAL_MACTX_CLEAR_PREV_TX_INFO = 353 /* 0x161 */, 42762306a36Sopenharmony_ci HAL_TX_PUNCTURE_SETUP = 354 /* 0x162 */, 42862306a36Sopenharmony_ci HAL_R2R_STATUS_END = 355 /* 0x163 */, 42962306a36Sopenharmony_ci HAL_MACTX_PREFETCH_CV_COMMON = 356 /* 0x164 */, 43062306a36Sopenharmony_ci HAL_END_OF_FLUSH_MARKER = 357 /* 0x165 */, 43162306a36Sopenharmony_ci HAL_MACTX_MU_UPLINK_COMMON_PUNC = 358 /* 0x166 */, 43262306a36Sopenharmony_ci HAL_MACTX_MU_UPLINK_USER_SETUP_PUNC = 359 /* 0x167 */, 43362306a36Sopenharmony_ci HAL_RECEIVED_RESPONSE_USER_7_0 = 360 /* 0x168 */, 43462306a36Sopenharmony_ci HAL_RECEIVED_RESPONSE_USER_15_8 = 361 /* 0x169 */, 43562306a36Sopenharmony_ci HAL_RECEIVED_RESPONSE_USER_23_16 = 362 /* 0x16a */, 43662306a36Sopenharmony_ci HAL_RECEIVED_RESPONSE_USER_31_24 = 363 /* 0x16b */, 43762306a36Sopenharmony_ci HAL_RECEIVED_RESPONSE_USER_36_32 = 364 /* 0x16c */, 43862306a36Sopenharmony_ci HAL_TX_LOOPBACK_SETUP = 365 /* 0x16d */, 43962306a36Sopenharmony_ci HAL_PHYRX_OTHER_RECEIVE_INFO_RU_DETAILS = 366 /* 0x16e */, 44062306a36Sopenharmony_ci HAL_SCH_WAIT_INSTR_TX_PATH = 367 /* 0x16f */, 44162306a36Sopenharmony_ci HAL_MACTX_OTHER_TRANSMIT_INFO_TX2TX = 368 /* 0x170 */, 44262306a36Sopenharmony_ci HAL_MACTX_OTHER_TRANSMIT_INFOMUPHY_SETUP = 369 /* 0x171 */, 44362306a36Sopenharmony_ci HAL_PHYRX_OTHER_RECEIVE_INFOVM_DETAILS = 370 /* 0x172 */, 44462306a36Sopenharmony_ci HAL_TX_WUR_DATA = 371 /* 0x173 */, 44562306a36Sopenharmony_ci HAL_RX_PPDU_END_START = 372 /* 0x174 */, 44662306a36Sopenharmony_ci HAL_RX_PPDU_END_MIDDLE = 373 /* 0x175 */, 44762306a36Sopenharmony_ci HAL_RX_PPDU_END_LAST = 374 /* 0x176 */, 44862306a36Sopenharmony_ci HAL_MACTX_BACKOFF_BASED_TRANSMISSION = 375 /* 0x177 */, 44962306a36Sopenharmony_ci HAL_MACTX_OTHER_TRANSMIT_INFO_DL_OFDMA_TX = 376 /* 0x178 */, 45062306a36Sopenharmony_ci HAL_SRP_INFO = 377 /* 0x179 */, 45162306a36Sopenharmony_ci HAL_OBSS_SR_INFO = 378 /* 0x17a */, 45262306a36Sopenharmony_ci HAL_SCHEDULER_SW_MSG_STATUS = 379 /* 0x17b */, 45362306a36Sopenharmony_ci HAL_HWSCH_RXPCU_MAC_INFO_ANNOUNCEMENT = 380 /* 0x17c */, 45462306a36Sopenharmony_ci HAL_RXPCU_SETUP_COMPLETE = 381 /* 0x17d */, 45562306a36Sopenharmony_ci HAL_SNOOP_PPDU_START = 382 /* 0x17e */, 45662306a36Sopenharmony_ci HAL_SNOOP_MPDU_USR_DBG_INFO = 383 /* 0x17f */, 45762306a36Sopenharmony_ci HAL_SNOOP_MSDU_USR_DBG_INFO = 384 /* 0x180 */, 45862306a36Sopenharmony_ci HAL_SNOOP_MSDU_USR_DATA = 385 /* 0x181 */, 45962306a36Sopenharmony_ci HAL_SNOOP_MPDU_USR_STAT_INFO = 386 /* 0x182 */, 46062306a36Sopenharmony_ci HAL_SNOOP_PPDU_END = 387 /* 0x183 */, 46162306a36Sopenharmony_ci HAL_SNOOP_SPARE = 388 /* 0x184 */, 46262306a36Sopenharmony_ci HAL_PHYRX_OTHER_RECEIVE_INFO_MU_RSSI_COMMON = 390 /* 0x186 */, 46362306a36Sopenharmony_ci HAL_PHYRX_OTHER_RECEIVE_INFO_MU_RSSI_USER = 391 /* 0x187 */, 46462306a36Sopenharmony_ci HAL_MACTX_OTHER_TRANSMIT_INFO_SCH_DETAILS = 392 /* 0x188 */, 46562306a36Sopenharmony_ci HAL_PHYRX_OTHER_RECEIVE_INFO_108PVM_DETAILS = 393 /* 0x189 */, 46662306a36Sopenharmony_ci HAL_SCH_TLV_WRAPPER = 394 /* 0x18a */, 46762306a36Sopenharmony_ci HAL_SCHEDULER_STATUS_WRAPPER = 395 /* 0x18b */, 46862306a36Sopenharmony_ci HAL_MPDU_INFO_6X = 396 /* 0x18c */, 46962306a36Sopenharmony_ci HAL_MACTX_11AZ_USER_DESC_PER_USER = 397 /* 0x18d */, 47062306a36Sopenharmony_ci HAL_MACTX_U_SIGHT_SU_MU = 398 /* 0x18e */, 47162306a36Sopenharmony_ci HAL_MACTX_U_SIGHT_TB = 399 /* 0x18f */, 47262306a36Sopenharmony_ci HAL_PHYRX_U_SIGHT_SU_MU = 403 /* 0x193 */, 47362306a36Sopenharmony_ci HAL_PHYRX_U_SIGHT_TB = 404 /* 0x194 */, 47462306a36Sopenharmony_ci HAL_MACRX_LMR_READ_REQUEST = 408 /* 0x198 */, 47562306a36Sopenharmony_ci HAL_MACRX_LMR_DATA_REQUEST = 409 /* 0x199 */, 47662306a36Sopenharmony_ci HAL_PHYRX_LMR_TRANSFER_DONE = 410 /* 0x19a */, 47762306a36Sopenharmony_ci HAL_PHYRX_LMR_TRANSFER_ABORT = 411 /* 0x19b */, 47862306a36Sopenharmony_ci HAL_PHYRX_LMR_READ_REQUEST_ACK = 412 /* 0x19c */, 47962306a36Sopenharmony_ci HAL_MACRX_SECURE_LTF_SEQ_PTR = 413 /* 0x19d */, 48062306a36Sopenharmony_ci HAL_PHYRX_USER_INFO_MU_UL = 414 /* 0x19e */, 48162306a36Sopenharmony_ci HAL_MPDU_QUEUE_OVERVIEW = 415 /* 0x19f */, 48262306a36Sopenharmony_ci HAL_SCHEDULER_NAV_INFO = 416 /* 0x1a0 */, 48362306a36Sopenharmony_ci HAL_LMR_PEER_ENTRY = 418 /* 0x1a2 */, 48462306a36Sopenharmony_ci HAL_LMR_MPDU_START = 419 /* 0x1a3 */, 48562306a36Sopenharmony_ci HAL_LMR_DATA = 420 /* 0x1a4 */, 48662306a36Sopenharmony_ci HAL_LMR_MPDU_END = 421 /* 0x1a5 */, 48762306a36Sopenharmony_ci HAL_REO_GET_QUEUE_1K_STATS_STATUS = 422 /* 0x1a6 */, 48862306a36Sopenharmony_ci HAL_RX_FRAME_1K_BITMAP_ACK = 423 /* 0x1a7 */, 48962306a36Sopenharmony_ci HAL_TX_FES_STATUS_1K_BA = 424 /* 0x1a8 */, 49062306a36Sopenharmony_ci HAL_TQM_ACKED_1K_MPDU = 425 /* 0x1a9 */, 49162306a36Sopenharmony_ci HAL_MACRX_INBSS_OBSS_IND = 426 /* 0x1aa */, 49262306a36Sopenharmony_ci HAL_PHYRX_LOCATION = 427 /* 0x1ab */, 49362306a36Sopenharmony_ci HAL_MLO_TX_NOTIFICATION_SU = 428 /* 0x1ac */, 49462306a36Sopenharmony_ci HAL_MLO_TX_NOTIFICATION_MU = 429 /* 0x1ad */, 49562306a36Sopenharmony_ci HAL_MLO_TX_REQ_SU = 430 /* 0x1ae */, 49662306a36Sopenharmony_ci HAL_MLO_TX_REQ_MU = 431 /* 0x1af */, 49762306a36Sopenharmony_ci HAL_MLO_TX_RESP = 432 /* 0x1b0 */, 49862306a36Sopenharmony_ci HAL_MLO_RX_NOTIFICATION = 433 /* 0x1b1 */, 49962306a36Sopenharmony_ci HAL_MLO_BKOFF_TRUNC_REQ = 434 /* 0x1b2 */, 50062306a36Sopenharmony_ci HAL_MLO_TBTT_NOTIFICATION = 435 /* 0x1b3 */, 50162306a36Sopenharmony_ci HAL_MLO_MESSAGE = 436 /* 0x1b4 */, 50262306a36Sopenharmony_ci HAL_MLO_TS_SYNC_MSG = 437 /* 0x1b5 */, 50362306a36Sopenharmony_ci HAL_MLO_FES_SETUP = 438 /* 0x1b6 */, 50462306a36Sopenharmony_ci HAL_MLO_PDG_FES_SETUP_SU = 439 /* 0x1b7 */, 50562306a36Sopenharmony_ci HAL_MLO_PDG_FES_SETUP_MU = 440 /* 0x1b8 */, 50662306a36Sopenharmony_ci HAL_MPDU_INFO_1K_BITMAP = 441 /* 0x1b9 */, 50762306a36Sopenharmony_ci HAL_MON_BUF_ADDR = 442 /* 0x1ba */, 50862306a36Sopenharmony_ci HAL_TX_FRAG_STATE = 443 /* 0x1bb */, 50962306a36Sopenharmony_ci HAL_MACTXHT_SIG_USR_OFDMA = 446 /* 0x1be */, 51062306a36Sopenharmony_ci HAL_PHYRXHT_SIG_CMN_PUNC = 448 /* 0x1c0 */, 51162306a36Sopenharmony_ci HAL_PHYRXHT_SIG_CMN_OFDMA = 450 /* 0x1c2 */, 51262306a36Sopenharmony_ci HAL_PHYRXHT_SIG_USR_OFDMA = 454 /* 0x1c6 */, 51362306a36Sopenharmony_ci HAL_PHYRX_PKT_END_PART1 = 456 /* 0x1c8 */, 51462306a36Sopenharmony_ci HAL_MACTXXPECT_NDP_RECEPTION = 457 /* 0x1c9 */, 51562306a36Sopenharmony_ci HAL_MACTX_SECURE_LTF_SEQ_PTR = 458 /* 0x1ca */, 51662306a36Sopenharmony_ci HAL_MLO_PDG_BKOFF_TRUNC_NOTIFY = 460 /* 0x1cc */, 51762306a36Sopenharmony_ci HAL_PHYRX_11AZ_INTEGRITY_DATA = 461 /* 0x1cd */, 51862306a36Sopenharmony_ci HAL_PHYTX_LOCATION = 462 /* 0x1ce */, 51962306a36Sopenharmony_ci HAL_PHYTX_11AZ_INTEGRITY_DATA = 463 /* 0x1cf */, 52062306a36Sopenharmony_ci HAL_MACTXHT_SIG_USR_SU = 466 /* 0x1d2 */, 52162306a36Sopenharmony_ci HAL_MACTXHT_SIG_USR_MU_MIMO = 467 /* 0x1d3 */, 52262306a36Sopenharmony_ci HAL_PHYRXHT_SIG_USR_SU = 468 /* 0x1d4 */, 52362306a36Sopenharmony_ci HAL_PHYRXHT_SIG_USR_MU_MIMO = 469 /* 0x1d5 */, 52462306a36Sopenharmony_ci HAL_PHYRX_GENERIC_U_SIG = 470 /* 0x1d6 */, 52562306a36Sopenharmony_ci HAL_PHYRX_GENERICHT_SIG = 471 /* 0x1d7 */, 52662306a36Sopenharmony_ci HAL_OVERWRITE_RESP_START = 472 /* 0x1d8 */, 52762306a36Sopenharmony_ci HAL_OVERWRITE_RESP_PREAMBLE_INFO = 473 /* 0x1d9 */, 52862306a36Sopenharmony_ci HAL_OVERWRITE_RESP_FRAME_INFO = 474 /* 0x1da */, 52962306a36Sopenharmony_ci HAL_OVERWRITE_RESP_END = 475 /* 0x1db */, 53062306a36Sopenharmony_ci HAL_RXPCUARLY_RX_INDICATION = 476 /* 0x1dc */, 53162306a36Sopenharmony_ci HAL_MON_DROP = 477 /* 0x1dd */, 53262306a36Sopenharmony_ci HAL_MACRX_MU_UPLINK_COMMON_SNIFF = 478 /* 0x1de */, 53362306a36Sopenharmony_ci HAL_MACRX_MU_UPLINK_USER_SETUP_SNIFF = 479 /* 0x1df */, 53462306a36Sopenharmony_ci HAL_MACRX_MU_UPLINK_USER_SEL_SNIFF = 480 /* 0x1e0 */, 53562306a36Sopenharmony_ci HAL_MACRX_MU_UPLINK_FCS_STATUS_SNIFF = 481 /* 0x1e1 */, 53662306a36Sopenharmony_ci HAL_MACTX_PREFETCH_CV_DMA = 482 /* 0x1e2 */, 53762306a36Sopenharmony_ci HAL_MACTX_PREFETCH_CV_PER_USER = 483 /* 0x1e3 */, 53862306a36Sopenharmony_ci HAL_PHYRX_OTHER_RECEIVE_INFO_ALL_SIGB_DETAILS = 484 /* 0x1e4 */, 53962306a36Sopenharmony_ci HAL_MACTX_BF_PARAMS_UPDATE_COMMON = 485 /* 0x1e5 */, 54062306a36Sopenharmony_ci HAL_MACTX_BF_PARAMS_UPDATE_PER_USER = 486 /* 0x1e6 */, 54162306a36Sopenharmony_ci HAL_RANGING_USER_DETAILS = 487 /* 0x1e7 */, 54262306a36Sopenharmony_ci HAL_PHYTX_CV_CORR_STATUS = 488 /* 0x1e8 */, 54362306a36Sopenharmony_ci HAL_PHYTX_CV_CORR_COMMON = 489 /* 0x1e9 */, 54462306a36Sopenharmony_ci HAL_PHYTX_CV_CORR_USER = 490 /* 0x1ea */, 54562306a36Sopenharmony_ci HAL_MACTX_CV_CORR_COMMON = 491 /* 0x1eb */, 54662306a36Sopenharmony_ci HAL_MACTX_CV_CORR_MAC_INFO_GROUP = 492 /* 0x1ec */, 54762306a36Sopenharmony_ci HAL_BW_PUNCTUREVAL_WRAPPER = 493 /* 0x1ed */, 54862306a36Sopenharmony_ci HAL_MACTX_RX_NOTIFICATION_FOR_PHY = 494 /* 0x1ee */, 54962306a36Sopenharmony_ci HAL_MACTX_TX_NOTIFICATION_FOR_PHY = 495 /* 0x1ef */, 55062306a36Sopenharmony_ci HAL_MACTX_MU_UPLINK_COMMON_PER_BW = 496 /* 0x1f0 */, 55162306a36Sopenharmony_ci HAL_MACTX_MU_UPLINK_USER_SETUP_PER_BW = 497 /* 0x1f1 */, 55262306a36Sopenharmony_ci HAL_RX_PPDU_END_USER_STATS_EXT2 = 498 /* 0x1f2 */, 55362306a36Sopenharmony_ci HAL_FW2SW_MON = 499 /* 0x1f3 */, 55462306a36Sopenharmony_ci HAL_WSI_DIRECT_MESSAGE = 500 /* 0x1f4 */, 55562306a36Sopenharmony_ci HAL_MACTXMLSR_PRE_SWITCH = 501 /* 0x1f5 */, 55662306a36Sopenharmony_ci HAL_MACTXMLSR_SWITCH = 502 /* 0x1f6 */, 55762306a36Sopenharmony_ci HAL_MACTXMLSR_SWITCH_BACK = 503 /* 0x1f7 */, 55862306a36Sopenharmony_ci HAL_PHYTXMLSR_SWITCH_ACK = 504 /* 0x1f8 */, 55962306a36Sopenharmony_ci HAL_PHYTXMLSR_SWITCH_BACK_ACK = 505 /* 0x1f9 */, 56062306a36Sopenharmony_ci HAL_SPARE_REUSE_TAG_0 = 506 /* 0x1fa */, 56162306a36Sopenharmony_ci HAL_SPARE_REUSE_TAG_1 = 507 /* 0x1fb */, 56262306a36Sopenharmony_ci HAL_SPARE_REUSE_TAG_2 = 508 /* 0x1fc */, 56362306a36Sopenharmony_ci HAL_SPARE_REUSE_TAG_3 = 509 /* 0x1fd */, 56462306a36Sopenharmony_ci /* FIXME: Assign correct value for HAL_TCL_DATA_CMD */ 56562306a36Sopenharmony_ci HAL_TCL_DATA_CMD = 510, 56662306a36Sopenharmony_ci HAL_TLV_BASE = 511 /* 0x1ff */, 56762306a36Sopenharmony_ci}; 56862306a36Sopenharmony_ci 56962306a36Sopenharmony_ci#define HAL_TLV_HDR_TAG GENMASK(9, 1) 57062306a36Sopenharmony_ci#define HAL_TLV_HDR_LEN GENMASK(25, 10) 57162306a36Sopenharmony_ci#define HAL_TLV_USR_ID GENMASK(31, 26) 57262306a36Sopenharmony_ci 57362306a36Sopenharmony_ci#define HAL_TLV_ALIGN 4 57462306a36Sopenharmony_ci 57562306a36Sopenharmony_cistruct hal_tlv_hdr { 57662306a36Sopenharmony_ci __le32 tl; 57762306a36Sopenharmony_ci u8 value[]; 57862306a36Sopenharmony_ci} __packed; 57962306a36Sopenharmony_ci 58062306a36Sopenharmony_ci#define HAL_TLV_64_HDR_TAG GENMASK(9, 1) 58162306a36Sopenharmony_ci#define HAL_TLV_64_HDR_LEN GENMASK(21, 10) 58262306a36Sopenharmony_ci 58362306a36Sopenharmony_cistruct hal_tlv_64_hdr { 58462306a36Sopenharmony_ci u64 tl; 58562306a36Sopenharmony_ci u8 value[]; 58662306a36Sopenharmony_ci} __packed; 58762306a36Sopenharmony_ci 58862306a36Sopenharmony_ci#define RX_MPDU_DESC_INFO0_MSDU_COUNT GENMASK(7, 0) 58962306a36Sopenharmony_ci#define RX_MPDU_DESC_INFO0_FRAG_FLAG BIT(8) 59062306a36Sopenharmony_ci#define RX_MPDU_DESC_INFO0_MPDU_RETRY BIT(9) 59162306a36Sopenharmony_ci#define RX_MPDU_DESC_INFO0_AMPDU_FLAG BIT(10) 59262306a36Sopenharmony_ci#define RX_MPDU_DESC_INFO0_BAR_FRAME BIT(11) 59362306a36Sopenharmony_ci#define RX_MPDU_DESC_INFO0_VALID_PN BIT(12) 59462306a36Sopenharmony_ci#define RX_MPDU_DESC_INFO0_RAW_MPDU BIT(13) 59562306a36Sopenharmony_ci#define RX_MPDU_DESC_INFO0_MORE_FRAG_FLAG BIT(14) 59662306a36Sopenharmony_ci#define RX_MPDU_DESC_INFO0_SRC_INFO GENMASK(26, 15) 59762306a36Sopenharmony_ci#define RX_MPDU_DESC_INFO0_MPDU_QOS_CTRL_VALID BIT(27) 59862306a36Sopenharmony_ci#define RX_MPDU_DESC_INFO0_TID GENMASK(31, 28) 59962306a36Sopenharmony_ci 60062306a36Sopenharmony_ci/* TODO revisit after meta data is concluded */ 60162306a36Sopenharmony_ci#define RX_MPDU_DESC_META_DATA_PEER_ID GENMASK(15, 0) 60262306a36Sopenharmony_ci 60362306a36Sopenharmony_cistruct rx_mpdu_desc { 60462306a36Sopenharmony_ci __le32 info0; /* %RX_MPDU_DESC_INFO */ 60562306a36Sopenharmony_ci __le32 peer_meta_data; 60662306a36Sopenharmony_ci} __packed; 60762306a36Sopenharmony_ci 60862306a36Sopenharmony_ci/* rx_mpdu_desc 60962306a36Sopenharmony_ci * Producer: RXDMA 61062306a36Sopenharmony_ci * Consumer: REO/SW/FW 61162306a36Sopenharmony_ci * 61262306a36Sopenharmony_ci * msdu_count 61362306a36Sopenharmony_ci * The number of MSDUs within the MPDU 61462306a36Sopenharmony_ci * 61562306a36Sopenharmony_ci * fragment_flag 61662306a36Sopenharmony_ci * When set, this MPDU is a fragment and REO should forward this 61762306a36Sopenharmony_ci * fragment MPDU to the REO destination ring without any reorder 61862306a36Sopenharmony_ci * checks, pn checks or bitmap update. This implies that REO is 61962306a36Sopenharmony_ci * forwarding the pointer to the MSDU link descriptor. 62062306a36Sopenharmony_ci * 62162306a36Sopenharmony_ci * mpdu_retry_bit 62262306a36Sopenharmony_ci * The retry bit setting from the MPDU header of the received frame 62362306a36Sopenharmony_ci * 62462306a36Sopenharmony_ci * ampdu_flag 62562306a36Sopenharmony_ci * Indicates the MPDU was received as part of an A-MPDU. 62662306a36Sopenharmony_ci * 62762306a36Sopenharmony_ci * bar_frame 62862306a36Sopenharmony_ci * Indicates the received frame is a BAR frame. After processing, 62962306a36Sopenharmony_ci * this frame shall be pushed to SW or deleted. 63062306a36Sopenharmony_ci * 63162306a36Sopenharmony_ci * valid_pn 63262306a36Sopenharmony_ci * When not set, REO will not perform a PN sequence number check. 63362306a36Sopenharmony_ci * 63462306a36Sopenharmony_ci * raw_mpdu 63562306a36Sopenharmony_ci * Field only valid when first_msdu_in_mpdu_flag is set. Indicates 63662306a36Sopenharmony_ci * the contents in the MSDU buffer contains a 'RAW' MPDU. This 63762306a36Sopenharmony_ci * 'RAW' MPDU might be spread out over multiple MSDU buffers. 63862306a36Sopenharmony_ci * 63962306a36Sopenharmony_ci * more_fragment_flag 64062306a36Sopenharmony_ci * The More Fragment bit setting from the MPDU header of the 64162306a36Sopenharmony_ci * received frame 64262306a36Sopenharmony_ci * 64362306a36Sopenharmony_ci * src_info 64462306a36Sopenharmony_ci * Source (Virtual) device/interface info associated with this peer. 64562306a36Sopenharmony_ci * This field gets passed on by REO to PPE in the EDMA descriptor. 64662306a36Sopenharmony_ci * 64762306a36Sopenharmony_ci * mpdu_qos_control_valid 64862306a36Sopenharmony_ci * When set, the MPDU has a QoS control field 64962306a36Sopenharmony_ci * 65062306a36Sopenharmony_ci * tid 65162306a36Sopenharmony_ci * Field only valid when mpdu_qos_control_valid is set 65262306a36Sopenharmony_ci */ 65362306a36Sopenharmony_ci 65462306a36Sopenharmony_cienum hal_rx_msdu_desc_reo_dest_ind { 65562306a36Sopenharmony_ci HAL_RX_MSDU_DESC_REO_DEST_IND_TCL, 65662306a36Sopenharmony_ci HAL_RX_MSDU_DESC_REO_DEST_IND_SW1, 65762306a36Sopenharmony_ci HAL_RX_MSDU_DESC_REO_DEST_IND_SW2, 65862306a36Sopenharmony_ci HAL_RX_MSDU_DESC_REO_DEST_IND_SW3, 65962306a36Sopenharmony_ci HAL_RX_MSDU_DESC_REO_DEST_IND_SW4, 66062306a36Sopenharmony_ci HAL_RX_MSDU_DESC_REO_DEST_IND_RELEASE, 66162306a36Sopenharmony_ci HAL_RX_MSDU_DESC_REO_DEST_IND_FW, 66262306a36Sopenharmony_ci HAL_RX_MSDU_DESC_REO_DEST_IND_SW5, 66362306a36Sopenharmony_ci HAL_RX_MSDU_DESC_REO_DEST_IND_SW6, 66462306a36Sopenharmony_ci HAL_RX_MSDU_DESC_REO_DEST_IND_SW7, 66562306a36Sopenharmony_ci HAL_RX_MSDU_DESC_REO_DEST_IND_SW8, 66662306a36Sopenharmony_ci}; 66762306a36Sopenharmony_ci 66862306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_FIRST_MSDU_IN_MPDU BIT(0) 66962306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_LAST_MSDU_IN_MPDU BIT(1) 67062306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_MSDU_CONTINUATION BIT(2) 67162306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_MSDU_LENGTH GENMASK(16, 3) 67262306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_MSDU_DROP BIT(17) 67362306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_VALID_SA BIT(18) 67462306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_VALID_DA BIT(19) 67562306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_DA_MCBC BIT(20) 67662306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_L3_HDR_PAD_MSB BIT(21) 67762306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_TCP_UDP_CHKSUM_FAIL BIT(22) 67862306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_IP_CHKSUM_FAIL BIT(23) 67962306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_FROM_DS BIT(24) 68062306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_TO_DS BIT(25) 68162306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_INTRA_BSS BIT(26) 68262306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_DST_CHIP_ID GENMASK(28, 27) 68362306a36Sopenharmony_ci#define RX_MSDU_DESC_INFO0_DECAP_FORMAT GENMASK(30, 29) 68462306a36Sopenharmony_ci 68562306a36Sopenharmony_ci#define HAL_RX_MSDU_PKT_LENGTH_GET(val) \ 68662306a36Sopenharmony_ci (u32_get_bits((val), RX_MSDU_DESC_INFO0_MSDU_LENGTH)) 68762306a36Sopenharmony_ci 68862306a36Sopenharmony_cistruct rx_msdu_desc { 68962306a36Sopenharmony_ci __le32 info0; 69062306a36Sopenharmony_ci} __packed; 69162306a36Sopenharmony_ci 69262306a36Sopenharmony_ci/* rx_msdu_desc 69362306a36Sopenharmony_ci * 69462306a36Sopenharmony_ci * first_msdu_in_mpdu 69562306a36Sopenharmony_ci * Indicates first msdu in mpdu. 69662306a36Sopenharmony_ci * 69762306a36Sopenharmony_ci * last_msdu_in_mpdu 69862306a36Sopenharmony_ci * Indicates last msdu in mpdu. This flag can be true only when 69962306a36Sopenharmony_ci * 'Msdu_continuation' set to 0. This implies that when an msdu 70062306a36Sopenharmony_ci * is spread out over multiple buffers and thus msdu_continuation 70162306a36Sopenharmony_ci * is set, only for the very last buffer of the msdu, can the 70262306a36Sopenharmony_ci * 'last_msdu_in_mpdu' be set. 70362306a36Sopenharmony_ci * 70462306a36Sopenharmony_ci * When both first_msdu_in_mpdu and last_msdu_in_mpdu are set, 70562306a36Sopenharmony_ci * the MPDU that this MSDU belongs to only contains a single MSDU. 70662306a36Sopenharmony_ci * 70762306a36Sopenharmony_ci * msdu_continuation 70862306a36Sopenharmony_ci * When set, this MSDU buffer was not able to hold the entire MSDU. 70962306a36Sopenharmony_ci * The next buffer will therefore contain additional information 71062306a36Sopenharmony_ci * related to this MSDU. 71162306a36Sopenharmony_ci * 71262306a36Sopenharmony_ci * msdu_length 71362306a36Sopenharmony_ci * Field is only valid in combination with the 'first_msdu_in_mpdu' 71462306a36Sopenharmony_ci * being set. Full MSDU length in bytes after decapsulation. This 71562306a36Sopenharmony_ci * field is still valid for MPDU frames without A-MSDU. It still 71662306a36Sopenharmony_ci * represents MSDU length after decapsulation Or in case of RAW 71762306a36Sopenharmony_ci * MPDUs, it indicates the length of the entire MPDU (without FCS 71862306a36Sopenharmony_ci * field). 71962306a36Sopenharmony_ci * 72062306a36Sopenharmony_ci * msdu_drop 72162306a36Sopenharmony_ci * Indicates that REO shall drop this MSDU and not forward it to 72262306a36Sopenharmony_ci * any other ring. 72362306a36Sopenharmony_ci * 72462306a36Sopenharmony_ci * valid_sa 72562306a36Sopenharmony_ci * Indicates OLE found a valid SA entry for this MSDU. 72662306a36Sopenharmony_ci * 72762306a36Sopenharmony_ci * valid_da 72862306a36Sopenharmony_ci * When set, OLE found a valid DA entry for this MSDU. 72962306a36Sopenharmony_ci * 73062306a36Sopenharmony_ci * da_mcbc 73162306a36Sopenharmony_ci * Field Only valid if valid_da is set. Indicates the DA address 73262306a36Sopenharmony_ci * is a Multicast or Broadcast address for this MSDU. 73362306a36Sopenharmony_ci * 73462306a36Sopenharmony_ci * l3_header_padding_msb 73562306a36Sopenharmony_ci * Passed on from 'RX_MSDU_END' TLV (only the MSB is reported as 73662306a36Sopenharmony_ci * the LSB is always zero). Number of bytes padded to make sure 73762306a36Sopenharmony_ci * that the L3 header will always start of a Dword boundary 73862306a36Sopenharmony_ci * 73962306a36Sopenharmony_ci * tcp_udp_checksum_fail 74062306a36Sopenharmony_ci * Passed on from 'RX_ATTENTION' TLV 74162306a36Sopenharmony_ci * Indicates that the computed checksum did not match the checksum 74262306a36Sopenharmony_ci * in the TCP/UDP header. 74362306a36Sopenharmony_ci * 74462306a36Sopenharmony_ci * ip_checksum_fail 74562306a36Sopenharmony_ci * Passed on from 'RX_ATTENTION' TLV 74662306a36Sopenharmony_ci * Indicates that the computed checksum did not match the checksum 74762306a36Sopenharmony_ci * in the IP header. 74862306a36Sopenharmony_ci * 74962306a36Sopenharmony_ci * from_DS 75062306a36Sopenharmony_ci * Set if the 'from DS' bit is set in the frame control. 75162306a36Sopenharmony_ci * 75262306a36Sopenharmony_ci * to_DS 75362306a36Sopenharmony_ci * Set if the 'to DS' bit is set in the frame control. 75462306a36Sopenharmony_ci * 75562306a36Sopenharmony_ci * intra_bss 75662306a36Sopenharmony_ci * This packet needs intra-BSS routing by SW as the 'vdev_id' 75762306a36Sopenharmony_ci * for the destination is the same as the 'vdev_id' that this 75862306a36Sopenharmony_ci * MSDU was got in. 75962306a36Sopenharmony_ci * 76062306a36Sopenharmony_ci * dest_chip_id 76162306a36Sopenharmony_ci * If intra_bss is set, copied by RXOLE/RXDMA from 'ADDR_SEARCH_ENTRY' 76262306a36Sopenharmony_ci * to support intra-BSS routing with multi-chip multi-link operation. 76362306a36Sopenharmony_ci * This indicates into which chip's TCL the packet should be queued. 76462306a36Sopenharmony_ci * 76562306a36Sopenharmony_ci * decap_format 76662306a36Sopenharmony_ci * Indicates the format after decapsulation: 76762306a36Sopenharmony_ci */ 76862306a36Sopenharmony_ci 76962306a36Sopenharmony_ci#define RX_MSDU_EXT_DESC_INFO0_REO_DEST_IND GENMASK(4, 0) 77062306a36Sopenharmony_ci#define RX_MSDU_EXT_DESC_INFO0_SERVICE_CODE GENMASK(13, 5) 77162306a36Sopenharmony_ci#define RX_MSDU_EXT_DESC_INFO0_PRIORITY_VALID BIT(14) 77262306a36Sopenharmony_ci#define RX_MSDU_EXT_DESC_INFO0_DATA_OFFSET GENMASK(26, 15) 77362306a36Sopenharmony_ci#define RX_MSDU_EXT_DESC_INFO0_SRC_LINK_ID GENMASK(29, 27) 77462306a36Sopenharmony_ci 77562306a36Sopenharmony_cistruct rx_msdu_ext_desc { 77662306a36Sopenharmony_ci __le32 info0; 77762306a36Sopenharmony_ci} __packed; 77862306a36Sopenharmony_ci 77962306a36Sopenharmony_ci/* rx_msdu_ext_desc 78062306a36Sopenharmony_ci * 78162306a36Sopenharmony_ci * reo_destination_indication 78262306a36Sopenharmony_ci * The ID of the REO exit ring where the MSDU frame shall push 78362306a36Sopenharmony_ci * after (MPDU level) reordering has finished. 78462306a36Sopenharmony_ci * 78562306a36Sopenharmony_ci * service_code 78662306a36Sopenharmony_ci * Opaque service code between PPE and Wi-Fi 78762306a36Sopenharmony_ci * 78862306a36Sopenharmony_ci * priority_valid 78962306a36Sopenharmony_ci * 79062306a36Sopenharmony_ci * data_offset 79162306a36Sopenharmony_ci * The offset to Rx packet data within the buffer (including 79262306a36Sopenharmony_ci * Rx DMA offset programming and L3 header padding inserted 79362306a36Sopenharmony_ci * by Rx OLE). 79462306a36Sopenharmony_ci * 79562306a36Sopenharmony_ci * src_link_id 79662306a36Sopenharmony_ci * Set to the link ID of the PMAC that received the frame 79762306a36Sopenharmony_ci */ 79862306a36Sopenharmony_ci 79962306a36Sopenharmony_cienum hal_reo_dest_ring_buffer_type { 80062306a36Sopenharmony_ci HAL_REO_DEST_RING_BUFFER_TYPE_MSDU, 80162306a36Sopenharmony_ci HAL_REO_DEST_RING_BUFFER_TYPE_LINK_DESC, 80262306a36Sopenharmony_ci}; 80362306a36Sopenharmony_ci 80462306a36Sopenharmony_cienum hal_reo_dest_ring_push_reason { 80562306a36Sopenharmony_ci HAL_REO_DEST_RING_PUSH_REASON_ERR_DETECTED, 80662306a36Sopenharmony_ci HAL_REO_DEST_RING_PUSH_REASON_ROUTING_INSTRUCTION, 80762306a36Sopenharmony_ci}; 80862306a36Sopenharmony_ci 80962306a36Sopenharmony_cienum hal_reo_dest_ring_error_code { 81062306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_DESC_ADDR_ZERO, 81162306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_DESC_INVALID, 81262306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_AMPDU_IN_NON_BA, 81362306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_NON_BA_DUPLICATE, 81462306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_BA_DUPLICATE, 81562306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_FRAME_2K_JUMP, 81662306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_BAR_2K_JUMP, 81762306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_FRAME_OOR, 81862306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_BAR_OOR, 81962306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_NO_BA_SESSION, 82062306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_FRAME_SN_EQUALS_SSN, 82162306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_PN_CHECK_FAILED, 82262306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_2K_ERR_FLAG_SET, 82362306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_PN_ERR_FLAG_SET, 82462306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_DESC_BLOCKED, 82562306a36Sopenharmony_ci HAL_REO_DEST_RING_ERROR_CODE_MAX, 82662306a36Sopenharmony_ci}; 82762306a36Sopenharmony_ci 82862306a36Sopenharmony_ci#define HAL_REO_DEST_RING_INFO0_BUFFER_TYPE BIT(0) 82962306a36Sopenharmony_ci#define HAL_REO_DEST_RING_INFO0_PUSH_REASON GENMASK(2, 1) 83062306a36Sopenharmony_ci#define HAL_REO_DEST_RING_INFO0_ERROR_CODE GENMASK(7, 3) 83162306a36Sopenharmony_ci#define HAL_REO_DEST_RING_INFO0_MSDU_DATA_SIZE GENMASK(11, 8) 83262306a36Sopenharmony_ci#define HAL_REO_DEST_RING_INFO0_SW_EXCEPTION BIT(12) 83362306a36Sopenharmony_ci#define HAL_REO_DEST_RING_INFO0_SRC_LINK_ID GENMASK(15, 13) 83462306a36Sopenharmony_ci#define HAL_REO_DEST_RING_INFO0_SIGNATURE GENMASK(19, 16) 83562306a36Sopenharmony_ci#define HAL_REO_DEST_RING_INFO0_RING_ID GENMASK(27, 20) 83662306a36Sopenharmony_ci#define HAL_REO_DEST_RING_INFO0_LOOPING_COUNT GENMASK(31, 28) 83762306a36Sopenharmony_ci 83862306a36Sopenharmony_cistruct hal_reo_dest_ring { 83962306a36Sopenharmony_ci struct ath12k_buffer_addr buf_addr_info; 84062306a36Sopenharmony_ci struct rx_mpdu_desc rx_mpdu_info; 84162306a36Sopenharmony_ci struct rx_msdu_desc rx_msdu_info; 84262306a36Sopenharmony_ci __le32 buf_va_lo; 84362306a36Sopenharmony_ci __le32 buf_va_hi; 84462306a36Sopenharmony_ci __le32 info0; /* %HAL_REO_DEST_RING_INFO0_ */ 84562306a36Sopenharmony_ci} __packed; 84662306a36Sopenharmony_ci 84762306a36Sopenharmony_ci/* hal_reo_dest_ring 84862306a36Sopenharmony_ci * 84962306a36Sopenharmony_ci * Producer: RXDMA 85062306a36Sopenharmony_ci * Consumer: REO/SW/FW 85162306a36Sopenharmony_ci * 85262306a36Sopenharmony_ci * buf_addr_info 85362306a36Sopenharmony_ci * Details of the physical address of a buffer or MSDU 85462306a36Sopenharmony_ci * link descriptor. 85562306a36Sopenharmony_ci * 85662306a36Sopenharmony_ci * rx_mpdu_info 85762306a36Sopenharmony_ci * General information related to the MPDU that is passed 85862306a36Sopenharmony_ci * on from REO entrance ring to the REO destination ring. 85962306a36Sopenharmony_ci * 86062306a36Sopenharmony_ci * rx_msdu_info 86162306a36Sopenharmony_ci * General information related to the MSDU that is passed 86262306a36Sopenharmony_ci * on from RXDMA all the way to the REO destination ring. 86362306a36Sopenharmony_ci * 86462306a36Sopenharmony_ci * buf_va_lo 86562306a36Sopenharmony_ci * Field only valid if Reo_dest_buffer_type is set to MSDU_buf_address 86662306a36Sopenharmony_ci * Lower 32 bits of the 64-bit virtual address corresponding 86762306a36Sopenharmony_ci * to Buf_or_link_desc_addr_info 86862306a36Sopenharmony_ci * 86962306a36Sopenharmony_ci * buf_va_hi 87062306a36Sopenharmony_ci * Address (upper 32 bits) of the REO queue descriptor. 87162306a36Sopenharmony_ci * Upper 32 bits of the 64-bit virtual address corresponding 87262306a36Sopenharmony_ci * to Buf_or_link_desc_addr_info 87362306a36Sopenharmony_ci * 87462306a36Sopenharmony_ci * buffer_type 87562306a36Sopenharmony_ci * Indicates the type of address provided in the buf_addr_info. 87662306a36Sopenharmony_ci * Values are defined in enum %HAL_REO_DEST_RING_BUFFER_TYPE_. 87762306a36Sopenharmony_ci * 87862306a36Sopenharmony_ci * push_reason 87962306a36Sopenharmony_ci * Reason for pushing this frame to this exit ring. Values are 88062306a36Sopenharmony_ci * defined in enum %HAL_REO_DEST_RING_PUSH_REASON_. 88162306a36Sopenharmony_ci * 88262306a36Sopenharmony_ci * error_code 88362306a36Sopenharmony_ci * Valid only when 'push_reason' is set. All error codes are 88462306a36Sopenharmony_ci * defined in enum %HAL_REO_DEST_RING_ERROR_CODE_. 88562306a36Sopenharmony_ci * 88662306a36Sopenharmony_ci * captured_msdu_data_size 88762306a36Sopenharmony_ci * The number of following REO_DESTINATION STRUCTs that have 88862306a36Sopenharmony_ci * been replaced with msdu_data extracted from the msdu_buffer 88962306a36Sopenharmony_ci * and copied into the ring for easy FW/SW access. 89062306a36Sopenharmony_ci * 89162306a36Sopenharmony_ci * sw_exception 89262306a36Sopenharmony_ci * This field has the same setting as the SW_exception field 89362306a36Sopenharmony_ci * in the corresponding REO_entrance_ring descriptor. 89462306a36Sopenharmony_ci * When set, the REO entrance descriptor is generated by FW, 89562306a36Sopenharmony_ci * and the MPDU was processed in the following way: 89662306a36Sopenharmony_ci * - NO re-order function is needed. 89762306a36Sopenharmony_ci * - MPDU delinking is determined by the setting of Entrance 89862306a36Sopenharmony_ci * ring field: SW_excection_mpdu_delink 89962306a36Sopenharmony_ci * - Destination ring selection is based on the setting of 90062306a36Sopenharmony_ci * the Entrance ring field SW_exception_destination _ring_valid 90162306a36Sopenharmony_ci * 90262306a36Sopenharmony_ci * src_link_id 90362306a36Sopenharmony_ci * Set to the link ID of the PMAC that received the frame 90462306a36Sopenharmony_ci * 90562306a36Sopenharmony_ci * signature 90662306a36Sopenharmony_ci * Set to value 0x8 when msdu capture mode is enabled for this ring 90762306a36Sopenharmony_ci * 90862306a36Sopenharmony_ci * ring_id 90962306a36Sopenharmony_ci * The buffer pointer ring id. 91062306a36Sopenharmony_ci * 0 - Idle ring 91162306a36Sopenharmony_ci * 1 - N refers to other rings. 91262306a36Sopenharmony_ci * 91362306a36Sopenharmony_ci * looping_count 91462306a36Sopenharmony_ci * Indicates the number of times the producer of entries into 91562306a36Sopenharmony_ci * this ring has looped around the ring. 91662306a36Sopenharmony_ci */ 91762306a36Sopenharmony_ci 91862306a36Sopenharmony_ci#define HAL_REO_TO_PPE_RING_INFO0_DATA_LENGTH GENMASK(15, 0) 91962306a36Sopenharmony_ci#define HAL_REO_TO_PPE_RING_INFO0_DATA_OFFSET GENMASK(23, 16) 92062306a36Sopenharmony_ci#define HAL_REO_TO_PPE_RING_INFO0_POOL_ID GENMASK(28, 24) 92162306a36Sopenharmony_ci#define HAL_REO_TO_PPE_RING_INFO0_PREHEADER BIT(29) 92262306a36Sopenharmony_ci#define HAL_REO_TO_PPE_RING_INFO0_TSO_EN BIT(30) 92362306a36Sopenharmony_ci#define HAL_REO_TO_PPE_RING_INFO0_MORE BIT(31) 92462306a36Sopenharmony_ci 92562306a36Sopenharmony_cistruct hal_reo_to_ppe_ring { 92662306a36Sopenharmony_ci __le32 buffer_addr; 92762306a36Sopenharmony_ci __le32 info0; /* %HAL_REO_TO_PPE_RING_INFO0_ */ 92862306a36Sopenharmony_ci} __packed; 92962306a36Sopenharmony_ci 93062306a36Sopenharmony_ci/* hal_reo_to_ppe_ring 93162306a36Sopenharmony_ci * 93262306a36Sopenharmony_ci * Producer: REO 93362306a36Sopenharmony_ci * Consumer: PPE 93462306a36Sopenharmony_ci * 93562306a36Sopenharmony_ci * buf_addr_info 93662306a36Sopenharmony_ci * Details of the physical address of a buffer or MSDU 93762306a36Sopenharmony_ci * link descriptor. 93862306a36Sopenharmony_ci * 93962306a36Sopenharmony_ci * data_length 94062306a36Sopenharmony_ci * Length of valid data in bytes 94162306a36Sopenharmony_ci * 94262306a36Sopenharmony_ci * data_offset 94362306a36Sopenharmony_ci * Offset to the data from buffer pointer. Can be used to 94462306a36Sopenharmony_ci * strip header in the data for tunnel termination etc. 94562306a36Sopenharmony_ci * 94662306a36Sopenharmony_ci * pool_id 94762306a36Sopenharmony_ci * REO has global configuration register for this field. 94862306a36Sopenharmony_ci * It may have several free buffer pools, each 94962306a36Sopenharmony_ci * RX-Descriptor ring can fetch free buffer from specific 95062306a36Sopenharmony_ci * buffer pool; pool id will indicate which pool the buffer 95162306a36Sopenharmony_ci * will be released to; POOL_ID Zero returned to SW 95262306a36Sopenharmony_ci * 95362306a36Sopenharmony_ci * preheader 95462306a36Sopenharmony_ci * Disabled: 0 (Default) 95562306a36Sopenharmony_ci * Enabled: 1 95662306a36Sopenharmony_ci * 95762306a36Sopenharmony_ci * tso_en 95862306a36Sopenharmony_ci * Disabled: 0 (Default) 95962306a36Sopenharmony_ci * Enabled: 1 96062306a36Sopenharmony_ci * 96162306a36Sopenharmony_ci * more 96262306a36Sopenharmony_ci * More Segments followed 96362306a36Sopenharmony_ci */ 96462306a36Sopenharmony_ci 96562306a36Sopenharmony_cienum hal_reo_entr_rxdma_push_reason { 96662306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_PUSH_REASON_ERR_DETECTED, 96762306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_PUSH_REASON_ROUTING_INSTRUCTION, 96862306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_PUSH_REASON_RX_FLUSH, 96962306a36Sopenharmony_ci}; 97062306a36Sopenharmony_ci 97162306a36Sopenharmony_cienum hal_reo_entr_rxdma_ecode { 97262306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_OVERFLOW_ERR, 97362306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_MPDU_LEN_ERR, 97462306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_FCS_ERR, 97562306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_DECRYPT_ERR, 97662306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_TKIP_MIC_ERR, 97762306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_UNECRYPTED_ERR, 97862306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_MSDU_LEN_ERR, 97962306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_MSDU_LIMIT_ERR, 98062306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_WIFI_PARSE_ERR, 98162306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_AMSDU_PARSE_ERR, 98262306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_SA_TIMEOUT_ERR, 98362306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_DA_TIMEOUT_ERR, 98462306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_FLOW_TIMEOUT_ERR, 98562306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_FLUSH_REQUEST_ERR, 98662306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_AMSDU_FRAG_ERR, 98762306a36Sopenharmony_ci HAL_REO_ENTR_RING_RXDMA_ECODE_MAX, 98862306a36Sopenharmony_ci}; 98962306a36Sopenharmony_ci 99062306a36Sopenharmony_cienum hal_rx_reo_dest_ring { 99162306a36Sopenharmony_ci HAL_RX_REO_DEST_RING_TCL, 99262306a36Sopenharmony_ci HAL_RX_REO_DEST_RING_SW1, 99362306a36Sopenharmony_ci HAL_RX_REO_DEST_RING_SW2, 99462306a36Sopenharmony_ci HAL_RX_REO_DEST_RING_SW3, 99562306a36Sopenharmony_ci HAL_RX_REO_DEST_RING_SW4, 99662306a36Sopenharmony_ci HAL_RX_REO_DEST_RING_RELEASE, 99762306a36Sopenharmony_ci HAL_RX_REO_DEST_RING_FW, 99862306a36Sopenharmony_ci HAL_RX_REO_DEST_RING_SW5, 99962306a36Sopenharmony_ci HAL_RX_REO_DEST_RING_SW6, 100062306a36Sopenharmony_ci HAL_RX_REO_DEST_RING_SW7, 100162306a36Sopenharmony_ci HAL_RX_REO_DEST_RING_SW8, 100262306a36Sopenharmony_ci}; 100362306a36Sopenharmony_ci 100462306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO0_QUEUE_ADDR_HI GENMASK(7, 0) 100562306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO0_MPDU_BYTE_COUNT GENMASK(21, 8) 100662306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO0_DEST_IND GENMASK(26, 22) 100762306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO0_FRAMELESS_BAR BIT(27) 100862306a36Sopenharmony_ci 100962306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO1_RXDMA_PUSH_REASON GENMASK(1, 0) 101062306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO1_RXDMA_ERROR_CODE GENMASK(6, 2) 101162306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO1_MPDU_FRAG_NUM GENMASK(10, 7) 101262306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO1_SW_EXCEPTION BIT(11) 101362306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO1_SW_EXCEPT_MPDU_DELINK BIT(12) 101462306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO1_SW_EXCEPTION_RING_VLD BIT(13) 101562306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO1_SW_EXCEPTION_RING GENMASK(18, 14) 101662306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO1_MPDU_SEQ_NUM GENMASK(30, 19) 101762306a36Sopenharmony_ci 101862306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO2_PHY_PPDU_ID GENMASK(15, 0) 101962306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO2_SRC_LINK_ID GENMASK(18, 16) 102062306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO2_RING_ID GENMASK(27, 20) 102162306a36Sopenharmony_ci#define HAL_REO_ENTR_RING_INFO2_LOOPING_COUNT GENMASK(31, 28) 102262306a36Sopenharmony_ci 102362306a36Sopenharmony_cistruct hal_reo_entrance_ring { 102462306a36Sopenharmony_ci struct ath12k_buffer_addr buf_addr_info; 102562306a36Sopenharmony_ci struct rx_mpdu_desc rx_mpdu_info; 102662306a36Sopenharmony_ci __le32 queue_addr_lo; 102762306a36Sopenharmony_ci __le32 info0; /* %HAL_REO_ENTR_RING_INFO0_ */ 102862306a36Sopenharmony_ci __le32 info1; /* %HAL_REO_ENTR_RING_INFO1_ */ 102962306a36Sopenharmony_ci __le32 info2; /* %HAL_REO_DEST_RING_INFO2_ */ 103062306a36Sopenharmony_ci 103162306a36Sopenharmony_ci} __packed; 103262306a36Sopenharmony_ci 103362306a36Sopenharmony_ci/* hal_reo_entrance_ring 103462306a36Sopenharmony_ci * 103562306a36Sopenharmony_ci * Producer: RXDMA 103662306a36Sopenharmony_ci * Consumer: REO 103762306a36Sopenharmony_ci * 103862306a36Sopenharmony_ci * buf_addr_info 103962306a36Sopenharmony_ci * Details of the physical address of a buffer or MSDU 104062306a36Sopenharmony_ci * link descriptor. 104162306a36Sopenharmony_ci * 104262306a36Sopenharmony_ci * rx_mpdu_info 104362306a36Sopenharmony_ci * General information related to the MPDU that is passed 104462306a36Sopenharmony_ci * on from REO entrance ring to the REO destination ring. 104562306a36Sopenharmony_ci * 104662306a36Sopenharmony_ci * queue_addr_lo 104762306a36Sopenharmony_ci * Address (lower 32 bits) of the REO queue descriptor. 104862306a36Sopenharmony_ci * 104962306a36Sopenharmony_ci * queue_addr_hi 105062306a36Sopenharmony_ci * Address (upper 8 bits) of the REO queue descriptor. 105162306a36Sopenharmony_ci * 105262306a36Sopenharmony_ci * mpdu_byte_count 105362306a36Sopenharmony_ci * An approximation of the number of bytes received in this MPDU. 105462306a36Sopenharmony_ci * Used to keeps stats on the amount of data flowing 105562306a36Sopenharmony_ci * through a queue. 105662306a36Sopenharmony_ci * 105762306a36Sopenharmony_ci * reo_destination_indication 105862306a36Sopenharmony_ci * The id of the reo exit ring where the msdu frame shall push 105962306a36Sopenharmony_ci * after (MPDU level) reordering has finished. Values are defined 106062306a36Sopenharmony_ci * in enum %HAL_RX_MSDU_DESC_REO_DEST_IND_. 106162306a36Sopenharmony_ci * 106262306a36Sopenharmony_ci * frameless_bar 106362306a36Sopenharmony_ci * Indicates that this REO entrance ring struct contains BAR info 106462306a36Sopenharmony_ci * from a multi TID BAR frame. The original multi TID BAR frame 106562306a36Sopenharmony_ci * itself contained all the REO info for the first TID, but all 106662306a36Sopenharmony_ci * the subsequent TID info and their linkage to the REO descriptors 106762306a36Sopenharmony_ci * is passed down as 'frameless' BAR info. 106862306a36Sopenharmony_ci * 106962306a36Sopenharmony_ci * The only fields valid in this descriptor when this bit is set 107062306a36Sopenharmony_ci * are queue_addr_lo, queue_addr_hi, mpdu_sequence_number, 107162306a36Sopenharmony_ci * bar_frame and peer_meta_data. 107262306a36Sopenharmony_ci * 107362306a36Sopenharmony_ci * rxdma_push_reason 107462306a36Sopenharmony_ci * Reason for pushing this frame to this exit ring. Values are 107562306a36Sopenharmony_ci * defined in enum %HAL_REO_ENTR_RING_RXDMA_PUSH_REASON_. 107662306a36Sopenharmony_ci * 107762306a36Sopenharmony_ci * rxdma_error_code 107862306a36Sopenharmony_ci * Valid only when 'push_reason' is set. All error codes are 107962306a36Sopenharmony_ci * defined in enum %HAL_REO_ENTR_RING_RXDMA_ECODE_. 108062306a36Sopenharmony_ci * 108162306a36Sopenharmony_ci * mpdu_fragment_number 108262306a36Sopenharmony_ci * Field only valid when Reo_level_mpdu_frame_info. 108362306a36Sopenharmony_ci * Rx_mpdu_desc_info_details.Fragment_flag is set. 108462306a36Sopenharmony_ci * 108562306a36Sopenharmony_ci * sw_exception 108662306a36Sopenharmony_ci * When not set, REO is performing all its default MPDU processing 108762306a36Sopenharmony_ci * operations, 108862306a36Sopenharmony_ci * When set, this REO entrance descriptor is generated by FW, and 108962306a36Sopenharmony_ci * should be processed as an exception. This implies: 109062306a36Sopenharmony_ci * NO re-order function is needed. 109162306a36Sopenharmony_ci * MPDU delinking is determined by the setting of field 109262306a36Sopenharmony_ci * SW_excection_mpdu_delink 109362306a36Sopenharmony_ci * 109462306a36Sopenharmony_ci * sw_exception_mpdu_delink 109562306a36Sopenharmony_ci * Field only valid when SW_exception is set. 109662306a36Sopenharmony_ci * 1'b0: REO should NOT delink the MPDU, and thus pass this 109762306a36Sopenharmony_ci * MPDU on to the destination ring as is. This implies that 109862306a36Sopenharmony_ci * in the REO_DESTINATION_RING struct field 109962306a36Sopenharmony_ci * Buf_or_link_desc_addr_info should point to an MSDU link 110062306a36Sopenharmony_ci * descriptor 110162306a36Sopenharmony_ci * 1'b1: REO should perform the normal MPDU delink into MSDU operations. 110262306a36Sopenharmony_ci * 110362306a36Sopenharmony_ci * sw_exception_dest_ring 110462306a36Sopenharmony_ci * Field only valid when fields SW_exception and SW 110562306a36Sopenharmony_ci * exception_destination_ring_valid are set. values are defined 110662306a36Sopenharmony_ci * in %HAL_RX_REO_DEST_RING_. 110762306a36Sopenharmony_ci * 110862306a36Sopenharmony_ci * mpdu_seq_number 110962306a36Sopenharmony_ci * The field can have two different meanings based on the setting 111062306a36Sopenharmony_ci * of sub-field Reo level mpdu frame info. 111162306a36Sopenharmony_ci * Rx_mpdu_desc_info_details. BAR_frame 111262306a36Sopenharmony_ci * 'BAR_frame' is NOT set: 111362306a36Sopenharmony_ci * The MPDU sequence number of the received frame. 111462306a36Sopenharmony_ci * 'BAR_frame' is set. 111562306a36Sopenharmony_ci * The MPDU Start sequence number from the BAR frame 111662306a36Sopenharmony_ci * 111762306a36Sopenharmony_ci * phy_ppdu_id 111862306a36Sopenharmony_ci * A PPDU counter value that PHY increments for every PPDU received 111962306a36Sopenharmony_ci * 112062306a36Sopenharmony_ci * src_link_id 112162306a36Sopenharmony_ci * Set to the link ID of the PMAC that received the frame 112262306a36Sopenharmony_ci * 112362306a36Sopenharmony_ci * ring_id 112462306a36Sopenharmony_ci * The buffer pointer ring id. 112562306a36Sopenharmony_ci * 0 - Idle ring 112662306a36Sopenharmony_ci * 1 - N refers to other rings. 112762306a36Sopenharmony_ci * 112862306a36Sopenharmony_ci * looping_count 112962306a36Sopenharmony_ci * Indicates the number of times the producer of entries into 113062306a36Sopenharmony_ci * this ring has looped around the ring. 113162306a36Sopenharmony_ci */ 113262306a36Sopenharmony_ci 113362306a36Sopenharmony_ci#define HAL_REO_CMD_HDR_INFO0_CMD_NUMBER GENMASK(15, 0) 113462306a36Sopenharmony_ci#define HAL_REO_CMD_HDR_INFO0_STATUS_REQUIRED BIT(16) 113562306a36Sopenharmony_ci 113662306a36Sopenharmony_cistruct hal_reo_cmd_hdr { 113762306a36Sopenharmony_ci __le32 info0; 113862306a36Sopenharmony_ci} __packed; 113962306a36Sopenharmony_ci 114062306a36Sopenharmony_ci#define HAL_REO_GET_QUEUE_STATS_INFO0_QUEUE_ADDR_HI GENMASK(7, 0) 114162306a36Sopenharmony_ci#define HAL_REO_GET_QUEUE_STATS_INFO0_CLEAR_STATS BIT(8) 114262306a36Sopenharmony_ci 114362306a36Sopenharmony_cistruct hal_reo_get_queue_stats { 114462306a36Sopenharmony_ci struct hal_reo_cmd_hdr cmd; 114562306a36Sopenharmony_ci __le32 queue_addr_lo; 114662306a36Sopenharmony_ci __le32 info0; 114762306a36Sopenharmony_ci __le32 rsvd0[6]; 114862306a36Sopenharmony_ci __le32 tlv64_pad; 114962306a36Sopenharmony_ci} __packed; 115062306a36Sopenharmony_ci 115162306a36Sopenharmony_ci/* hal_reo_get_queue_stats 115262306a36Sopenharmony_ci * Producer: SW 115362306a36Sopenharmony_ci * Consumer: REO 115462306a36Sopenharmony_ci * 115562306a36Sopenharmony_ci * cmd 115662306a36Sopenharmony_ci * Details for command execution tracking purposes. 115762306a36Sopenharmony_ci * 115862306a36Sopenharmony_ci * queue_addr_lo 115962306a36Sopenharmony_ci * Address (lower 32 bits) of the REO queue descriptor. 116062306a36Sopenharmony_ci * 116162306a36Sopenharmony_ci * queue_addr_hi 116262306a36Sopenharmony_ci * Address (upper 8 bits) of the REO queue descriptor. 116362306a36Sopenharmony_ci * 116462306a36Sopenharmony_ci * clear_stats 116562306a36Sopenharmony_ci * Clear stats settings. When set, Clear the stats after 116662306a36Sopenharmony_ci * generating the status. 116762306a36Sopenharmony_ci * 116862306a36Sopenharmony_ci * Following stats will be cleared. 116962306a36Sopenharmony_ci * Timeout_count 117062306a36Sopenharmony_ci * Forward_due_to_bar_count 117162306a36Sopenharmony_ci * Duplicate_count 117262306a36Sopenharmony_ci * Frames_in_order_count 117362306a36Sopenharmony_ci * BAR_received_count 117462306a36Sopenharmony_ci * MPDU_Frames_processed_count 117562306a36Sopenharmony_ci * MSDU_Frames_processed_count 117662306a36Sopenharmony_ci * Total_processed_byte_count 117762306a36Sopenharmony_ci * Late_receive_MPDU_count 117862306a36Sopenharmony_ci * window_jump_2k 117962306a36Sopenharmony_ci * Hole_count 118062306a36Sopenharmony_ci */ 118162306a36Sopenharmony_ci 118262306a36Sopenharmony_ci#define HAL_REO_FLUSH_QUEUE_INFO0_DESC_ADDR_HI GENMASK(7, 0) 118362306a36Sopenharmony_ci#define HAL_REO_FLUSH_QUEUE_INFO0_BLOCK_DESC_ADDR BIT(8) 118462306a36Sopenharmony_ci#define HAL_REO_FLUSH_QUEUE_INFO0_BLOCK_RESRC_IDX GENMASK(10, 9) 118562306a36Sopenharmony_ci 118662306a36Sopenharmony_cistruct hal_reo_flush_queue { 118762306a36Sopenharmony_ci struct hal_reo_cmd_hdr cmd; 118862306a36Sopenharmony_ci __le32 desc_addr_lo; 118962306a36Sopenharmony_ci __le32 info0; 119062306a36Sopenharmony_ci __le32 rsvd0[6]; 119162306a36Sopenharmony_ci} __packed; 119262306a36Sopenharmony_ci 119362306a36Sopenharmony_ci#define HAL_REO_FLUSH_CACHE_INFO0_CACHE_ADDR_HI GENMASK(7, 0) 119462306a36Sopenharmony_ci#define HAL_REO_FLUSH_CACHE_INFO0_FWD_ALL_MPDUS BIT(8) 119562306a36Sopenharmony_ci#define HAL_REO_FLUSH_CACHE_INFO0_RELEASE_BLOCK_IDX BIT(9) 119662306a36Sopenharmony_ci#define HAL_REO_FLUSH_CACHE_INFO0_BLOCK_RESRC_IDX GENMASK(11, 10) 119762306a36Sopenharmony_ci#define HAL_REO_FLUSH_CACHE_INFO0_FLUSH_WO_INVALIDATE BIT(12) 119862306a36Sopenharmony_ci#define HAL_REO_FLUSH_CACHE_INFO0_BLOCK_CACHE_USAGE BIT(13) 119962306a36Sopenharmony_ci#define HAL_REO_FLUSH_CACHE_INFO0_FLUSH_ALL BIT(14) 120062306a36Sopenharmony_ci 120162306a36Sopenharmony_cistruct hal_reo_flush_cache { 120262306a36Sopenharmony_ci struct hal_reo_cmd_hdr cmd; 120362306a36Sopenharmony_ci __le32 cache_addr_lo; 120462306a36Sopenharmony_ci __le32 info0; 120562306a36Sopenharmony_ci __le32 rsvd0[6]; 120662306a36Sopenharmony_ci} __packed; 120762306a36Sopenharmony_ci 120862306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO0_CMD_TYPE BIT(0) 120962306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO0_DESC_TYPE BIT(1) 121062306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO0_BANK_ID GENMASK(7, 2) 121162306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO0_TX_NOTIFY_FRAME GENMASK(10, 8) 121262306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO0_HDR_LEN_READ_SEL BIT(11) 121362306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO0_BUF_TIMESTAMP GENMASK(30, 12) 121462306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO0_BUF_TIMESTAMP_VLD BIT(31) 121562306a36Sopenharmony_ci 121662306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO1_CMD_NUM GENMASK(31, 16) 121762306a36Sopenharmony_ci 121862306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO2_DATA_LEN GENMASK(15, 0) 121962306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO2_IP4_CKSUM_EN BIT(16) 122062306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO2_UDP4_CKSUM_EN BIT(17) 122162306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO2_UDP6_CKSUM_EN BIT(18) 122262306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO2_TCP4_CKSUM_EN BIT(19) 122362306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO2_TCP6_CKSUM_EN BIT(20) 122462306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO2_TO_FW BIT(21) 122562306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO2_PKT_OFFSET GENMASK(31, 23) 122662306a36Sopenharmony_ci 122762306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO3_TID_OVERWRITE BIT(0) 122862306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO3_FLOW_OVERRIDE_EN BIT(1) 122962306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO3_CLASSIFY_INFO_SEL GENMASK(3, 2) 123062306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO3_TID GENMASK(7, 4) 123162306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO3_FLOW_OVERRIDE BIT(8) 123262306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO3_PMAC_ID GENMASK(10, 9) 123362306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO3_MSDU_COLOR GENMASK(12, 11) 123462306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO3_VDEV_ID GENMASK(31, 24) 123562306a36Sopenharmony_ci 123662306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO4_SEARCH_INDEX GENMASK(19, 0) 123762306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO4_CACHE_SET_NUM GENMASK(23, 20) 123862306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO4_IDX_LOOKUP_OVERRIDE BIT(24) 123962306a36Sopenharmony_ci 124062306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO5_RING_ID GENMASK(27, 20) 124162306a36Sopenharmony_ci#define HAL_TCL_DATA_CMD_INFO5_LOOPING_COUNT GENMASK(31, 28) 124262306a36Sopenharmony_ci 124362306a36Sopenharmony_cienum hal_encrypt_type { 124462306a36Sopenharmony_ci HAL_ENCRYPT_TYPE_WEP_40, 124562306a36Sopenharmony_ci HAL_ENCRYPT_TYPE_WEP_104, 124662306a36Sopenharmony_ci HAL_ENCRYPT_TYPE_TKIP_NO_MIC, 124762306a36Sopenharmony_ci HAL_ENCRYPT_TYPE_WEP_128, 124862306a36Sopenharmony_ci HAL_ENCRYPT_TYPE_TKIP_MIC, 124962306a36Sopenharmony_ci HAL_ENCRYPT_TYPE_WAPI, 125062306a36Sopenharmony_ci HAL_ENCRYPT_TYPE_CCMP_128, 125162306a36Sopenharmony_ci HAL_ENCRYPT_TYPE_OPEN, 125262306a36Sopenharmony_ci HAL_ENCRYPT_TYPE_CCMP_256, 125362306a36Sopenharmony_ci HAL_ENCRYPT_TYPE_GCMP_128, 125462306a36Sopenharmony_ci HAL_ENCRYPT_TYPE_AES_GCMP_256, 125562306a36Sopenharmony_ci HAL_ENCRYPT_TYPE_WAPI_GCM_SM4, 125662306a36Sopenharmony_ci}; 125762306a36Sopenharmony_ci 125862306a36Sopenharmony_cienum hal_tcl_encap_type { 125962306a36Sopenharmony_ci HAL_TCL_ENCAP_TYPE_RAW, 126062306a36Sopenharmony_ci HAL_TCL_ENCAP_TYPE_NATIVE_WIFI, 126162306a36Sopenharmony_ci HAL_TCL_ENCAP_TYPE_ETHERNET, 126262306a36Sopenharmony_ci HAL_TCL_ENCAP_TYPE_802_3 = 3, 126362306a36Sopenharmony_ci}; 126462306a36Sopenharmony_ci 126562306a36Sopenharmony_cienum hal_tcl_desc_type { 126662306a36Sopenharmony_ci HAL_TCL_DESC_TYPE_BUFFER, 126762306a36Sopenharmony_ci HAL_TCL_DESC_TYPE_EXT_DESC, 126862306a36Sopenharmony_ci}; 126962306a36Sopenharmony_ci 127062306a36Sopenharmony_cienum hal_wbm_htt_tx_comp_status { 127162306a36Sopenharmony_ci HAL_WBM_REL_HTT_TX_COMP_STATUS_OK, 127262306a36Sopenharmony_ci HAL_WBM_REL_HTT_TX_COMP_STATUS_DROP, 127362306a36Sopenharmony_ci HAL_WBM_REL_HTT_TX_COMP_STATUS_TTL, 127462306a36Sopenharmony_ci HAL_WBM_REL_HTT_TX_COMP_STATUS_REINJ, 127562306a36Sopenharmony_ci HAL_WBM_REL_HTT_TX_COMP_STATUS_INSPECT, 127662306a36Sopenharmony_ci HAL_WBM_REL_HTT_TX_COMP_STATUS_MEC_NOTIFY, 127762306a36Sopenharmony_ci HAL_WBM_REL_HTT_TX_COMP_STATUS_MAX, 127862306a36Sopenharmony_ci}; 127962306a36Sopenharmony_ci 128062306a36Sopenharmony_cistruct hal_tcl_data_cmd { 128162306a36Sopenharmony_ci struct ath12k_buffer_addr buf_addr_info; 128262306a36Sopenharmony_ci __le32 info0; 128362306a36Sopenharmony_ci __le32 info1; 128462306a36Sopenharmony_ci __le32 info2; 128562306a36Sopenharmony_ci __le32 info3; 128662306a36Sopenharmony_ci __le32 info4; 128762306a36Sopenharmony_ci __le32 info5; 128862306a36Sopenharmony_ci} __packed; 128962306a36Sopenharmony_ci 129062306a36Sopenharmony_ci/* hal_tcl_data_cmd 129162306a36Sopenharmony_ci * 129262306a36Sopenharmony_ci * buf_addr_info 129362306a36Sopenharmony_ci * Details of the physical address of a buffer or MSDU 129462306a36Sopenharmony_ci * link descriptor. 129562306a36Sopenharmony_ci * 129662306a36Sopenharmony_ci * tcl_cmd_type 129762306a36Sopenharmony_ci * used to select the type of TCL Command descriptor 129862306a36Sopenharmony_ci * 129962306a36Sopenharmony_ci * desc_type 130062306a36Sopenharmony_ci * Indicates the type of address provided in the buf_addr_info. 130162306a36Sopenharmony_ci * Values are defined in enum %HAL_REO_DEST_RING_BUFFER_TYPE_. 130262306a36Sopenharmony_ci * 130362306a36Sopenharmony_ci * bank_id 130462306a36Sopenharmony_ci * used to select one of the TCL register banks for fields removed 130562306a36Sopenharmony_ci * from 'TCL_DATA_CMD' that do not change often within one virtual 130662306a36Sopenharmony_ci * device or a set of virtual devices: 130762306a36Sopenharmony_ci * 130862306a36Sopenharmony_ci * tx_notify_frame 130962306a36Sopenharmony_ci * TCL copies this value to 'TQM_ENTRANCE_RING' field FW_tx_notify_frame. 131062306a36Sopenharmony_ci * 131162306a36Sopenharmony_ci * hdr_length_read_sel 131262306a36Sopenharmony_ci * used to select the per 'encap_type' register set for MSDU header 131362306a36Sopenharmony_ci * read length 131462306a36Sopenharmony_ci * 131562306a36Sopenharmony_ci * buffer_timestamp 131662306a36Sopenharmony_ci * buffer_timestamp_valid 131762306a36Sopenharmony_ci * Frame system entrance timestamp. It shall be filled by first 131862306a36Sopenharmony_ci * module (SW, TCL or TQM) that sees the frames first. 131962306a36Sopenharmony_ci * 132062306a36Sopenharmony_ci * cmd_num 132162306a36Sopenharmony_ci * This number can be used to match against status. 132262306a36Sopenharmony_ci * 132362306a36Sopenharmony_ci * data_length 132462306a36Sopenharmony_ci * MSDU length in case of direct descriptor. Length of link 132562306a36Sopenharmony_ci * extension descriptor in case of Link extension descriptor. 132662306a36Sopenharmony_ci * 132762306a36Sopenharmony_ci * *_checksum_en 132862306a36Sopenharmony_ci * Enable checksum replacement for ipv4, udp_over_ipv4, ipv6, 132962306a36Sopenharmony_ci * udp_over_ipv6, tcp_over_ipv4 and tcp_over_ipv6. 133062306a36Sopenharmony_ci * 133162306a36Sopenharmony_ci * to_fw 133262306a36Sopenharmony_ci * Forward packet to FW along with classification result. The 133362306a36Sopenharmony_ci * packet will not be forward to TQM when this bit is set. 133462306a36Sopenharmony_ci * 1'b0: Use classification result to forward the packet. 133562306a36Sopenharmony_ci * 1'b1: Override classification result & forward packet only to fw 133662306a36Sopenharmony_ci * 133762306a36Sopenharmony_ci * packet_offset 133862306a36Sopenharmony_ci * Packet offset from Metadata in case of direct buffer descriptor. 133962306a36Sopenharmony_ci * 134062306a36Sopenharmony_ci * hlos_tid_overwrite 134162306a36Sopenharmony_ci * 134262306a36Sopenharmony_ci * When set, TCL shall ignore the IP DSCP and VLAN PCP 134362306a36Sopenharmony_ci * fields and use HLOS_TID as the final TID. Otherwise TCL 134462306a36Sopenharmony_ci * shall consider the DSCP and PCP fields as well as HLOS_TID 134562306a36Sopenharmony_ci * and choose a final TID based on the configured priority 134662306a36Sopenharmony_ci * 134762306a36Sopenharmony_ci * flow_override_enable 134862306a36Sopenharmony_ci * TCL uses this to select the flow pointer from the peer table, 134962306a36Sopenharmony_ci * which can be overridden by SW for pre-encrypted raw WiFi packets 135062306a36Sopenharmony_ci * that cannot be parsed for UDP or for other MLO 135162306a36Sopenharmony_ci * 0 - FP_PARSE_IP: Use the flow-pointer based on parsing the IPv4 135262306a36Sopenharmony_ci * or IPv6 header. 135362306a36Sopenharmony_ci * 1 - FP_USE_OVERRIDE: Use the who_classify_info_sel and 135462306a36Sopenharmony_ci * flow_override fields to select the flow-pointer 135562306a36Sopenharmony_ci * 135662306a36Sopenharmony_ci * who_classify_info_sel 135762306a36Sopenharmony_ci * Field only valid when flow_override_enable is set to FP_USE_OVERRIDE. 135862306a36Sopenharmony_ci * This field is used to select one of the 'WHO_CLASSIFY_INFO's in the 135962306a36Sopenharmony_ci * peer table in case more than 2 flows are mapped to a single TID. 136062306a36Sopenharmony_ci * 0: To choose Flow 0 and 1 of any TID use this value. 136162306a36Sopenharmony_ci * 1: To choose Flow 2 and 3 of any TID use this value. 136262306a36Sopenharmony_ci * 2: To choose Flow 4 and 5 of any TID use this value. 136362306a36Sopenharmony_ci * 3: To choose Flow 6 and 7 of any TID use this value. 136462306a36Sopenharmony_ci * 136562306a36Sopenharmony_ci * If who_classify_info sel is not in sync with the num_tx_classify_info 136662306a36Sopenharmony_ci * field from address search, then TCL will set 'who_classify_info_sel' 136762306a36Sopenharmony_ci * to 0 use flows 0 and 1. 136862306a36Sopenharmony_ci * 136962306a36Sopenharmony_ci * hlos_tid 137062306a36Sopenharmony_ci * HLOS MSDU priority 137162306a36Sopenharmony_ci * Field is used when HLOS_TID_overwrite is set. 137262306a36Sopenharmony_ci * 137362306a36Sopenharmony_ci * flow_override 137462306a36Sopenharmony_ci * Field only valid when flow_override_enable is set to FP_USE_OVERRIDE 137562306a36Sopenharmony_ci * TCL uses this to select the flow pointer from the peer table, 137662306a36Sopenharmony_ci * which can be overridden by SW for pre-encrypted raw WiFi packets 137762306a36Sopenharmony_ci * that cannot be parsed for UDP or for other MLO 137862306a36Sopenharmony_ci * 0 - FP_USE_NON_UDP: Use the non-UDP flow pointer (flow 0) 137962306a36Sopenharmony_ci * 1 - FP_USE_UDP: Use the UDP flow pointer (flow 1) 138062306a36Sopenharmony_ci * 138162306a36Sopenharmony_ci * pmac_id 138262306a36Sopenharmony_ci * TCL uses this PMAC_ID in address search, i.e, while 138362306a36Sopenharmony_ci * finding matching entry for the packet in AST corresponding 138462306a36Sopenharmony_ci * to given PMAC_ID 138562306a36Sopenharmony_ci * 138662306a36Sopenharmony_ci * If PMAC ID is all 1s (=> value 3), it indicates wildcard 138762306a36Sopenharmony_ci * match for any PMAC 138862306a36Sopenharmony_ci * 138962306a36Sopenharmony_ci * vdev_id 139062306a36Sopenharmony_ci * Virtual device ID to check against the address search entry to 139162306a36Sopenharmony_ci * avoid security issues from transmitting packets from an incorrect 139262306a36Sopenharmony_ci * virtual device 139362306a36Sopenharmony_ci * 139462306a36Sopenharmony_ci * search_index 139562306a36Sopenharmony_ci * The index that will be used for index based address or 139662306a36Sopenharmony_ci * flow search. The field is valid when 'search_type' is 1 or 2. 139762306a36Sopenharmony_ci * 139862306a36Sopenharmony_ci * cache_set_num 139962306a36Sopenharmony_ci * 140062306a36Sopenharmony_ci * Cache set number that should be used to cache the index 140162306a36Sopenharmony_ci * based search results, for address and flow search. This 140262306a36Sopenharmony_ci * value should be equal to LSB four bits of the hash value of 140362306a36Sopenharmony_ci * match data, in case of search index points to an entry which 140462306a36Sopenharmony_ci * may be used in content based search also. The value can be 140562306a36Sopenharmony_ci * anything when the entry pointed by search index will not be 140662306a36Sopenharmony_ci * used for content based search. 140762306a36Sopenharmony_ci * 140862306a36Sopenharmony_ci * index_loop_override 140962306a36Sopenharmony_ci * When set, address search and packet routing is forced to use 141062306a36Sopenharmony_ci * 'search_index' instead of following the register configuration 141162306a36Sopenharmony_ci * selected by Bank_id. 141262306a36Sopenharmony_ci * 141362306a36Sopenharmony_ci * ring_id 141462306a36Sopenharmony_ci * The buffer pointer ring ID. 141562306a36Sopenharmony_ci * 0 refers to the IDLE ring 141662306a36Sopenharmony_ci * 1 - N refers to other rings 141762306a36Sopenharmony_ci * 141862306a36Sopenharmony_ci * looping_count 141962306a36Sopenharmony_ci * 142062306a36Sopenharmony_ci * A count value that indicates the number of times the 142162306a36Sopenharmony_ci * producer of entries into the Ring has looped around the 142262306a36Sopenharmony_ci * ring. 142362306a36Sopenharmony_ci * 142462306a36Sopenharmony_ci * At initialization time, this value is set to 0. On the 142562306a36Sopenharmony_ci * first loop, this value is set to 1. After the max value is 142662306a36Sopenharmony_ci * reached allowed by the number of bits for this field, the 142762306a36Sopenharmony_ci * count value continues with 0 again. 142862306a36Sopenharmony_ci * 142962306a36Sopenharmony_ci * In case SW is the consumer of the ring entries, it can 143062306a36Sopenharmony_ci * use this field to figure out up to where the producer of 143162306a36Sopenharmony_ci * entries has created new entries. This eliminates the need to 143262306a36Sopenharmony_ci * check where the head pointer' of the ring is located once 143362306a36Sopenharmony_ci * the SW starts processing an interrupt indicating that new 143462306a36Sopenharmony_ci * entries have been put into this ring... 143562306a36Sopenharmony_ci * 143662306a36Sopenharmony_ci * Also note that SW if it wants only needs to look at the 143762306a36Sopenharmony_ci * LSB bit of this count value. 143862306a36Sopenharmony_ci */ 143962306a36Sopenharmony_ci 144062306a36Sopenharmony_ci#define HAL_TCL_DESC_LEN sizeof(struct hal_tcl_data_cmd) 144162306a36Sopenharmony_ci 144262306a36Sopenharmony_ci#define HAL_TX_MSDU_EXT_INFO0_BUF_PTR_LO GENMASK(31, 0) 144362306a36Sopenharmony_ci 144462306a36Sopenharmony_ci#define HAL_TX_MSDU_EXT_INFO1_BUF_PTR_HI GENMASK(7, 0) 144562306a36Sopenharmony_ci#define HAL_TX_MSDU_EXT_INFO1_EXTN_OVERRIDE BIT(8) 144662306a36Sopenharmony_ci#define HAL_TX_MSDU_EXT_INFO1_ENCAP_TYPE GENMASK(10, 9) 144762306a36Sopenharmony_ci#define HAL_TX_MSDU_EXT_INFO1_ENCRYPT_TYPE GENMASK(14, 11) 144862306a36Sopenharmony_ci#define HAL_TX_MSDU_EXT_INFO1_BUF_LEN GENMASK(31, 16) 144962306a36Sopenharmony_ci 145062306a36Sopenharmony_cistruct hal_tx_msdu_ext_desc { 145162306a36Sopenharmony_ci __le32 rsvd0[6]; 145262306a36Sopenharmony_ci __le32 info0; 145362306a36Sopenharmony_ci __le32 info1; 145462306a36Sopenharmony_ci __le32 rsvd1[10]; 145562306a36Sopenharmony_ci}; 145662306a36Sopenharmony_ci 145762306a36Sopenharmony_cistruct hal_tcl_gse_cmd { 145862306a36Sopenharmony_ci __le32 ctrl_buf_addr_lo; 145962306a36Sopenharmony_ci __le32 info0; 146062306a36Sopenharmony_ci __le32 meta_data[2]; 146162306a36Sopenharmony_ci __le32 rsvd0[2]; 146262306a36Sopenharmony_ci __le32 info1; 146362306a36Sopenharmony_ci} __packed; 146462306a36Sopenharmony_ci 146562306a36Sopenharmony_ci/* hal_tcl_gse_cmd 146662306a36Sopenharmony_ci * 146762306a36Sopenharmony_ci * ctrl_buf_addr_lo, ctrl_buf_addr_hi 146862306a36Sopenharmony_ci * Address of a control buffer containing additional info needed 146962306a36Sopenharmony_ci * for this command execution. 147062306a36Sopenharmony_ci * 147162306a36Sopenharmony_ci * meta_data 147262306a36Sopenharmony_ci * Meta data to be returned in the status descriptor 147362306a36Sopenharmony_ci */ 147462306a36Sopenharmony_ci 147562306a36Sopenharmony_cienum hal_tcl_cache_op_res { 147662306a36Sopenharmony_ci HAL_TCL_CACHE_OP_RES_DONE, 147762306a36Sopenharmony_ci HAL_TCL_CACHE_OP_RES_NOT_FOUND, 147862306a36Sopenharmony_ci HAL_TCL_CACHE_OP_RES_TIMEOUT, 147962306a36Sopenharmony_ci}; 148062306a36Sopenharmony_ci 148162306a36Sopenharmony_cistruct hal_tcl_status_ring { 148262306a36Sopenharmony_ci __le32 info0; 148362306a36Sopenharmony_ci __le32 msdu_byte_count; 148462306a36Sopenharmony_ci __le32 msdu_timestamp; 148562306a36Sopenharmony_ci __le32 meta_data[2]; 148662306a36Sopenharmony_ci __le32 info1; 148762306a36Sopenharmony_ci __le32 rsvd0; 148862306a36Sopenharmony_ci __le32 info2; 148962306a36Sopenharmony_ci} __packed; 149062306a36Sopenharmony_ci 149162306a36Sopenharmony_ci/* hal_tcl_status_ring 149262306a36Sopenharmony_ci * 149362306a36Sopenharmony_ci * msdu_cnt 149462306a36Sopenharmony_ci * msdu_byte_count 149562306a36Sopenharmony_ci * MSDU count of Entry and MSDU byte count for entry 1. 149662306a36Sopenharmony_ci * 149762306a36Sopenharmony_ci */ 149862306a36Sopenharmony_ci 149962306a36Sopenharmony_ci#define HAL_CE_SRC_DESC_ADDR_INFO_ADDR_HI GENMASK(7, 0) 150062306a36Sopenharmony_ci#define HAL_CE_SRC_DESC_ADDR_INFO_HASH_EN BIT(8) 150162306a36Sopenharmony_ci#define HAL_CE_SRC_DESC_ADDR_INFO_BYTE_SWAP BIT(9) 150262306a36Sopenharmony_ci#define HAL_CE_SRC_DESC_ADDR_INFO_DEST_SWAP BIT(10) 150362306a36Sopenharmony_ci#define HAL_CE_SRC_DESC_ADDR_INFO_GATHER BIT(11) 150462306a36Sopenharmony_ci#define HAL_CE_SRC_DESC_ADDR_INFO_LEN GENMASK(31, 16) 150562306a36Sopenharmony_ci 150662306a36Sopenharmony_ci#define HAL_CE_SRC_DESC_META_INFO_DATA GENMASK(15, 0) 150762306a36Sopenharmony_ci 150862306a36Sopenharmony_ci#define HAL_CE_SRC_DESC_FLAGS_RING_ID GENMASK(27, 20) 150962306a36Sopenharmony_ci#define HAL_CE_SRC_DESC_FLAGS_LOOP_CNT HAL_SRNG_DESC_LOOP_CNT 151062306a36Sopenharmony_ci 151162306a36Sopenharmony_cistruct hal_ce_srng_src_desc { 151262306a36Sopenharmony_ci __le32 buffer_addr_low; 151362306a36Sopenharmony_ci __le32 buffer_addr_info; /* %HAL_CE_SRC_DESC_ADDR_INFO_ */ 151462306a36Sopenharmony_ci __le32 meta_info; /* %HAL_CE_SRC_DESC_META_INFO_ */ 151562306a36Sopenharmony_ci __le32 flags; /* %HAL_CE_SRC_DESC_FLAGS_ */ 151662306a36Sopenharmony_ci} __packed; 151762306a36Sopenharmony_ci 151862306a36Sopenharmony_ci/* hal_ce_srng_src_desc 151962306a36Sopenharmony_ci * 152062306a36Sopenharmony_ci * buffer_addr_lo 152162306a36Sopenharmony_ci * LSB 32 bits of the 40 Bit Pointer to the source buffer 152262306a36Sopenharmony_ci * 152362306a36Sopenharmony_ci * buffer_addr_hi 152462306a36Sopenharmony_ci * MSB 8 bits of the 40 Bit Pointer to the source buffer 152562306a36Sopenharmony_ci * 152662306a36Sopenharmony_ci * toeplitz_en 152762306a36Sopenharmony_ci * Enable generation of 32-bit Toeplitz-LFSR hash for 152862306a36Sopenharmony_ci * data transfer. In case of gather field in first source 152962306a36Sopenharmony_ci * ring entry of the gather copy cycle in taken into account. 153062306a36Sopenharmony_ci * 153162306a36Sopenharmony_ci * src_swap 153262306a36Sopenharmony_ci * Treats source memory organization as big-endian. For 153362306a36Sopenharmony_ci * each dword read (4 bytes), the byte 0 is swapped with byte 3 153462306a36Sopenharmony_ci * and byte 1 is swapped with byte 2. 153562306a36Sopenharmony_ci * In case of gather field in first source ring entry of 153662306a36Sopenharmony_ci * the gather copy cycle in taken into account. 153762306a36Sopenharmony_ci * 153862306a36Sopenharmony_ci * dest_swap 153962306a36Sopenharmony_ci * Treats destination memory organization as big-endian. 154062306a36Sopenharmony_ci * For each dword write (4 bytes), the byte 0 is swapped with 154162306a36Sopenharmony_ci * byte 3 and byte 1 is swapped with byte 2. 154262306a36Sopenharmony_ci * In case of gather field in first source ring entry of 154362306a36Sopenharmony_ci * the gather copy cycle in taken into account. 154462306a36Sopenharmony_ci * 154562306a36Sopenharmony_ci * gather 154662306a36Sopenharmony_ci * Enables gather of multiple copy engine source 154762306a36Sopenharmony_ci * descriptors to one destination. 154862306a36Sopenharmony_ci * 154962306a36Sopenharmony_ci * ce_res_0 155062306a36Sopenharmony_ci * Reserved 155162306a36Sopenharmony_ci * 155262306a36Sopenharmony_ci * 155362306a36Sopenharmony_ci * length 155462306a36Sopenharmony_ci * Length of the buffer in units of octets of the current 155562306a36Sopenharmony_ci * descriptor 155662306a36Sopenharmony_ci * 155762306a36Sopenharmony_ci * fw_metadata 155862306a36Sopenharmony_ci * Meta data used by FW. 155962306a36Sopenharmony_ci * In case of gather field in first source ring entry of 156062306a36Sopenharmony_ci * the gather copy cycle in taken into account. 156162306a36Sopenharmony_ci * 156262306a36Sopenharmony_ci * ce_res_1 156362306a36Sopenharmony_ci * Reserved 156462306a36Sopenharmony_ci * 156562306a36Sopenharmony_ci * ce_res_2 156662306a36Sopenharmony_ci * Reserved 156762306a36Sopenharmony_ci * 156862306a36Sopenharmony_ci * ring_id 156962306a36Sopenharmony_ci * The buffer pointer ring ID. 157062306a36Sopenharmony_ci * 0 refers to the IDLE ring 157162306a36Sopenharmony_ci * 1 - N refers to other rings 157262306a36Sopenharmony_ci * Helps with debugging when dumping ring contents. 157362306a36Sopenharmony_ci * 157462306a36Sopenharmony_ci * looping_count 157562306a36Sopenharmony_ci * A count value that indicates the number of times the 157662306a36Sopenharmony_ci * producer of entries into the Ring has looped around the 157762306a36Sopenharmony_ci * ring. 157862306a36Sopenharmony_ci * 157962306a36Sopenharmony_ci * At initialization time, this value is set to 0. On the 158062306a36Sopenharmony_ci * first loop, this value is set to 1. After the max value is 158162306a36Sopenharmony_ci * reached allowed by the number of bits for this field, the 158262306a36Sopenharmony_ci * count value continues with 0 again. 158362306a36Sopenharmony_ci * 158462306a36Sopenharmony_ci * In case SW is the consumer of the ring entries, it can 158562306a36Sopenharmony_ci * use this field to figure out up to where the producer of 158662306a36Sopenharmony_ci * entries has created new entries. This eliminates the need to 158762306a36Sopenharmony_ci * check where the head pointer' of the ring is located once 158862306a36Sopenharmony_ci * the SW starts processing an interrupt indicating that new 158962306a36Sopenharmony_ci * entries have been put into this ring... 159062306a36Sopenharmony_ci * 159162306a36Sopenharmony_ci * Also note that SW if it wants only needs to look at the 159262306a36Sopenharmony_ci * LSB bit of this count value. 159362306a36Sopenharmony_ci */ 159462306a36Sopenharmony_ci 159562306a36Sopenharmony_ci#define HAL_CE_DEST_DESC_ADDR_INFO_ADDR_HI GENMASK(7, 0) 159662306a36Sopenharmony_ci#define HAL_CE_DEST_DESC_ADDR_INFO_RING_ID GENMASK(27, 20) 159762306a36Sopenharmony_ci#define HAL_CE_DEST_DESC_ADDR_INFO_LOOP_CNT HAL_SRNG_DESC_LOOP_CNT 159862306a36Sopenharmony_ci 159962306a36Sopenharmony_cistruct hal_ce_srng_dest_desc { 160062306a36Sopenharmony_ci __le32 buffer_addr_low; 160162306a36Sopenharmony_ci __le32 buffer_addr_info; /* %HAL_CE_DEST_DESC_ADDR_INFO_ */ 160262306a36Sopenharmony_ci} __packed; 160362306a36Sopenharmony_ci 160462306a36Sopenharmony_ci/* hal_ce_srng_dest_desc 160562306a36Sopenharmony_ci * 160662306a36Sopenharmony_ci * dst_buffer_low 160762306a36Sopenharmony_ci * LSB 32 bits of the 40 Bit Pointer to the Destination 160862306a36Sopenharmony_ci * buffer 160962306a36Sopenharmony_ci * 161062306a36Sopenharmony_ci * dst_buffer_high 161162306a36Sopenharmony_ci * MSB 8 bits of the 40 Bit Pointer to the Destination 161262306a36Sopenharmony_ci * buffer 161362306a36Sopenharmony_ci * 161462306a36Sopenharmony_ci * ce_res_4 161562306a36Sopenharmony_ci * Reserved 161662306a36Sopenharmony_ci * 161762306a36Sopenharmony_ci * ring_id 161862306a36Sopenharmony_ci * The buffer pointer ring ID. 161962306a36Sopenharmony_ci * 0 refers to the IDLE ring 162062306a36Sopenharmony_ci * 1 - N refers to other rings 162162306a36Sopenharmony_ci * Helps with debugging when dumping ring contents. 162262306a36Sopenharmony_ci * 162362306a36Sopenharmony_ci * looping_count 162462306a36Sopenharmony_ci * A count value that indicates the number of times the 162562306a36Sopenharmony_ci * producer of entries into the Ring has looped around the 162662306a36Sopenharmony_ci * ring. 162762306a36Sopenharmony_ci * 162862306a36Sopenharmony_ci * At initialization time, this value is set to 0. On the 162962306a36Sopenharmony_ci * first loop, this value is set to 1. After the max value is 163062306a36Sopenharmony_ci * reached allowed by the number of bits for this field, the 163162306a36Sopenharmony_ci * count value continues with 0 again. 163262306a36Sopenharmony_ci * 163362306a36Sopenharmony_ci * In case SW is the consumer of the ring entries, it can 163462306a36Sopenharmony_ci * use this field to figure out up to where the producer of 163562306a36Sopenharmony_ci * entries has created new entries. This eliminates the need to 163662306a36Sopenharmony_ci * check where the head pointer' of the ring is located once 163762306a36Sopenharmony_ci * the SW starts processing an interrupt indicating that new 163862306a36Sopenharmony_ci * entries have been put into this ring... 163962306a36Sopenharmony_ci * 164062306a36Sopenharmony_ci * Also note that SW if it wants only needs to look at the 164162306a36Sopenharmony_ci * LSB bit of this count value. 164262306a36Sopenharmony_ci */ 164362306a36Sopenharmony_ci 164462306a36Sopenharmony_ci#define HAL_CE_DST_STATUS_DESC_FLAGS_HASH_EN BIT(8) 164562306a36Sopenharmony_ci#define HAL_CE_DST_STATUS_DESC_FLAGS_BYTE_SWAP BIT(9) 164662306a36Sopenharmony_ci#define HAL_CE_DST_STATUS_DESC_FLAGS_DEST_SWAP BIT(10) 164762306a36Sopenharmony_ci#define HAL_CE_DST_STATUS_DESC_FLAGS_GATHER BIT(11) 164862306a36Sopenharmony_ci#define HAL_CE_DST_STATUS_DESC_FLAGS_LEN GENMASK(31, 16) 164962306a36Sopenharmony_ci 165062306a36Sopenharmony_ci#define HAL_CE_DST_STATUS_DESC_META_INFO_DATA GENMASK(15, 0) 165162306a36Sopenharmony_ci#define HAL_CE_DST_STATUS_DESC_META_INFO_RING_ID GENMASK(27, 20) 165262306a36Sopenharmony_ci#define HAL_CE_DST_STATUS_DESC_META_INFO_LOOP_CNT HAL_SRNG_DESC_LOOP_CNT 165362306a36Sopenharmony_ci 165462306a36Sopenharmony_cistruct hal_ce_srng_dst_status_desc { 165562306a36Sopenharmony_ci __le32 flags; /* %HAL_CE_DST_STATUS_DESC_FLAGS_ */ 165662306a36Sopenharmony_ci __le32 toeplitz_hash0; 165762306a36Sopenharmony_ci __le32 toeplitz_hash1; 165862306a36Sopenharmony_ci __le32 meta_info; /* HAL_CE_DST_STATUS_DESC_META_INFO_ */ 165962306a36Sopenharmony_ci} __packed; 166062306a36Sopenharmony_ci 166162306a36Sopenharmony_ci/* hal_ce_srng_dst_status_desc 166262306a36Sopenharmony_ci * 166362306a36Sopenharmony_ci * ce_res_5 166462306a36Sopenharmony_ci * Reserved 166562306a36Sopenharmony_ci * 166662306a36Sopenharmony_ci * toeplitz_en 166762306a36Sopenharmony_ci * 166862306a36Sopenharmony_ci * src_swap 166962306a36Sopenharmony_ci * Source memory buffer swapped 167062306a36Sopenharmony_ci * 167162306a36Sopenharmony_ci * dest_swap 167262306a36Sopenharmony_ci * Destination memory buffer swapped 167362306a36Sopenharmony_ci * 167462306a36Sopenharmony_ci * gather 167562306a36Sopenharmony_ci * Gather of multiple copy engine source descriptors to one 167662306a36Sopenharmony_ci * destination enabled 167762306a36Sopenharmony_ci * 167862306a36Sopenharmony_ci * ce_res_6 167962306a36Sopenharmony_ci * Reserved 168062306a36Sopenharmony_ci * 168162306a36Sopenharmony_ci * length 168262306a36Sopenharmony_ci * Sum of all the Lengths of the source descriptor in the 168362306a36Sopenharmony_ci * gather chain 168462306a36Sopenharmony_ci * 168562306a36Sopenharmony_ci * toeplitz_hash_0 168662306a36Sopenharmony_ci * 32 LS bits of 64 bit Toeplitz LFSR hash result 168762306a36Sopenharmony_ci * 168862306a36Sopenharmony_ci * toeplitz_hash_1 168962306a36Sopenharmony_ci * 32 MS bits of 64 bit Toeplitz LFSR hash result 169062306a36Sopenharmony_ci * 169162306a36Sopenharmony_ci * fw_metadata 169262306a36Sopenharmony_ci * Meta data used by FW 169362306a36Sopenharmony_ci * In case of gather field in first source ring entry of 169462306a36Sopenharmony_ci * the gather copy cycle in taken into account. 169562306a36Sopenharmony_ci * 169662306a36Sopenharmony_ci * ce_res_7 169762306a36Sopenharmony_ci * Reserved 169862306a36Sopenharmony_ci * 169962306a36Sopenharmony_ci * ring_id 170062306a36Sopenharmony_ci * The buffer pointer ring ID. 170162306a36Sopenharmony_ci * 0 refers to the IDLE ring 170262306a36Sopenharmony_ci * 1 - N refers to other rings 170362306a36Sopenharmony_ci * Helps with debugging when dumping ring contents. 170462306a36Sopenharmony_ci * 170562306a36Sopenharmony_ci * looping_count 170662306a36Sopenharmony_ci * A count value that indicates the number of times the 170762306a36Sopenharmony_ci * producer of entries into the Ring has looped around the 170862306a36Sopenharmony_ci * ring. 170962306a36Sopenharmony_ci * 171062306a36Sopenharmony_ci * At initialization time, this value is set to 0. On the 171162306a36Sopenharmony_ci * first loop, this value is set to 1. After the max value is 171262306a36Sopenharmony_ci * reached allowed by the number of bits for this field, the 171362306a36Sopenharmony_ci * count value continues with 0 again. 171462306a36Sopenharmony_ci * 171562306a36Sopenharmony_ci * In case SW is the consumer of the ring entries, it can 171662306a36Sopenharmony_ci * use this field to figure out up to where the producer of 171762306a36Sopenharmony_ci * entries has created new entries. This eliminates the need to 171862306a36Sopenharmony_ci * check where the head pointer' of the ring is located once 171962306a36Sopenharmony_ci * the SW starts processing an interrupt indicating that new 172062306a36Sopenharmony_ci * entries have been put into this ring... 172162306a36Sopenharmony_ci * 172262306a36Sopenharmony_ci * Also note that SW if it wants only needs to look at the 172362306a36Sopenharmony_ci * LSB bit of this count value. 172462306a36Sopenharmony_ci */ 172562306a36Sopenharmony_ci 172662306a36Sopenharmony_ci#define HAL_TX_RATE_STATS_INFO0_VALID BIT(0) 172762306a36Sopenharmony_ci#define HAL_TX_RATE_STATS_INFO0_BW GENMASK(3, 1) 172862306a36Sopenharmony_ci#define HAL_TX_RATE_STATS_INFO0_PKT_TYPE GENMASK(7, 4) 172962306a36Sopenharmony_ci#define HAL_TX_RATE_STATS_INFO0_STBC BIT(8) 173062306a36Sopenharmony_ci#define HAL_TX_RATE_STATS_INFO0_LDPC BIT(9) 173162306a36Sopenharmony_ci#define HAL_TX_RATE_STATS_INFO0_SGI GENMASK(11, 10) 173262306a36Sopenharmony_ci#define HAL_TX_RATE_STATS_INFO0_MCS GENMASK(15, 12) 173362306a36Sopenharmony_ci#define HAL_TX_RATE_STATS_INFO0_OFDMA_TX BIT(16) 173462306a36Sopenharmony_ci#define HAL_TX_RATE_STATS_INFO0_TONES_IN_RU GENMASK(28, 17) 173562306a36Sopenharmony_ci 173662306a36Sopenharmony_cienum hal_tx_rate_stats_bw { 173762306a36Sopenharmony_ci HAL_TX_RATE_STATS_BW_20, 173862306a36Sopenharmony_ci HAL_TX_RATE_STATS_BW_40, 173962306a36Sopenharmony_ci HAL_TX_RATE_STATS_BW_80, 174062306a36Sopenharmony_ci HAL_TX_RATE_STATS_BW_160, 174162306a36Sopenharmony_ci}; 174262306a36Sopenharmony_ci 174362306a36Sopenharmony_cienum hal_tx_rate_stats_pkt_type { 174462306a36Sopenharmony_ci HAL_TX_RATE_STATS_PKT_TYPE_11A, 174562306a36Sopenharmony_ci HAL_TX_RATE_STATS_PKT_TYPE_11B, 174662306a36Sopenharmony_ci HAL_TX_RATE_STATS_PKT_TYPE_11N, 174762306a36Sopenharmony_ci HAL_TX_RATE_STATS_PKT_TYPE_11AC, 174862306a36Sopenharmony_ci HAL_TX_RATE_STATS_PKT_TYPE_11AX, 174962306a36Sopenharmony_ci HAL_TX_RATE_STATS_PKT_TYPE_11BA, 175062306a36Sopenharmony_ci HAL_TX_RATE_STATS_PKT_TYPE_11BE, 175162306a36Sopenharmony_ci}; 175262306a36Sopenharmony_ci 175362306a36Sopenharmony_cienum hal_tx_rate_stats_sgi { 175462306a36Sopenharmony_ci HAL_TX_RATE_STATS_SGI_08US, 175562306a36Sopenharmony_ci HAL_TX_RATE_STATS_SGI_04US, 175662306a36Sopenharmony_ci HAL_TX_RATE_STATS_SGI_16US, 175762306a36Sopenharmony_ci HAL_TX_RATE_STATS_SGI_32US, 175862306a36Sopenharmony_ci}; 175962306a36Sopenharmony_ci 176062306a36Sopenharmony_cistruct hal_tx_rate_stats { 176162306a36Sopenharmony_ci __le32 info0; 176262306a36Sopenharmony_ci __le32 tsf; 176362306a36Sopenharmony_ci} __packed; 176462306a36Sopenharmony_ci 176562306a36Sopenharmony_cistruct hal_wbm_link_desc { 176662306a36Sopenharmony_ci struct ath12k_buffer_addr buf_addr_info; 176762306a36Sopenharmony_ci} __packed; 176862306a36Sopenharmony_ci 176962306a36Sopenharmony_ci/* hal_wbm_link_desc 177062306a36Sopenharmony_ci * 177162306a36Sopenharmony_ci * Producer: WBM 177262306a36Sopenharmony_ci * Consumer: WBM 177362306a36Sopenharmony_ci * 177462306a36Sopenharmony_ci * buf_addr_info 177562306a36Sopenharmony_ci * Details of the physical address of a buffer or MSDU 177662306a36Sopenharmony_ci * link descriptor. 177762306a36Sopenharmony_ci */ 177862306a36Sopenharmony_ci 177962306a36Sopenharmony_cienum hal_wbm_rel_src_module { 178062306a36Sopenharmony_ci HAL_WBM_REL_SRC_MODULE_TQM, 178162306a36Sopenharmony_ci HAL_WBM_REL_SRC_MODULE_RXDMA, 178262306a36Sopenharmony_ci HAL_WBM_REL_SRC_MODULE_REO, 178362306a36Sopenharmony_ci HAL_WBM_REL_SRC_MODULE_FW, 178462306a36Sopenharmony_ci HAL_WBM_REL_SRC_MODULE_SW, 178562306a36Sopenharmony_ci}; 178662306a36Sopenharmony_ci 178762306a36Sopenharmony_cienum hal_wbm_rel_desc_type { 178862306a36Sopenharmony_ci HAL_WBM_REL_DESC_TYPE_REL_MSDU, 178962306a36Sopenharmony_ci HAL_WBM_REL_DESC_TYPE_MSDU_LINK, 179062306a36Sopenharmony_ci HAL_WBM_REL_DESC_TYPE_MPDU_LINK, 179162306a36Sopenharmony_ci HAL_WBM_REL_DESC_TYPE_MSDU_EXT, 179262306a36Sopenharmony_ci HAL_WBM_REL_DESC_TYPE_QUEUE_EXT, 179362306a36Sopenharmony_ci}; 179462306a36Sopenharmony_ci 179562306a36Sopenharmony_ci/* hal_wbm_rel_desc_type 179662306a36Sopenharmony_ci * 179762306a36Sopenharmony_ci * msdu_buffer 179862306a36Sopenharmony_ci * The address points to an MSDU buffer 179962306a36Sopenharmony_ci * 180062306a36Sopenharmony_ci * msdu_link_descriptor 180162306a36Sopenharmony_ci * The address points to an Tx MSDU link descriptor 180262306a36Sopenharmony_ci * 180362306a36Sopenharmony_ci * mpdu_link_descriptor 180462306a36Sopenharmony_ci * The address points to an MPDU link descriptor 180562306a36Sopenharmony_ci * 180662306a36Sopenharmony_ci * msdu_ext_descriptor 180762306a36Sopenharmony_ci * The address points to an MSDU extension descriptor 180862306a36Sopenharmony_ci * 180962306a36Sopenharmony_ci * queue_ext_descriptor 181062306a36Sopenharmony_ci * The address points to an TQM queue extension descriptor. WBM should 181162306a36Sopenharmony_ci * treat this is the same way as a link descriptor. 181262306a36Sopenharmony_ci */ 181362306a36Sopenharmony_ci 181462306a36Sopenharmony_cienum hal_wbm_rel_bm_act { 181562306a36Sopenharmony_ci HAL_WBM_REL_BM_ACT_PUT_IN_IDLE, 181662306a36Sopenharmony_ci HAL_WBM_REL_BM_ACT_REL_MSDU, 181762306a36Sopenharmony_ci}; 181862306a36Sopenharmony_ci 181962306a36Sopenharmony_ci/* hal_wbm_rel_bm_act 182062306a36Sopenharmony_ci * 182162306a36Sopenharmony_ci * put_in_idle_list 182262306a36Sopenharmony_ci * Put the buffer or descriptor back in the idle list. In case of MSDU or 182362306a36Sopenharmony_ci * MDPU link descriptor, BM does not need to check to release any 182462306a36Sopenharmony_ci * individual MSDU buffers. 182562306a36Sopenharmony_ci * 182662306a36Sopenharmony_ci * release_msdu_list 182762306a36Sopenharmony_ci * This BM action can only be used in combination with desc_type being 182862306a36Sopenharmony_ci * msdu_link_descriptor. Field first_msdu_index points out which MSDU 182962306a36Sopenharmony_ci * pointer in the MSDU link descriptor is the first of an MPDU that is 183062306a36Sopenharmony_ci * released. BM shall release all the MSDU buffers linked to this first 183162306a36Sopenharmony_ci * MSDU buffer pointer. All related MSDU buffer pointer entries shall be 183262306a36Sopenharmony_ci * set to value 0, which represents the 'NULL' pointer. When all MSDU 183362306a36Sopenharmony_ci * buffer pointers in the MSDU link descriptor are 'NULL', the MSDU link 183462306a36Sopenharmony_ci * descriptor itself shall also be released. 183562306a36Sopenharmony_ci */ 183662306a36Sopenharmony_ci#define HAL_WBM_COMPL_RX_INFO0_REL_SRC_MODULE GENMASK(2, 0) 183762306a36Sopenharmony_ci#define HAL_WBM_COMPL_RX_INFO0_BM_ACTION GENMASK(5, 3) 183862306a36Sopenharmony_ci#define HAL_WBM_COMPL_RX_INFO0_DESC_TYPE GENMASK(8, 6) 183962306a36Sopenharmony_ci#define HAL_WBM_COMPL_RX_INFO0_RBM GENMASK(12, 9) 184062306a36Sopenharmony_ci#define HAL_WBM_COMPL_RX_INFO0_RXDMA_PUSH_REASON GENMASK(18, 17) 184162306a36Sopenharmony_ci#define HAL_WBM_COMPL_RX_INFO0_RXDMA_ERROR_CODE GENMASK(23, 19) 184262306a36Sopenharmony_ci#define HAL_WBM_COMPL_RX_INFO0_REO_PUSH_REASON GENMASK(25, 24) 184362306a36Sopenharmony_ci#define HAL_WBM_COMPL_RX_INFO0_REO_ERROR_CODE GENMASK(30, 26) 184462306a36Sopenharmony_ci#define HAL_WBM_COMPL_RX_INFO0_WBM_INTERNAL_ERROR BIT(31) 184562306a36Sopenharmony_ci 184662306a36Sopenharmony_ci#define HAL_WBM_COMPL_RX_INFO1_PHY_ADDR_HI GENMASK(7, 0) 184762306a36Sopenharmony_ci#define HAL_WBM_COMPL_RX_INFO1_SW_COOKIE GENMASK(27, 8) 184862306a36Sopenharmony_ci#define HAL_WBM_COMPL_RX_INFO1_LOOPING_COUNT GENMASK(31, 28) 184962306a36Sopenharmony_ci 185062306a36Sopenharmony_cistruct hal_wbm_completion_ring_rx { 185162306a36Sopenharmony_ci __le32 addr_lo; 185262306a36Sopenharmony_ci __le32 addr_hi; 185362306a36Sopenharmony_ci __le32 info0; 185462306a36Sopenharmony_ci struct rx_mpdu_desc rx_mpdu_info; 185562306a36Sopenharmony_ci struct rx_msdu_desc rx_msdu_info; 185662306a36Sopenharmony_ci __le32 phy_addr_lo; 185762306a36Sopenharmony_ci __le32 info1; 185862306a36Sopenharmony_ci} __packed; 185962306a36Sopenharmony_ci 186062306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO0_REL_SRC_MODULE GENMASK(2, 0) 186162306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO0_DESC_TYPE GENMASK(8, 6) 186262306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO0_RBM GENMASK(12, 9) 186362306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO0_TQM_RELEASE_REASON GENMASK(16, 13) 186462306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO0_RBM_OVERRIDE_VLD BIT(17) 186562306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO0_SW_COOKIE_LO GENMASK(29, 18) 186662306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO0_CC_DONE BIT(30) 186762306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO0_WBM_INTERNAL_ERROR BIT(31) 186862306a36Sopenharmony_ci 186962306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO1_TQM_STATUS_NUMBER GENMASK(23, 0) 187062306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO1_TRANSMIT_COUNT GENMASK(30, 24) 187162306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO1_SW_REL_DETAILS_VALID BIT(31) 187262306a36Sopenharmony_ci 187362306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO2_ACK_FRAME_RSSI GENMASK(7, 0) 187462306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO2_FIRST_MSDU BIT(8) 187562306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO2_LAST_MSDU BIT(9) 187662306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO2_FW_TX_NOTIF_FRAME GENMASK(12, 10) 187762306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO2_BUFFER_TIMESTAMP GENMASK(31, 13) 187862306a36Sopenharmony_ci 187962306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO3_PEER_ID GENMASK(15, 0) 188062306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO3_TID GENMASK(19, 16) 188162306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO3_SW_COOKIE_HI GENMASK(27, 20) 188262306a36Sopenharmony_ci#define HAL_WBM_COMPL_TX_INFO3_LOOPING_COUNT GENMASK(31, 28) 188362306a36Sopenharmony_ci 188462306a36Sopenharmony_cistruct hal_wbm_completion_ring_tx { 188562306a36Sopenharmony_ci __le32 buf_va_lo; 188662306a36Sopenharmony_ci __le32 buf_va_hi; 188762306a36Sopenharmony_ci __le32 info0; 188862306a36Sopenharmony_ci __le32 info1; 188962306a36Sopenharmony_ci __le32 info2; 189062306a36Sopenharmony_ci struct hal_tx_rate_stats rate_stats; 189162306a36Sopenharmony_ci __le32 info3; 189262306a36Sopenharmony_ci} __packed; 189362306a36Sopenharmony_ci 189462306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO0_REL_SRC_MODULE GENMASK(2, 0) 189562306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO0_BM_ACTION GENMASK(5, 3) 189662306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO0_DESC_TYPE GENMASK(8, 6) 189762306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO0_FIRST_MSDU_IDX GENMASK(12, 9) 189862306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO0_TQM_RELEASE_REASON GENMASK(18, 13) 189962306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO0_RBM_OVERRIDE_VLD BIT(17) 190062306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO0_SW_BUFFER_COOKIE_11_0 GENMASK(29, 18) 190162306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO0_WBM_INTERNAL_ERROR BIT(31) 190262306a36Sopenharmony_ci 190362306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO1_TQM_STATUS_NUMBER GENMASK(23, 0) 190462306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO1_TRANSMIT_COUNT GENMASK(30, 24) 190562306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO1_SW_REL_DETAILS_VALID BIT(31) 190662306a36Sopenharmony_ci 190762306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO2_ACK_FRAME_RSSI GENMASK(7, 0) 190862306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO2_FIRST_MSDU BIT(8) 190962306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO2_LAST_MSDU BIT(9) 191062306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO2_FW_TX_NOTIF_FRAME GENMASK(12, 10) 191162306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO2_BUFFER_TIMESTAMP GENMASK(31, 13) 191262306a36Sopenharmony_ci 191362306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO3_PEER_ID GENMASK(15, 0) 191462306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO3_TID GENMASK(19, 16) 191562306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO3_SW_BUFFER_COOKIE_19_12 GENMASK(27, 20) 191662306a36Sopenharmony_ci#define HAL_WBM_RELEASE_TX_INFO3_LOOPING_COUNT GENMASK(31, 28) 191762306a36Sopenharmony_ci 191862306a36Sopenharmony_cistruct hal_wbm_release_ring_tx { 191962306a36Sopenharmony_ci struct ath12k_buffer_addr buf_addr_info; 192062306a36Sopenharmony_ci __le32 info0; 192162306a36Sopenharmony_ci __le32 info1; 192262306a36Sopenharmony_ci __le32 info2; 192362306a36Sopenharmony_ci struct hal_tx_rate_stats rate_stats; 192462306a36Sopenharmony_ci __le32 info3; 192562306a36Sopenharmony_ci} __packed; 192662306a36Sopenharmony_ci 192762306a36Sopenharmony_ci#define HAL_WBM_RELEASE_RX_INFO0_REL_SRC_MODULE GENMASK(2, 0) 192862306a36Sopenharmony_ci#define HAL_WBM_RELEASE_RX_INFO0_BM_ACTION GENMASK(5, 3) 192962306a36Sopenharmony_ci#define HAL_WBM_RELEASE_RX_INFO0_DESC_TYPE GENMASK(8, 6) 193062306a36Sopenharmony_ci#define HAL_WBM_RELEASE_RX_INFO0_FIRST_MSDU_IDX GENMASK(12, 9) 193162306a36Sopenharmony_ci#define HAL_WBM_RELEASE_RX_INFO0_CC_STATUS BIT(16) 193262306a36Sopenharmony_ci#define HAL_WBM_RELEASE_RX_INFO0_RXDMA_PUSH_REASON GENMASK(18, 17) 193362306a36Sopenharmony_ci#define HAL_WBM_RELEASE_RX_INFO0_RXDMA_ERROR_CODE GENMASK(23, 19) 193462306a36Sopenharmony_ci#define HAL_WBM_RELEASE_RX_INFO0_REO_PUSH_REASON GENMASK(25, 24) 193562306a36Sopenharmony_ci#define HAL_WBM_RELEASE_RX_INFO0_REO_ERROR_CODE GENMASK(30, 26) 193662306a36Sopenharmony_ci#define HAL_WBM_RELEASE_RX_INFO0_WBM_INTERNAL_ERROR BIT(31) 193762306a36Sopenharmony_ci 193862306a36Sopenharmony_ci#define HAL_WBM_RELEASE_RX_INFO2_RING_ID GENMASK(27, 20) 193962306a36Sopenharmony_ci#define HAL_WBM_RELEASE_RX_INFO2_LOOPING_COUNT GENMASK(31, 28) 194062306a36Sopenharmony_ci 194162306a36Sopenharmony_cistruct hal_wbm_release_ring_rx { 194262306a36Sopenharmony_ci struct ath12k_buffer_addr buf_addr_info; 194362306a36Sopenharmony_ci __le32 info0; 194462306a36Sopenharmony_ci struct rx_mpdu_desc rx_mpdu_info; 194562306a36Sopenharmony_ci struct rx_msdu_desc rx_msdu_info; 194662306a36Sopenharmony_ci __le32 info1; 194762306a36Sopenharmony_ci __le32 info2; 194862306a36Sopenharmony_ci} __packed; 194962306a36Sopenharmony_ci 195062306a36Sopenharmony_ci#define HAL_WBM_RELEASE_RX_CC_INFO0_RBM GENMASK(12, 9) 195162306a36Sopenharmony_ci#define HAL_WBM_RELEASE_RX_CC_INFO1_COOKIE GENMASK(27, 8) 195262306a36Sopenharmony_ci/* Used when hw cc is success */ 195362306a36Sopenharmony_cistruct hal_wbm_release_ring_cc_rx { 195462306a36Sopenharmony_ci __le32 buf_va_lo; 195562306a36Sopenharmony_ci __le32 buf_va_hi; 195662306a36Sopenharmony_ci __le32 info0; 195762306a36Sopenharmony_ci struct rx_mpdu_desc rx_mpdu_info; 195862306a36Sopenharmony_ci struct rx_msdu_desc rx_msdu_info; 195962306a36Sopenharmony_ci __le32 buf_pa_lo; 196062306a36Sopenharmony_ci __le32 info1; 196162306a36Sopenharmony_ci} __packed; 196262306a36Sopenharmony_ci 196362306a36Sopenharmony_ci#define HAL_WBM_RELEASE_INFO0_REL_SRC_MODULE GENMASK(2, 0) 196462306a36Sopenharmony_ci#define HAL_WBM_RELEASE_INFO0_BM_ACTION GENMASK(5, 3) 196562306a36Sopenharmony_ci#define HAL_WBM_RELEASE_INFO0_DESC_TYPE GENMASK(8, 6) 196662306a36Sopenharmony_ci#define HAL_WBM_RELEASE_INFO0_RXDMA_PUSH_REASON GENMASK(18, 17) 196762306a36Sopenharmony_ci#define HAL_WBM_RELEASE_INFO0_RXDMA_ERROR_CODE GENMASK(23, 19) 196862306a36Sopenharmony_ci#define HAL_WBM_RELEASE_INFO0_REO_PUSH_REASON GENMASK(25, 24) 196962306a36Sopenharmony_ci#define HAL_WBM_RELEASE_INFO0_REO_ERROR_CODE GENMASK(30, 26) 197062306a36Sopenharmony_ci#define HAL_WBM_RELEASE_INFO0_WBM_INTERNAL_ERROR BIT(31) 197162306a36Sopenharmony_ci 197262306a36Sopenharmony_ci#define HAL_WBM_RELEASE_INFO3_FIRST_MSDU BIT(0) 197362306a36Sopenharmony_ci#define HAL_WBM_RELEASE_INFO3_LAST_MSDU BIT(1) 197462306a36Sopenharmony_ci#define HAL_WBM_RELEASE_INFO3_CONTINUATION BIT(2) 197562306a36Sopenharmony_ci 197662306a36Sopenharmony_ci#define HAL_WBM_RELEASE_INFO5_LOOPING_COUNT GENMASK(31, 28) 197762306a36Sopenharmony_ci 197862306a36Sopenharmony_cistruct hal_wbm_release_ring { 197962306a36Sopenharmony_ci struct ath12k_buffer_addr buf_addr_info; 198062306a36Sopenharmony_ci __le32 info0; 198162306a36Sopenharmony_ci __le32 info1; 198262306a36Sopenharmony_ci __le32 info2; 198362306a36Sopenharmony_ci __le32 info3; 198462306a36Sopenharmony_ci __le32 info4; 198562306a36Sopenharmony_ci __le32 info5; 198662306a36Sopenharmony_ci} __packed; 198762306a36Sopenharmony_ci 198862306a36Sopenharmony_ci/* hal_wbm_release_ring 198962306a36Sopenharmony_ci * 199062306a36Sopenharmony_ci * Producer: SW/TQM/RXDMA/REO/SWITCH 199162306a36Sopenharmony_ci * Consumer: WBM/SW/FW 199262306a36Sopenharmony_ci * 199362306a36Sopenharmony_ci * HTT tx status is overlaid on wbm_release ring on 4-byte words 2, 3, 4 and 5 199462306a36Sopenharmony_ci * for software based completions. 199562306a36Sopenharmony_ci * 199662306a36Sopenharmony_ci * buf_addr_info 199762306a36Sopenharmony_ci * Details of the physical address of the buffer or link descriptor. 199862306a36Sopenharmony_ci * 199962306a36Sopenharmony_ci * release_source_module 200062306a36Sopenharmony_ci * Indicates which module initiated the release of this buffer/descriptor. 200162306a36Sopenharmony_ci * Values are defined in enum %HAL_WBM_REL_SRC_MODULE_. 200262306a36Sopenharmony_ci * 200362306a36Sopenharmony_ci * buffer_or_desc_type 200462306a36Sopenharmony_ci * Field only valid when WBM is marked as the return_buffer_manager in 200562306a36Sopenharmony_ci * the Released_Buffer_address_info. Indicates that type of buffer or 200662306a36Sopenharmony_ci * descriptor is being released. Values are in enum %HAL_WBM_REL_DESC_TYPE. 200762306a36Sopenharmony_ci * 200862306a36Sopenharmony_ci * wbm_internal_error 200962306a36Sopenharmony_ci * Is set when WBM got a buffer pointer but the action was to push it to 201062306a36Sopenharmony_ci * the idle link descriptor ring or do link related activity OR 201162306a36Sopenharmony_ci * Is set when WBM got a link buffer pointer but the action was to push it 201262306a36Sopenharmony_ci * to the buffer descriptor ring. 201362306a36Sopenharmony_ci * 201462306a36Sopenharmony_ci * looping_count 201562306a36Sopenharmony_ci * A count value that indicates the number of times the 201662306a36Sopenharmony_ci * producer of entries into the Buffer Manager Ring has looped 201762306a36Sopenharmony_ci * around the ring. 201862306a36Sopenharmony_ci * 201962306a36Sopenharmony_ci * At initialization time, this value is set to 0. On the 202062306a36Sopenharmony_ci * first loop, this value is set to 1. After the max value is 202162306a36Sopenharmony_ci * reached allowed by the number of bits for this field, the 202262306a36Sopenharmony_ci * count value continues with 0 again. 202362306a36Sopenharmony_ci * 202462306a36Sopenharmony_ci * In case SW is the consumer of the ring entries, it can 202562306a36Sopenharmony_ci * use this field to figure out up to where the producer of 202662306a36Sopenharmony_ci * entries has created new entries. This eliminates the need to 202762306a36Sopenharmony_ci * check where the head pointer' of the ring is located once 202862306a36Sopenharmony_ci * the SW starts processing an interrupt indicating that new 202962306a36Sopenharmony_ci * entries have been put into this ring... 203062306a36Sopenharmony_ci * 203162306a36Sopenharmony_ci * Also note that SW if it wants only needs to look at the 203262306a36Sopenharmony_ci * LSB bit of this count value. 203362306a36Sopenharmony_ci */ 203462306a36Sopenharmony_ci 203562306a36Sopenharmony_ci/** 203662306a36Sopenharmony_ci * enum hal_wbm_tqm_rel_reason - TQM release reason code 203762306a36Sopenharmony_ci * @HAL_WBM_TQM_REL_REASON_FRAME_ACKED: ACK or BACK received for the frame 203862306a36Sopenharmony_ci * @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_MPDU: Command remove_mpdus initiated by SW 203962306a36Sopenharmony_ci * @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_TX: Command remove transmitted_mpdus 204062306a36Sopenharmony_ci * initiated by sw. 204162306a36Sopenharmony_ci * @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_NOTX: Command remove untransmitted_mpdus 204262306a36Sopenharmony_ci * initiated by sw. 204362306a36Sopenharmony_ci * @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_AGED_FRAMES: Command remove aged msdus or 204462306a36Sopenharmony_ci * mpdus. 204562306a36Sopenharmony_ci * @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON1: Remove command initiated by 204662306a36Sopenharmony_ci * fw with fw_reason1. 204762306a36Sopenharmony_ci * @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON2: Remove command initiated by 204862306a36Sopenharmony_ci * fw with fw_reason2. 204962306a36Sopenharmony_ci * @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON3: Remove command initiated by 205062306a36Sopenharmony_ci * fw with fw_reason3. 205162306a36Sopenharmony_ci */ 205262306a36Sopenharmony_cienum hal_wbm_tqm_rel_reason { 205362306a36Sopenharmony_ci HAL_WBM_TQM_REL_REASON_FRAME_ACKED, 205462306a36Sopenharmony_ci HAL_WBM_TQM_REL_REASON_CMD_REMOVE_MPDU, 205562306a36Sopenharmony_ci HAL_WBM_TQM_REL_REASON_CMD_REMOVE_TX, 205662306a36Sopenharmony_ci HAL_WBM_TQM_REL_REASON_CMD_REMOVE_NOTX, 205762306a36Sopenharmony_ci HAL_WBM_TQM_REL_REASON_CMD_REMOVE_AGED_FRAMES, 205862306a36Sopenharmony_ci HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON1, 205962306a36Sopenharmony_ci HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON2, 206062306a36Sopenharmony_ci HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON3, 206162306a36Sopenharmony_ci}; 206262306a36Sopenharmony_ci 206362306a36Sopenharmony_cistruct hal_wbm_buffer_ring { 206462306a36Sopenharmony_ci struct ath12k_buffer_addr buf_addr_info; 206562306a36Sopenharmony_ci}; 206662306a36Sopenharmony_ci 206762306a36Sopenharmony_cienum hal_mon_end_reason { 206862306a36Sopenharmony_ci HAL_MON_STATUS_BUFFER_FULL, 206962306a36Sopenharmony_ci HAL_MON_FLUSH_DETECTED, 207062306a36Sopenharmony_ci HAL_MON_END_OF_PPDU, 207162306a36Sopenharmony_ci HAL_MON_PPDU_TRUNCATED, 207262306a36Sopenharmony_ci}; 207362306a36Sopenharmony_ci 207462306a36Sopenharmony_ci#define HAL_SW_MONITOR_RING_INFO0_RXDMA_PUSH_REASON GENMASK(1, 0) 207562306a36Sopenharmony_ci#define HAL_SW_MONITOR_RING_INFO0_RXDMA_ERROR_CODE GENMASK(6, 2) 207662306a36Sopenharmony_ci#define HAL_SW_MONITOR_RING_INFO0_MPDU_FRAGMENT_NUMBER GENMASK(10, 7) 207762306a36Sopenharmony_ci#define HAL_SW_MONITOR_RING_INFO0_FRAMELESS_BAR BIT(11) 207862306a36Sopenharmony_ci#define HAL_SW_MONITOR_RING_INFO0_STATUS_BUF_COUNT GENMASK(15, 12) 207962306a36Sopenharmony_ci#define HAL_SW_MONITOR_RING_INFO0_END_OF_PPDU BIT(16) 208062306a36Sopenharmony_ci 208162306a36Sopenharmony_ci#define HAL_SW_MONITOR_RING_INFO1_PHY_PPDU_ID GENMASK(15, 0) 208262306a36Sopenharmony_ci#define HAL_SW_MONITOR_RING_INFO1_RING_ID GENMASK(27, 20) 208362306a36Sopenharmony_ci#define HAL_SW_MONITOR_RING_INFO1_LOOPING_COUNT GENMASK(31, 28) 208462306a36Sopenharmony_ci 208562306a36Sopenharmony_cistruct hal_sw_monitor_ring { 208662306a36Sopenharmony_ci struct ath12k_buffer_addr buf_addr_info; 208762306a36Sopenharmony_ci struct rx_mpdu_desc rx_mpdu_info; 208862306a36Sopenharmony_ci struct ath12k_buffer_addr status_buff_addr_info; 208962306a36Sopenharmony_ci __le32 info0; /* %HAL_SW_MONITOR_RING_INFO0 */ 209062306a36Sopenharmony_ci __le32 info1; /* %HAL_SW_MONITOR_RING_INFO1 */ 209162306a36Sopenharmony_ci} __packed; 209262306a36Sopenharmony_ci 209362306a36Sopenharmony_ci/* hal_sw_monitor_ring 209462306a36Sopenharmony_ci * 209562306a36Sopenharmony_ci * Producer: RXDMA 209662306a36Sopenharmony_ci * Consumer: REO/SW/FW 209762306a36Sopenharmony_ci * buf_addr_info 209862306a36Sopenharmony_ci * Details of the physical address of a buffer or MSDU 209962306a36Sopenharmony_ci * link descriptor. 210062306a36Sopenharmony_ci * 210162306a36Sopenharmony_ci * rx_mpdu_info 210262306a36Sopenharmony_ci * Details related to the MPDU being pushed to SW, valid 210362306a36Sopenharmony_ci * only if end_of_ppdu is set to 0. 210462306a36Sopenharmony_ci * 210562306a36Sopenharmony_ci * status_buff_addr_info 210662306a36Sopenharmony_ci * Details of the physical address of the first status 210762306a36Sopenharmony_ci * buffer used for the PPDU (either the PPDU that included the 210862306a36Sopenharmony_ci * MPDU being pushed to SW if end_of_ppdu = 0, or the PPDU 210962306a36Sopenharmony_ci * whose end is indicated through end_of_ppdu = 1) 211062306a36Sopenharmony_ci * 211162306a36Sopenharmony_ci * rxdma_push_reason 211262306a36Sopenharmony_ci * Indicates why RXDMA pushed the frame to this ring 211362306a36Sopenharmony_ci * 211462306a36Sopenharmony_ci * <enum 0 rxdma_error_detected> RXDMA detected an error an 211562306a36Sopenharmony_ci * pushed this frame to this queue 211662306a36Sopenharmony_ci * 211762306a36Sopenharmony_ci * <enum 1 rxdma_routing_instruction> RXDMA pushed the 211862306a36Sopenharmony_ci * frame to this queue per received routing instructions. No 211962306a36Sopenharmony_ci * error within RXDMA was detected 212062306a36Sopenharmony_ci * 212162306a36Sopenharmony_ci * <enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a 212262306a36Sopenharmony_ci * result the MSDU link descriptor might not have the 212362306a36Sopenharmony_ci * last_msdu_in_mpdu_flag set, but instead WBM might just see a 212462306a36Sopenharmony_ci * NULL pointer in the MSDU link descriptor. This is to be 212562306a36Sopenharmony_ci * considered a normal condition for this scenario. 212662306a36Sopenharmony_ci * 212762306a36Sopenharmony_ci * rxdma_error_code 212862306a36Sopenharmony_ci * Field only valid when rxdma_push_reason is set to 212962306a36Sopenharmony_ci * 'rxdma_error_detected.' 213062306a36Sopenharmony_ci * 213162306a36Sopenharmony_ci * <enum 0 rxdma_overflow_err>MPDU frame is not complete 213262306a36Sopenharmony_ci * due to a FIFO overflow error in RXPCU. 213362306a36Sopenharmony_ci * 213462306a36Sopenharmony_ci * <enum 1 rxdma_mpdu_length_err>MPDU frame is not complete 213562306a36Sopenharmony_ci * due to receiving incomplete MPDU from the PHY 213662306a36Sopenharmony_ci * 213762306a36Sopenharmony_ci * <enum 3 rxdma_decrypt_err>CRYPTO reported a decryption 213862306a36Sopenharmony_ci * error or CRYPTO received an encrypted frame, but did not get 213962306a36Sopenharmony_ci * a valid corresponding key id in the peer entry. 214062306a36Sopenharmony_ci * 214162306a36Sopenharmony_ci * <enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC 214262306a36Sopenharmony_ci * error 214362306a36Sopenharmony_ci * 214462306a36Sopenharmony_ci * <enum 5 rxdma_unecrypted_err>CRYPTO reported an 214562306a36Sopenharmony_ci * unencrypted frame error when encrypted was expected 214662306a36Sopenharmony_ci * 214762306a36Sopenharmony_ci * <enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU 214862306a36Sopenharmony_ci * length error 214962306a36Sopenharmony_ci * 215062306a36Sopenharmony_ci * <enum 7 rxdma_msdu_limit_err>RX OLE reported that max 215162306a36Sopenharmony_ci * number of MSDUs allowed in an MPDU got exceeded 215262306a36Sopenharmony_ci * 215362306a36Sopenharmony_ci * <enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing 215462306a36Sopenharmony_ci * error 215562306a36Sopenharmony_ci * 215662306a36Sopenharmony_ci * <enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU 215762306a36Sopenharmony_ci * parsing error 215862306a36Sopenharmony_ci * 215962306a36Sopenharmony_ci * <enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout 216062306a36Sopenharmony_ci * during SA search 216162306a36Sopenharmony_ci * 216262306a36Sopenharmony_ci * <enum 11 rxdma_da_timeout_err>RX OLE reported a timeout 216362306a36Sopenharmony_ci * during DA search 216462306a36Sopenharmony_ci * 216562306a36Sopenharmony_ci * <enum 12 rxdma_flow_timeout_err>RX OLE reported a 216662306a36Sopenharmony_ci * timeout during flow search 216762306a36Sopenharmony_ci * 216862306a36Sopenharmony_ci * <enum 13 rxdma_flush_request>RXDMA received a flush 216962306a36Sopenharmony_ci * request 217062306a36Sopenharmony_ci * 217162306a36Sopenharmony_ci * <enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU 217262306a36Sopenharmony_ci * present as well as a fragmented MPDU. 217362306a36Sopenharmony_ci * 217462306a36Sopenharmony_ci * mpdu_fragment_number 217562306a36Sopenharmony_ci * Field only valid when Reo_level_mpdu_frame_info. 217662306a36Sopenharmony_ci * Rx_mpdu_desc_info_details.Fragment_flag is set and 217762306a36Sopenharmony_ci * end_of_ppdu is set to 0. 217862306a36Sopenharmony_ci * 217962306a36Sopenharmony_ci * The fragment number from the 802.11 header. 218062306a36Sopenharmony_ci * 218162306a36Sopenharmony_ci * Note that the sequence number is embedded in the field: 218262306a36Sopenharmony_ci * Reo_level_mpdu_frame_info. Rx_mpdu_desc_info_details. 218362306a36Sopenharmony_ci * Mpdu_sequence_number 218462306a36Sopenharmony_ci * 218562306a36Sopenharmony_ci * frameless_bar 218662306a36Sopenharmony_ci * When set, this SW monitor ring struct contains BAR info 218762306a36Sopenharmony_ci * from a multi TID BAR frame. The original multi TID BAR frame 218862306a36Sopenharmony_ci * itself contained all the REO info for the first TID, but all 218962306a36Sopenharmony_ci * the subsequent TID info and their linkage to the REO 219062306a36Sopenharmony_ci * descriptors is passed down as 'frameless' BAR info. 219162306a36Sopenharmony_ci * 219262306a36Sopenharmony_ci * The only fields valid in this descriptor when this bit 219362306a36Sopenharmony_ci * is within the 219462306a36Sopenharmony_ci * 219562306a36Sopenharmony_ci * Reo_level_mpdu_frame_info: 219662306a36Sopenharmony_ci * Within Rx_mpdu_desc_info_details: 219762306a36Sopenharmony_ci * Mpdu_Sequence_number 219862306a36Sopenharmony_ci * BAR_frame 219962306a36Sopenharmony_ci * Peer_meta_data 220062306a36Sopenharmony_ci * All other fields shall be set to 0. 220162306a36Sopenharmony_ci * 220262306a36Sopenharmony_ci * status_buf_count 220362306a36Sopenharmony_ci * A count of status buffers used so far for the PPDU 220462306a36Sopenharmony_ci * (either the PPDU that included the MPDU being pushed to SW 220562306a36Sopenharmony_ci * if end_of_ppdu = 0, or the PPDU whose end is indicated 220662306a36Sopenharmony_ci * through end_of_ppdu = 1) 220762306a36Sopenharmony_ci * 220862306a36Sopenharmony_ci * end_of_ppdu 220962306a36Sopenharmony_ci * Some hw RXDMA can be configured to generate a separate 221062306a36Sopenharmony_ci * 'SW_MONITOR_RING' descriptor at the end of a PPDU (either 221162306a36Sopenharmony_ci * through an 'RX_PPDU_END' TLV or through an 'RX_FLUSH') to 221262306a36Sopenharmony_ci * demarcate PPDUs. 221362306a36Sopenharmony_ci * 221462306a36Sopenharmony_ci * For such a descriptor, this bit is set to 1 and fields 221562306a36Sopenharmony_ci * Reo_level_mpdu_frame_info, mpdu_fragment_number and 221662306a36Sopenharmony_ci * Frameless_bar are all set to 0. 221762306a36Sopenharmony_ci * 221862306a36Sopenharmony_ci * Otherwise this bit is set to 0. 221962306a36Sopenharmony_ci * 222062306a36Sopenharmony_ci * phy_ppdu_id 222162306a36Sopenharmony_ci * A PPDU counter value that PHY increments for every PPDU 222262306a36Sopenharmony_ci * received 222362306a36Sopenharmony_ci * 222462306a36Sopenharmony_ci * The counter value wraps around. Some hw RXDMA can be 222562306a36Sopenharmony_ci * configured to copy this from the RX_PPDU_START TLV for every 222662306a36Sopenharmony_ci * output descriptor. 222762306a36Sopenharmony_ci * 222862306a36Sopenharmony_ci * ring_id 222962306a36Sopenharmony_ci * For debugging. 223062306a36Sopenharmony_ci * This field is filled in by the SRNG module. 223162306a36Sopenharmony_ci * It help to identify the ring that is being looked 223262306a36Sopenharmony_ci * 223362306a36Sopenharmony_ci * looping_count 223462306a36Sopenharmony_ci * For debugging. 223562306a36Sopenharmony_ci * This field is filled in by the SRNG module. 223662306a36Sopenharmony_ci * 223762306a36Sopenharmony_ci * A count value that indicates the number of times the 223862306a36Sopenharmony_ci * producer of entries into this Ring has looped around the 223962306a36Sopenharmony_ci * ring. 224062306a36Sopenharmony_ci * At initialization time, this value is set to 0. On the 224162306a36Sopenharmony_ci * first loop, this value is set to 1. After the max value is 224262306a36Sopenharmony_ci * reached allowed by the number of bits for this field, the 224362306a36Sopenharmony_ci * count value continues with 0 again. 224462306a36Sopenharmony_ci * 224562306a36Sopenharmony_ci * In case SW is the consumer of the ring entries, it can 224662306a36Sopenharmony_ci * use this field to figure out up to where the producer of 224762306a36Sopenharmony_ci * entries has created new entries. This eliminates the need to 224862306a36Sopenharmony_ci * check where the head pointer' of the ring is located once 224962306a36Sopenharmony_ci * the SW starts processing an interrupt indicating that new 225062306a36Sopenharmony_ci * entries have been put into this ring... 225162306a36Sopenharmony_ci */ 225262306a36Sopenharmony_ci 225362306a36Sopenharmony_cienum hal_desc_owner { 225462306a36Sopenharmony_ci HAL_DESC_OWNER_WBM, 225562306a36Sopenharmony_ci HAL_DESC_OWNER_SW, 225662306a36Sopenharmony_ci HAL_DESC_OWNER_TQM, 225762306a36Sopenharmony_ci HAL_DESC_OWNER_RXDMA, 225862306a36Sopenharmony_ci HAL_DESC_OWNER_REO, 225962306a36Sopenharmony_ci HAL_DESC_OWNER_SWITCH, 226062306a36Sopenharmony_ci}; 226162306a36Sopenharmony_ci 226262306a36Sopenharmony_cienum hal_desc_buf_type { 226362306a36Sopenharmony_ci HAL_DESC_BUF_TYPE_TX_MSDU_LINK, 226462306a36Sopenharmony_ci HAL_DESC_BUF_TYPE_TX_MPDU_LINK, 226562306a36Sopenharmony_ci HAL_DESC_BUF_TYPE_TX_MPDU_QUEUE_HEAD, 226662306a36Sopenharmony_ci HAL_DESC_BUF_TYPE_TX_MPDU_QUEUE_EXT, 226762306a36Sopenharmony_ci HAL_DESC_BUF_TYPE_TX_FLOW, 226862306a36Sopenharmony_ci HAL_DESC_BUF_TYPE_TX_BUFFER, 226962306a36Sopenharmony_ci HAL_DESC_BUF_TYPE_RX_MSDU_LINK, 227062306a36Sopenharmony_ci HAL_DESC_BUF_TYPE_RX_MPDU_LINK, 227162306a36Sopenharmony_ci HAL_DESC_BUF_TYPE_RX_REO_QUEUE, 227262306a36Sopenharmony_ci HAL_DESC_BUF_TYPE_RX_REO_QUEUE_EXT, 227362306a36Sopenharmony_ci HAL_DESC_BUF_TYPE_RX_BUFFER, 227462306a36Sopenharmony_ci HAL_DESC_BUF_TYPE_IDLE_LINK, 227562306a36Sopenharmony_ci}; 227662306a36Sopenharmony_ci 227762306a36Sopenharmony_ci#define HAL_DESC_REO_OWNED 4 227862306a36Sopenharmony_ci#define HAL_DESC_REO_QUEUE_DESC 8 227962306a36Sopenharmony_ci#define HAL_DESC_REO_QUEUE_EXT_DESC 9 228062306a36Sopenharmony_ci#define HAL_DESC_REO_NON_QOS_TID 16 228162306a36Sopenharmony_ci 228262306a36Sopenharmony_ci#define HAL_DESC_HDR_INFO0_OWNER GENMASK(3, 0) 228362306a36Sopenharmony_ci#define HAL_DESC_HDR_INFO0_BUF_TYPE GENMASK(7, 4) 228462306a36Sopenharmony_ci#define HAL_DESC_HDR_INFO0_DBG_RESERVED GENMASK(31, 8) 228562306a36Sopenharmony_ci 228662306a36Sopenharmony_cistruct hal_desc_header { 228762306a36Sopenharmony_ci __le32 info0; 228862306a36Sopenharmony_ci} __packed; 228962306a36Sopenharmony_ci 229062306a36Sopenharmony_cistruct hal_rx_mpdu_link_ptr { 229162306a36Sopenharmony_ci struct ath12k_buffer_addr addr_info; 229262306a36Sopenharmony_ci} __packed; 229362306a36Sopenharmony_ci 229462306a36Sopenharmony_cistruct hal_rx_msdu_details { 229562306a36Sopenharmony_ci struct ath12k_buffer_addr buf_addr_info; 229662306a36Sopenharmony_ci struct rx_msdu_desc rx_msdu_info; 229762306a36Sopenharmony_ci struct rx_msdu_ext_desc rx_msdu_ext_info; 229862306a36Sopenharmony_ci} __packed; 229962306a36Sopenharmony_ci 230062306a36Sopenharmony_ci#define HAL_RX_MSDU_LNK_INFO0_RX_QUEUE_NUMBER GENMASK(15, 0) 230162306a36Sopenharmony_ci#define HAL_RX_MSDU_LNK_INFO0_FIRST_MSDU_LNK BIT(16) 230262306a36Sopenharmony_ci 230362306a36Sopenharmony_cistruct hal_rx_msdu_link { 230462306a36Sopenharmony_ci struct hal_desc_header desc_hdr; 230562306a36Sopenharmony_ci struct ath12k_buffer_addr buf_addr_info; 230662306a36Sopenharmony_ci __le32 info0; 230762306a36Sopenharmony_ci __le32 pn[4]; 230862306a36Sopenharmony_ci struct hal_rx_msdu_details msdu_link[6]; 230962306a36Sopenharmony_ci} __packed; 231062306a36Sopenharmony_ci 231162306a36Sopenharmony_cistruct hal_rx_reo_queue_ext { 231262306a36Sopenharmony_ci struct hal_desc_header desc_hdr; 231362306a36Sopenharmony_ci __le32 rsvd; 231462306a36Sopenharmony_ci struct hal_rx_mpdu_link_ptr mpdu_link[15]; 231562306a36Sopenharmony_ci} __packed; 231662306a36Sopenharmony_ci 231762306a36Sopenharmony_ci/* hal_rx_reo_queue_ext 231862306a36Sopenharmony_ci * Consumer: REO 231962306a36Sopenharmony_ci * Producer: REO 232062306a36Sopenharmony_ci * 232162306a36Sopenharmony_ci * descriptor_header 232262306a36Sopenharmony_ci * Details about which module owns this struct. 232362306a36Sopenharmony_ci * 232462306a36Sopenharmony_ci * mpdu_link 232562306a36Sopenharmony_ci * Pointer to the next MPDU_link descriptor in the MPDU queue. 232662306a36Sopenharmony_ci */ 232762306a36Sopenharmony_ci 232862306a36Sopenharmony_cienum hal_rx_reo_queue_pn_size { 232962306a36Sopenharmony_ci HAL_RX_REO_QUEUE_PN_SIZE_24, 233062306a36Sopenharmony_ci HAL_RX_REO_QUEUE_PN_SIZE_48, 233162306a36Sopenharmony_ci HAL_RX_REO_QUEUE_PN_SIZE_128, 233262306a36Sopenharmony_ci}; 233362306a36Sopenharmony_ci 233462306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_RX_QUEUE_NUMBER GENMASK(15, 0) 233562306a36Sopenharmony_ci 233662306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_VLD BIT(0) 233762306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_ASSOC_LNK_DESC_COUNTER GENMASK(2, 1) 233862306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_DIS_DUP_DETECTION BIT(3) 233962306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_SOFT_REORDER_EN BIT(4) 234062306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_AC GENMASK(6, 5) 234162306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_BAR BIT(7) 234262306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_RETRY BIT(8) 234362306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_CHECK_2K_MODE BIT(9) 234462306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_OOR_MODE BIT(10) 234562306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_BA_WINDOW_SIZE GENMASK(20, 11) 234662306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_PN_CHECK BIT(21) 234762306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_EVEN_PN BIT(22) 234862306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_UNEVEN_PN BIT(23) 234962306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_PN_HANDLE_ENABLE BIT(24) 235062306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_PN_SIZE GENMASK(26, 25) 235162306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO0_IGNORE_AMPDU_FLG BIT(27) 235262306a36Sopenharmony_ci 235362306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO1_SVLD BIT(0) 235462306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO1_SSN GENMASK(12, 1) 235562306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO1_CURRENT_IDX GENMASK(22, 13) 235662306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO1_SEQ_2K_ERR BIT(23) 235762306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO1_PN_ERR BIT(24) 235862306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO1_PN_VALID BIT(31) 235962306a36Sopenharmony_ci 236062306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO2_MPDU_COUNT GENMASK(6, 0) 236162306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO2_MSDU_COUNT (31, 7) 236262306a36Sopenharmony_ci 236362306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO3_TIMEOUT_COUNT GENMASK(9, 4) 236462306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO3_FWD_DUE_TO_BAR_CNT GENMASK(15, 10) 236562306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO3_DUPLICATE_COUNT GENMASK(31, 16) 236662306a36Sopenharmony_ci 236762306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO4_FRAME_IN_ORD_COUNT GENMASK(23, 0) 236862306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO4_BAR_RECVD_COUNT GENMASK(31, 24) 236962306a36Sopenharmony_ci 237062306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO5_LATE_RX_MPDU_COUNT GENMASK(11, 0) 237162306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO5_WINDOW_JUMP_2K GENMASK(15, 12) 237262306a36Sopenharmony_ci#define HAL_RX_REO_QUEUE_INFO5_HOLE_COUNT GENMASK(31, 16) 237362306a36Sopenharmony_ci 237462306a36Sopenharmony_cistruct hal_rx_reo_queue { 237562306a36Sopenharmony_ci struct hal_desc_header desc_hdr; 237662306a36Sopenharmony_ci __le32 rx_queue_num; 237762306a36Sopenharmony_ci __le32 info0; 237862306a36Sopenharmony_ci __le32 info1; 237962306a36Sopenharmony_ci __le32 pn[4]; 238062306a36Sopenharmony_ci __le32 last_rx_enqueue_timestamp; 238162306a36Sopenharmony_ci __le32 last_rx_dequeue_timestamp; 238262306a36Sopenharmony_ci __le32 next_aging_queue[2]; 238362306a36Sopenharmony_ci __le32 prev_aging_queue[2]; 238462306a36Sopenharmony_ci __le32 rx_bitmap[9]; 238562306a36Sopenharmony_ci __le32 info2; 238662306a36Sopenharmony_ci __le32 info3; 238762306a36Sopenharmony_ci __le32 info4; 238862306a36Sopenharmony_ci __le32 processed_mpdus; 238962306a36Sopenharmony_ci __le32 processed_msdus; 239062306a36Sopenharmony_ci __le32 processed_total_bytes; 239162306a36Sopenharmony_ci __le32 info5; 239262306a36Sopenharmony_ci __le32 rsvd[2]; 239362306a36Sopenharmony_ci struct hal_rx_reo_queue_ext ext_desc[]; 239462306a36Sopenharmony_ci} __packed; 239562306a36Sopenharmony_ci 239662306a36Sopenharmony_ci/* hal_rx_reo_queue 239762306a36Sopenharmony_ci * 239862306a36Sopenharmony_ci * descriptor_header 239962306a36Sopenharmony_ci * Details about which module owns this struct. Note that sub field 240062306a36Sopenharmony_ci * Buffer_type shall be set to receive_reo_queue_descriptor. 240162306a36Sopenharmony_ci * 240262306a36Sopenharmony_ci * receive_queue_number 240362306a36Sopenharmony_ci * Indicates the MPDU queue ID to which this MPDU link descriptor belongs. 240462306a36Sopenharmony_ci * 240562306a36Sopenharmony_ci * vld 240662306a36Sopenharmony_ci * Valid bit indicating a session is established and the queue descriptor 240762306a36Sopenharmony_ci * is valid. 240862306a36Sopenharmony_ci * associated_link_descriptor_counter 240962306a36Sopenharmony_ci * Indicates which of the 3 link descriptor counters shall be incremented 241062306a36Sopenharmony_ci * or decremented when link descriptors are added or removed from this 241162306a36Sopenharmony_ci * flow queue. 241262306a36Sopenharmony_ci * disable_duplicate_detection 241362306a36Sopenharmony_ci * When set, do not perform any duplicate detection. 241462306a36Sopenharmony_ci * soft_reorder_enable 241562306a36Sopenharmony_ci * When set, REO has been instructed to not perform the actual re-ordering 241662306a36Sopenharmony_ci * of frames for this queue, but just to insert the reorder opcodes. 241762306a36Sopenharmony_ci * ac 241862306a36Sopenharmony_ci * Indicates the access category of the queue descriptor. 241962306a36Sopenharmony_ci * bar 242062306a36Sopenharmony_ci * Indicates if BAR has been received. 242162306a36Sopenharmony_ci * retry 242262306a36Sopenharmony_ci * Retry bit is checked if this bit is set. 242362306a36Sopenharmony_ci * chk_2k_mode 242462306a36Sopenharmony_ci * Indicates what type of operation is expected from Reo when the received 242562306a36Sopenharmony_ci * frame SN falls within the 2K window. 242662306a36Sopenharmony_ci * oor_mode 242762306a36Sopenharmony_ci * Indicates what type of operation is expected when the received frame 242862306a36Sopenharmony_ci * falls within the OOR window. 242962306a36Sopenharmony_ci * ba_window_size 243062306a36Sopenharmony_ci * Indicates the negotiated (window size + 1). Max of 256 bits. 243162306a36Sopenharmony_ci * 243262306a36Sopenharmony_ci * A value 255 means 256 bitmap, 63 means 64 bitmap, 0 (means non-BA 243362306a36Sopenharmony_ci * session, with window size of 0). The 3 values here are the main values 243462306a36Sopenharmony_ci * validated, but other values should work as well. 243562306a36Sopenharmony_ci * 243662306a36Sopenharmony_ci * A BA window size of 0 (=> one frame entry bitmat), means that there is 243762306a36Sopenharmony_ci * no additional rx_reo_queue_ext desc. following rx_reo_queue in memory. 243862306a36Sopenharmony_ci * A BA window size of 1 - 105, means that there is 1 rx_reo_queue_ext. 243962306a36Sopenharmony_ci * A BA window size of 106 - 210, means that there are 2 rx_reo_queue_ext. 244062306a36Sopenharmony_ci * A BA window size of 211 - 256, means that there are 3 rx_reo_queue_ext. 244162306a36Sopenharmony_ci * pn_check_needed, pn_shall_be_even, pn_shall_be_uneven, pn_handling_enable, 244262306a36Sopenharmony_ci * pn_size 244362306a36Sopenharmony_ci * REO shall perform the PN increment check, even number check, uneven 244462306a36Sopenharmony_ci * number check, PN error check and size of the PN field check. 244562306a36Sopenharmony_ci * ignore_ampdu_flag 244662306a36Sopenharmony_ci * REO shall ignore the ampdu_flag on entrance descriptor for this queue. 244762306a36Sopenharmony_ci * 244862306a36Sopenharmony_ci * svld 244962306a36Sopenharmony_ci * Sequence number in next field is valid one. 245062306a36Sopenharmony_ci * ssn 245162306a36Sopenharmony_ci * Starting Sequence number of the session. 245262306a36Sopenharmony_ci * current_index 245362306a36Sopenharmony_ci * Points to last forwarded packet 245462306a36Sopenharmony_ci * seq_2k_error_detected_flag 245562306a36Sopenharmony_ci * REO has detected a 2k error jump in the sequence number and from that 245662306a36Sopenharmony_ci * moment forward, all new frames are forwarded directly to FW, without 245762306a36Sopenharmony_ci * duplicate detect, reordering, etc. 245862306a36Sopenharmony_ci * pn_error_detected_flag 245962306a36Sopenharmony_ci * REO has detected a PN error. 246062306a36Sopenharmony_ci */ 246162306a36Sopenharmony_ci 246262306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_QUEUE_ADDR_HI GENMASK(7, 0) 246362306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_RX_QUEUE_NUM BIT(8) 246462306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_VLD BIT(9) 246562306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_ASSOC_LNK_DESC_CNT BIT(10) 246662306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_DIS_DUP_DETECTION BIT(11) 246762306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SOFT_REORDER_EN BIT(12) 246862306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_AC BIT(13) 246962306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_BAR BIT(14) 247062306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_RETRY BIT(15) 247162306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_CHECK_2K_MODE BIT(16) 247262306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_OOR_MODE BIT(17) 247362306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_BA_WINDOW_SIZE BIT(18) 247462306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_CHECK BIT(19) 247562306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_EVEN_PN BIT(20) 247662306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_UNEVEN_PN BIT(21) 247762306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_HANDLE_ENABLE BIT(22) 247862306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_SIZE BIT(23) 247962306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_IGNORE_AMPDU_FLG BIT(24) 248062306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SVLD BIT(25) 248162306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SSN BIT(26) 248262306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SEQ_2K_ERR BIT(27) 248362306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_ERR BIT(28) 248462306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_VALID BIT(29) 248562306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN BIT(30) 248662306a36Sopenharmony_ci 248762306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO1_RX_QUEUE_NUMBER GENMASK(15, 0) 248862306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO1_VLD BIT(16) 248962306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO1_ASSOC_LNK_DESC_COUNTER GENMASK(18, 17) 249062306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO1_DIS_DUP_DETECTION BIT(19) 249162306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO1_SOFT_REORDER_EN BIT(20) 249262306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO1_AC GENMASK(22, 21) 249362306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO1_BAR BIT(23) 249462306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO1_RETRY BIT(24) 249562306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO1_CHECK_2K_MODE BIT(25) 249662306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO1_OOR_MODE BIT(26) 249762306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO1_PN_CHECK BIT(27) 249862306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO1_EVEN_PN BIT(28) 249962306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO1_UNEVEN_PN BIT(29) 250062306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO1_PN_HANDLE_ENABLE BIT(30) 250162306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO1_IGNORE_AMPDU_FLG BIT(31) 250262306a36Sopenharmony_ci 250362306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO2_BA_WINDOW_SIZE GENMASK(7, 0) 250462306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO2_PN_SIZE GENMASK(9, 8) 250562306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO2_SVLD BIT(10) 250662306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO2_SSN GENMASK(22, 11) 250762306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO2_SEQ_2K_ERR BIT(23) 250862306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO2_PN_ERR BIT(24) 250962306a36Sopenharmony_ci#define HAL_REO_UPD_RX_QUEUE_INFO2_PN_VALID BIT(25) 251062306a36Sopenharmony_ci 251162306a36Sopenharmony_cistruct hal_reo_update_rx_queue { 251262306a36Sopenharmony_ci struct hal_reo_cmd_hdr cmd; 251362306a36Sopenharmony_ci __le32 queue_addr_lo; 251462306a36Sopenharmony_ci __le32 info0; 251562306a36Sopenharmony_ci __le32 info1; 251662306a36Sopenharmony_ci __le32 info2; 251762306a36Sopenharmony_ci __le32 pn[4]; 251862306a36Sopenharmony_ci} __packed; 251962306a36Sopenharmony_ci 252062306a36Sopenharmony_ci#define HAL_REO_UNBLOCK_CACHE_INFO0_UNBLK_CACHE BIT(0) 252162306a36Sopenharmony_ci#define HAL_REO_UNBLOCK_CACHE_INFO0_RESOURCE_IDX GENMASK(2, 1) 252262306a36Sopenharmony_ci 252362306a36Sopenharmony_cistruct hal_reo_unblock_cache { 252462306a36Sopenharmony_ci struct hal_reo_cmd_hdr cmd; 252562306a36Sopenharmony_ci __le32 info0; 252662306a36Sopenharmony_ci __le32 rsvd[7]; 252762306a36Sopenharmony_ci} __packed; 252862306a36Sopenharmony_ci 252962306a36Sopenharmony_cienum hal_reo_exec_status { 253062306a36Sopenharmony_ci HAL_REO_EXEC_STATUS_SUCCESS, 253162306a36Sopenharmony_ci HAL_REO_EXEC_STATUS_BLOCKED, 253262306a36Sopenharmony_ci HAL_REO_EXEC_STATUS_FAILED, 253362306a36Sopenharmony_ci HAL_REO_EXEC_STATUS_RESOURCE_BLOCKED, 253462306a36Sopenharmony_ci}; 253562306a36Sopenharmony_ci 253662306a36Sopenharmony_ci#define HAL_REO_STATUS_HDR_INFO0_STATUS_NUM GENMASK(15, 0) 253762306a36Sopenharmony_ci#define HAL_REO_STATUS_HDR_INFO0_EXEC_TIME GENMASK(25, 16) 253862306a36Sopenharmony_ci#define HAL_REO_STATUS_HDR_INFO0_EXEC_STATUS GENMASK(27, 26) 253962306a36Sopenharmony_ci 254062306a36Sopenharmony_cistruct hal_reo_status_hdr { 254162306a36Sopenharmony_ci __le32 info0; 254262306a36Sopenharmony_ci __le32 timestamp; 254362306a36Sopenharmony_ci} __packed; 254462306a36Sopenharmony_ci 254562306a36Sopenharmony_ci/* hal_reo_status_hdr 254662306a36Sopenharmony_ci * Producer: REO 254762306a36Sopenharmony_ci * Consumer: SW 254862306a36Sopenharmony_ci * 254962306a36Sopenharmony_ci * status_num 255062306a36Sopenharmony_ci * The value in this field is equal to value of the reo command 255162306a36Sopenharmony_ci * number. This field helps to correlate the statuses with the REO 255262306a36Sopenharmony_ci * commands. 255362306a36Sopenharmony_ci * 255462306a36Sopenharmony_ci * execution_time (in us) 255562306a36Sopenharmony_ci * The amount of time REO took to execute the command. Note that 255662306a36Sopenharmony_ci * this time does not include the duration of the command waiting 255762306a36Sopenharmony_ci * in the command ring, before the execution started. 255862306a36Sopenharmony_ci * 255962306a36Sopenharmony_ci * execution_status 256062306a36Sopenharmony_ci * Execution status of the command. Values are defined in 256162306a36Sopenharmony_ci * enum %HAL_REO_EXEC_STATUS_. 256262306a36Sopenharmony_ci */ 256362306a36Sopenharmony_ci#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO0_SSN GENMASK(11, 0) 256462306a36Sopenharmony_ci#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO0_CUR_IDX GENMASK(21, 12) 256562306a36Sopenharmony_ci 256662306a36Sopenharmony_ci#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO1_MPDU_COUNT GENMASK(6, 0) 256762306a36Sopenharmony_ci#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO1_MSDU_COUNT GENMASK(31, 7) 256862306a36Sopenharmony_ci 256962306a36Sopenharmony_ci#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_WINDOW_JMP2K GENMASK(3, 0) 257062306a36Sopenharmony_ci#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_TIMEOUT_COUNT GENMASK(9, 4) 257162306a36Sopenharmony_ci#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_FDTB_COUNT GENMASK(15, 10) 257262306a36Sopenharmony_ci#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_DUPLICATE_COUNT GENMASK(31, 16) 257362306a36Sopenharmony_ci 257462306a36Sopenharmony_ci#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO3_FIO_COUNT GENMASK(23, 0) 257562306a36Sopenharmony_ci#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO3_BAR_RCVD_CNT GENMASK(31, 24) 257662306a36Sopenharmony_ci 257762306a36Sopenharmony_ci#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_LATE_RX_MPDU GENMASK(11, 0) 257862306a36Sopenharmony_ci#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_HOLE_COUNT GENMASK(27, 12) 257962306a36Sopenharmony_ci 258062306a36Sopenharmony_ci#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO5_LOOPING_CNT GENMASK(31, 28) 258162306a36Sopenharmony_ci 258262306a36Sopenharmony_cistruct hal_reo_get_queue_stats_status { 258362306a36Sopenharmony_ci struct hal_reo_status_hdr hdr; 258462306a36Sopenharmony_ci __le32 info0; 258562306a36Sopenharmony_ci __le32 pn[4]; 258662306a36Sopenharmony_ci __le32 last_rx_enqueue_timestamp; 258762306a36Sopenharmony_ci __le32 last_rx_dequeue_timestamp; 258862306a36Sopenharmony_ci __le32 rx_bitmap[9]; 258962306a36Sopenharmony_ci __le32 info1; 259062306a36Sopenharmony_ci __le32 info2; 259162306a36Sopenharmony_ci __le32 info3; 259262306a36Sopenharmony_ci __le32 num_mpdu_frames; 259362306a36Sopenharmony_ci __le32 num_msdu_frames; 259462306a36Sopenharmony_ci __le32 total_bytes; 259562306a36Sopenharmony_ci __le32 info4; 259662306a36Sopenharmony_ci __le32 info5; 259762306a36Sopenharmony_ci} __packed; 259862306a36Sopenharmony_ci 259962306a36Sopenharmony_ci/* hal_reo_get_queue_stats_status 260062306a36Sopenharmony_ci * Producer: REO 260162306a36Sopenharmony_ci * Consumer: SW 260262306a36Sopenharmony_ci * 260362306a36Sopenharmony_ci * status_hdr 260462306a36Sopenharmony_ci * Details that can link this status with the original command. It 260562306a36Sopenharmony_ci * also contains info on how long REO took to execute this command. 260662306a36Sopenharmony_ci * 260762306a36Sopenharmony_ci * ssn 260862306a36Sopenharmony_ci * Starting Sequence number of the session, this changes whenever 260962306a36Sopenharmony_ci * window moves (can be filled by SW then maintained by REO). 261062306a36Sopenharmony_ci * 261162306a36Sopenharmony_ci * current_index 261262306a36Sopenharmony_ci * Points to last forwarded packet. 261362306a36Sopenharmony_ci * 261462306a36Sopenharmony_ci * pn 261562306a36Sopenharmony_ci * Bits of the PN number. 261662306a36Sopenharmony_ci * 261762306a36Sopenharmony_ci * last_rx_enqueue_timestamp 261862306a36Sopenharmony_ci * last_rx_dequeue_timestamp 261962306a36Sopenharmony_ci * Timestamp of arrival of the last MPDU for this queue and 262062306a36Sopenharmony_ci * Timestamp of forwarding an MPDU accordingly. 262162306a36Sopenharmony_ci * 262262306a36Sopenharmony_ci * rx_bitmap 262362306a36Sopenharmony_ci * When a bit is set, the corresponding frame is currently held 262462306a36Sopenharmony_ci * in the re-order queue. The bitmap is Fully managed by HW. 262562306a36Sopenharmony_ci * 262662306a36Sopenharmony_ci * current_mpdu_count 262762306a36Sopenharmony_ci * current_msdu_count 262862306a36Sopenharmony_ci * The number of MPDUs and MSDUs in the queue. 262962306a36Sopenharmony_ci * 263062306a36Sopenharmony_ci * timeout_count 263162306a36Sopenharmony_ci * The number of times REO started forwarding frames even though 263262306a36Sopenharmony_ci * there is a hole in the bitmap. Forwarding reason is timeout. 263362306a36Sopenharmony_ci * 263462306a36Sopenharmony_ci * forward_due_to_bar_count 263562306a36Sopenharmony_ci * The number of times REO started forwarding frames even though 263662306a36Sopenharmony_ci * there is a hole in the bitmap. Fwd reason is reception of BAR. 263762306a36Sopenharmony_ci * 263862306a36Sopenharmony_ci * duplicate_count 263962306a36Sopenharmony_ci * The number of duplicate frames that have been detected. 264062306a36Sopenharmony_ci * 264162306a36Sopenharmony_ci * frames_in_order_count 264262306a36Sopenharmony_ci * The number of frames that have been received in order (without 264362306a36Sopenharmony_ci * a hole that prevented them from being forwarded immediately). 264462306a36Sopenharmony_ci * 264562306a36Sopenharmony_ci * bar_received_count 264662306a36Sopenharmony_ci * The number of times a BAR frame is received. 264762306a36Sopenharmony_ci * 264862306a36Sopenharmony_ci * mpdu_frames_processed_count 264962306a36Sopenharmony_ci * msdu_frames_processed_count 265062306a36Sopenharmony_ci * The total number of MPDU/MSDU frames that have been processed. 265162306a36Sopenharmony_ci * 265262306a36Sopenharmony_ci * total_bytes 265362306a36Sopenharmony_ci * An approximation of the number of bytes received for this queue. 265462306a36Sopenharmony_ci * 265562306a36Sopenharmony_ci * late_receive_mpdu_count 265662306a36Sopenharmony_ci * The number of MPDUs received after the window had already moved 265762306a36Sopenharmony_ci * on. The 'late' sequence window is defined as 265862306a36Sopenharmony_ci * (Window SSN - 256) - (Window SSN - 1). 265962306a36Sopenharmony_ci * 266062306a36Sopenharmony_ci * window_jump_2k 266162306a36Sopenharmony_ci * The number of times the window moved more than 2K 266262306a36Sopenharmony_ci * 266362306a36Sopenharmony_ci * hole_count 266462306a36Sopenharmony_ci * The number of times a hole was created in the receive bitmap. 266562306a36Sopenharmony_ci * 266662306a36Sopenharmony_ci * looping_count 266762306a36Sopenharmony_ci * A count value that indicates the number of times the producer of 266862306a36Sopenharmony_ci * entries into this Ring has looped around the ring. 266962306a36Sopenharmony_ci */ 267062306a36Sopenharmony_ci 267162306a36Sopenharmony_ci#define HAL_REO_STATUS_LOOP_CNT GENMASK(31, 28) 267262306a36Sopenharmony_ci 267362306a36Sopenharmony_ci#define HAL_REO_FLUSH_QUEUE_INFO0_ERR_DETECTED BIT(0) 267462306a36Sopenharmony_ci#define HAL_REO_FLUSH_QUEUE_INFO0_RSVD GENMASK(31, 1) 267562306a36Sopenharmony_ci#define HAL_REO_FLUSH_QUEUE_INFO1_RSVD GENMASK(27, 0) 267662306a36Sopenharmony_ci 267762306a36Sopenharmony_cistruct hal_reo_flush_queue_status { 267862306a36Sopenharmony_ci struct hal_reo_status_hdr hdr; 267962306a36Sopenharmony_ci __le32 info0; 268062306a36Sopenharmony_ci __le32 rsvd0[21]; 268162306a36Sopenharmony_ci __le32 info1; 268262306a36Sopenharmony_ci} __packed; 268362306a36Sopenharmony_ci 268462306a36Sopenharmony_ci/* hal_reo_flush_queue_status 268562306a36Sopenharmony_ci * Producer: REO 268662306a36Sopenharmony_ci * Consumer: SW 268762306a36Sopenharmony_ci * 268862306a36Sopenharmony_ci * status_hdr 268962306a36Sopenharmony_ci * Details that can link this status with the original command. It 269062306a36Sopenharmony_ci * also contains info on how long REO took to execute this command. 269162306a36Sopenharmony_ci * 269262306a36Sopenharmony_ci * error_detected 269362306a36Sopenharmony_ci * Status of blocking resource 269462306a36Sopenharmony_ci * 269562306a36Sopenharmony_ci * 0 - No error has been detected while executing this command 269662306a36Sopenharmony_ci * 1 - Error detected. The resource to be used for blocking was 269762306a36Sopenharmony_ci * already in use. 269862306a36Sopenharmony_ci * 269962306a36Sopenharmony_ci * looping_count 270062306a36Sopenharmony_ci * A count value that indicates the number of times the producer of 270162306a36Sopenharmony_ci * entries into this Ring has looped around the ring. 270262306a36Sopenharmony_ci */ 270362306a36Sopenharmony_ci 270462306a36Sopenharmony_ci#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_IS_ERR BIT(0) 270562306a36Sopenharmony_ci#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_BLOCK_ERR_CODE GENMASK(2, 1) 270662306a36Sopenharmony_ci#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_STATUS_HIT BIT(8) 270762306a36Sopenharmony_ci#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_DESC_TYPE GENMASK(11, 9) 270862306a36Sopenharmony_ci#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_CLIENT_ID GENMASK(15, 12) 270962306a36Sopenharmony_ci#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_ERR GENMASK(17, 16) 271062306a36Sopenharmony_ci#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_COUNT GENMASK(25, 18) 271162306a36Sopenharmony_ci 271262306a36Sopenharmony_cistruct hal_reo_flush_cache_status { 271362306a36Sopenharmony_ci struct hal_reo_status_hdr hdr; 271462306a36Sopenharmony_ci __le32 info0; 271562306a36Sopenharmony_ci __le32 rsvd0[21]; 271662306a36Sopenharmony_ci __le32 info1; 271762306a36Sopenharmony_ci} __packed; 271862306a36Sopenharmony_ci 271962306a36Sopenharmony_ci/* hal_reo_flush_cache_status 272062306a36Sopenharmony_ci * Producer: REO 272162306a36Sopenharmony_ci * Consumer: SW 272262306a36Sopenharmony_ci * 272362306a36Sopenharmony_ci * status_hdr 272462306a36Sopenharmony_ci * Details that can link this status with the original command. It 272562306a36Sopenharmony_ci * also contains info on how long REO took to execute this command. 272662306a36Sopenharmony_ci * 272762306a36Sopenharmony_ci * error_detected 272862306a36Sopenharmony_ci * Status for blocking resource handling 272962306a36Sopenharmony_ci * 273062306a36Sopenharmony_ci * 0 - No error has been detected while executing this command 273162306a36Sopenharmony_ci * 1 - An error in the blocking resource management was detected 273262306a36Sopenharmony_ci * 273362306a36Sopenharmony_ci * block_error_details 273462306a36Sopenharmony_ci * only valid when error_detected is set 273562306a36Sopenharmony_ci * 273662306a36Sopenharmony_ci * 0 - No blocking related errors found 273762306a36Sopenharmony_ci * 1 - Blocking resource is already in use 273862306a36Sopenharmony_ci * 2 - Resource requested to be unblocked, was not blocked 273962306a36Sopenharmony_ci * 274062306a36Sopenharmony_ci * cache_controller_flush_status_hit 274162306a36Sopenharmony_ci * The status that the cache controller returned on executing the 274262306a36Sopenharmony_ci * flush command. 274362306a36Sopenharmony_ci * 274462306a36Sopenharmony_ci * 0 - miss; 1 - hit 274562306a36Sopenharmony_ci * 274662306a36Sopenharmony_ci * cache_controller_flush_status_desc_type 274762306a36Sopenharmony_ci * Flush descriptor type 274862306a36Sopenharmony_ci * 274962306a36Sopenharmony_ci * cache_controller_flush_status_client_id 275062306a36Sopenharmony_ci * Module who made the flush request 275162306a36Sopenharmony_ci * 275262306a36Sopenharmony_ci * In REO, this is always 0 275362306a36Sopenharmony_ci * 275462306a36Sopenharmony_ci * cache_controller_flush_status_error 275562306a36Sopenharmony_ci * Error condition 275662306a36Sopenharmony_ci * 275762306a36Sopenharmony_ci * 0 - No error found 275862306a36Sopenharmony_ci * 1 - HW interface is still busy 275962306a36Sopenharmony_ci * 2 - Line currently locked. Used for one line flush command 276062306a36Sopenharmony_ci * 3 - At least one line is still locked. 276162306a36Sopenharmony_ci * Used for cache flush command. 276262306a36Sopenharmony_ci * 276362306a36Sopenharmony_ci * cache_controller_flush_count 276462306a36Sopenharmony_ci * The number of lines that were actually flushed out 276562306a36Sopenharmony_ci * 276662306a36Sopenharmony_ci * looping_count 276762306a36Sopenharmony_ci * A count value that indicates the number of times the producer of 276862306a36Sopenharmony_ci * entries into this Ring has looped around the ring. 276962306a36Sopenharmony_ci */ 277062306a36Sopenharmony_ci 277162306a36Sopenharmony_ci#define HAL_REO_UNBLOCK_CACHE_STATUS_INFO0_IS_ERR BIT(0) 277262306a36Sopenharmony_ci#define HAL_REO_UNBLOCK_CACHE_STATUS_INFO0_TYPE BIT(1) 277362306a36Sopenharmony_ci 277462306a36Sopenharmony_cistruct hal_reo_unblock_cache_status { 277562306a36Sopenharmony_ci struct hal_reo_status_hdr hdr; 277662306a36Sopenharmony_ci __le32 info0; 277762306a36Sopenharmony_ci __le32 rsvd0[21]; 277862306a36Sopenharmony_ci __le32 info1; 277962306a36Sopenharmony_ci} __packed; 278062306a36Sopenharmony_ci 278162306a36Sopenharmony_ci/* hal_reo_unblock_cache_status 278262306a36Sopenharmony_ci * Producer: REO 278362306a36Sopenharmony_ci * Consumer: SW 278462306a36Sopenharmony_ci * 278562306a36Sopenharmony_ci * status_hdr 278662306a36Sopenharmony_ci * Details that can link this status with the original command. It 278762306a36Sopenharmony_ci * also contains info on how long REO took to execute this command. 278862306a36Sopenharmony_ci * 278962306a36Sopenharmony_ci * error_detected 279062306a36Sopenharmony_ci * 0 - No error has been detected while executing this command 279162306a36Sopenharmony_ci * 1 - The blocking resource was not in use, and therefore it could 279262306a36Sopenharmony_ci * not be unblocked. 279362306a36Sopenharmony_ci * 279462306a36Sopenharmony_ci * unblock_type 279562306a36Sopenharmony_ci * Reference to the type of unblock command 279662306a36Sopenharmony_ci * 0 - Unblock a blocking resource 279762306a36Sopenharmony_ci * 1 - The entire cache usage is unblock 279862306a36Sopenharmony_ci * 279962306a36Sopenharmony_ci * looping_count 280062306a36Sopenharmony_ci * A count value that indicates the number of times the producer of 280162306a36Sopenharmony_ci * entries into this Ring has looped around the ring. 280262306a36Sopenharmony_ci */ 280362306a36Sopenharmony_ci 280462306a36Sopenharmony_ci#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO0_IS_ERR BIT(0) 280562306a36Sopenharmony_ci#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO0_LIST_EMPTY BIT(1) 280662306a36Sopenharmony_ci 280762306a36Sopenharmony_ci#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO1_REL_DESC_COUNT GENMASK(15, 0) 280862306a36Sopenharmony_ci#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO1_FWD_BUF_COUNT GENMASK(31, 16) 280962306a36Sopenharmony_ci 281062306a36Sopenharmony_cistruct hal_reo_flush_timeout_list_status { 281162306a36Sopenharmony_ci struct hal_reo_status_hdr hdr; 281262306a36Sopenharmony_ci __le32 info0; 281362306a36Sopenharmony_ci __le32 info1; 281462306a36Sopenharmony_ci __le32 rsvd0[20]; 281562306a36Sopenharmony_ci __le32 info2; 281662306a36Sopenharmony_ci} __packed; 281762306a36Sopenharmony_ci 281862306a36Sopenharmony_ci/* hal_reo_flush_timeout_list_status 281962306a36Sopenharmony_ci * Producer: REO 282062306a36Sopenharmony_ci * Consumer: SW 282162306a36Sopenharmony_ci * 282262306a36Sopenharmony_ci * status_hdr 282362306a36Sopenharmony_ci * Details that can link this status with the original command. It 282462306a36Sopenharmony_ci * also contains info on how long REO took to execute this command. 282562306a36Sopenharmony_ci * 282662306a36Sopenharmony_ci * error_detected 282762306a36Sopenharmony_ci * 0 - No error has been detected while executing this command 282862306a36Sopenharmony_ci * 1 - Command not properly executed and returned with error 282962306a36Sopenharmony_ci * 283062306a36Sopenharmony_ci * timeout_list_empty 283162306a36Sopenharmony_ci * When set, REO has depleted the timeout list and all entries are 283262306a36Sopenharmony_ci * gone. 283362306a36Sopenharmony_ci * 283462306a36Sopenharmony_ci * release_desc_count 283562306a36Sopenharmony_ci * Producer: SW; Consumer: REO 283662306a36Sopenharmony_ci * The number of link descriptor released 283762306a36Sopenharmony_ci * 283862306a36Sopenharmony_ci * forward_buf_count 283962306a36Sopenharmony_ci * Producer: SW; Consumer: REO 284062306a36Sopenharmony_ci * The number of buffers forwarded to the REO destination rings 284162306a36Sopenharmony_ci * 284262306a36Sopenharmony_ci * looping_count 284362306a36Sopenharmony_ci * A count value that indicates the number of times the producer of 284462306a36Sopenharmony_ci * entries into this Ring has looped around the ring. 284562306a36Sopenharmony_ci */ 284662306a36Sopenharmony_ci 284762306a36Sopenharmony_ci#define HAL_REO_DESC_THRESH_STATUS_INFO0_THRESH_INDEX GENMASK(1, 0) 284862306a36Sopenharmony_ci#define HAL_REO_DESC_THRESH_STATUS_INFO1_LINK_DESC_COUNTER0 GENMASK(23, 0) 284962306a36Sopenharmony_ci#define HAL_REO_DESC_THRESH_STATUS_INFO2_LINK_DESC_COUNTER1 GENMASK(23, 0) 285062306a36Sopenharmony_ci#define HAL_REO_DESC_THRESH_STATUS_INFO3_LINK_DESC_COUNTER2 GENMASK(23, 0) 285162306a36Sopenharmony_ci#define HAL_REO_DESC_THRESH_STATUS_INFO4_LINK_DESC_COUNTER_SUM GENMASK(25, 0) 285262306a36Sopenharmony_ci 285362306a36Sopenharmony_cistruct hal_reo_desc_thresh_reached_status { 285462306a36Sopenharmony_ci struct hal_reo_status_hdr hdr; 285562306a36Sopenharmony_ci __le32 info0; 285662306a36Sopenharmony_ci __le32 info1; 285762306a36Sopenharmony_ci __le32 info2; 285862306a36Sopenharmony_ci __le32 info3; 285962306a36Sopenharmony_ci __le32 info4; 286062306a36Sopenharmony_ci __le32 rsvd0[17]; 286162306a36Sopenharmony_ci __le32 info5; 286262306a36Sopenharmony_ci} __packed; 286362306a36Sopenharmony_ci 286462306a36Sopenharmony_ci/* hal_reo_desc_thresh_reached_status 286562306a36Sopenharmony_ci * Producer: REO 286662306a36Sopenharmony_ci * Consumer: SW 286762306a36Sopenharmony_ci * 286862306a36Sopenharmony_ci * status_hdr 286962306a36Sopenharmony_ci * Details that can link this status with the original command. It 287062306a36Sopenharmony_ci * also contains info on how long REO took to execute this command. 287162306a36Sopenharmony_ci * 287262306a36Sopenharmony_ci * threshold_index 287362306a36Sopenharmony_ci * The index of the threshold register whose value got reached 287462306a36Sopenharmony_ci * 287562306a36Sopenharmony_ci * link_descriptor_counter0 287662306a36Sopenharmony_ci * link_descriptor_counter1 287762306a36Sopenharmony_ci * link_descriptor_counter2 287862306a36Sopenharmony_ci * link_descriptor_counter_sum 287962306a36Sopenharmony_ci * Value of the respective counters at generation of this message 288062306a36Sopenharmony_ci * 288162306a36Sopenharmony_ci * looping_count 288262306a36Sopenharmony_ci * A count value that indicates the number of times the producer of 288362306a36Sopenharmony_ci * entries into this Ring has looped around the ring. 288462306a36Sopenharmony_ci */ 288562306a36Sopenharmony_ci 288662306a36Sopenharmony_ci#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_DATA_LENGTH GENMASK(13, 0) 288762306a36Sopenharmony_ci#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_L4_CSUM_STATUS BIT(14) 288862306a36Sopenharmony_ci#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_L3_CSUM_STATUS BIT(15) 288962306a36Sopenharmony_ci#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_PID GENMASK(27, 24) 289062306a36Sopenharmony_ci#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_QDISC BIT(28) 289162306a36Sopenharmony_ci#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_MULTICAST BIT(29) 289262306a36Sopenharmony_ci#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_MORE BIT(30) 289362306a36Sopenharmony_ci#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_VALID_TOGGLE BIT(31) 289462306a36Sopenharmony_ci 289562306a36Sopenharmony_cistruct hal_tcl_entrance_from_ppe_ring { 289662306a36Sopenharmony_ci __le32 buffer_addr; 289762306a36Sopenharmony_ci __le32 info0; 289862306a36Sopenharmony_ci} __packed; 289962306a36Sopenharmony_ci 290062306a36Sopenharmony_cistruct hal_mon_buf_ring { 290162306a36Sopenharmony_ci __le32 paddr_lo; 290262306a36Sopenharmony_ci __le32 paddr_hi; 290362306a36Sopenharmony_ci __le64 cookie; 290462306a36Sopenharmony_ci}; 290562306a36Sopenharmony_ci 290662306a36Sopenharmony_ci/* hal_mon_buf_ring 290762306a36Sopenharmony_ci * Producer : SW 290862306a36Sopenharmony_ci * Consumer : Monitor 290962306a36Sopenharmony_ci * 291062306a36Sopenharmony_ci * paddr_lo 291162306a36Sopenharmony_ci * Lower 32-bit physical address of the buffer pointer from the source ring. 291262306a36Sopenharmony_ci * paddr_hi 291362306a36Sopenharmony_ci * bit range 7-0 : upper 8 bit of the physical address. 291462306a36Sopenharmony_ci * bit range 31-8 : reserved. 291562306a36Sopenharmony_ci * cookie 291662306a36Sopenharmony_ci * Consumer: RxMon/TxMon 64 bit cookie of the buffers. 291762306a36Sopenharmony_ci */ 291862306a36Sopenharmony_ci 291962306a36Sopenharmony_ci#define HAL_MON_DEST_COOKIE_BUF_ID GENMASK(17, 0) 292062306a36Sopenharmony_ci 292162306a36Sopenharmony_ci#define HAL_MON_DEST_INFO0_END_OFFSET GENMASK(15, 0) 292262306a36Sopenharmony_ci#define HAL_MON_DEST_INFO0_FLUSH_DETECTED BIT(16) 292362306a36Sopenharmony_ci#define HAL_MON_DEST_INFO0_END_OF_PPDU BIT(17) 292462306a36Sopenharmony_ci#define HAL_MON_DEST_INFO0_INITIATOR BIT(18) 292562306a36Sopenharmony_ci#define HAL_MON_DEST_INFO0_EMPTY_DESC BIT(19) 292662306a36Sopenharmony_ci#define HAL_MON_DEST_INFO0_RING_ID GENMASK(27, 20) 292762306a36Sopenharmony_ci#define HAL_MON_DEST_INFO0_LOOPING_COUNT GENMASK(31, 28) 292862306a36Sopenharmony_ci 292962306a36Sopenharmony_cistruct hal_mon_dest_desc { 293062306a36Sopenharmony_ci __le32 cookie; 293162306a36Sopenharmony_ci __le32 reserved; 293262306a36Sopenharmony_ci __le32 ppdu_id; 293362306a36Sopenharmony_ci __le32 info0; 293462306a36Sopenharmony_ci}; 293562306a36Sopenharmony_ci 293662306a36Sopenharmony_ci/* hal_mon_dest_ring 293762306a36Sopenharmony_ci * Producer : TxMon/RxMon 293862306a36Sopenharmony_ci * Consumer : SW 293962306a36Sopenharmony_ci * cookie 294062306a36Sopenharmony_ci * bit 0 -17 buf_id to track the skb's vaddr. 294162306a36Sopenharmony_ci * ppdu_id 294262306a36Sopenharmony_ci * Phy ppdu_id 294362306a36Sopenharmony_ci * end_offset 294462306a36Sopenharmony_ci * The offset into status buffer where DMA ended, ie., offset to the last 294562306a36Sopenharmony_ci * TLV + last TLV size. 294662306a36Sopenharmony_ci * flush_detected 294762306a36Sopenharmony_ci * Indicates whether 'tx_flush' or 'rx_flush' occurred. 294862306a36Sopenharmony_ci * end_of_ppdu 294962306a36Sopenharmony_ci * Indicates end of ppdu. 295062306a36Sopenharmony_ci * pmac_id 295162306a36Sopenharmony_ci * Indicates PMAC that received from frame. 295262306a36Sopenharmony_ci * empty_descriptor 295362306a36Sopenharmony_ci * This descriptor is written on flush or end of ppdu or end of status 295462306a36Sopenharmony_ci * buffer. 295562306a36Sopenharmony_ci * ring_id 295662306a36Sopenharmony_ci * updated by SRNG. 295762306a36Sopenharmony_ci * looping_count 295862306a36Sopenharmony_ci * updated by SRNG. 295962306a36Sopenharmony_ci */ 296062306a36Sopenharmony_ci 296162306a36Sopenharmony_ci#endif /* ATH12K_HAL_DESC_H */ 2962