Path: blob/main/sys/contrib/dev/athk/ath12k/hal_desc.h
48378 views
/* SPDX-License-Identifier: BSD-3-Clause-Clear */1/*2* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.3* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.4*/5#include "core.h"67#ifndef ATH12K_HAL_DESC_H8#define ATH12K_HAL_DESC_H910#define BUFFER_ADDR_INFO0_ADDR GENMASK(31, 0)1112#define BUFFER_ADDR_INFO1_ADDR GENMASK(7, 0)13#define BUFFER_ADDR_INFO1_RET_BUF_MGR GENMASK(11, 8)14#define BUFFER_ADDR_INFO1_SW_COOKIE GENMASK(31, 12)1516struct ath12k_buffer_addr {17__le32 info0;18__le32 info1;19} __packed;2021/* ath12k_buffer_addr22*23* buffer_addr_31_024* Address (lower 32 bits) of the MSDU buffer or MSDU_EXTENSION25* descriptor or Link descriptor26*27* buffer_addr_39_3228* Address (upper 8 bits) of the MSDU buffer or MSDU_EXTENSION29* descriptor or Link descriptor30*31* return_buffer_manager (RBM)32* Consumer: WBM33* Producer: SW/FW34* Indicates to which buffer manager the buffer or MSDU_EXTENSION35* descriptor or link descriptor that is being pointed to shall be36* returned after the frame has been processed. It is used by WBM37* for routing purposes.38*39* Values are defined in enum %HAL_RX_BUF_RBM_40*41* sw_buffer_cookie42* Cookie field exclusively used by SW. HW ignores the contents,43* accept that it passes the programmed value on to other44* descriptors together with the physical address.45*46* Field can be used by SW to for example associate the buffers47* physical address with the virtual address.48*49* NOTE1:50* The three most significant bits can have a special meaning51* in case this struct is embedded in a TX_MPDU_DETAILS STRUCT,52* and field transmit_bw_restriction is set53*54* In case of NON punctured transmission:55* Sw_buffer_cookie[19:17] = 3'b000: 20 MHz TX only56* Sw_buffer_cookie[19:17] = 3'b001: 40 MHz TX only57* Sw_buffer_cookie[19:17] = 3'b010: 80 MHz TX only58* Sw_buffer_cookie[19:17] = 3'b011: 160 MHz TX only59* Sw_buffer_cookie[19:17] = 3'b101: 240 MHz TX only60* Sw_buffer_cookie[19:17] = 3'b100: 320 MHz TX only61* Sw_buffer_cookie[19:18] = 2'b11: reserved62*63* In case of punctured transmission:64* Sw_buffer_cookie[19:16] = 4'b0000: pattern 0 only65* Sw_buffer_cookie[19:16] = 4'b0001: pattern 1 only66* Sw_buffer_cookie[19:16] = 4'b0010: pattern 2 only67* Sw_buffer_cookie[19:16] = 4'b0011: pattern 3 only68* Sw_buffer_cookie[19:16] = 4'b0100: pattern 4 only69* Sw_buffer_cookie[19:16] = 4'b0101: pattern 5 only70* Sw_buffer_cookie[19:16] = 4'b0110: pattern 6 only71* Sw_buffer_cookie[19:16] = 4'b0111: pattern 7 only72* Sw_buffer_cookie[19:16] = 4'b1000: pattern 8 only73* Sw_buffer_cookie[19:16] = 4'b1001: pattern 9 only74* Sw_buffer_cookie[19:16] = 4'b1010: pattern 10 only75* Sw_buffer_cookie[19:16] = 4'b1011: pattern 11 only76* Sw_buffer_cookie[19:18] = 2'b11: reserved77*78* Note: a punctured transmission is indicated by the presence79* of TLV TX_PUNCTURE_SETUP embedded in the scheduler TLV80*81* Sw_buffer_cookie[20:17]: Tid: The TID field in the QoS control82* field83*84* Sw_buffer_cookie[16]: Mpdu_qos_control_valid: This field85* indicates MPDUs with a QoS control field.86*87*/8889enum hal_tlv_tag {90HAL_MACTX_CBF_START = 0 /* 0x0 */,91HAL_PHYRX_DATA = 1 /* 0x1 */,92HAL_PHYRX_CBF_DATA_RESP = 2 /* 0x2 */,93HAL_PHYRX_ABORT_REQUEST = 3 /* 0x3 */,94HAL_PHYRX_USER_ABORT_NOTIFICATION = 4 /* 0x4 */,95HAL_MACTX_DATA_RESP = 5 /* 0x5 */,96HAL_MACTX_CBF_DATA = 6 /* 0x6 */,97HAL_MACTX_CBF_DONE = 7 /* 0x7 */,98HAL_PHYRX_LMR_DATA_RESP = 8 /* 0x8 */,99HAL_RXPCU_TO_UCODE_START = 9 /* 0x9 */,100HAL_RXPCU_TO_UCODE_DELIMITER_FOR_FULL_MPDU = 10 /* 0xa */,101HAL_RXPCU_TO_UCODE_FULL_MPDU_DATA = 11 /* 0xb */,102HAL_RXPCU_TO_UCODE_FCS_STATUS = 12 /* 0xc */,103HAL_RXPCU_TO_UCODE_MPDU_DELIMITER = 13 /* 0xd */,104HAL_RXPCU_TO_UCODE_DELIMITER_FOR_MPDU_HEADER = 14 /* 0xe */,105HAL_RXPCU_TO_UCODE_MPDU_HEADER_DATA = 15 /* 0xf */,106HAL_RXPCU_TO_UCODE_END = 16 /* 0x10 */,107HAL_MACRX_CBF_READ_REQUEST = 32 /* 0x20 */,108HAL_MACRX_CBF_DATA_REQUEST = 33 /* 0x21 */,109HAL_MACRXXPECT_NDP_RECEPTION = 34 /* 0x22 */,110HAL_MACRX_FREEZE_CAPTURE_CHANNEL = 35 /* 0x23 */,111HAL_MACRX_NDP_TIMEOUT = 36 /* 0x24 */,112HAL_MACRX_ABORT_ACK = 37 /* 0x25 */,113HAL_MACRX_REQ_IMPLICIT_FB = 38 /* 0x26 */,114HAL_MACRX_CHAIN_MASK = 39 /* 0x27 */,115HAL_MACRX_NAP_USER = 40 /* 0x28 */,116HAL_MACRX_ABORT_REQUEST = 41 /* 0x29 */,117HAL_PHYTX_OTHER_TRANSMIT_INFO16 = 42 /* 0x2a */,118HAL_PHYTX_ABORT_ACK = 43 /* 0x2b */,119HAL_PHYTX_ABORT_REQUEST = 44 /* 0x2c */,120HAL_PHYTX_PKT_END = 45 /* 0x2d */,121HAL_PHYTX_PPDU_HEADER_INFO_REQUEST = 46 /* 0x2e */,122HAL_PHYTX_REQUEST_CTRL_INFO = 47 /* 0x2f */,123HAL_PHYTX_DATA_REQUEST = 48 /* 0x30 */,124HAL_PHYTX_BF_CV_LOADING_DONE = 49 /* 0x31 */,125HAL_PHYTX_NAP_ACK = 50 /* 0x32 */,126HAL_PHYTX_NAP_DONE = 51 /* 0x33 */,127HAL_PHYTX_OFF_ACK = 52 /* 0x34 */,128HAL_PHYTX_ON_ACK = 53 /* 0x35 */,129HAL_PHYTX_SYNTH_OFF_ACK = 54 /* 0x36 */,130HAL_PHYTX_DEBUG16 = 55 /* 0x37 */,131HAL_MACTX_ABORT_REQUEST = 56 /* 0x38 */,132HAL_MACTX_ABORT_ACK = 57 /* 0x39 */,133HAL_MACTX_PKT_END = 58 /* 0x3a */,134HAL_MACTX_PRE_PHY_DESC = 59 /* 0x3b */,135HAL_MACTX_BF_PARAMS_COMMON = 60 /* 0x3c */,136HAL_MACTX_BF_PARAMS_PER_USER = 61 /* 0x3d */,137HAL_MACTX_PREFETCH_CV = 62 /* 0x3e */,138HAL_MACTX_USER_DESC_COMMON = 63 /* 0x3f */,139HAL_MACTX_USER_DESC_PER_USER = 64 /* 0x40 */,140HAL_XAMPLE_USER_TLV_16 = 65 /* 0x41 */,141HAL_XAMPLE_TLV_16 = 66 /* 0x42 */,142HAL_MACTX_PHY_OFF = 67 /* 0x43 */,143HAL_MACTX_PHY_ON = 68 /* 0x44 */,144HAL_MACTX_SYNTH_OFF = 69 /* 0x45 */,145HAL_MACTXXPECT_CBF_COMMON = 70 /* 0x46 */,146HAL_MACTXXPECT_CBF_PER_USER = 71 /* 0x47 */,147HAL_MACTX_PHY_DESC = 72 /* 0x48 */,148HAL_MACTX_L_SIG_A = 73 /* 0x49 */,149HAL_MACTX_L_SIG_B = 74 /* 0x4a */,150HAL_MACTX_HT_SIG = 75 /* 0x4b */,151HAL_MACTX_VHT_SIG_A = 76 /* 0x4c */,152HAL_MACTX_VHT_SIG_B_SU20 = 77 /* 0x4d */,153HAL_MACTX_VHT_SIG_B_SU40 = 78 /* 0x4e */,154HAL_MACTX_VHT_SIG_B_SU80 = 79 /* 0x4f */,155HAL_MACTX_VHT_SIG_B_SU160 = 80 /* 0x50 */,156HAL_MACTX_VHT_SIG_B_MU20 = 81 /* 0x51 */,157HAL_MACTX_VHT_SIG_B_MU40 = 82 /* 0x52 */,158HAL_MACTX_VHT_SIG_B_MU80 = 83 /* 0x53 */,159HAL_MACTX_VHT_SIG_B_MU160 = 84 /* 0x54 */,160HAL_MACTX_SERVICE = 85 /* 0x55 */,161HAL_MACTX_HE_SIG_A_SU = 86 /* 0x56 */,162HAL_MACTX_HE_SIG_A_MU_DL = 87 /* 0x57 */,163HAL_MACTX_HE_SIG_A_MU_UL = 88 /* 0x58 */,164HAL_MACTX_HE_SIG_B1_MU = 89 /* 0x59 */,165HAL_MACTX_HE_SIG_B2_MU = 90 /* 0x5a */,166HAL_MACTX_HE_SIG_B2_OFDMA = 91 /* 0x5b */,167HAL_MACTX_DELETE_CV = 92 /* 0x5c */,168HAL_MACTX_MU_UPLINK_COMMON = 93 /* 0x5d */,169HAL_MACTX_MU_UPLINK_USER_SETUP = 94 /* 0x5e */,170HAL_MACTX_OTHER_TRANSMIT_INFO = 95 /* 0x5f */,171HAL_MACTX_PHY_NAP = 96 /* 0x60 */,172HAL_MACTX_DEBUG = 97 /* 0x61 */,173HAL_PHYRX_ABORT_ACK = 98 /* 0x62 */,174HAL_PHYRX_GENERATED_CBF_DETAILS = 99 /* 0x63 */,175HAL_PHYRX_RSSI_LEGACY = 100 /* 0x64 */,176HAL_PHYRX_RSSI_HT = 101 /* 0x65 */,177HAL_PHYRX_USER_INFO = 102 /* 0x66 */,178HAL_PHYRX_PKT_END = 103 /* 0x67 */,179HAL_PHYRX_DEBUG = 104 /* 0x68 */,180HAL_PHYRX_CBF_TRANSFER_DONE = 105 /* 0x69 */,181HAL_PHYRX_CBF_TRANSFER_ABORT = 106 /* 0x6a */,182HAL_PHYRX_L_SIG_A = 107 /* 0x6b */,183HAL_PHYRX_L_SIG_B = 108 /* 0x6c */,184HAL_PHYRX_HT_SIG = 109 /* 0x6d */,185HAL_PHYRX_VHT_SIG_A = 110 /* 0x6e */,186HAL_PHYRX_VHT_SIG_B_SU20 = 111 /* 0x6f */,187HAL_PHYRX_VHT_SIG_B_SU40 = 112 /* 0x70 */,188HAL_PHYRX_VHT_SIG_B_SU80 = 113 /* 0x71 */,189HAL_PHYRX_VHT_SIG_B_SU160 = 114 /* 0x72 */,190HAL_PHYRX_VHT_SIG_B_MU20 = 115 /* 0x73 */,191HAL_PHYRX_VHT_SIG_B_MU40 = 116 /* 0x74 */,192HAL_PHYRX_VHT_SIG_B_MU80 = 117 /* 0x75 */,193HAL_PHYRX_VHT_SIG_B_MU160 = 118 /* 0x76 */,194HAL_PHYRX_HE_SIG_A_SU = 119 /* 0x77 */,195HAL_PHYRX_HE_SIG_A_MU_DL = 120 /* 0x78 */,196HAL_PHYRX_HE_SIG_A_MU_UL = 121 /* 0x79 */,197HAL_PHYRX_HE_SIG_B1_MU = 122 /* 0x7a */,198HAL_PHYRX_HE_SIG_B2_MU = 123 /* 0x7b */,199HAL_PHYRX_HE_SIG_B2_OFDMA = 124 /* 0x7c */,200HAL_PHYRX_OTHER_RECEIVE_INFO = 125 /* 0x7d */,201HAL_PHYRX_COMMON_USER_INFO = 126 /* 0x7e */,202HAL_PHYRX_DATA_DONE = 127 /* 0x7f */,203HAL_COEX_TX_REQ = 128 /* 0x80 */,204HAL_DUMMY = 129 /* 0x81 */,205HALXAMPLE_TLV_32_NAME = 130 /* 0x82 */,206HAL_MPDU_LIMIT = 131 /* 0x83 */,207HAL_NA_LENGTH_END = 132 /* 0x84 */,208HAL_OLE_BUF_STATUS = 133 /* 0x85 */,209HAL_PCU_PPDU_SETUP_DONE = 134 /* 0x86 */,210HAL_PCU_PPDU_SETUP_END = 135 /* 0x87 */,211HAL_PCU_PPDU_SETUP_INIT = 136 /* 0x88 */,212HAL_PCU_PPDU_SETUP_START = 137 /* 0x89 */,213HAL_PDG_FES_SETUP = 138 /* 0x8a */,214HAL_PDG_RESPONSE = 139 /* 0x8b */,215HAL_PDG_TX_REQ = 140 /* 0x8c */,216HAL_SCH_WAIT_INSTR = 141 /* 0x8d */,217HAL_TQM_FLOWMPTY_STATUS = 143 /* 0x8f */,218HAL_TQM_FLOW_NOTMPTY_STATUS = 144 /* 0x90 */,219HAL_TQM_GEN_MPDU_LENGTH_LIST = 145 /* 0x91 */,220HAL_TQM_GEN_MPDU_LENGTH_LIST_STATUS = 146 /* 0x92 */,221HAL_TQM_GEN_MPDUS = 147 /* 0x93 */,222HAL_TQM_GEN_MPDUS_STATUS = 148 /* 0x94 */,223HAL_TQM_REMOVE_MPDU = 149 /* 0x95 */,224HAL_TQM_REMOVE_MPDU_STATUS = 150 /* 0x96 */,225HAL_TQM_REMOVE_MSDU = 151 /* 0x97 */,226HAL_TQM_REMOVE_MSDU_STATUS = 152 /* 0x98 */,227HAL_TQM_UPDATE_TX_MPDU_COUNT = 153 /* 0x99 */,228HAL_TQM_WRITE_CMD = 154 /* 0x9a */,229HAL_OFDMA_TRIGGER_DETAILS = 155 /* 0x9b */,230HAL_TX_DATA = 156 /* 0x9c */,231HAL_TX_FES_SETUP = 157 /* 0x9d */,232HAL_RX_PACKET = 158 /* 0x9e */,233HALXPECTED_RESPONSE = 159 /* 0x9f */,234HAL_TX_MPDU_END = 160 /* 0xa0 */,235HAL_TX_MPDU_START = 161 /* 0xa1 */,236HAL_TX_MSDU_END = 162 /* 0xa2 */,237HAL_TX_MSDU_START = 163 /* 0xa3 */,238HAL_TX_SW_MODE_SETUP = 164 /* 0xa4 */,239HAL_TXPCU_BUFFER_STATUS = 165 /* 0xa5 */,240HAL_TXPCU_USER_BUFFER_STATUS = 166 /* 0xa6 */,241HAL_DATA_TO_TIME_CONFIG = 167 /* 0xa7 */,242HALXAMPLE_USER_TLV_32 = 168 /* 0xa8 */,243HAL_MPDU_INFO = 169 /* 0xa9 */,244HAL_PDG_USER_SETUP = 170 /* 0xaa */,245HAL_TX_11AH_SETUP = 171 /* 0xab */,246HAL_REO_UPDATE_RX_REO_QUEUE_STATUS = 172 /* 0xac */,247HAL_TX_PEER_ENTRY = 173 /* 0xad */,248HAL_TX_RAW_OR_NATIVE_FRAME_SETUP = 174 /* 0xae */,249HALXAMPLE_USER_TLV_44 = 175 /* 0xaf */,250HAL_TX_FLUSH = 176 /* 0xb0 */,251HAL_TX_FLUSH_REQ = 177 /* 0xb1 */,252HAL_TQM_WRITE_CMD_STATUS = 178 /* 0xb2 */,253HAL_TQM_GET_MPDU_QUEUE_STATS = 179 /* 0xb3 */,254HAL_TQM_GET_MSDU_FLOW_STATS = 180 /* 0xb4 */,255HALXAMPLE_USER_CTLV_44 = 181 /* 0xb5 */,256HAL_TX_FES_STATUS_START = 182 /* 0xb6 */,257HAL_TX_FES_STATUS_USER_PPDU = 183 /* 0xb7 */,258HAL_TX_FES_STATUS_USER_RESPONSE = 184 /* 0xb8 */,259HAL_TX_FES_STATUS_END = 185 /* 0xb9 */,260HAL_RX_TRIG_INFO = 186 /* 0xba */,261HAL_RXPCU_TX_SETUP_CLEAR = 187 /* 0xbb */,262HAL_RX_FRAME_BITMAP_REQ = 188 /* 0xbc */,263HAL_RX_FRAME_BITMAP_ACK = 189 /* 0xbd */,264HAL_COEX_RX_STATUS = 190 /* 0xbe */,265HAL_RX_START_PARAM = 191 /* 0xbf */,266HAL_RX_PPDU_START = 192 /* 0xc0 */,267HAL_RX_PPDU_END = 193 /* 0xc1 */,268HAL_RX_MPDU_START = 194 /* 0xc2 */,269HAL_RX_MPDU_END = 195 /* 0xc3 */,270HAL_RX_MSDU_START = 196 /* 0xc4 */,271HAL_RX_MSDU_END = 197 /* 0xc5 */,272HAL_RX_ATTENTION = 198 /* 0xc6 */,273HAL_RECEIVED_RESPONSE_INFO = 199 /* 0xc7 */,274HAL_RX_PHY_SLEEP = 200 /* 0xc8 */,275HAL_RX_HEADER = 201 /* 0xc9 */,276HAL_RX_PEER_ENTRY = 202 /* 0xca */,277HAL_RX_FLUSH = 203 /* 0xcb */,278HAL_RX_RESPONSE_REQUIRED_INFO = 204 /* 0xcc */,279HAL_RX_FRAMELESS_BAR_DETAILS = 205 /* 0xcd */,280HAL_TQM_GET_MPDU_QUEUE_STATS_STATUS = 206 /* 0xce */,281HAL_TQM_GET_MSDU_FLOW_STATS_STATUS = 207 /* 0xcf */,282HAL_TX_CBF_INFO = 208 /* 0xd0 */,283HAL_PCU_PPDU_SETUP_USER = 209 /* 0xd1 */,284HAL_RX_MPDU_PCU_START = 210 /* 0xd2 */,285HAL_RX_PM_INFO = 211 /* 0xd3 */,286HAL_RX_USER_PPDU_END = 212 /* 0xd4 */,287HAL_RX_PRE_PPDU_START = 213 /* 0xd5 */,288HAL_RX_PREAMBLE = 214 /* 0xd6 */,289HAL_TX_FES_SETUP_COMPLETE = 215 /* 0xd7 */,290HAL_TX_LAST_MPDU_FETCHED = 216 /* 0xd8 */,291HAL_TXDMA_STOP_REQUEST = 217 /* 0xd9 */,292HAL_RXPCU_SETUP = 218 /* 0xda */,293HAL_RXPCU_USER_SETUP = 219 /* 0xdb */,294HAL_TX_FES_STATUS_ACK_OR_BA = 220 /* 0xdc */,295HAL_TQM_ACKED_MPDU = 221 /* 0xdd */,296HAL_COEX_TX_RESP = 222 /* 0xde */,297HAL_COEX_TX_STATUS = 223 /* 0xdf */,298HAL_MACTX_COEX_PHY_CTRL = 224 /* 0xe0 */,299HAL_COEX_STATUS_BROADCAST = 225 /* 0xe1 */,300HAL_RESPONSE_START_STATUS = 226 /* 0xe2 */,301HAL_RESPONSEND_STATUS = 227 /* 0xe3 */,302HAL_CRYPTO_STATUS = 228 /* 0xe4 */,303HAL_RECEIVED_TRIGGER_INFO = 229 /* 0xe5 */,304HAL_COEX_TX_STOP_CTRL = 230 /* 0xe6 */,305HAL_RX_PPDU_ACK_REPORT = 231 /* 0xe7 */,306HAL_RX_PPDU_NO_ACK_REPORT = 232 /* 0xe8 */,307HAL_SCH_COEX_STATUS = 233 /* 0xe9 */,308HAL_SCHEDULER_COMMAND_STATUS = 234 /* 0xea */,309HAL_SCHEDULER_RX_PPDU_NO_RESPONSE_STATUS = 235 /* 0xeb */,310HAL_TX_FES_STATUS_PROT = 236 /* 0xec */,311HAL_TX_FES_STATUS_START_PPDU = 237 /* 0xed */,312HAL_TX_FES_STATUS_START_PROT = 238 /* 0xee */,313HAL_TXPCU_PHYTX_DEBUG32 = 239 /* 0xef */,314HAL_TXPCU_PHYTX_OTHER_TRANSMIT_INFO32 = 240 /* 0xf0 */,315HAL_TX_MPDU_COUNT_TRANSFERND = 241 /* 0xf1 */,316HAL_WHO_ANCHOR_OFFSET = 242 /* 0xf2 */,317HAL_WHO_ANCHOR_VALUE = 243 /* 0xf3 */,318HAL_WHO_CCE_INFO = 244 /* 0xf4 */,319HAL_WHO_COMMIT = 245 /* 0xf5 */,320HAL_WHO_COMMIT_DONE = 246 /* 0xf6 */,321HAL_WHO_FLUSH = 247 /* 0xf7 */,322HAL_WHO_L2_LLC = 248 /* 0xf8 */,323HAL_WHO_L2_PAYLOAD = 249 /* 0xf9 */,324HAL_WHO_L3_CHECKSUM = 250 /* 0xfa */,325HAL_WHO_L3_INFO = 251 /* 0xfb */,326HAL_WHO_L4_CHECKSUM = 252 /* 0xfc */,327HAL_WHO_L4_INFO = 253 /* 0xfd */,328HAL_WHO_MSDU = 254 /* 0xfe */,329HAL_WHO_MSDU_MISC = 255 /* 0xff */,330HAL_WHO_PACKET_DATA = 256 /* 0x100 */,331HAL_WHO_PACKET_HDR = 257 /* 0x101 */,332HAL_WHO_PPDU_END = 258 /* 0x102 */,333HAL_WHO_PPDU_START = 259 /* 0x103 */,334HAL_WHO_TSO = 260 /* 0x104 */,335HAL_WHO_WMAC_HEADER_PV0 = 261 /* 0x105 */,336HAL_WHO_WMAC_HEADER_PV1 = 262 /* 0x106 */,337HAL_WHO_WMAC_IV = 263 /* 0x107 */,338HAL_MPDU_INFO_END = 264 /* 0x108 */,339HAL_MPDU_INFO_BITMAP = 265 /* 0x109 */,340HAL_TX_QUEUE_EXTENSION = 266 /* 0x10a */,341HAL_SCHEDULER_SELFGEN_RESPONSE_STATUS = 267 /* 0x10b */,342HAL_TQM_UPDATE_TX_MPDU_COUNT_STATUS = 268 /* 0x10c */,343HAL_TQM_ACKED_MPDU_STATUS = 269 /* 0x10d */,344HAL_TQM_ADD_MSDU_STATUS = 270 /* 0x10e */,345HAL_TQM_LIST_GEN_DONE = 271 /* 0x10f */,346HAL_WHO_TERMINATE = 272 /* 0x110 */,347HAL_TX_LAST_MPDU_END = 273 /* 0x111 */,348HAL_TX_CV_DATA = 274 /* 0x112 */,349HAL_PPDU_TX_END = 275 /* 0x113 */,350HAL_PROT_TX_END = 276 /* 0x114 */,351HAL_MPDU_INFO_GLOBAL_END = 277 /* 0x115 */,352HAL_TQM_SCH_INSTR_GLOBAL_END = 278 /* 0x116 */,353HAL_RX_PPDU_END_USER_STATS = 279 /* 0x117 */,354HAL_RX_PPDU_END_USER_STATS_EXT = 280 /* 0x118 */,355HAL_REO_GET_QUEUE_STATS = 281 /* 0x119 */,356HAL_REO_FLUSH_QUEUE = 282 /* 0x11a */,357HAL_REO_FLUSH_CACHE = 283 /* 0x11b */,358HAL_REO_UNBLOCK_CACHE = 284 /* 0x11c */,359HAL_REO_GET_QUEUE_STATS_STATUS = 285 /* 0x11d */,360HAL_REO_FLUSH_QUEUE_STATUS = 286 /* 0x11e */,361HAL_REO_FLUSH_CACHE_STATUS = 287 /* 0x11f */,362HAL_REO_UNBLOCK_CACHE_STATUS = 288 /* 0x120 */,363HAL_TQM_FLUSH_CACHE = 289 /* 0x121 */,364HAL_TQM_UNBLOCK_CACHE = 290 /* 0x122 */,365HAL_TQM_FLUSH_CACHE_STATUS = 291 /* 0x123 */,366HAL_TQM_UNBLOCK_CACHE_STATUS = 292 /* 0x124 */,367HAL_RX_PPDU_END_STATUS_DONE = 293 /* 0x125 */,368HAL_RX_STATUS_BUFFER_DONE = 294 /* 0x126 */,369HAL_TX_DATA_SYNC = 297 /* 0x129 */,370HAL_PHYRX_CBF_READ_REQUEST_ACK = 298 /* 0x12a */,371HAL_TQM_GET_MPDU_HEAD_INFO = 299 /* 0x12b */,372HAL_TQM_SYNC_CMD = 300 /* 0x12c */,373HAL_TQM_GET_MPDU_HEAD_INFO_STATUS = 301 /* 0x12d */,374HAL_TQM_SYNC_CMD_STATUS = 302 /* 0x12e */,375HAL_TQM_THRESHOLD_DROP_NOTIFICATION_STATUS = 303 /* 0x12f */,376HAL_TQM_DESCRIPTOR_THRESHOLD_REACHED_STATUS = 304 /* 0x130 */,377HAL_REO_FLUSH_TIMEOUT_LIST = 305 /* 0x131 */,378HAL_REO_FLUSH_TIMEOUT_LIST_STATUS = 306 /* 0x132 */,379HAL_REO_DESCRIPTOR_THRESHOLD_REACHED_STATUS = 307 /* 0x133 */,380HAL_SCHEDULER_RX_SIFS_RESPONSE_TRIGGER_STATUS = 308 /* 0x134 */,381HALXAMPLE_USER_TLV_32_NAME = 309 /* 0x135 */,382HAL_RX_PPDU_START_USER_INFO = 310 /* 0x136 */,383HAL_RX_RING_MASK = 311 /* 0x137 */,384HAL_COEX_MAC_NAP = 312 /* 0x138 */,385HAL_RXPCU_PPDU_END_INFO = 313 /* 0x139 */,386HAL_WHO_MESH_CONTROL = 314 /* 0x13a */,387HAL_PDG_SW_MODE_BW_START = 315 /* 0x13b */,388HAL_PDG_SW_MODE_BW_END = 316 /* 0x13c */,389HAL_PDG_WAIT_FOR_MAC_REQUEST = 317 /* 0x13d */,390HAL_PDG_WAIT_FOR_PHY_REQUEST = 318 /* 0x13e */,391HAL_SCHEDULER_END = 319 /* 0x13f */,392HAL_RX_PPDU_START_DROPPED = 320 /* 0x140 */,393HAL_RX_PPDU_END_DROPPED = 321 /* 0x141 */,394HAL_RX_PPDU_END_STATUS_DONE_DROPPED = 322 /* 0x142 */,395HAL_RX_MPDU_START_DROPPED = 323 /* 0x143 */,396HAL_RX_MSDU_START_DROPPED = 324 /* 0x144 */,397HAL_RX_MSDU_END_DROPPED = 325 /* 0x145 */,398HAL_RX_MPDU_END_DROPPED = 326 /* 0x146 */,399HAL_RX_ATTENTION_DROPPED = 327 /* 0x147 */,400HAL_TXPCU_USER_SETUP = 328 /* 0x148 */,401HAL_RXPCU_USER_SETUP_EXT = 329 /* 0x149 */,402HAL_CMD_PART_0_END = 330 /* 0x14a */,403HAL_MACTX_SYNTH_ON = 331 /* 0x14b */,404HAL_SCH_CRITICAL_TLV_REFERENCE = 332 /* 0x14c */,405HAL_TQM_MPDU_GLOBAL_START = 333 /* 0x14d */,406HALXAMPLE_TLV_32 = 334 /* 0x14e */,407HAL_TQM_UPDATE_TX_MSDU_FLOW = 335 /* 0x14f */,408HAL_TQM_UPDATE_TX_MPDU_QUEUE_HEAD = 336 /* 0x150 */,409HAL_TQM_UPDATE_TX_MSDU_FLOW_STATUS = 337 /* 0x151 */,410HAL_TQM_UPDATE_TX_MPDU_QUEUE_HEAD_STATUS = 338 /* 0x152 */,411HAL_REO_UPDATE_RX_REO_QUEUE = 339 /* 0x153 */,412HAL_TQM_MPDU_QUEUEMPTY_STATUS = 340 /* 0x154 */,413HAL_TQM_2_SCH_MPDU_AVAILABLE = 341 /* 0x155 */,414HAL_PDG_TRIG_RESPONSE = 342 /* 0x156 */,415HAL_TRIGGER_RESPONSE_TX_DONE = 343 /* 0x157 */,416HAL_ABORT_FROM_PHYRX_DETAILS = 344 /* 0x158 */,417HAL_SCH_TQM_CMD_WRAPPER = 345 /* 0x159 */,418HAL_MPDUS_AVAILABLE = 346 /* 0x15a */,419HAL_RECEIVED_RESPONSE_INFO_PART2 = 347 /* 0x15b */,420HAL_PHYRX_TX_START_TIMING = 348 /* 0x15c */,421HAL_TXPCU_PREAMBLE_DONE = 349 /* 0x15d */,422HAL_NDP_PREAMBLE_DONE = 350 /* 0x15e */,423HAL_SCH_TQM_CMD_WRAPPER_RBO_DROP = 351 /* 0x15f */,424HAL_SCH_TQM_CMD_WRAPPER_CONT_DROP = 352 /* 0x160 */,425HAL_MACTX_CLEAR_PREV_TX_INFO = 353 /* 0x161 */,426HAL_TX_PUNCTURE_SETUP = 354 /* 0x162 */,427HAL_R2R_STATUS_END = 355 /* 0x163 */,428HAL_MACTX_PREFETCH_CV_COMMON = 356 /* 0x164 */,429HAL_END_OF_FLUSH_MARKER = 357 /* 0x165 */,430HAL_MACTX_MU_UPLINK_COMMON_PUNC = 358 /* 0x166 */,431HAL_MACTX_MU_UPLINK_USER_SETUP_PUNC = 359 /* 0x167 */,432HAL_RECEIVED_RESPONSE_USER_7_0 = 360 /* 0x168 */,433HAL_RECEIVED_RESPONSE_USER_15_8 = 361 /* 0x169 */,434HAL_RECEIVED_RESPONSE_USER_23_16 = 362 /* 0x16a */,435HAL_RECEIVED_RESPONSE_USER_31_24 = 363 /* 0x16b */,436HAL_RECEIVED_RESPONSE_USER_36_32 = 364 /* 0x16c */,437HAL_TX_LOOPBACK_SETUP = 365 /* 0x16d */,438HAL_PHYRX_OTHER_RECEIVE_INFO_RU_DETAILS = 366 /* 0x16e */,439HAL_SCH_WAIT_INSTR_TX_PATH = 367 /* 0x16f */,440HAL_MACTX_OTHER_TRANSMIT_INFO_TX2TX = 368 /* 0x170 */,441HAL_MACTX_OTHER_TRANSMIT_INFOMUPHY_SETUP = 369 /* 0x171 */,442HAL_PHYRX_OTHER_RECEIVE_INFOVM_DETAILS = 370 /* 0x172 */,443HAL_TX_WUR_DATA = 371 /* 0x173 */,444HAL_RX_PPDU_END_START = 372 /* 0x174 */,445HAL_RX_PPDU_END_MIDDLE = 373 /* 0x175 */,446HAL_RX_PPDU_END_LAST = 374 /* 0x176 */,447HAL_MACTX_BACKOFF_BASED_TRANSMISSION = 375 /* 0x177 */,448HAL_MACTX_OTHER_TRANSMIT_INFO_DL_OFDMA_TX = 376 /* 0x178 */,449HAL_SRP_INFO = 377 /* 0x179 */,450HAL_OBSS_SR_INFO = 378 /* 0x17a */,451HAL_SCHEDULER_SW_MSG_STATUS = 379 /* 0x17b */,452HAL_HWSCH_RXPCU_MAC_INFO_ANNOUNCEMENT = 380 /* 0x17c */,453HAL_RXPCU_SETUP_COMPLETE = 381 /* 0x17d */,454HAL_SNOOP_PPDU_START = 382 /* 0x17e */,455HAL_SNOOP_MPDU_USR_DBG_INFO = 383 /* 0x17f */,456HAL_SNOOP_MSDU_USR_DBG_INFO = 384 /* 0x180 */,457HAL_SNOOP_MSDU_USR_DATA = 385 /* 0x181 */,458HAL_SNOOP_MPDU_USR_STAT_INFO = 386 /* 0x182 */,459HAL_SNOOP_PPDU_END = 387 /* 0x183 */,460HAL_SNOOP_SPARE = 388 /* 0x184 */,461HAL_PHYRX_OTHER_RECEIVE_INFO_MU_RSSI_COMMON = 390 /* 0x186 */,462HAL_PHYRX_OTHER_RECEIVE_INFO_MU_RSSI_USER = 391 /* 0x187 */,463HAL_MACTX_OTHER_TRANSMIT_INFO_SCH_DETAILS = 392 /* 0x188 */,464HAL_PHYRX_OTHER_RECEIVE_INFO_108PVM_DETAILS = 393 /* 0x189 */,465HAL_SCH_TLV_WRAPPER = 394 /* 0x18a */,466HAL_SCHEDULER_STATUS_WRAPPER = 395 /* 0x18b */,467HAL_MPDU_INFO_6X = 396 /* 0x18c */,468HAL_MACTX_11AZ_USER_DESC_PER_USER = 397 /* 0x18d */,469HAL_MACTX_U_SIGHT_SU_MU = 398 /* 0x18e */,470HAL_MACTX_U_SIGHT_TB = 399 /* 0x18f */,471HAL_PHYRX_U_SIGHT_SU_MU = 403 /* 0x193 */,472HAL_PHYRX_U_SIGHT_TB = 404 /* 0x194 */,473HAL_MACRX_LMR_READ_REQUEST = 408 /* 0x198 */,474HAL_MACRX_LMR_DATA_REQUEST = 409 /* 0x199 */,475HAL_PHYRX_LMR_TRANSFER_DONE = 410 /* 0x19a */,476HAL_PHYRX_LMR_TRANSFER_ABORT = 411 /* 0x19b */,477HAL_PHYRX_LMR_READ_REQUEST_ACK = 412 /* 0x19c */,478HAL_MACRX_SECURE_LTF_SEQ_PTR = 413 /* 0x19d */,479HAL_PHYRX_USER_INFO_MU_UL = 414 /* 0x19e */,480HAL_MPDU_QUEUE_OVERVIEW = 415 /* 0x19f */,481HAL_SCHEDULER_NAV_INFO = 416 /* 0x1a0 */,482HAL_LMR_PEER_ENTRY = 418 /* 0x1a2 */,483HAL_LMR_MPDU_START = 419 /* 0x1a3 */,484HAL_LMR_DATA = 420 /* 0x1a4 */,485HAL_LMR_MPDU_END = 421 /* 0x1a5 */,486HAL_REO_GET_QUEUE_1K_STATS_STATUS = 422 /* 0x1a6 */,487HAL_RX_FRAME_1K_BITMAP_ACK = 423 /* 0x1a7 */,488HAL_TX_FES_STATUS_1K_BA = 424 /* 0x1a8 */,489HAL_TQM_ACKED_1K_MPDU = 425 /* 0x1a9 */,490HAL_MACRX_INBSS_OBSS_IND = 426 /* 0x1aa */,491HAL_PHYRX_LOCATION = 427 /* 0x1ab */,492HAL_MLO_TX_NOTIFICATION_SU = 428 /* 0x1ac */,493HAL_MLO_TX_NOTIFICATION_MU = 429 /* 0x1ad */,494HAL_MLO_TX_REQ_SU = 430 /* 0x1ae */,495HAL_MLO_TX_REQ_MU = 431 /* 0x1af */,496HAL_MLO_TX_RESP = 432 /* 0x1b0 */,497HAL_MLO_RX_NOTIFICATION = 433 /* 0x1b1 */,498HAL_MLO_BKOFF_TRUNC_REQ = 434 /* 0x1b2 */,499HAL_MLO_TBTT_NOTIFICATION = 435 /* 0x1b3 */,500HAL_MLO_MESSAGE = 436 /* 0x1b4 */,501HAL_MLO_TS_SYNC_MSG = 437 /* 0x1b5 */,502HAL_MLO_FES_SETUP = 438 /* 0x1b6 */,503HAL_MLO_PDG_FES_SETUP_SU = 439 /* 0x1b7 */,504HAL_MLO_PDG_FES_SETUP_MU = 440 /* 0x1b8 */,505HAL_MPDU_INFO_1K_BITMAP = 441 /* 0x1b9 */,506HAL_MON_BUF_ADDR = 442 /* 0x1ba */,507HAL_TX_FRAG_STATE = 443 /* 0x1bb */,508HAL_MACTXHT_SIG_USR_OFDMA = 446 /* 0x1be */,509HAL_PHYRXHT_SIG_CMN_PUNC = 448 /* 0x1c0 */,510HAL_PHYRXHT_SIG_CMN_OFDMA = 450 /* 0x1c2 */,511HAL_PHYRXHT_SIG_USR_OFDMA = 454 /* 0x1c6 */,512HAL_PHYRX_PKT_END_PART1 = 456 /* 0x1c8 */,513HAL_MACTXXPECT_NDP_RECEPTION = 457 /* 0x1c9 */,514HAL_MACTX_SECURE_LTF_SEQ_PTR = 458 /* 0x1ca */,515HAL_MLO_PDG_BKOFF_TRUNC_NOTIFY = 460 /* 0x1cc */,516HAL_PHYRX_11AZ_INTEGRITY_DATA = 461 /* 0x1cd */,517HAL_PHYTX_LOCATION = 462 /* 0x1ce */,518HAL_PHYTX_11AZ_INTEGRITY_DATA = 463 /* 0x1cf */,519HAL_MACTXHT_SIG_USR_SU = 466 /* 0x1d2 */,520HAL_MACTXHT_SIG_USR_MU_MIMO = 467 /* 0x1d3 */,521HAL_PHYRXHT_SIG_USR_SU = 468 /* 0x1d4 */,522HAL_PHYRXHT_SIG_USR_MU_MIMO = 469 /* 0x1d5 */,523HAL_PHYRX_GENERIC_U_SIG = 470 /* 0x1d6 */,524HAL_PHYRX_GENERICHT_SIG = 471 /* 0x1d7 */,525HAL_OVERWRITE_RESP_START = 472 /* 0x1d8 */,526HAL_OVERWRITE_RESP_PREAMBLE_INFO = 473 /* 0x1d9 */,527HAL_OVERWRITE_RESP_FRAME_INFO = 474 /* 0x1da */,528HAL_OVERWRITE_RESP_END = 475 /* 0x1db */,529HAL_RXPCUARLY_RX_INDICATION = 476 /* 0x1dc */,530HAL_MON_DROP = 477 /* 0x1dd */,531HAL_MACRX_MU_UPLINK_COMMON_SNIFF = 478 /* 0x1de */,532HAL_MACRX_MU_UPLINK_USER_SETUP_SNIFF = 479 /* 0x1df */,533HAL_MACRX_MU_UPLINK_USER_SEL_SNIFF = 480 /* 0x1e0 */,534HAL_MACRX_MU_UPLINK_FCS_STATUS_SNIFF = 481 /* 0x1e1 */,535HAL_MACTX_PREFETCH_CV_DMA = 482 /* 0x1e2 */,536HAL_MACTX_PREFETCH_CV_PER_USER = 483 /* 0x1e3 */,537HAL_PHYRX_OTHER_RECEIVE_INFO_ALL_SIGB_DETAILS = 484 /* 0x1e4 */,538HAL_MACTX_BF_PARAMS_UPDATE_COMMON = 485 /* 0x1e5 */,539HAL_MACTX_BF_PARAMS_UPDATE_PER_USER = 486 /* 0x1e6 */,540HAL_RANGING_USER_DETAILS = 487 /* 0x1e7 */,541HAL_PHYTX_CV_CORR_STATUS = 488 /* 0x1e8 */,542HAL_PHYTX_CV_CORR_COMMON = 489 /* 0x1e9 */,543HAL_PHYTX_CV_CORR_USER = 490 /* 0x1ea */,544HAL_MACTX_CV_CORR_COMMON = 491 /* 0x1eb */,545HAL_MACTX_CV_CORR_MAC_INFO_GROUP = 492 /* 0x1ec */,546HAL_BW_PUNCTUREVAL_WRAPPER = 493 /* 0x1ed */,547HAL_MACTX_RX_NOTIFICATION_FOR_PHY = 494 /* 0x1ee */,548HAL_MACTX_TX_NOTIFICATION_FOR_PHY = 495 /* 0x1ef */,549HAL_MACTX_MU_UPLINK_COMMON_PER_BW = 496 /* 0x1f0 */,550HAL_MACTX_MU_UPLINK_USER_SETUP_PER_BW = 497 /* 0x1f1 */,551HAL_RX_PPDU_END_USER_STATS_EXT2 = 498 /* 0x1f2 */,552HAL_FW2SW_MON = 499 /* 0x1f3 */,553HAL_WSI_DIRECT_MESSAGE = 500 /* 0x1f4 */,554HAL_MACTXMLSR_PRE_SWITCH = 501 /* 0x1f5 */,555HAL_MACTXMLSR_SWITCH = 502 /* 0x1f6 */,556HAL_MACTXMLSR_SWITCH_BACK = 503 /* 0x1f7 */,557HAL_PHYTXMLSR_SWITCH_ACK = 504 /* 0x1f8 */,558HAL_PHYTXMLSR_SWITCH_BACK_ACK = 505 /* 0x1f9 */,559HAL_SPARE_REUSE_TAG_0 = 506 /* 0x1fa */,560HAL_SPARE_REUSE_TAG_1 = 507 /* 0x1fb */,561HAL_SPARE_REUSE_TAG_2 = 508 /* 0x1fc */,562HAL_SPARE_REUSE_TAG_3 = 509 /* 0x1fd */,563/* FIXME: Assign correct value for HAL_TCL_DATA_CMD */564HAL_TCL_DATA_CMD = 510,565HAL_TLV_BASE = 511 /* 0x1ff */,566};567568#define HAL_TLV_HDR_TAG GENMASK(9, 1)569#define HAL_TLV_HDR_LEN GENMASK(25, 10)570#define HAL_TLV_USR_ID GENMASK(31, 26)571572#define HAL_TLV_ALIGN 4573574struct hal_tlv_hdr {575__le32 tl;576u8 value[];577} __packed;578579#define HAL_TLV_64_HDR_TAG GENMASK(9, 1)580#define HAL_TLV_64_HDR_LEN GENMASK(21, 10)581582struct hal_tlv_64_hdr {583u64 tl;584u8 value[];585} __packed;586587#define RX_MPDU_DESC_INFO0_MSDU_COUNT GENMASK(7, 0)588#define RX_MPDU_DESC_INFO0_FRAG_FLAG BIT(8)589#define RX_MPDU_DESC_INFO0_MPDU_RETRY BIT(9)590#define RX_MPDU_DESC_INFO0_AMPDU_FLAG BIT(10)591#define RX_MPDU_DESC_INFO0_BAR_FRAME BIT(11)592#define RX_MPDU_DESC_INFO0_VALID_PN BIT(12)593#define RX_MPDU_DESC_INFO0_RAW_MPDU BIT(13)594#define RX_MPDU_DESC_INFO0_MORE_FRAG_FLAG BIT(14)595#define RX_MPDU_DESC_INFO0_SRC_INFO GENMASK(26, 15)596#define RX_MPDU_DESC_INFO0_MPDU_QOS_CTRL_VALID BIT(27)597#define RX_MPDU_DESC_INFO0_TID GENMASK(31, 28)598599/* TODO revisit after meta data is concluded */600#define RX_MPDU_DESC_META_DATA_PEER_ID GENMASK(15, 0)601602struct rx_mpdu_desc {603__le32 info0; /* %RX_MPDU_DESC_INFO */604__le32 peer_meta_data;605} __packed;606607/* rx_mpdu_desc608* Producer: RXDMA609* Consumer: REO/SW/FW610*611* msdu_count612* The number of MSDUs within the MPDU613*614* fragment_flag615* When set, this MPDU is a fragment and REO should forward this616* fragment MPDU to the REO destination ring without any reorder617* checks, pn checks or bitmap update. This implies that REO is618* forwarding the pointer to the MSDU link descriptor.619*620* mpdu_retry_bit621* The retry bit setting from the MPDU header of the received frame622*623* ampdu_flag624* Indicates the MPDU was received as part of an A-MPDU.625*626* bar_frame627* Indicates the received frame is a BAR frame. After processing,628* this frame shall be pushed to SW or deleted.629*630* valid_pn631* When not set, REO will not perform a PN sequence number check.632*633* raw_mpdu634* Field only valid when first_msdu_in_mpdu_flag is set. Indicates635* the contents in the MSDU buffer contains a 'RAW' MPDU. This636* 'RAW' MPDU might be spread out over multiple MSDU buffers.637*638* more_fragment_flag639* The More Fragment bit setting from the MPDU header of the640* received frame641*642* src_info643* Source (Virtual) device/interface info associated with this peer.644* This field gets passed on by REO to PPE in the EDMA descriptor.645*646* mpdu_qos_control_valid647* When set, the MPDU has a QoS control field648*649* tid650* Field only valid when mpdu_qos_control_valid is set651*/652653enum hal_rx_msdu_desc_reo_dest_ind {654HAL_RX_MSDU_DESC_REO_DEST_IND_TCL,655HAL_RX_MSDU_DESC_REO_DEST_IND_SW1,656HAL_RX_MSDU_DESC_REO_DEST_IND_SW2,657HAL_RX_MSDU_DESC_REO_DEST_IND_SW3,658HAL_RX_MSDU_DESC_REO_DEST_IND_SW4,659HAL_RX_MSDU_DESC_REO_DEST_IND_RELEASE,660HAL_RX_MSDU_DESC_REO_DEST_IND_FW,661HAL_RX_MSDU_DESC_REO_DEST_IND_SW5,662HAL_RX_MSDU_DESC_REO_DEST_IND_SW6,663HAL_RX_MSDU_DESC_REO_DEST_IND_SW7,664HAL_RX_MSDU_DESC_REO_DEST_IND_SW8,665};666667#define RX_MSDU_DESC_INFO0_FIRST_MSDU_IN_MPDU BIT(0)668#define RX_MSDU_DESC_INFO0_LAST_MSDU_IN_MPDU BIT(1)669#define RX_MSDU_DESC_INFO0_MSDU_CONTINUATION BIT(2)670#define RX_MSDU_DESC_INFO0_MSDU_LENGTH GENMASK(16, 3)671#define RX_MSDU_DESC_INFO0_MSDU_DROP BIT(17)672#define RX_MSDU_DESC_INFO0_VALID_SA BIT(18)673#define RX_MSDU_DESC_INFO0_VALID_DA BIT(19)674#define RX_MSDU_DESC_INFO0_DA_MCBC BIT(20)675#define RX_MSDU_DESC_INFO0_L3_HDR_PAD_MSB BIT(21)676#define RX_MSDU_DESC_INFO0_TCP_UDP_CHKSUM_FAIL BIT(22)677#define RX_MSDU_DESC_INFO0_IP_CHKSUM_FAIL BIT(23)678#define RX_MSDU_DESC_INFO0_FROM_DS BIT(24)679#define RX_MSDU_DESC_INFO0_TO_DS BIT(25)680#define RX_MSDU_DESC_INFO0_INTRA_BSS BIT(26)681#define RX_MSDU_DESC_INFO0_DST_CHIP_ID GENMASK(28, 27)682#define RX_MSDU_DESC_INFO0_DECAP_FORMAT GENMASK(30, 29)683684#define HAL_RX_MSDU_PKT_LENGTH_GET(val) \685(u32_get_bits((val), RX_MSDU_DESC_INFO0_MSDU_LENGTH))686687struct rx_msdu_desc {688__le32 info0;689} __packed;690691/* rx_msdu_desc692*693* first_msdu_in_mpdu694* Indicates first msdu in mpdu.695*696* last_msdu_in_mpdu697* Indicates last msdu in mpdu. This flag can be true only when698* 'Msdu_continuation' set to 0. This implies that when an msdu699* is spread out over multiple buffers and thus msdu_continuation700* is set, only for the very last buffer of the msdu, can the701* 'last_msdu_in_mpdu' be set.702*703* When both first_msdu_in_mpdu and last_msdu_in_mpdu are set,704* the MPDU that this MSDU belongs to only contains a single MSDU.705*706* msdu_continuation707* When set, this MSDU buffer was not able to hold the entire MSDU.708* The next buffer will therefore contain additional information709* related to this MSDU.710*711* msdu_length712* Field is only valid in combination with the 'first_msdu_in_mpdu'713* being set. Full MSDU length in bytes after decapsulation. This714* field is still valid for MPDU frames without A-MSDU. It still715* represents MSDU length after decapsulation Or in case of RAW716* MPDUs, it indicates the length of the entire MPDU (without FCS717* field).718*719* msdu_drop720* Indicates that REO shall drop this MSDU and not forward it to721* any other ring.722*723* valid_sa724* Indicates OLE found a valid SA entry for this MSDU.725*726* valid_da727* When set, OLE found a valid DA entry for this MSDU.728*729* da_mcbc730* Field Only valid if valid_da is set. Indicates the DA address731* is a Multicast or Broadcast address for this MSDU.732*733* l3_header_padding_msb734* Passed on from 'RX_MSDU_END' TLV (only the MSB is reported as735* the LSB is always zero). Number of bytes padded to make sure736* that the L3 header will always start of a Dword boundary737*738* tcp_udp_checksum_fail739* Passed on from 'RX_ATTENTION' TLV740* Indicates that the computed checksum did not match the checksum741* in the TCP/UDP header.742*743* ip_checksum_fail744* Passed on from 'RX_ATTENTION' TLV745* Indicates that the computed checksum did not match the checksum746* in the IP header.747*748* from_DS749* Set if the 'from DS' bit is set in the frame control.750*751* to_DS752* Set if the 'to DS' bit is set in the frame control.753*754* intra_bss755* This packet needs intra-BSS routing by SW as the 'vdev_id'756* for the destination is the same as the 'vdev_id' that this757* MSDU was got in.758*759* dest_chip_id760* If intra_bss is set, copied by RXOLE/RXDMA from 'ADDR_SEARCH_ENTRY'761* to support intra-BSS routing with multi-chip multi-link operation.762* This indicates into which chip's TCL the packet should be queued.763*764* decap_format765* Indicates the format after decapsulation:766*/767768#define RX_MSDU_EXT_DESC_INFO0_REO_DEST_IND GENMASK(4, 0)769#define RX_MSDU_EXT_DESC_INFO0_SERVICE_CODE GENMASK(13, 5)770#define RX_MSDU_EXT_DESC_INFO0_PRIORITY_VALID BIT(14)771#define RX_MSDU_EXT_DESC_INFO0_DATA_OFFSET GENMASK(26, 15)772#define RX_MSDU_EXT_DESC_INFO0_SRC_LINK_ID GENMASK(29, 27)773774struct rx_msdu_ext_desc {775__le32 info0;776} __packed;777778/* rx_msdu_ext_desc779*780* reo_destination_indication781* The ID of the REO exit ring where the MSDU frame shall push782* after (MPDU level) reordering has finished.783*784* service_code785* Opaque service code between PPE and Wi-Fi786*787* priority_valid788*789* data_offset790* The offset to Rx packet data within the buffer (including791* Rx DMA offset programming and L3 header padding inserted792* by Rx OLE).793*794* src_link_id795* Set to the link ID of the PMAC that received the frame796*/797798enum hal_reo_dest_ring_buffer_type {799HAL_REO_DEST_RING_BUFFER_TYPE_MSDU,800HAL_REO_DEST_RING_BUFFER_TYPE_LINK_DESC,801};802803enum hal_reo_dest_ring_push_reason {804HAL_REO_DEST_RING_PUSH_REASON_ERR_DETECTED,805HAL_REO_DEST_RING_PUSH_REASON_ROUTING_INSTRUCTION,806};807808enum hal_reo_dest_ring_error_code {809HAL_REO_DEST_RING_ERROR_CODE_DESC_ADDR_ZERO,810HAL_REO_DEST_RING_ERROR_CODE_DESC_INVALID,811HAL_REO_DEST_RING_ERROR_CODE_AMPDU_IN_NON_BA,812HAL_REO_DEST_RING_ERROR_CODE_NON_BA_DUPLICATE,813HAL_REO_DEST_RING_ERROR_CODE_BA_DUPLICATE,814HAL_REO_DEST_RING_ERROR_CODE_FRAME_2K_JUMP,815HAL_REO_DEST_RING_ERROR_CODE_BAR_2K_JUMP,816HAL_REO_DEST_RING_ERROR_CODE_FRAME_OOR,817HAL_REO_DEST_RING_ERROR_CODE_BAR_OOR,818HAL_REO_DEST_RING_ERROR_CODE_NO_BA_SESSION,819HAL_REO_DEST_RING_ERROR_CODE_FRAME_SN_EQUALS_SSN,820HAL_REO_DEST_RING_ERROR_CODE_PN_CHECK_FAILED,821HAL_REO_DEST_RING_ERROR_CODE_2K_ERR_FLAG_SET,822HAL_REO_DEST_RING_ERROR_CODE_PN_ERR_FLAG_SET,823HAL_REO_DEST_RING_ERROR_CODE_DESC_BLOCKED,824HAL_REO_DEST_RING_ERROR_CODE_MAX,825};826827#define HAL_REO_DEST_RING_INFO0_BUFFER_TYPE BIT(0)828#define HAL_REO_DEST_RING_INFO0_PUSH_REASON GENMASK(2, 1)829#define HAL_REO_DEST_RING_INFO0_ERROR_CODE GENMASK(7, 3)830#define HAL_REO_DEST_RING_INFO0_MSDU_DATA_SIZE GENMASK(11, 8)831#define HAL_REO_DEST_RING_INFO0_SW_EXCEPTION BIT(12)832#define HAL_REO_DEST_RING_INFO0_SRC_LINK_ID GENMASK(15, 13)833#define HAL_REO_DEST_RING_INFO0_SIGNATURE GENMASK(19, 16)834#define HAL_REO_DEST_RING_INFO0_RING_ID GENMASK(27, 20)835#define HAL_REO_DEST_RING_INFO0_LOOPING_COUNT GENMASK(31, 28)836837struct hal_reo_dest_ring {838struct ath12k_buffer_addr buf_addr_info;839struct rx_mpdu_desc rx_mpdu_info;840struct rx_msdu_desc rx_msdu_info;841__le32 buf_va_lo;842__le32 buf_va_hi;843__le32 info0; /* %HAL_REO_DEST_RING_INFO0_ */844} __packed;845846/* hal_reo_dest_ring847*848* Producer: RXDMA849* Consumer: REO/SW/FW850*851* buf_addr_info852* Details of the physical address of a buffer or MSDU853* link descriptor.854*855* rx_mpdu_info856* General information related to the MPDU that is passed857* on from REO entrance ring to the REO destination ring.858*859* rx_msdu_info860* General information related to the MSDU that is passed861* on from RXDMA all the way to the REO destination ring.862*863* buf_va_lo864* Field only valid if Reo_dest_buffer_type is set to MSDU_buf_address865* Lower 32 bits of the 64-bit virtual address corresponding866* to Buf_or_link_desc_addr_info867*868* buf_va_hi869* Address (upper 32 bits) of the REO queue descriptor.870* Upper 32 bits of the 64-bit virtual address corresponding871* to Buf_or_link_desc_addr_info872*873* buffer_type874* Indicates the type of address provided in the buf_addr_info.875* Values are defined in enum %HAL_REO_DEST_RING_BUFFER_TYPE_.876*877* push_reason878* Reason for pushing this frame to this exit ring. Values are879* defined in enum %HAL_REO_DEST_RING_PUSH_REASON_.880*881* error_code882* Valid only when 'push_reason' is set. All error codes are883* defined in enum %HAL_REO_DEST_RING_ERROR_CODE_.884*885* captured_msdu_data_size886* The number of following REO_DESTINATION STRUCTs that have887* been replaced with msdu_data extracted from the msdu_buffer888* and copied into the ring for easy FW/SW access.889*890* sw_exception891* This field has the same setting as the SW_exception field892* in the corresponding REO_entrance_ring descriptor.893* When set, the REO entrance descriptor is generated by FW,894* and the MPDU was processed in the following way:895* - NO re-order function is needed.896* - MPDU delinking is determined by the setting of Entrance897* ring field: SW_excection_mpdu_delink898* - Destination ring selection is based on the setting of899* the Entrance ring field SW_exception_destination _ring_valid900*901* src_link_id902* Set to the link ID of the PMAC that received the frame903*904* signature905* Set to value 0x8 when msdu capture mode is enabled for this ring906*907* ring_id908* The buffer pointer ring id.909* 0 - Idle ring910* 1 - N refers to other rings.911*912* looping_count913* Indicates the number of times the producer of entries into914* this ring has looped around the ring.915*/916917#define HAL_REO_TO_PPE_RING_INFO0_DATA_LENGTH GENMASK(15, 0)918#define HAL_REO_TO_PPE_RING_INFO0_DATA_OFFSET GENMASK(23, 16)919#define HAL_REO_TO_PPE_RING_INFO0_POOL_ID GENMASK(28, 24)920#define HAL_REO_TO_PPE_RING_INFO0_PREHEADER BIT(29)921#define HAL_REO_TO_PPE_RING_INFO0_TSO_EN BIT(30)922#define HAL_REO_TO_PPE_RING_INFO0_MORE BIT(31)923924struct hal_reo_to_ppe_ring {925__le32 buffer_addr;926__le32 info0; /* %HAL_REO_TO_PPE_RING_INFO0_ */927} __packed;928929/* hal_reo_to_ppe_ring930*931* Producer: REO932* Consumer: PPE933*934* buf_addr_info935* Details of the physical address of a buffer or MSDU936* link descriptor.937*938* data_length939* Length of valid data in bytes940*941* data_offset942* Offset to the data from buffer pointer. Can be used to943* strip header in the data for tunnel termination etc.944*945* pool_id946* REO has global configuration register for this field.947* It may have several free buffer pools, each948* RX-Descriptor ring can fetch free buffer from specific949* buffer pool; pool id will indicate which pool the buffer950* will be released to; POOL_ID Zero returned to SW951*952* preheader953* Disabled: 0 (Default)954* Enabled: 1955*956* tso_en957* Disabled: 0 (Default)958* Enabled: 1959*960* more961* More Segments followed962*/963964enum hal_reo_entr_rxdma_push_reason {965HAL_REO_ENTR_RING_RXDMA_PUSH_REASON_ERR_DETECTED,966HAL_REO_ENTR_RING_RXDMA_PUSH_REASON_ROUTING_INSTRUCTION,967HAL_REO_ENTR_RING_RXDMA_PUSH_REASON_RX_FLUSH,968};969970enum hal_reo_entr_rxdma_ecode {971HAL_REO_ENTR_RING_RXDMA_ECODE_OVERFLOW_ERR,972HAL_REO_ENTR_RING_RXDMA_ECODE_MPDU_LEN_ERR,973HAL_REO_ENTR_RING_RXDMA_ECODE_FCS_ERR,974HAL_REO_ENTR_RING_RXDMA_ECODE_DECRYPT_ERR,975HAL_REO_ENTR_RING_RXDMA_ECODE_TKIP_MIC_ERR,976HAL_REO_ENTR_RING_RXDMA_ECODE_UNECRYPTED_ERR,977HAL_REO_ENTR_RING_RXDMA_ECODE_MSDU_LEN_ERR,978HAL_REO_ENTR_RING_RXDMA_ECODE_MSDU_LIMIT_ERR,979HAL_REO_ENTR_RING_RXDMA_ECODE_WIFI_PARSE_ERR,980HAL_REO_ENTR_RING_RXDMA_ECODE_AMSDU_PARSE_ERR,981HAL_REO_ENTR_RING_RXDMA_ECODE_SA_TIMEOUT_ERR,982HAL_REO_ENTR_RING_RXDMA_ECODE_DA_TIMEOUT_ERR,983HAL_REO_ENTR_RING_RXDMA_ECODE_FLOW_TIMEOUT_ERR,984HAL_REO_ENTR_RING_RXDMA_ECODE_FLUSH_REQUEST_ERR,985HAL_REO_ENTR_RING_RXDMA_ECODE_AMSDU_FRAG_ERR,986HAL_REO_ENTR_RING_RXDMA_ECODE_MAX,987};988989enum hal_rx_reo_dest_ring {990HAL_RX_REO_DEST_RING_TCL,991HAL_RX_REO_DEST_RING_SW1,992HAL_RX_REO_DEST_RING_SW2,993HAL_RX_REO_DEST_RING_SW3,994HAL_RX_REO_DEST_RING_SW4,995HAL_RX_REO_DEST_RING_RELEASE,996HAL_RX_REO_DEST_RING_FW,997HAL_RX_REO_DEST_RING_SW5,998HAL_RX_REO_DEST_RING_SW6,999HAL_RX_REO_DEST_RING_SW7,1000HAL_RX_REO_DEST_RING_SW8,1001};10021003#define HAL_REO_ENTR_RING_INFO0_QUEUE_ADDR_HI GENMASK(7, 0)1004#define HAL_REO_ENTR_RING_INFO0_MPDU_BYTE_COUNT GENMASK(21, 8)1005#define HAL_REO_ENTR_RING_INFO0_DEST_IND GENMASK(26, 22)1006#define HAL_REO_ENTR_RING_INFO0_FRAMELESS_BAR BIT(27)10071008#define HAL_REO_ENTR_RING_INFO1_RXDMA_PUSH_REASON GENMASK(1, 0)1009#define HAL_REO_ENTR_RING_INFO1_RXDMA_ERROR_CODE GENMASK(6, 2)1010#define HAL_REO_ENTR_RING_INFO1_MPDU_FRAG_NUM GENMASK(10, 7)1011#define HAL_REO_ENTR_RING_INFO1_SW_EXCEPTION BIT(11)1012#define HAL_REO_ENTR_RING_INFO1_SW_EXCEPT_MPDU_DELINK BIT(12)1013#define HAL_REO_ENTR_RING_INFO1_SW_EXCEPTION_RING_VLD BIT(13)1014#define HAL_REO_ENTR_RING_INFO1_SW_EXCEPTION_RING GENMASK(18, 14)1015#define HAL_REO_ENTR_RING_INFO1_MPDU_SEQ_NUM GENMASK(30, 19)10161017#define HAL_REO_ENTR_RING_INFO2_PHY_PPDU_ID GENMASK(15, 0)1018#define HAL_REO_ENTR_RING_INFO2_SRC_LINK_ID GENMASK(18, 16)1019#define HAL_REO_ENTR_RING_INFO2_RING_ID GENMASK(27, 20)1020#define HAL_REO_ENTR_RING_INFO2_LOOPING_COUNT GENMASK(31, 28)10211022struct hal_reo_entrance_ring {1023struct ath12k_buffer_addr buf_addr_info;1024struct rx_mpdu_desc rx_mpdu_info;1025__le32 queue_addr_lo;1026__le32 info0; /* %HAL_REO_ENTR_RING_INFO0_ */1027__le32 info1; /* %HAL_REO_ENTR_RING_INFO1_ */1028__le32 info2; /* %HAL_REO_DEST_RING_INFO2_ */10291030} __packed;10311032/* hal_reo_entrance_ring1033*1034* Producer: RXDMA1035* Consumer: REO1036*1037* buf_addr_info1038* Details of the physical address of a buffer or MSDU1039* link descriptor.1040*1041* rx_mpdu_info1042* General information related to the MPDU that is passed1043* on from REO entrance ring to the REO destination ring.1044*1045* queue_addr_lo1046* Address (lower 32 bits) of the REO queue descriptor.1047*1048* queue_addr_hi1049* Address (upper 8 bits) of the REO queue descriptor.1050*1051* mpdu_byte_count1052* An approximation of the number of bytes received in this MPDU.1053* Used to keeps stats on the amount of data flowing1054* through a queue.1055*1056* reo_destination_indication1057* The id of the reo exit ring where the msdu frame shall push1058* after (MPDU level) reordering has finished. Values are defined1059* in enum %HAL_RX_MSDU_DESC_REO_DEST_IND_.1060*1061* frameless_bar1062* Indicates that this REO entrance ring struct contains BAR info1063* from a multi TID BAR frame. The original multi TID BAR frame1064* itself contained all the REO info for the first TID, but all1065* the subsequent TID info and their linkage to the REO descriptors1066* is passed down as 'frameless' BAR info.1067*1068* The only fields valid in this descriptor when this bit is set1069* are queue_addr_lo, queue_addr_hi, mpdu_sequence_number,1070* bar_frame and peer_meta_data.1071*1072* rxdma_push_reason1073* Reason for pushing this frame to this exit ring. Values are1074* defined in enum %HAL_REO_ENTR_RING_RXDMA_PUSH_REASON_.1075*1076* rxdma_error_code1077* Valid only when 'push_reason' is set. All error codes are1078* defined in enum %HAL_REO_ENTR_RING_RXDMA_ECODE_.1079*1080* mpdu_fragment_number1081* Field only valid when Reo_level_mpdu_frame_info.1082* Rx_mpdu_desc_info_details.Fragment_flag is set.1083*1084* sw_exception1085* When not set, REO is performing all its default MPDU processing1086* operations,1087* When set, this REO entrance descriptor is generated by FW, and1088* should be processed as an exception. This implies:1089* NO re-order function is needed.1090* MPDU delinking is determined by the setting of field1091* SW_excection_mpdu_delink1092*1093* sw_exception_mpdu_delink1094* Field only valid when SW_exception is set.1095* 1'b0: REO should NOT delink the MPDU, and thus pass this1096* MPDU on to the destination ring as is. This implies that1097* in the REO_DESTINATION_RING struct field1098* Buf_or_link_desc_addr_info should point to an MSDU link1099* descriptor1100* 1'b1: REO should perform the normal MPDU delink into MSDU operations.1101*1102* sw_exception_dest_ring1103* Field only valid when fields SW_exception and SW1104* exception_destination_ring_valid are set. values are defined1105* in %HAL_RX_REO_DEST_RING_.1106*1107* mpdu_seq_number1108* The field can have two different meanings based on the setting1109* of sub-field Reo level mpdu frame info.1110* Rx_mpdu_desc_info_details. BAR_frame1111* 'BAR_frame' is NOT set:1112* The MPDU sequence number of the received frame.1113* 'BAR_frame' is set.1114* The MPDU Start sequence number from the BAR frame1115*1116* phy_ppdu_id1117* A PPDU counter value that PHY increments for every PPDU received1118*1119* src_link_id1120* Set to the link ID of the PMAC that received the frame1121*1122* ring_id1123* The buffer pointer ring id.1124* 0 - Idle ring1125* 1 - N refers to other rings.1126*1127* looping_count1128* Indicates the number of times the producer of entries into1129* this ring has looped around the ring.1130*/11311132#define HAL_REO_CMD_HDR_INFO0_CMD_NUMBER GENMASK(15, 0)1133#define HAL_REO_CMD_HDR_INFO0_STATUS_REQUIRED BIT(16)11341135struct hal_reo_cmd_hdr {1136__le32 info0;1137} __packed;11381139#define HAL_REO_GET_QUEUE_STATS_INFO0_QUEUE_ADDR_HI GENMASK(7, 0)1140#define HAL_REO_GET_QUEUE_STATS_INFO0_CLEAR_STATS BIT(8)11411142struct hal_reo_get_queue_stats {1143struct hal_reo_cmd_hdr cmd;1144__le32 queue_addr_lo;1145__le32 info0;1146__le32 rsvd0[6];1147__le32 tlv64_pad;1148} __packed;11491150/* hal_reo_get_queue_stats1151* Producer: SW1152* Consumer: REO1153*1154* cmd1155* Details for command execution tracking purposes.1156*1157* queue_addr_lo1158* Address (lower 32 bits) of the REO queue descriptor.1159*1160* queue_addr_hi1161* Address (upper 8 bits) of the REO queue descriptor.1162*1163* clear_stats1164* Clear stats settings. When set, Clear the stats after1165* generating the status.1166*1167* Following stats will be cleared.1168* Timeout_count1169* Forward_due_to_bar_count1170* Duplicate_count1171* Frames_in_order_count1172* BAR_received_count1173* MPDU_Frames_processed_count1174* MSDU_Frames_processed_count1175* Total_processed_byte_count1176* Late_receive_MPDU_count1177* window_jump_2k1178* Hole_count1179*/11801181#define HAL_REO_FLUSH_QUEUE_INFO0_DESC_ADDR_HI GENMASK(7, 0)1182#define HAL_REO_FLUSH_QUEUE_INFO0_BLOCK_DESC_ADDR BIT(8)1183#define HAL_REO_FLUSH_QUEUE_INFO0_BLOCK_RESRC_IDX GENMASK(10, 9)11841185struct hal_reo_flush_queue {1186struct hal_reo_cmd_hdr cmd;1187__le32 desc_addr_lo;1188__le32 info0;1189__le32 rsvd0[6];1190} __packed;11911192#define HAL_REO_FLUSH_CACHE_INFO0_CACHE_ADDR_HI GENMASK(7, 0)1193#define HAL_REO_FLUSH_CACHE_INFO0_FWD_ALL_MPDUS BIT(8)1194#define HAL_REO_FLUSH_CACHE_INFO0_RELEASE_BLOCK_IDX BIT(9)1195#define HAL_REO_FLUSH_CACHE_INFO0_BLOCK_RESRC_IDX GENMASK(11, 10)1196#define HAL_REO_FLUSH_CACHE_INFO0_FLUSH_WO_INVALIDATE BIT(12)1197#define HAL_REO_FLUSH_CACHE_INFO0_BLOCK_CACHE_USAGE BIT(13)1198#define HAL_REO_FLUSH_CACHE_INFO0_FLUSH_ALL BIT(14)11991200struct hal_reo_flush_cache {1201struct hal_reo_cmd_hdr cmd;1202__le32 cache_addr_lo;1203__le32 info0;1204__le32 rsvd0[6];1205} __packed;12061207#define HAL_TCL_DATA_CMD_INFO0_CMD_TYPE BIT(0)1208#define HAL_TCL_DATA_CMD_INFO0_DESC_TYPE BIT(1)1209#define HAL_TCL_DATA_CMD_INFO0_BANK_ID GENMASK(7, 2)1210#define HAL_TCL_DATA_CMD_INFO0_TX_NOTIFY_FRAME GENMASK(10, 8)1211#define HAL_TCL_DATA_CMD_INFO0_HDR_LEN_READ_SEL BIT(11)1212#define HAL_TCL_DATA_CMD_INFO0_BUF_TIMESTAMP GENMASK(30, 12)1213#define HAL_TCL_DATA_CMD_INFO0_BUF_TIMESTAMP_VLD BIT(31)12141215#define HAL_TCL_DATA_CMD_INFO1_CMD_NUM GENMASK(31, 16)12161217#define HAL_TCL_DATA_CMD_INFO2_DATA_LEN GENMASK(15, 0)1218#define HAL_TCL_DATA_CMD_INFO2_IP4_CKSUM_EN BIT(16)1219#define HAL_TCL_DATA_CMD_INFO2_UDP4_CKSUM_EN BIT(17)1220#define HAL_TCL_DATA_CMD_INFO2_UDP6_CKSUM_EN BIT(18)1221#define HAL_TCL_DATA_CMD_INFO2_TCP4_CKSUM_EN BIT(19)1222#define HAL_TCL_DATA_CMD_INFO2_TCP6_CKSUM_EN BIT(20)1223#define HAL_TCL_DATA_CMD_INFO2_TO_FW BIT(21)1224#define HAL_TCL_DATA_CMD_INFO2_PKT_OFFSET GENMASK(31, 23)12251226#define HAL_TCL_DATA_CMD_INFO3_TID_OVERWRITE BIT(0)1227#define HAL_TCL_DATA_CMD_INFO3_FLOW_OVERRIDE_EN BIT(1)1228#define HAL_TCL_DATA_CMD_INFO3_CLASSIFY_INFO_SEL GENMASK(3, 2)1229#define HAL_TCL_DATA_CMD_INFO3_TID GENMASK(7, 4)1230#define HAL_TCL_DATA_CMD_INFO3_FLOW_OVERRIDE BIT(8)1231#define HAL_TCL_DATA_CMD_INFO3_PMAC_ID GENMASK(10, 9)1232#define HAL_TCL_DATA_CMD_INFO3_MSDU_COLOR GENMASK(12, 11)1233#define HAL_TCL_DATA_CMD_INFO3_VDEV_ID GENMASK(31, 24)12341235#define HAL_TCL_DATA_CMD_INFO4_SEARCH_INDEX GENMASK(19, 0)1236#define HAL_TCL_DATA_CMD_INFO4_CACHE_SET_NUM GENMASK(23, 20)1237#define HAL_TCL_DATA_CMD_INFO4_IDX_LOOKUP_OVERRIDE BIT(24)12381239#define HAL_TCL_DATA_CMD_INFO5_RING_ID GENMASK(27, 20)1240#define HAL_TCL_DATA_CMD_INFO5_LOOPING_COUNT GENMASK(31, 28)12411242enum hal_encrypt_type {1243HAL_ENCRYPT_TYPE_WEP_40,1244HAL_ENCRYPT_TYPE_WEP_104,1245HAL_ENCRYPT_TYPE_TKIP_NO_MIC,1246HAL_ENCRYPT_TYPE_WEP_128,1247HAL_ENCRYPT_TYPE_TKIP_MIC,1248HAL_ENCRYPT_TYPE_WAPI,1249HAL_ENCRYPT_TYPE_CCMP_128,1250HAL_ENCRYPT_TYPE_OPEN,1251HAL_ENCRYPT_TYPE_CCMP_256,1252HAL_ENCRYPT_TYPE_GCMP_128,1253HAL_ENCRYPT_TYPE_AES_GCMP_256,1254HAL_ENCRYPT_TYPE_WAPI_GCM_SM4,1255};12561257enum hal_tcl_encap_type {1258HAL_TCL_ENCAP_TYPE_RAW,1259HAL_TCL_ENCAP_TYPE_NATIVE_WIFI,1260HAL_TCL_ENCAP_TYPE_ETHERNET,1261HAL_TCL_ENCAP_TYPE_802_3 = 3,1262};12631264enum hal_tcl_desc_type {1265HAL_TCL_DESC_TYPE_BUFFER,1266HAL_TCL_DESC_TYPE_EXT_DESC,1267};12681269enum hal_wbm_htt_tx_comp_status {1270HAL_WBM_REL_HTT_TX_COMP_STATUS_OK,1271HAL_WBM_REL_HTT_TX_COMP_STATUS_DROP,1272HAL_WBM_REL_HTT_TX_COMP_STATUS_TTL,1273HAL_WBM_REL_HTT_TX_COMP_STATUS_REINJ,1274HAL_WBM_REL_HTT_TX_COMP_STATUS_INSPECT,1275HAL_WBM_REL_HTT_TX_COMP_STATUS_MEC_NOTIFY,1276HAL_WBM_REL_HTT_TX_COMP_STATUS_MAX,1277};12781279struct hal_tcl_data_cmd {1280struct ath12k_buffer_addr buf_addr_info;1281__le32 info0;1282__le32 info1;1283__le32 info2;1284__le32 info3;1285__le32 info4;1286__le32 info5;1287} __packed;12881289/* hal_tcl_data_cmd1290*1291* buf_addr_info1292* Details of the physical address of a buffer or MSDU1293* link descriptor.1294*1295* tcl_cmd_type1296* used to select the type of TCL Command descriptor1297*1298* desc_type1299* Indicates the type of address provided in the buf_addr_info.1300* Values are defined in enum %HAL_REO_DEST_RING_BUFFER_TYPE_.1301*1302* bank_id1303* used to select one of the TCL register banks for fields removed1304* from 'TCL_DATA_CMD' that do not change often within one virtual1305* device or a set of virtual devices:1306*1307* tx_notify_frame1308* TCL copies this value to 'TQM_ENTRANCE_RING' field FW_tx_notify_frame.1309*1310* hdr_length_read_sel1311* used to select the per 'encap_type' register set for MSDU header1312* read length1313*1314* buffer_timestamp1315* buffer_timestamp_valid1316* Frame system entrance timestamp. It shall be filled by first1317* module (SW, TCL or TQM) that sees the frames first.1318*1319* cmd_num1320* This number can be used to match against status.1321*1322* data_length1323* MSDU length in case of direct descriptor. Length of link1324* extension descriptor in case of Link extension descriptor.1325*1326* *_checksum_en1327* Enable checksum replacement for ipv4, udp_over_ipv4, ipv6,1328* udp_over_ipv6, tcp_over_ipv4 and tcp_over_ipv6.1329*1330* to_fw1331* Forward packet to FW along with classification result. The1332* packet will not be forward to TQM when this bit is set.1333* 1'b0: Use classification result to forward the packet.1334* 1'b1: Override classification result & forward packet only to fw1335*1336* packet_offset1337* Packet offset from Metadata in case of direct buffer descriptor.1338*1339* hlos_tid_overwrite1340*1341* When set, TCL shall ignore the IP DSCP and VLAN PCP1342* fields and use HLOS_TID as the final TID. Otherwise TCL1343* shall consider the DSCP and PCP fields as well as HLOS_TID1344* and choose a final TID based on the configured priority1345*1346* flow_override_enable1347* TCL uses this to select the flow pointer from the peer table,1348* which can be overridden by SW for pre-encrypted raw WiFi packets1349* that cannot be parsed for UDP or for other MLO1350* 0 - FP_PARSE_IP: Use the flow-pointer based on parsing the IPv41351* or IPv6 header.1352* 1 - FP_USE_OVERRIDE: Use the who_classify_info_sel and1353* flow_override fields to select the flow-pointer1354*1355* who_classify_info_sel1356* Field only valid when flow_override_enable is set to FP_USE_OVERRIDE.1357* This field is used to select one of the 'WHO_CLASSIFY_INFO's in the1358* peer table in case more than 2 flows are mapped to a single TID.1359* 0: To choose Flow 0 and 1 of any TID use this value.1360* 1: To choose Flow 2 and 3 of any TID use this value.1361* 2: To choose Flow 4 and 5 of any TID use this value.1362* 3: To choose Flow 6 and 7 of any TID use this value.1363*1364* If who_classify_info sel is not in sync with the num_tx_classify_info1365* field from address search, then TCL will set 'who_classify_info_sel'1366* to 0 use flows 0 and 1.1367*1368* hlos_tid1369* HLOS MSDU priority1370* Field is used when HLOS_TID_overwrite is set.1371*1372* flow_override1373* Field only valid when flow_override_enable is set to FP_USE_OVERRIDE1374* TCL uses this to select the flow pointer from the peer table,1375* which can be overridden by SW for pre-encrypted raw WiFi packets1376* that cannot be parsed for UDP or for other MLO1377* 0 - FP_USE_NON_UDP: Use the non-UDP flow pointer (flow 0)1378* 1 - FP_USE_UDP: Use the UDP flow pointer (flow 1)1379*1380* pmac_id1381* TCL uses this PMAC_ID in address search, i.e, while1382* finding matching entry for the packet in AST corresponding1383* to given PMAC_ID1384*1385* If PMAC ID is all 1s (=> value 3), it indicates wildcard1386* match for any PMAC1387*1388* vdev_id1389* Virtual device ID to check against the address search entry to1390* avoid security issues from transmitting packets from an incorrect1391* virtual device1392*1393* search_index1394* The index that will be used for index based address or1395* flow search. The field is valid when 'search_type' is 1 or 2.1396*1397* cache_set_num1398*1399* Cache set number that should be used to cache the index1400* based search results, for address and flow search. This1401* value should be equal to LSB four bits of the hash value of1402* match data, in case of search index points to an entry which1403* may be used in content based search also. The value can be1404* anything when the entry pointed by search index will not be1405* used for content based search.1406*1407* index_loop_override1408* When set, address search and packet routing is forced to use1409* 'search_index' instead of following the register configuration1410* selected by Bank_id.1411*1412* ring_id1413* The buffer pointer ring ID.1414* 0 refers to the IDLE ring1415* 1 - N refers to other rings1416*1417* looping_count1418*1419* A count value that indicates the number of times the1420* producer of entries into the Ring has looped around the1421* ring.1422*1423* At initialization time, this value is set to 0. On the1424* first loop, this value is set to 1. After the max value is1425* reached allowed by the number of bits for this field, the1426* count value continues with 0 again.1427*1428* In case SW is the consumer of the ring entries, it can1429* use this field to figure out up to where the producer of1430* entries has created new entries. This eliminates the need to1431* check where the head pointer' of the ring is located once1432* the SW starts processing an interrupt indicating that new1433* entries have been put into this ring...1434*1435* Also note that SW if it wants only needs to look at the1436* LSB bit of this count value.1437*/14381439#define HAL_TCL_DESC_LEN sizeof(struct hal_tcl_data_cmd)14401441#define HAL_TX_MSDU_EXT_INFO0_BUF_PTR_LO GENMASK(31, 0)14421443#define HAL_TX_MSDU_EXT_INFO1_BUF_PTR_HI GENMASK(7, 0)1444#define HAL_TX_MSDU_EXT_INFO1_EXTN_OVERRIDE BIT(8)1445#define HAL_TX_MSDU_EXT_INFO1_ENCAP_TYPE GENMASK(10, 9)1446#define HAL_TX_MSDU_EXT_INFO1_ENCRYPT_TYPE GENMASK(14, 11)1447#define HAL_TX_MSDU_EXT_INFO1_BUF_LEN GENMASK(31, 16)14481449struct hal_tx_msdu_ext_desc {1450__le32 rsvd0[6];1451__le32 info0;1452__le32 info1;1453__le32 rsvd1[10];1454};14551456struct hal_tcl_gse_cmd {1457__le32 ctrl_buf_addr_lo;1458__le32 info0;1459__le32 meta_data[2];1460__le32 rsvd0[2];1461__le32 info1;1462} __packed;14631464/* hal_tcl_gse_cmd1465*1466* ctrl_buf_addr_lo, ctrl_buf_addr_hi1467* Address of a control buffer containing additional info needed1468* for this command execution.1469*1470* meta_data1471* Meta data to be returned in the status descriptor1472*/14731474enum hal_tcl_cache_op_res {1475HAL_TCL_CACHE_OP_RES_DONE,1476HAL_TCL_CACHE_OP_RES_NOT_FOUND,1477HAL_TCL_CACHE_OP_RES_TIMEOUT,1478};14791480struct hal_tcl_status_ring {1481__le32 info0;1482__le32 msdu_byte_count;1483__le32 msdu_timestamp;1484__le32 meta_data[2];1485__le32 info1;1486__le32 rsvd0;1487__le32 info2;1488} __packed;14891490/* hal_tcl_status_ring1491*1492* msdu_cnt1493* msdu_byte_count1494* MSDU count of Entry and MSDU byte count for entry 1.1495*1496*/14971498#define HAL_CE_SRC_DESC_ADDR_INFO_ADDR_HI GENMASK(7, 0)1499#define HAL_CE_SRC_DESC_ADDR_INFO_HASH_EN BIT(8)1500#define HAL_CE_SRC_DESC_ADDR_INFO_BYTE_SWAP BIT(9)1501#define HAL_CE_SRC_DESC_ADDR_INFO_DEST_SWAP BIT(10)1502#define HAL_CE_SRC_DESC_ADDR_INFO_GATHER BIT(11)1503#define HAL_CE_SRC_DESC_ADDR_INFO_LEN GENMASK(31, 16)15041505#define HAL_CE_SRC_DESC_META_INFO_DATA GENMASK(15, 0)15061507#define HAL_CE_SRC_DESC_FLAGS_RING_ID GENMASK(27, 20)1508#define HAL_CE_SRC_DESC_FLAGS_LOOP_CNT HAL_SRNG_DESC_LOOP_CNT15091510struct hal_ce_srng_src_desc {1511__le32 buffer_addr_low;1512__le32 buffer_addr_info; /* %HAL_CE_SRC_DESC_ADDR_INFO_ */1513__le32 meta_info; /* %HAL_CE_SRC_DESC_META_INFO_ */1514__le32 flags; /* %HAL_CE_SRC_DESC_FLAGS_ */1515} __packed;15161517/* hal_ce_srng_src_desc1518*1519* buffer_addr_lo1520* LSB 32 bits of the 40 Bit Pointer to the source buffer1521*1522* buffer_addr_hi1523* MSB 8 bits of the 40 Bit Pointer to the source buffer1524*1525* toeplitz_en1526* Enable generation of 32-bit Toeplitz-LFSR hash for1527* data transfer. In case of gather field in first source1528* ring entry of the gather copy cycle in taken into account.1529*1530* src_swap1531* Treats source memory organization as big-endian. For1532* each dword read (4 bytes), the byte 0 is swapped with byte 31533* and byte 1 is swapped with byte 2.1534* In case of gather field in first source ring entry of1535* the gather copy cycle in taken into account.1536*1537* dest_swap1538* Treats destination memory organization as big-endian.1539* For each dword write (4 bytes), the byte 0 is swapped with1540* byte 3 and byte 1 is swapped with byte 2.1541* In case of gather field in first source ring entry of1542* the gather copy cycle in taken into account.1543*1544* gather1545* Enables gather of multiple copy engine source1546* descriptors to one destination.1547*1548* ce_res_01549* Reserved1550*1551*1552* length1553* Length of the buffer in units of octets of the current1554* descriptor1555*1556* fw_metadata1557* Meta data used by FW.1558* In case of gather field in first source ring entry of1559* the gather copy cycle in taken into account.1560*1561* ce_res_11562* Reserved1563*1564* ce_res_21565* Reserved1566*1567* ring_id1568* The buffer pointer ring ID.1569* 0 refers to the IDLE ring1570* 1 - N refers to other rings1571* Helps with debugging when dumping ring contents.1572*1573* looping_count1574* A count value that indicates the number of times the1575* producer of entries into the Ring has looped around the1576* ring.1577*1578* At initialization time, this value is set to 0. On the1579* first loop, this value is set to 1. After the max value is1580* reached allowed by the number of bits for this field, the1581* count value continues with 0 again.1582*1583* In case SW is the consumer of the ring entries, it can1584* use this field to figure out up to where the producer of1585* entries has created new entries. This eliminates the need to1586* check where the head pointer' of the ring is located once1587* the SW starts processing an interrupt indicating that new1588* entries have been put into this ring...1589*1590* Also note that SW if it wants only needs to look at the1591* LSB bit of this count value.1592*/15931594#define HAL_CE_DEST_DESC_ADDR_INFO_ADDR_HI GENMASK(7, 0)1595#define HAL_CE_DEST_DESC_ADDR_INFO_RING_ID GENMASK(27, 20)1596#define HAL_CE_DEST_DESC_ADDR_INFO_LOOP_CNT HAL_SRNG_DESC_LOOP_CNT15971598struct hal_ce_srng_dest_desc {1599__le32 buffer_addr_low;1600__le32 buffer_addr_info; /* %HAL_CE_DEST_DESC_ADDR_INFO_ */1601} __packed;16021603/* hal_ce_srng_dest_desc1604*1605* dst_buffer_low1606* LSB 32 bits of the 40 Bit Pointer to the Destination1607* buffer1608*1609* dst_buffer_high1610* MSB 8 bits of the 40 Bit Pointer to the Destination1611* buffer1612*1613* ce_res_41614* Reserved1615*1616* ring_id1617* The buffer pointer ring ID.1618* 0 refers to the IDLE ring1619* 1 - N refers to other rings1620* Helps with debugging when dumping ring contents.1621*1622* looping_count1623* A count value that indicates the number of times the1624* producer of entries into the Ring has looped around the1625* ring.1626*1627* At initialization time, this value is set to 0. On the1628* first loop, this value is set to 1. After the max value is1629* reached allowed by the number of bits for this field, the1630* count value continues with 0 again.1631*1632* In case SW is the consumer of the ring entries, it can1633* use this field to figure out up to where the producer of1634* entries has created new entries. This eliminates the need to1635* check where the head pointer' of the ring is located once1636* the SW starts processing an interrupt indicating that new1637* entries have been put into this ring...1638*1639* Also note that SW if it wants only needs to look at the1640* LSB bit of this count value.1641*/16421643#define HAL_CE_DST_STATUS_DESC_FLAGS_HASH_EN BIT(8)1644#define HAL_CE_DST_STATUS_DESC_FLAGS_BYTE_SWAP BIT(9)1645#define HAL_CE_DST_STATUS_DESC_FLAGS_DEST_SWAP BIT(10)1646#define HAL_CE_DST_STATUS_DESC_FLAGS_GATHER BIT(11)1647#define HAL_CE_DST_STATUS_DESC_FLAGS_LEN GENMASK(31, 16)16481649#define HAL_CE_DST_STATUS_DESC_META_INFO_DATA GENMASK(15, 0)1650#define HAL_CE_DST_STATUS_DESC_META_INFO_RING_ID GENMASK(27, 20)1651#define HAL_CE_DST_STATUS_DESC_META_INFO_LOOP_CNT HAL_SRNG_DESC_LOOP_CNT16521653struct hal_ce_srng_dst_status_desc {1654__le32 flags; /* %HAL_CE_DST_STATUS_DESC_FLAGS_ */1655__le32 toeplitz_hash0;1656__le32 toeplitz_hash1;1657__le32 meta_info; /* HAL_CE_DST_STATUS_DESC_META_INFO_ */1658} __packed;16591660/* hal_ce_srng_dst_status_desc1661*1662* ce_res_51663* Reserved1664*1665* toeplitz_en1666*1667* src_swap1668* Source memory buffer swapped1669*1670* dest_swap1671* Destination memory buffer swapped1672*1673* gather1674* Gather of multiple copy engine source descriptors to one1675* destination enabled1676*1677* ce_res_61678* Reserved1679*1680* length1681* Sum of all the Lengths of the source descriptor in the1682* gather chain1683*1684* toeplitz_hash_01685* 32 LS bits of 64 bit Toeplitz LFSR hash result1686*1687* toeplitz_hash_11688* 32 MS bits of 64 bit Toeplitz LFSR hash result1689*1690* fw_metadata1691* Meta data used by FW1692* In case of gather field in first source ring entry of1693* the gather copy cycle in taken into account.1694*1695* ce_res_71696* Reserved1697*1698* ring_id1699* The buffer pointer ring ID.1700* 0 refers to the IDLE ring1701* 1 - N refers to other rings1702* Helps with debugging when dumping ring contents.1703*1704* looping_count1705* A count value that indicates the number of times the1706* producer of entries into the Ring has looped around the1707* ring.1708*1709* At initialization time, this value is set to 0. On the1710* first loop, this value is set to 1. After the max value is1711* reached allowed by the number of bits for this field, the1712* count value continues with 0 again.1713*1714* In case SW is the consumer of the ring entries, it can1715* use this field to figure out up to where the producer of1716* entries has created new entries. This eliminates the need to1717* check where the head pointer' of the ring is located once1718* the SW starts processing an interrupt indicating that new1719* entries have been put into this ring...1720*1721* Also note that SW if it wants only needs to look at the1722* LSB bit of this count value.1723*/17241725#define HAL_TX_RATE_STATS_INFO0_VALID BIT(0)1726#define HAL_TX_RATE_STATS_INFO0_BW GENMASK(3, 1)1727#define HAL_TX_RATE_STATS_INFO0_PKT_TYPE GENMASK(7, 4)1728#define HAL_TX_RATE_STATS_INFO0_STBC BIT(8)1729#define HAL_TX_RATE_STATS_INFO0_LDPC BIT(9)1730#define HAL_TX_RATE_STATS_INFO0_SGI GENMASK(11, 10)1731#define HAL_TX_RATE_STATS_INFO0_MCS GENMASK(15, 12)1732#define HAL_TX_RATE_STATS_INFO0_OFDMA_TX BIT(16)1733#define HAL_TX_RATE_STATS_INFO0_TONES_IN_RU GENMASK(28, 17)17341735enum hal_tx_rate_stats_bw {1736HAL_TX_RATE_STATS_BW_20,1737HAL_TX_RATE_STATS_BW_40,1738HAL_TX_RATE_STATS_BW_80,1739HAL_TX_RATE_STATS_BW_160,1740};17411742enum hal_tx_rate_stats_pkt_type {1743HAL_TX_RATE_STATS_PKT_TYPE_11A,1744HAL_TX_RATE_STATS_PKT_TYPE_11B,1745HAL_TX_RATE_STATS_PKT_TYPE_11N,1746HAL_TX_RATE_STATS_PKT_TYPE_11AC,1747HAL_TX_RATE_STATS_PKT_TYPE_11AX,1748HAL_TX_RATE_STATS_PKT_TYPE_11BA,1749HAL_TX_RATE_STATS_PKT_TYPE_11BE,1750};17511752enum hal_tx_rate_stats_sgi {1753HAL_TX_RATE_STATS_SGI_08US,1754HAL_TX_RATE_STATS_SGI_04US,1755HAL_TX_RATE_STATS_SGI_16US,1756HAL_TX_RATE_STATS_SGI_32US,1757};17581759struct hal_tx_rate_stats {1760__le32 info0;1761__le32 tsf;1762} __packed;17631764struct hal_wbm_link_desc {1765struct ath12k_buffer_addr buf_addr_info;1766} __packed;17671768/* hal_wbm_link_desc1769*1770* Producer: WBM1771* Consumer: WBM1772*1773* buf_addr_info1774* Details of the physical address of a buffer or MSDU1775* link descriptor.1776*/17771778enum hal_wbm_rel_src_module {1779HAL_WBM_REL_SRC_MODULE_TQM,1780HAL_WBM_REL_SRC_MODULE_RXDMA,1781HAL_WBM_REL_SRC_MODULE_REO,1782HAL_WBM_REL_SRC_MODULE_FW,1783HAL_WBM_REL_SRC_MODULE_SW,1784};17851786enum hal_wbm_rel_desc_type {1787HAL_WBM_REL_DESC_TYPE_REL_MSDU,1788HAL_WBM_REL_DESC_TYPE_MSDU_LINK,1789HAL_WBM_REL_DESC_TYPE_MPDU_LINK,1790HAL_WBM_REL_DESC_TYPE_MSDU_EXT,1791HAL_WBM_REL_DESC_TYPE_QUEUE_EXT,1792};17931794/* hal_wbm_rel_desc_type1795*1796* msdu_buffer1797* The address points to an MSDU buffer1798*1799* msdu_link_descriptor1800* The address points to an Tx MSDU link descriptor1801*1802* mpdu_link_descriptor1803* The address points to an MPDU link descriptor1804*1805* msdu_ext_descriptor1806* The address points to an MSDU extension descriptor1807*1808* queue_ext_descriptor1809* The address points to an TQM queue extension descriptor. WBM should1810* treat this is the same way as a link descriptor.1811*/18121813enum hal_wbm_rel_bm_act {1814HAL_WBM_REL_BM_ACT_PUT_IN_IDLE,1815HAL_WBM_REL_BM_ACT_REL_MSDU,1816};18171818/* hal_wbm_rel_bm_act1819*1820* put_in_idle_list1821* Put the buffer or descriptor back in the idle list. In case of MSDU or1822* MDPU link descriptor, BM does not need to check to release any1823* individual MSDU buffers.1824*1825* release_msdu_list1826* This BM action can only be used in combination with desc_type being1827* msdu_link_descriptor. Field first_msdu_index points out which MSDU1828* pointer in the MSDU link descriptor is the first of an MPDU that is1829* released. BM shall release all the MSDU buffers linked to this first1830* MSDU buffer pointer. All related MSDU buffer pointer entries shall be1831* set to value 0, which represents the 'NULL' pointer. When all MSDU1832* buffer pointers in the MSDU link descriptor are 'NULL', the MSDU link1833* descriptor itself shall also be released.1834*/1835#define HAL_WBM_COMPL_RX_INFO0_REL_SRC_MODULE GENMASK(2, 0)1836#define HAL_WBM_COMPL_RX_INFO0_BM_ACTION GENMASK(5, 3)1837#define HAL_WBM_COMPL_RX_INFO0_DESC_TYPE GENMASK(8, 6)1838#define HAL_WBM_COMPL_RX_INFO0_RBM GENMASK(12, 9)1839#define HAL_WBM_COMPL_RX_INFO0_RXDMA_PUSH_REASON GENMASK(18, 17)1840#define HAL_WBM_COMPL_RX_INFO0_RXDMA_ERROR_CODE GENMASK(23, 19)1841#define HAL_WBM_COMPL_RX_INFO0_REO_PUSH_REASON GENMASK(25, 24)1842#define HAL_WBM_COMPL_RX_INFO0_REO_ERROR_CODE GENMASK(30, 26)1843#define HAL_WBM_COMPL_RX_INFO0_WBM_INTERNAL_ERROR BIT(31)18441845#define HAL_WBM_COMPL_RX_INFO1_PHY_ADDR_HI GENMASK(7, 0)1846#define HAL_WBM_COMPL_RX_INFO1_SW_COOKIE GENMASK(27, 8)1847#define HAL_WBM_COMPL_RX_INFO1_LOOPING_COUNT GENMASK(31, 28)18481849struct hal_wbm_completion_ring_rx {1850__le32 addr_lo;1851__le32 addr_hi;1852__le32 info0;1853struct rx_mpdu_desc rx_mpdu_info;1854struct rx_msdu_desc rx_msdu_info;1855__le32 phy_addr_lo;1856__le32 info1;1857} __packed;18581859#define HAL_WBM_COMPL_TX_INFO0_REL_SRC_MODULE GENMASK(2, 0)1860#define HAL_WBM_COMPL_TX_INFO0_DESC_TYPE GENMASK(8, 6)1861#define HAL_WBM_COMPL_TX_INFO0_RBM GENMASK(12, 9)1862#define HAL_WBM_COMPL_TX_INFO0_TQM_RELEASE_REASON GENMASK(16, 13)1863#define HAL_WBM_COMPL_TX_INFO0_RBM_OVERRIDE_VLD BIT(17)1864#define HAL_WBM_COMPL_TX_INFO0_SW_COOKIE_LO GENMASK(29, 18)1865#define HAL_WBM_COMPL_TX_INFO0_CC_DONE BIT(30)1866#define HAL_WBM_COMPL_TX_INFO0_WBM_INTERNAL_ERROR BIT(31)18671868#define HAL_WBM_COMPL_TX_INFO1_TQM_STATUS_NUMBER GENMASK(23, 0)1869#define HAL_WBM_COMPL_TX_INFO1_TRANSMIT_COUNT GENMASK(30, 24)1870#define HAL_WBM_COMPL_TX_INFO1_SW_REL_DETAILS_VALID BIT(31)18711872#define HAL_WBM_COMPL_TX_INFO2_ACK_FRAME_RSSI GENMASK(7, 0)1873#define HAL_WBM_COMPL_TX_INFO2_FIRST_MSDU BIT(8)1874#define HAL_WBM_COMPL_TX_INFO2_LAST_MSDU BIT(9)1875#define HAL_WBM_COMPL_TX_INFO2_FW_TX_NOTIF_FRAME GENMASK(12, 10)1876#define HAL_WBM_COMPL_TX_INFO2_BUFFER_TIMESTAMP GENMASK(31, 13)18771878#define HAL_WBM_COMPL_TX_INFO3_PEER_ID GENMASK(15, 0)1879#define HAL_WBM_COMPL_TX_INFO3_TID GENMASK(19, 16)1880#define HAL_WBM_COMPL_TX_INFO3_SW_COOKIE_HI GENMASK(27, 20)1881#define HAL_WBM_COMPL_TX_INFO3_LOOPING_COUNT GENMASK(31, 28)18821883struct hal_wbm_completion_ring_tx {1884__le32 buf_va_lo;1885__le32 buf_va_hi;1886__le32 info0;1887__le32 info1;1888__le32 info2;1889struct hal_tx_rate_stats rate_stats;1890__le32 info3;1891} __packed;18921893#define HAL_WBM_RELEASE_TX_INFO0_REL_SRC_MODULE GENMASK(2, 0)1894#define HAL_WBM_RELEASE_TX_INFO0_BM_ACTION GENMASK(5, 3)1895#define HAL_WBM_RELEASE_TX_INFO0_DESC_TYPE GENMASK(8, 6)1896#define HAL_WBM_RELEASE_TX_INFO0_FIRST_MSDU_IDX GENMASK(12, 9)1897#define HAL_WBM_RELEASE_TX_INFO0_TQM_RELEASE_REASON GENMASK(18, 13)1898#define HAL_WBM_RELEASE_TX_INFO0_RBM_OVERRIDE_VLD BIT(17)1899#define HAL_WBM_RELEASE_TX_INFO0_SW_BUFFER_COOKIE_11_0 GENMASK(29, 18)1900#define HAL_WBM_RELEASE_TX_INFO0_WBM_INTERNAL_ERROR BIT(31)19011902#define HAL_WBM_RELEASE_TX_INFO1_TQM_STATUS_NUMBER GENMASK(23, 0)1903#define HAL_WBM_RELEASE_TX_INFO1_TRANSMIT_COUNT GENMASK(30, 24)1904#define HAL_WBM_RELEASE_TX_INFO1_SW_REL_DETAILS_VALID BIT(31)19051906#define HAL_WBM_RELEASE_TX_INFO2_ACK_FRAME_RSSI GENMASK(7, 0)1907#define HAL_WBM_RELEASE_TX_INFO2_FIRST_MSDU BIT(8)1908#define HAL_WBM_RELEASE_TX_INFO2_LAST_MSDU BIT(9)1909#define HAL_WBM_RELEASE_TX_INFO2_FW_TX_NOTIF_FRAME GENMASK(12, 10)1910#define HAL_WBM_RELEASE_TX_INFO2_BUFFER_TIMESTAMP GENMASK(31, 13)19111912#define HAL_WBM_RELEASE_TX_INFO3_PEER_ID GENMASK(15, 0)1913#define HAL_WBM_RELEASE_TX_INFO3_TID GENMASK(19, 16)1914#define HAL_WBM_RELEASE_TX_INFO3_SW_BUFFER_COOKIE_19_12 GENMASK(27, 20)1915#define HAL_WBM_RELEASE_TX_INFO3_LOOPING_COUNT GENMASK(31, 28)19161917struct hal_wbm_release_ring_tx {1918struct ath12k_buffer_addr buf_addr_info;1919__le32 info0;1920__le32 info1;1921__le32 info2;1922struct hal_tx_rate_stats rate_stats;1923__le32 info3;1924} __packed;19251926#define HAL_WBM_RELEASE_RX_INFO0_REL_SRC_MODULE GENMASK(2, 0)1927#define HAL_WBM_RELEASE_RX_INFO0_BM_ACTION GENMASK(5, 3)1928#define HAL_WBM_RELEASE_RX_INFO0_DESC_TYPE GENMASK(8, 6)1929#define HAL_WBM_RELEASE_RX_INFO0_FIRST_MSDU_IDX GENMASK(12, 9)1930#define HAL_WBM_RELEASE_RX_INFO0_CC_STATUS BIT(16)1931#define HAL_WBM_RELEASE_RX_INFO0_RXDMA_PUSH_REASON GENMASK(18, 17)1932#define HAL_WBM_RELEASE_RX_INFO0_RXDMA_ERROR_CODE GENMASK(23, 19)1933#define HAL_WBM_RELEASE_RX_INFO0_REO_PUSH_REASON GENMASK(25, 24)1934#define HAL_WBM_RELEASE_RX_INFO0_REO_ERROR_CODE GENMASK(30, 26)1935#define HAL_WBM_RELEASE_RX_INFO0_WBM_INTERNAL_ERROR BIT(31)19361937#define HAL_WBM_RELEASE_RX_INFO2_RING_ID GENMASK(27, 20)1938#define HAL_WBM_RELEASE_RX_INFO2_LOOPING_COUNT GENMASK(31, 28)19391940struct hal_wbm_release_ring_rx {1941struct ath12k_buffer_addr buf_addr_info;1942__le32 info0;1943struct rx_mpdu_desc rx_mpdu_info;1944struct rx_msdu_desc rx_msdu_info;1945__le32 info1;1946__le32 info2;1947} __packed;19481949#define HAL_WBM_RELEASE_RX_CC_INFO0_RBM GENMASK(12, 9)1950#define HAL_WBM_RELEASE_RX_CC_INFO1_COOKIE GENMASK(27, 8)1951/* Used when hw cc is success */1952struct hal_wbm_release_ring_cc_rx {1953__le32 buf_va_lo;1954__le32 buf_va_hi;1955__le32 info0;1956struct rx_mpdu_desc rx_mpdu_info;1957struct rx_msdu_desc rx_msdu_info;1958__le32 buf_pa_lo;1959__le32 info1;1960} __packed;19611962#define HAL_WBM_RELEASE_INFO0_REL_SRC_MODULE GENMASK(2, 0)1963#define HAL_WBM_RELEASE_INFO0_BM_ACTION GENMASK(5, 3)1964#define HAL_WBM_RELEASE_INFO0_DESC_TYPE GENMASK(8, 6)1965#define HAL_WBM_RELEASE_INFO0_RXDMA_PUSH_REASON GENMASK(18, 17)1966#define HAL_WBM_RELEASE_INFO0_RXDMA_ERROR_CODE GENMASK(23, 19)1967#define HAL_WBM_RELEASE_INFO0_REO_PUSH_REASON GENMASK(25, 24)1968#define HAL_WBM_RELEASE_INFO0_REO_ERROR_CODE GENMASK(30, 26)1969#define HAL_WBM_RELEASE_INFO0_WBM_INTERNAL_ERROR BIT(31)19701971#define HAL_WBM_RELEASE_INFO3_FIRST_MSDU BIT(0)1972#define HAL_WBM_RELEASE_INFO3_LAST_MSDU BIT(1)1973#define HAL_WBM_RELEASE_INFO3_CONTINUATION BIT(2)19741975#define HAL_WBM_RELEASE_INFO5_LOOPING_COUNT GENMASK(31, 28)19761977struct hal_wbm_release_ring {1978struct ath12k_buffer_addr buf_addr_info;1979__le32 info0;1980__le32 info1;1981__le32 info2;1982__le32 info3;1983__le32 info4;1984__le32 info5;1985} __packed;19861987/* hal_wbm_release_ring1988*1989* Producer: SW/TQM/RXDMA/REO/SWITCH1990* Consumer: WBM/SW/FW1991*1992* HTT tx status is overlaid on wbm_release ring on 4-byte words 2, 3, 4 and 51993* for software based completions.1994*1995* buf_addr_info1996* Details of the physical address of the buffer or link descriptor.1997*1998* release_source_module1999* Indicates which module initiated the release of this buffer/descriptor.2000* Values are defined in enum %HAL_WBM_REL_SRC_MODULE_.2001*2002* buffer_or_desc_type2003* Field only valid when WBM is marked as the return_buffer_manager in2004* the Released_Buffer_address_info. Indicates that type of buffer or2005* descriptor is being released. Values are in enum %HAL_WBM_REL_DESC_TYPE.2006*2007* wbm_internal_error2008* Is set when WBM got a buffer pointer but the action was to push it to2009* the idle link descriptor ring or do link related activity OR2010* Is set when WBM got a link buffer pointer but the action was to push it2011* to the buffer descriptor ring.2012*2013* looping_count2014* A count value that indicates the number of times the2015* producer of entries into the Buffer Manager Ring has looped2016* around the ring.2017*2018* At initialization time, this value is set to 0. On the2019* first loop, this value is set to 1. After the max value is2020* reached allowed by the number of bits for this field, the2021* count value continues with 0 again.2022*2023* In case SW is the consumer of the ring entries, it can2024* use this field to figure out up to where the producer of2025* entries has created new entries. This eliminates the need to2026* check where the head pointer' of the ring is located once2027* the SW starts processing an interrupt indicating that new2028* entries have been put into this ring...2029*2030* Also note that SW if it wants only needs to look at the2031* LSB bit of this count value.2032*/20332034/**2035* enum hal_wbm_tqm_rel_reason - TQM release reason code2036* @HAL_WBM_TQM_REL_REASON_FRAME_ACKED: ACK or BACK received for the frame2037* @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_MPDU: Command remove_mpdus initiated by SW2038* @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_TX: Command remove transmitted_mpdus2039* initiated by sw.2040* @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_NOTX: Command remove untransmitted_mpdus2041* initiated by sw.2042* @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_AGED_FRAMES: Command remove aged msdus or2043* mpdus.2044* @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON1: Remove command initiated by2045* fw with fw_reason1.2046* @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON2: Remove command initiated by2047* fw with fw_reason2.2048* @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON3: Remove command initiated by2049* fw with fw_reason3.2050*/2051enum hal_wbm_tqm_rel_reason {2052HAL_WBM_TQM_REL_REASON_FRAME_ACKED,2053HAL_WBM_TQM_REL_REASON_CMD_REMOVE_MPDU,2054HAL_WBM_TQM_REL_REASON_CMD_REMOVE_TX,2055HAL_WBM_TQM_REL_REASON_CMD_REMOVE_NOTX,2056HAL_WBM_TQM_REL_REASON_CMD_REMOVE_AGED_FRAMES,2057HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON1,2058HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON2,2059HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON3,2060};20612062struct hal_wbm_buffer_ring {2063struct ath12k_buffer_addr buf_addr_info;2064};20652066enum hal_mon_end_reason {2067HAL_MON_STATUS_BUFFER_FULL,2068HAL_MON_FLUSH_DETECTED,2069HAL_MON_END_OF_PPDU,2070HAL_MON_PPDU_TRUNCATED,2071};20722073#define HAL_SW_MONITOR_RING_INFO0_RXDMA_PUSH_REASON GENMASK(1, 0)2074#define HAL_SW_MONITOR_RING_INFO0_RXDMA_ERROR_CODE GENMASK(6, 2)2075#define HAL_SW_MONITOR_RING_INFO0_MPDU_FRAGMENT_NUMBER GENMASK(10, 7)2076#define HAL_SW_MONITOR_RING_INFO0_FRAMELESS_BAR BIT(11)2077#define HAL_SW_MONITOR_RING_INFO0_STATUS_BUF_COUNT GENMASK(15, 12)2078#define HAL_SW_MONITOR_RING_INFO0_END_OF_PPDU BIT(16)20792080#define HAL_SW_MONITOR_RING_INFO1_PHY_PPDU_ID GENMASK(15, 0)2081#define HAL_SW_MONITOR_RING_INFO1_RING_ID GENMASK(27, 20)2082#define HAL_SW_MONITOR_RING_INFO1_LOOPING_COUNT GENMASK(31, 28)20832084struct hal_sw_monitor_ring {2085struct ath12k_buffer_addr buf_addr_info;2086struct rx_mpdu_desc rx_mpdu_info;2087struct ath12k_buffer_addr status_buff_addr_info;2088__le32 info0; /* %HAL_SW_MONITOR_RING_INFO0 */2089__le32 info1; /* %HAL_SW_MONITOR_RING_INFO1 */2090} __packed;20912092/* hal_sw_monitor_ring2093*2094* Producer: RXDMA2095* Consumer: REO/SW/FW2096* buf_addr_info2097* Details of the physical address of a buffer or MSDU2098* link descriptor.2099*2100* rx_mpdu_info2101* Details related to the MPDU being pushed to SW, valid2102* only if end_of_ppdu is set to 0.2103*2104* status_buff_addr_info2105* Details of the physical address of the first status2106* buffer used for the PPDU (either the PPDU that included the2107* MPDU being pushed to SW if end_of_ppdu = 0, or the PPDU2108* whose end is indicated through end_of_ppdu = 1)2109*2110* rxdma_push_reason2111* Indicates why RXDMA pushed the frame to this ring2112*2113* <enum 0 rxdma_error_detected> RXDMA detected an error an2114* pushed this frame to this queue2115*2116* <enum 1 rxdma_routing_instruction> RXDMA pushed the2117* frame to this queue per received routing instructions. No2118* error within RXDMA was detected2119*2120* <enum 2 rxdma_rx_flush> RXDMA received an RX_FLUSH. As a2121* result the MSDU link descriptor might not have the2122* last_msdu_in_mpdu_flag set, but instead WBM might just see a2123* NULL pointer in the MSDU link descriptor. This is to be2124* considered a normal condition for this scenario.2125*2126* rxdma_error_code2127* Field only valid when rxdma_push_reason is set to2128* 'rxdma_error_detected.'2129*2130* <enum 0 rxdma_overflow_err>MPDU frame is not complete2131* due to a FIFO overflow error in RXPCU.2132*2133* <enum 1 rxdma_mpdu_length_err>MPDU frame is not complete2134* due to receiving incomplete MPDU from the PHY2135*2136* <enum 3 rxdma_decrypt_err>CRYPTO reported a decryption2137* error or CRYPTO received an encrypted frame, but did not get2138* a valid corresponding key id in the peer entry.2139*2140* <enum 4 rxdma_tkip_mic_err>CRYPTO reported a TKIP MIC2141* error2142*2143* <enum 5 rxdma_unecrypted_err>CRYPTO reported an2144* unencrypted frame error when encrypted was expected2145*2146* <enum 6 rxdma_msdu_len_err>RX OLE reported an MSDU2147* length error2148*2149* <enum 7 rxdma_msdu_limit_err>RX OLE reported that max2150* number of MSDUs allowed in an MPDU got exceeded2151*2152* <enum 8 rxdma_wifi_parse_err>RX OLE reported a parsing2153* error2154*2155* <enum 9 rxdma_amsdu_parse_err>RX OLE reported an A-MSDU2156* parsing error2157*2158* <enum 10 rxdma_sa_timeout_err>RX OLE reported a timeout2159* during SA search2160*2161* <enum 11 rxdma_da_timeout_err>RX OLE reported a timeout2162* during DA search2163*2164* <enum 12 rxdma_flow_timeout_err>RX OLE reported a2165* timeout during flow search2166*2167* <enum 13 rxdma_flush_request>RXDMA received a flush2168* request2169*2170* <enum 14 rxdma_amsdu_fragment_err>Rx PCU reported A-MSDU2171* present as well as a fragmented MPDU.2172*2173* mpdu_fragment_number2174* Field only valid when Reo_level_mpdu_frame_info.2175* Rx_mpdu_desc_info_details.Fragment_flag is set and2176* end_of_ppdu is set to 0.2177*2178* The fragment number from the 802.11 header.2179*2180* Note that the sequence number is embedded in the field:2181* Reo_level_mpdu_frame_info. Rx_mpdu_desc_info_details.2182* Mpdu_sequence_number2183*2184* frameless_bar2185* When set, this SW monitor ring struct contains BAR info2186* from a multi TID BAR frame. The original multi TID BAR frame2187* itself contained all the REO info for the first TID, but all2188* the subsequent TID info and their linkage to the REO2189* descriptors is passed down as 'frameless' BAR info.2190*2191* The only fields valid in this descriptor when this bit2192* is within the2193*2194* Reo_level_mpdu_frame_info:2195* Within Rx_mpdu_desc_info_details:2196* Mpdu_Sequence_number2197* BAR_frame2198* Peer_meta_data2199* All other fields shall be set to 0.2200*2201* status_buf_count2202* A count of status buffers used so far for the PPDU2203* (either the PPDU that included the MPDU being pushed to SW2204* if end_of_ppdu = 0, or the PPDU whose end is indicated2205* through end_of_ppdu = 1)2206*2207* end_of_ppdu2208* Some hw RXDMA can be configured to generate a separate2209* 'SW_MONITOR_RING' descriptor at the end of a PPDU (either2210* through an 'RX_PPDU_END' TLV or through an 'RX_FLUSH') to2211* demarcate PPDUs.2212*2213* For such a descriptor, this bit is set to 1 and fields2214* Reo_level_mpdu_frame_info, mpdu_fragment_number and2215* Frameless_bar are all set to 0.2216*2217* Otherwise this bit is set to 0.2218*2219* phy_ppdu_id2220* A PPDU counter value that PHY increments for every PPDU2221* received2222*2223* The counter value wraps around. Some hw RXDMA can be2224* configured to copy this from the RX_PPDU_START TLV for every2225* output descriptor.2226*2227* ring_id2228* For debugging.2229* This field is filled in by the SRNG module.2230* It help to identify the ring that is being looked2231*2232* looping_count2233* For debugging.2234* This field is filled in by the SRNG module.2235*2236* A count value that indicates the number of times the2237* producer of entries into this Ring has looped around the2238* ring.2239* At initialization time, this value is set to 0. On the2240* first loop, this value is set to 1. After the max value is2241* reached allowed by the number of bits for this field, the2242* count value continues with 0 again.2243*2244* In case SW is the consumer of the ring entries, it can2245* use this field to figure out up to where the producer of2246* entries has created new entries. This eliminates the need to2247* check where the head pointer' of the ring is located once2248* the SW starts processing an interrupt indicating that new2249* entries have been put into this ring...2250*/22512252enum hal_desc_owner {2253HAL_DESC_OWNER_WBM,2254HAL_DESC_OWNER_SW,2255HAL_DESC_OWNER_TQM,2256HAL_DESC_OWNER_RXDMA,2257HAL_DESC_OWNER_REO,2258HAL_DESC_OWNER_SWITCH,2259};22602261enum hal_desc_buf_type {2262HAL_DESC_BUF_TYPE_TX_MSDU_LINK,2263HAL_DESC_BUF_TYPE_TX_MPDU_LINK,2264HAL_DESC_BUF_TYPE_TX_MPDU_QUEUE_HEAD,2265HAL_DESC_BUF_TYPE_TX_MPDU_QUEUE_EXT,2266HAL_DESC_BUF_TYPE_TX_FLOW,2267HAL_DESC_BUF_TYPE_TX_BUFFER,2268HAL_DESC_BUF_TYPE_RX_MSDU_LINK,2269HAL_DESC_BUF_TYPE_RX_MPDU_LINK,2270HAL_DESC_BUF_TYPE_RX_REO_QUEUE,2271HAL_DESC_BUF_TYPE_RX_REO_QUEUE_EXT,2272HAL_DESC_BUF_TYPE_RX_BUFFER,2273HAL_DESC_BUF_TYPE_IDLE_LINK,2274};22752276#define HAL_DESC_REO_OWNED 42277#define HAL_DESC_REO_QUEUE_DESC 82278#define HAL_DESC_REO_QUEUE_EXT_DESC 92279#define HAL_DESC_REO_NON_QOS_TID 1622802281#define HAL_DESC_HDR_INFO0_OWNER GENMASK(3, 0)2282#define HAL_DESC_HDR_INFO0_BUF_TYPE GENMASK(7, 4)2283#define HAL_DESC_HDR_INFO0_DBG_RESERVED GENMASK(31, 8)22842285struct hal_desc_header {2286__le32 info0;2287} __packed;22882289struct hal_rx_mpdu_link_ptr {2290struct ath12k_buffer_addr addr_info;2291} __packed;22922293struct hal_rx_msdu_details {2294struct ath12k_buffer_addr buf_addr_info;2295struct rx_msdu_desc rx_msdu_info;2296struct rx_msdu_ext_desc rx_msdu_ext_info;2297} __packed;22982299#define HAL_RX_MSDU_LNK_INFO0_RX_QUEUE_NUMBER GENMASK(15, 0)2300#define HAL_RX_MSDU_LNK_INFO0_FIRST_MSDU_LNK BIT(16)23012302struct hal_rx_msdu_link {2303struct hal_desc_header desc_hdr;2304struct ath12k_buffer_addr buf_addr_info;2305__le32 info0;2306__le32 pn[4];2307struct hal_rx_msdu_details msdu_link[6];2308} __packed;23092310struct hal_rx_reo_queue_ext {2311struct hal_desc_header desc_hdr;2312__le32 rsvd;2313struct hal_rx_mpdu_link_ptr mpdu_link[15];2314} __packed;23152316/* hal_rx_reo_queue_ext2317* Consumer: REO2318* Producer: REO2319*2320* descriptor_header2321* Details about which module owns this struct.2322*2323* mpdu_link2324* Pointer to the next MPDU_link descriptor in the MPDU queue.2325*/23262327enum hal_rx_reo_queue_pn_size {2328HAL_RX_REO_QUEUE_PN_SIZE_24,2329HAL_RX_REO_QUEUE_PN_SIZE_48,2330HAL_RX_REO_QUEUE_PN_SIZE_128,2331};23322333#define HAL_RX_REO_QUEUE_RX_QUEUE_NUMBER GENMASK(15, 0)23342335#define HAL_RX_REO_QUEUE_INFO0_VLD BIT(0)2336#define HAL_RX_REO_QUEUE_INFO0_ASSOC_LNK_DESC_COUNTER GENMASK(2, 1)2337#define HAL_RX_REO_QUEUE_INFO0_DIS_DUP_DETECTION BIT(3)2338#define HAL_RX_REO_QUEUE_INFO0_SOFT_REORDER_EN BIT(4)2339#define HAL_RX_REO_QUEUE_INFO0_AC GENMASK(6, 5)2340#define HAL_RX_REO_QUEUE_INFO0_BAR BIT(7)2341#define HAL_RX_REO_QUEUE_INFO0_RETRY BIT(8)2342#define HAL_RX_REO_QUEUE_INFO0_CHECK_2K_MODE BIT(9)2343#define HAL_RX_REO_QUEUE_INFO0_OOR_MODE BIT(10)2344#define HAL_RX_REO_QUEUE_INFO0_BA_WINDOW_SIZE GENMASK(20, 11)2345#define HAL_RX_REO_QUEUE_INFO0_PN_CHECK BIT(21)2346#define HAL_RX_REO_QUEUE_INFO0_EVEN_PN BIT(22)2347#define HAL_RX_REO_QUEUE_INFO0_UNEVEN_PN BIT(23)2348#define HAL_RX_REO_QUEUE_INFO0_PN_HANDLE_ENABLE BIT(24)2349#define HAL_RX_REO_QUEUE_INFO0_PN_SIZE GENMASK(26, 25)2350#define HAL_RX_REO_QUEUE_INFO0_IGNORE_AMPDU_FLG BIT(27)23512352#define HAL_RX_REO_QUEUE_INFO1_SVLD BIT(0)2353#define HAL_RX_REO_QUEUE_INFO1_SSN GENMASK(12, 1)2354#define HAL_RX_REO_QUEUE_INFO1_CURRENT_IDX GENMASK(22, 13)2355#define HAL_RX_REO_QUEUE_INFO1_SEQ_2K_ERR BIT(23)2356#define HAL_RX_REO_QUEUE_INFO1_PN_ERR BIT(24)2357#define HAL_RX_REO_QUEUE_INFO1_PN_VALID BIT(31)23582359#define HAL_RX_REO_QUEUE_INFO2_MPDU_COUNT GENMASK(6, 0)2360#define HAL_RX_REO_QUEUE_INFO2_MSDU_COUNT (31, 7)23612362#define HAL_RX_REO_QUEUE_INFO3_TIMEOUT_COUNT GENMASK(9, 4)2363#define HAL_RX_REO_QUEUE_INFO3_FWD_DUE_TO_BAR_CNT GENMASK(15, 10)2364#define HAL_RX_REO_QUEUE_INFO3_DUPLICATE_COUNT GENMASK(31, 16)23652366#define HAL_RX_REO_QUEUE_INFO4_FRAME_IN_ORD_COUNT GENMASK(23, 0)2367#define HAL_RX_REO_QUEUE_INFO4_BAR_RECVD_COUNT GENMASK(31, 24)23682369#define HAL_RX_REO_QUEUE_INFO5_LATE_RX_MPDU_COUNT GENMASK(11, 0)2370#define HAL_RX_REO_QUEUE_INFO5_WINDOW_JUMP_2K GENMASK(15, 12)2371#define HAL_RX_REO_QUEUE_INFO5_HOLE_COUNT GENMASK(31, 16)23722373struct hal_rx_reo_queue {2374struct hal_desc_header desc_hdr;2375__le32 rx_queue_num;2376__le32 info0;2377__le32 info1;2378__le32 pn[4];2379__le32 last_rx_enqueue_timestamp;2380__le32 last_rx_dequeue_timestamp;2381__le32 next_aging_queue[2];2382__le32 prev_aging_queue[2];2383__le32 rx_bitmap[9];2384__le32 info2;2385__le32 info3;2386__le32 info4;2387__le32 processed_mpdus;2388__le32 processed_msdus;2389__le32 processed_total_bytes;2390__le32 info5;2391__le32 rsvd[2];2392struct hal_rx_reo_queue_ext ext_desc[];2393} __packed;23942395/* hal_rx_reo_queue2396*2397* descriptor_header2398* Details about which module owns this struct. Note that sub field2399* Buffer_type shall be set to receive_reo_queue_descriptor.2400*2401* receive_queue_number2402* Indicates the MPDU queue ID to which this MPDU link descriptor belongs.2403*2404* vld2405* Valid bit indicating a session is established and the queue descriptor2406* is valid.2407* associated_link_descriptor_counter2408* Indicates which of the 3 link descriptor counters shall be incremented2409* or decremented when link descriptors are added or removed from this2410* flow queue.2411* disable_duplicate_detection2412* When set, do not perform any duplicate detection.2413* soft_reorder_enable2414* When set, REO has been instructed to not perform the actual re-ordering2415* of frames for this queue, but just to insert the reorder opcodes.2416* ac2417* Indicates the access category of the queue descriptor.2418* bar2419* Indicates if BAR has been received.2420* retry2421* Retry bit is checked if this bit is set.2422* chk_2k_mode2423* Indicates what type of operation is expected from Reo when the received2424* frame SN falls within the 2K window.2425* oor_mode2426* Indicates what type of operation is expected when the received frame2427* falls within the OOR window.2428* ba_window_size2429* Indicates the negotiated (window size + 1). Max of 256 bits.2430*2431* A value 255 means 256 bitmap, 63 means 64 bitmap, 0 (means non-BA2432* session, with window size of 0). The 3 values here are the main values2433* validated, but other values should work as well.2434*2435* A BA window size of 0 (=> one frame entry bitmat), means that there is2436* no additional rx_reo_queue_ext desc. following rx_reo_queue in memory.2437* A BA window size of 1 - 105, means that there is 1 rx_reo_queue_ext.2438* A BA window size of 106 - 210, means that there are 2 rx_reo_queue_ext.2439* A BA window size of 211 - 256, means that there are 3 rx_reo_queue_ext.2440* pn_check_needed, pn_shall_be_even, pn_shall_be_uneven, pn_handling_enable,2441* pn_size2442* REO shall perform the PN increment check, even number check, uneven2443* number check, PN error check and size of the PN field check.2444* ignore_ampdu_flag2445* REO shall ignore the ampdu_flag on entrance descriptor for this queue.2446*2447* svld2448* Sequence number in next field is valid one.2449* ssn2450* Starting Sequence number of the session.2451* current_index2452* Points to last forwarded packet2453* seq_2k_error_detected_flag2454* REO has detected a 2k error jump in the sequence number and from that2455* moment forward, all new frames are forwarded directly to FW, without2456* duplicate detect, reordering, etc.2457* pn_error_detected_flag2458* REO has detected a PN error.2459*/24602461#define HAL_REO_UPD_RX_QUEUE_INFO0_QUEUE_ADDR_HI GENMASK(7, 0)2462#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_RX_QUEUE_NUM BIT(8)2463#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_VLD BIT(9)2464#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_ASSOC_LNK_DESC_CNT BIT(10)2465#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_DIS_DUP_DETECTION BIT(11)2466#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SOFT_REORDER_EN BIT(12)2467#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_AC BIT(13)2468#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_BAR BIT(14)2469#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_RETRY BIT(15)2470#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_CHECK_2K_MODE BIT(16)2471#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_OOR_MODE BIT(17)2472#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_BA_WINDOW_SIZE BIT(18)2473#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_CHECK BIT(19)2474#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_EVEN_PN BIT(20)2475#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_UNEVEN_PN BIT(21)2476#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_HANDLE_ENABLE BIT(22)2477#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_SIZE BIT(23)2478#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_IGNORE_AMPDU_FLG BIT(24)2479#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SVLD BIT(25)2480#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SSN BIT(26)2481#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SEQ_2K_ERR BIT(27)2482#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_ERR BIT(28)2483#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_VALID BIT(29)2484#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN BIT(30)24852486#define HAL_REO_UPD_RX_QUEUE_INFO1_RX_QUEUE_NUMBER GENMASK(15, 0)2487#define HAL_REO_UPD_RX_QUEUE_INFO1_VLD BIT(16)2488#define HAL_REO_UPD_RX_QUEUE_INFO1_ASSOC_LNK_DESC_COUNTER GENMASK(18, 17)2489#define HAL_REO_UPD_RX_QUEUE_INFO1_DIS_DUP_DETECTION BIT(19)2490#define HAL_REO_UPD_RX_QUEUE_INFO1_SOFT_REORDER_EN BIT(20)2491#define HAL_REO_UPD_RX_QUEUE_INFO1_AC GENMASK(22, 21)2492#define HAL_REO_UPD_RX_QUEUE_INFO1_BAR BIT(23)2493#define HAL_REO_UPD_RX_QUEUE_INFO1_RETRY BIT(24)2494#define HAL_REO_UPD_RX_QUEUE_INFO1_CHECK_2K_MODE BIT(25)2495#define HAL_REO_UPD_RX_QUEUE_INFO1_OOR_MODE BIT(26)2496#define HAL_REO_UPD_RX_QUEUE_INFO1_PN_CHECK BIT(27)2497#define HAL_REO_UPD_RX_QUEUE_INFO1_EVEN_PN BIT(28)2498#define HAL_REO_UPD_RX_QUEUE_INFO1_UNEVEN_PN BIT(29)2499#define HAL_REO_UPD_RX_QUEUE_INFO1_PN_HANDLE_ENABLE BIT(30)2500#define HAL_REO_UPD_RX_QUEUE_INFO1_IGNORE_AMPDU_FLG BIT(31)25012502#define HAL_REO_UPD_RX_QUEUE_INFO2_BA_WINDOW_SIZE GENMASK(7, 0)2503#define HAL_REO_UPD_RX_QUEUE_INFO2_PN_SIZE GENMASK(9, 8)2504#define HAL_REO_UPD_RX_QUEUE_INFO2_SVLD BIT(10)2505#define HAL_REO_UPD_RX_QUEUE_INFO2_SSN GENMASK(22, 11)2506#define HAL_REO_UPD_RX_QUEUE_INFO2_SEQ_2K_ERR BIT(23)2507#define HAL_REO_UPD_RX_QUEUE_INFO2_PN_ERR BIT(24)2508#define HAL_REO_UPD_RX_QUEUE_INFO2_PN_VALID BIT(25)25092510struct hal_reo_update_rx_queue {2511struct hal_reo_cmd_hdr cmd;2512__le32 queue_addr_lo;2513__le32 info0;2514__le32 info1;2515__le32 info2;2516__le32 pn[4];2517} __packed;25182519#define HAL_REO_UNBLOCK_CACHE_INFO0_UNBLK_CACHE BIT(0)2520#define HAL_REO_UNBLOCK_CACHE_INFO0_RESOURCE_IDX GENMASK(2, 1)25212522struct hal_reo_unblock_cache {2523struct hal_reo_cmd_hdr cmd;2524__le32 info0;2525__le32 rsvd[7];2526} __packed;25272528enum hal_reo_exec_status {2529HAL_REO_EXEC_STATUS_SUCCESS,2530HAL_REO_EXEC_STATUS_BLOCKED,2531HAL_REO_EXEC_STATUS_FAILED,2532HAL_REO_EXEC_STATUS_RESOURCE_BLOCKED,2533};25342535#define HAL_REO_STATUS_HDR_INFO0_STATUS_NUM GENMASK(15, 0)2536#define HAL_REO_STATUS_HDR_INFO0_EXEC_TIME GENMASK(25, 16)2537#define HAL_REO_STATUS_HDR_INFO0_EXEC_STATUS GENMASK(27, 26)25382539struct hal_reo_status_hdr {2540__le32 info0;2541__le32 timestamp;2542} __packed;25432544/* hal_reo_status_hdr2545* Producer: REO2546* Consumer: SW2547*2548* status_num2549* The value in this field is equal to value of the reo command2550* number. This field helps to correlate the statuses with the REO2551* commands.2552*2553* execution_time (in us)2554* The amount of time REO took to execute the command. Note that2555* this time does not include the duration of the command waiting2556* in the command ring, before the execution started.2557*2558* execution_status2559* Execution status of the command. Values are defined in2560* enum %HAL_REO_EXEC_STATUS_.2561*/2562#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO0_SSN GENMASK(11, 0)2563#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO0_CUR_IDX GENMASK(21, 12)25642565#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO1_MPDU_COUNT GENMASK(6, 0)2566#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO1_MSDU_COUNT GENMASK(31, 7)25672568#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_WINDOW_JMP2K GENMASK(3, 0)2569#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_TIMEOUT_COUNT GENMASK(9, 4)2570#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_FDTB_COUNT GENMASK(15, 10)2571#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_DUPLICATE_COUNT GENMASK(31, 16)25722573#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO3_FIO_COUNT GENMASK(23, 0)2574#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO3_BAR_RCVD_CNT GENMASK(31, 24)25752576#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_LATE_RX_MPDU GENMASK(11, 0)2577#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_HOLE_COUNT GENMASK(27, 12)25782579#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO5_LOOPING_CNT GENMASK(31, 28)25802581struct hal_reo_get_queue_stats_status {2582struct hal_reo_status_hdr hdr;2583__le32 info0;2584__le32 pn[4];2585__le32 last_rx_enqueue_timestamp;2586__le32 last_rx_dequeue_timestamp;2587__le32 rx_bitmap[9];2588__le32 info1;2589__le32 info2;2590__le32 info3;2591__le32 num_mpdu_frames;2592__le32 num_msdu_frames;2593__le32 total_bytes;2594__le32 info4;2595__le32 info5;2596} __packed;25972598/* hal_reo_get_queue_stats_status2599* Producer: REO2600* Consumer: SW2601*2602* status_hdr2603* Details that can link this status with the original command. It2604* also contains info on how long REO took to execute this command.2605*2606* ssn2607* Starting Sequence number of the session, this changes whenever2608* window moves (can be filled by SW then maintained by REO).2609*2610* current_index2611* Points to last forwarded packet.2612*2613* pn2614* Bits of the PN number.2615*2616* last_rx_enqueue_timestamp2617* last_rx_dequeue_timestamp2618* Timestamp of arrival of the last MPDU for this queue and2619* Timestamp of forwarding an MPDU accordingly.2620*2621* rx_bitmap2622* When a bit is set, the corresponding frame is currently held2623* in the re-order queue. The bitmap is Fully managed by HW.2624*2625* current_mpdu_count2626* current_msdu_count2627* The number of MPDUs and MSDUs in the queue.2628*2629* timeout_count2630* The number of times REO started forwarding frames even though2631* there is a hole in the bitmap. Forwarding reason is timeout.2632*2633* forward_due_to_bar_count2634* The number of times REO started forwarding frames even though2635* there is a hole in the bitmap. Fwd reason is reception of BAR.2636*2637* duplicate_count2638* The number of duplicate frames that have been detected.2639*2640* frames_in_order_count2641* The number of frames that have been received in order (without2642* a hole that prevented them from being forwarded immediately).2643*2644* bar_received_count2645* The number of times a BAR frame is received.2646*2647* mpdu_frames_processed_count2648* msdu_frames_processed_count2649* The total number of MPDU/MSDU frames that have been processed.2650*2651* total_bytes2652* An approximation of the number of bytes received for this queue.2653*2654* late_receive_mpdu_count2655* The number of MPDUs received after the window had already moved2656* on. The 'late' sequence window is defined as2657* (Window SSN - 256) - (Window SSN - 1).2658*2659* window_jump_2k2660* The number of times the window moved more than 2K2661*2662* hole_count2663* The number of times a hole was created in the receive bitmap.2664*2665* looping_count2666* A count value that indicates the number of times the producer of2667* entries into this Ring has looped around the ring.2668*/26692670#define HAL_REO_STATUS_LOOP_CNT GENMASK(31, 28)26712672#define HAL_REO_FLUSH_QUEUE_INFO0_ERR_DETECTED BIT(0)2673#define HAL_REO_FLUSH_QUEUE_INFO0_RSVD GENMASK(31, 1)2674#define HAL_REO_FLUSH_QUEUE_INFO1_RSVD GENMASK(27, 0)26752676struct hal_reo_flush_queue_status {2677struct hal_reo_status_hdr hdr;2678__le32 info0;2679__le32 rsvd0[21];2680__le32 info1;2681} __packed;26822683/* hal_reo_flush_queue_status2684* Producer: REO2685* Consumer: SW2686*2687* status_hdr2688* Details that can link this status with the original command. It2689* also contains info on how long REO took to execute this command.2690*2691* error_detected2692* Status of blocking resource2693*2694* 0 - No error has been detected while executing this command2695* 1 - Error detected. The resource to be used for blocking was2696* already in use.2697*2698* looping_count2699* A count value that indicates the number of times the producer of2700* entries into this Ring has looped around the ring.2701*/27022703#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_IS_ERR BIT(0)2704#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_BLOCK_ERR_CODE GENMASK(2, 1)2705#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_STATUS_HIT BIT(8)2706#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_DESC_TYPE GENMASK(11, 9)2707#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_CLIENT_ID GENMASK(15, 12)2708#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_ERR GENMASK(17, 16)2709#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_COUNT GENMASK(25, 18)27102711struct hal_reo_flush_cache_status {2712struct hal_reo_status_hdr hdr;2713__le32 info0;2714__le32 rsvd0[21];2715__le32 info1;2716} __packed;27172718/* hal_reo_flush_cache_status2719* Producer: REO2720* Consumer: SW2721*2722* status_hdr2723* Details that can link this status with the original command. It2724* also contains info on how long REO took to execute this command.2725*2726* error_detected2727* Status for blocking resource handling2728*2729* 0 - No error has been detected while executing this command2730* 1 - An error in the blocking resource management was detected2731*2732* block_error_details2733* only valid when error_detected is set2734*2735* 0 - No blocking related errors found2736* 1 - Blocking resource is already in use2737* 2 - Resource requested to be unblocked, was not blocked2738*2739* cache_controller_flush_status_hit2740* The status that the cache controller returned on executing the2741* flush command.2742*2743* 0 - miss; 1 - hit2744*2745* cache_controller_flush_status_desc_type2746* Flush descriptor type2747*2748* cache_controller_flush_status_client_id2749* Module who made the flush request2750*2751* In REO, this is always 02752*2753* cache_controller_flush_status_error2754* Error condition2755*2756* 0 - No error found2757* 1 - HW interface is still busy2758* 2 - Line currently locked. Used for one line flush command2759* 3 - At least one line is still locked.2760* Used for cache flush command.2761*2762* cache_controller_flush_count2763* The number of lines that were actually flushed out2764*2765* looping_count2766* A count value that indicates the number of times the producer of2767* entries into this Ring has looped around the ring.2768*/27692770#define HAL_REO_UNBLOCK_CACHE_STATUS_INFO0_IS_ERR BIT(0)2771#define HAL_REO_UNBLOCK_CACHE_STATUS_INFO0_TYPE BIT(1)27722773struct hal_reo_unblock_cache_status {2774struct hal_reo_status_hdr hdr;2775__le32 info0;2776__le32 rsvd0[21];2777__le32 info1;2778} __packed;27792780/* hal_reo_unblock_cache_status2781* Producer: REO2782* Consumer: SW2783*2784* status_hdr2785* Details that can link this status with the original command. It2786* also contains info on how long REO took to execute this command.2787*2788* error_detected2789* 0 - No error has been detected while executing this command2790* 1 - The blocking resource was not in use, and therefore it could2791* not be unblocked.2792*2793* unblock_type2794* Reference to the type of unblock command2795* 0 - Unblock a blocking resource2796* 1 - The entire cache usage is unblock2797*2798* looping_count2799* A count value that indicates the number of times the producer of2800* entries into this Ring has looped around the ring.2801*/28022803#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO0_IS_ERR BIT(0)2804#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO0_LIST_EMPTY BIT(1)28052806#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO1_REL_DESC_COUNT GENMASK(15, 0)2807#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO1_FWD_BUF_COUNT GENMASK(31, 16)28082809struct hal_reo_flush_timeout_list_status {2810struct hal_reo_status_hdr hdr;2811__le32 info0;2812__le32 info1;2813__le32 rsvd0[20];2814__le32 info2;2815} __packed;28162817/* hal_reo_flush_timeout_list_status2818* Producer: REO2819* Consumer: SW2820*2821* status_hdr2822* Details that can link this status with the original command. It2823* also contains info on how long REO took to execute this command.2824*2825* error_detected2826* 0 - No error has been detected while executing this command2827* 1 - Command not properly executed and returned with error2828*2829* timeout_list_empty2830* When set, REO has depleted the timeout list and all entries are2831* gone.2832*2833* release_desc_count2834* Producer: SW; Consumer: REO2835* The number of link descriptor released2836*2837* forward_buf_count2838* Producer: SW; Consumer: REO2839* The number of buffers forwarded to the REO destination rings2840*2841* looping_count2842* A count value that indicates the number of times the producer of2843* entries into this Ring has looped around the ring.2844*/28452846#define HAL_REO_DESC_THRESH_STATUS_INFO0_THRESH_INDEX GENMASK(1, 0)2847#define HAL_REO_DESC_THRESH_STATUS_INFO1_LINK_DESC_COUNTER0 GENMASK(23, 0)2848#define HAL_REO_DESC_THRESH_STATUS_INFO2_LINK_DESC_COUNTER1 GENMASK(23, 0)2849#define HAL_REO_DESC_THRESH_STATUS_INFO3_LINK_DESC_COUNTER2 GENMASK(23, 0)2850#define HAL_REO_DESC_THRESH_STATUS_INFO4_LINK_DESC_COUNTER_SUM GENMASK(25, 0)28512852struct hal_reo_desc_thresh_reached_status {2853struct hal_reo_status_hdr hdr;2854__le32 info0;2855__le32 info1;2856__le32 info2;2857__le32 info3;2858__le32 info4;2859__le32 rsvd0[17];2860__le32 info5;2861} __packed;28622863/* hal_reo_desc_thresh_reached_status2864* Producer: REO2865* Consumer: SW2866*2867* status_hdr2868* Details that can link this status with the original command. It2869* also contains info on how long REO took to execute this command.2870*2871* threshold_index2872* The index of the threshold register whose value got reached2873*2874* link_descriptor_counter02875* link_descriptor_counter12876* link_descriptor_counter22877* link_descriptor_counter_sum2878* Value of the respective counters at generation of this message2879*2880* looping_count2881* A count value that indicates the number of times the producer of2882* entries into this Ring has looped around the ring.2883*/28842885#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_DATA_LENGTH GENMASK(13, 0)2886#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_L4_CSUM_STATUS BIT(14)2887#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_L3_CSUM_STATUS BIT(15)2888#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_PID GENMASK(27, 24)2889#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_QDISC BIT(28)2890#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_MULTICAST BIT(29)2891#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_MORE BIT(30)2892#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_VALID_TOGGLE BIT(31)28932894struct hal_tcl_entrance_from_ppe_ring {2895__le32 buffer_addr;2896__le32 info0;2897} __packed;28982899struct hal_mon_buf_ring {2900__le32 paddr_lo;2901__le32 paddr_hi;2902__le64 cookie;2903};29042905/* hal_mon_buf_ring2906* Producer : SW2907* Consumer : Monitor2908*2909* paddr_lo2910* Lower 32-bit physical address of the buffer pointer from the source ring.2911* paddr_hi2912* bit range 7-0 : upper 8 bit of the physical address.2913* bit range 31-8 : reserved.2914* cookie2915* Consumer: RxMon/TxMon 64 bit cookie of the buffers.2916*/29172918#define HAL_MON_DEST_COOKIE_BUF_ID GENMASK(17, 0)29192920#define HAL_MON_DEST_INFO0_END_OFFSET GENMASK(15, 0)2921#define HAL_MON_DEST_INFO0_FLUSH_DETECTED BIT(16)2922#define HAL_MON_DEST_INFO0_END_OF_PPDU BIT(17)2923#define HAL_MON_DEST_INFO0_INITIATOR BIT(18)2924#define HAL_MON_DEST_INFO0_EMPTY_DESC BIT(19)2925#define HAL_MON_DEST_INFO0_RING_ID GENMASK(27, 20)2926#define HAL_MON_DEST_INFO0_LOOPING_COUNT GENMASK(31, 28)29272928struct hal_mon_dest_desc {2929__le32 cookie;2930__le32 reserved;2931__le32 ppdu_id;2932__le32 info0;2933};29342935/* hal_mon_dest_ring2936* Producer : TxMon/RxMon2937* Consumer : SW2938* cookie2939* bit 0 -17 buf_id to track the skb's vaddr.2940* ppdu_id2941* Phy ppdu_id2942* end_offset2943* The offset into status buffer where DMA ended, ie., offset to the last2944* TLV + last TLV size.2945* flush_detected2946* Indicates whether 'tx_flush' or 'rx_flush' occurred.2947* end_of_ppdu2948* Indicates end of ppdu.2949* pmac_id2950* Indicates PMAC that received from frame.2951* empty_descriptor2952* This descriptor is written on flush or end of ppdu or end of status2953* buffer.2954* ring_id2955* updated by SRNG.2956* looping_count2957* updated by SRNG.2958*/29592960#endif /* ATH12K_HAL_DESC_H */296129622963