#include "core.h"
#ifndef ATH12K_HAL_DESC_H
#define ATH12K_HAL_DESC_H
#define BUFFER_ADDR_INFO0_ADDR GENMASK(31, 0)
#define BUFFER_ADDR_INFO1_ADDR GENMASK(7, 0)
#define BUFFER_ADDR_INFO1_RET_BUF_MGR GENMASK(11, 8)
#define BUFFER_ADDR_INFO1_SW_COOKIE GENMASK(31, 12)
struct ath12k_buffer_addr {
__le32 info0;
__le32 info1;
} __packed;
enum hal_tlv_tag {
HAL_MACTX_CBF_START = 0 ,
HAL_PHYRX_DATA = 1 ,
HAL_PHYRX_CBF_DATA_RESP = 2 ,
HAL_PHYRX_ABORT_REQUEST = 3 ,
HAL_PHYRX_USER_ABORT_NOTIFICATION = 4 ,
HAL_MACTX_DATA_RESP = 5 ,
HAL_MACTX_CBF_DATA = 6 ,
HAL_MACTX_CBF_DONE = 7 ,
HAL_PHYRX_LMR_DATA_RESP = 8 ,
HAL_RXPCU_TO_UCODE_START = 9 ,
HAL_RXPCU_TO_UCODE_DELIMITER_FOR_FULL_MPDU = 10 ,
HAL_RXPCU_TO_UCODE_FULL_MPDU_DATA = 11 ,
HAL_RXPCU_TO_UCODE_FCS_STATUS = 12 ,
HAL_RXPCU_TO_UCODE_MPDU_DELIMITER = 13 ,
HAL_RXPCU_TO_UCODE_DELIMITER_FOR_MPDU_HEADER = 14 ,
HAL_RXPCU_TO_UCODE_MPDU_HEADER_DATA = 15 ,
HAL_RXPCU_TO_UCODE_END = 16 ,
HAL_MACRX_CBF_READ_REQUEST = 32 ,
HAL_MACRX_CBF_DATA_REQUEST = 33 ,
HAL_MACRXXPECT_NDP_RECEPTION = 34 ,
HAL_MACRX_FREEZE_CAPTURE_CHANNEL = 35 ,
HAL_MACRX_NDP_TIMEOUT = 36 ,
HAL_MACRX_ABORT_ACK = 37 ,
HAL_MACRX_REQ_IMPLICIT_FB = 38 ,
HAL_MACRX_CHAIN_MASK = 39 ,
HAL_MACRX_NAP_USER = 40 ,
HAL_MACRX_ABORT_REQUEST = 41 ,
HAL_PHYTX_OTHER_TRANSMIT_INFO16 = 42 ,
HAL_PHYTX_ABORT_ACK = 43 ,
HAL_PHYTX_ABORT_REQUEST = 44 ,
HAL_PHYTX_PKT_END = 45 ,
HAL_PHYTX_PPDU_HEADER_INFO_REQUEST = 46 ,
HAL_PHYTX_REQUEST_CTRL_INFO = 47 ,
HAL_PHYTX_DATA_REQUEST = 48 ,
HAL_PHYTX_BF_CV_LOADING_DONE = 49 ,
HAL_PHYTX_NAP_ACK = 50 ,
HAL_PHYTX_NAP_DONE = 51 ,
HAL_PHYTX_OFF_ACK = 52 ,
HAL_PHYTX_ON_ACK = 53 ,
HAL_PHYTX_SYNTH_OFF_ACK = 54 ,
HAL_PHYTX_DEBUG16 = 55 ,
HAL_MACTX_ABORT_REQUEST = 56 ,
HAL_MACTX_ABORT_ACK = 57 ,
HAL_MACTX_PKT_END = 58 ,
HAL_MACTX_PRE_PHY_DESC = 59 ,
HAL_MACTX_BF_PARAMS_COMMON = 60 ,
HAL_MACTX_BF_PARAMS_PER_USER = 61 ,
HAL_MACTX_PREFETCH_CV = 62 ,
HAL_MACTX_USER_DESC_COMMON = 63 ,
HAL_MACTX_USER_DESC_PER_USER = 64 ,
HAL_XAMPLE_USER_TLV_16 = 65 ,
HAL_XAMPLE_TLV_16 = 66 ,
HAL_MACTX_PHY_OFF = 67 ,
HAL_MACTX_PHY_ON = 68 ,
HAL_MACTX_SYNTH_OFF = 69 ,
HAL_MACTXXPECT_CBF_COMMON = 70 ,
HAL_MACTXXPECT_CBF_PER_USER = 71 ,
HAL_MACTX_PHY_DESC = 72 ,
HAL_MACTX_L_SIG_A = 73 ,
HAL_MACTX_L_SIG_B = 74 ,
HAL_MACTX_HT_SIG = 75 ,
HAL_MACTX_VHT_SIG_A = 76 ,
HAL_MACTX_VHT_SIG_B_SU20 = 77 ,
HAL_MACTX_VHT_SIG_B_SU40 = 78 ,
HAL_MACTX_VHT_SIG_B_SU80 = 79 ,
HAL_MACTX_VHT_SIG_B_SU160 = 80 ,
HAL_MACTX_VHT_SIG_B_MU20 = 81 ,
HAL_MACTX_VHT_SIG_B_MU40 = 82 ,
HAL_MACTX_VHT_SIG_B_MU80 = 83 ,
HAL_MACTX_VHT_SIG_B_MU160 = 84 ,
HAL_MACTX_SERVICE = 85 ,
HAL_MACTX_HE_SIG_A_SU = 86 ,
HAL_MACTX_HE_SIG_A_MU_DL = 87 ,
HAL_MACTX_HE_SIG_A_MU_UL = 88 ,
HAL_MACTX_HE_SIG_B1_MU = 89 ,
HAL_MACTX_HE_SIG_B2_MU = 90 ,
HAL_MACTX_HE_SIG_B2_OFDMA = 91 ,
HAL_MACTX_DELETE_CV = 92 ,
HAL_MACTX_MU_UPLINK_COMMON = 93 ,
HAL_MACTX_MU_UPLINK_USER_SETUP = 94 ,
HAL_MACTX_OTHER_TRANSMIT_INFO = 95 ,
HAL_MACTX_PHY_NAP = 96 ,
HAL_MACTX_DEBUG = 97 ,
HAL_PHYRX_ABORT_ACK = 98 ,
HAL_PHYRX_GENERATED_CBF_DETAILS = 99 ,
HAL_PHYRX_RSSI_LEGACY = 100 ,
HAL_PHYRX_RSSI_HT = 101 ,
HAL_PHYRX_USER_INFO = 102 ,
HAL_PHYRX_PKT_END = 103 ,
HAL_PHYRX_DEBUG = 104 ,
HAL_PHYRX_CBF_TRANSFER_DONE = 105 ,
HAL_PHYRX_CBF_TRANSFER_ABORT = 106 ,
HAL_PHYRX_L_SIG_A = 107 ,
HAL_PHYRX_L_SIG_B = 108 ,
HAL_PHYRX_HT_SIG = 109 ,
HAL_PHYRX_VHT_SIG_A = 110 ,
HAL_PHYRX_VHT_SIG_B_SU20 = 111 ,
HAL_PHYRX_VHT_SIG_B_SU40 = 112 ,
HAL_PHYRX_VHT_SIG_B_SU80 = 113 ,
HAL_PHYRX_VHT_SIG_B_SU160 = 114 ,
HAL_PHYRX_VHT_SIG_B_MU20 = 115 ,
HAL_PHYRX_VHT_SIG_B_MU40 = 116 ,
HAL_PHYRX_VHT_SIG_B_MU80 = 117 ,
HAL_PHYRX_VHT_SIG_B_MU160 = 118 ,
HAL_PHYRX_HE_SIG_A_SU = 119 ,
HAL_PHYRX_HE_SIG_A_MU_DL = 120 ,
HAL_PHYRX_HE_SIG_A_MU_UL = 121 ,
HAL_PHYRX_HE_SIG_B1_MU = 122 ,
HAL_PHYRX_HE_SIG_B2_MU = 123 ,
HAL_PHYRX_HE_SIG_B2_OFDMA = 124 ,
HAL_PHYRX_OTHER_RECEIVE_INFO = 125 ,
HAL_PHYRX_COMMON_USER_INFO = 126 ,
HAL_PHYRX_DATA_DONE = 127 ,
HAL_COEX_TX_REQ = 128 ,
HAL_DUMMY = 129 ,
HALXAMPLE_TLV_32_NAME = 130 ,
HAL_MPDU_LIMIT = 131 ,
HAL_NA_LENGTH_END = 132 ,
HAL_OLE_BUF_STATUS = 133 ,
HAL_PCU_PPDU_SETUP_DONE = 134 ,
HAL_PCU_PPDU_SETUP_END = 135 ,
HAL_PCU_PPDU_SETUP_INIT = 136 ,
HAL_PCU_PPDU_SETUP_START = 137 ,
HAL_PDG_FES_SETUP = 138 ,
HAL_PDG_RESPONSE = 139 ,
HAL_PDG_TX_REQ = 140 ,
HAL_SCH_WAIT_INSTR = 141 ,
HAL_TQM_FLOWMPTY_STATUS = 143 ,
HAL_TQM_FLOW_NOTMPTY_STATUS = 144 ,
HAL_TQM_GEN_MPDU_LENGTH_LIST = 145 ,
HAL_TQM_GEN_MPDU_LENGTH_LIST_STATUS = 146 ,
HAL_TQM_GEN_MPDUS = 147 ,
HAL_TQM_GEN_MPDUS_STATUS = 148 ,
HAL_TQM_REMOVE_MPDU = 149 ,
HAL_TQM_REMOVE_MPDU_STATUS = 150 ,
HAL_TQM_REMOVE_MSDU = 151 ,
HAL_TQM_REMOVE_MSDU_STATUS = 152 ,
HAL_TQM_UPDATE_TX_MPDU_COUNT = 153 ,
HAL_TQM_WRITE_CMD = 154 ,
HAL_OFDMA_TRIGGER_DETAILS = 155 ,
HAL_TX_DATA = 156 ,
HAL_TX_FES_SETUP = 157 ,
HAL_RX_PACKET = 158 ,
HALXPECTED_RESPONSE = 159 ,
HAL_TX_MPDU_END = 160 ,
HAL_TX_MPDU_START = 161 ,
HAL_TX_MSDU_END = 162 ,
HAL_TX_MSDU_START = 163 ,
HAL_TX_SW_MODE_SETUP = 164 ,
HAL_TXPCU_BUFFER_STATUS = 165 ,
HAL_TXPCU_USER_BUFFER_STATUS = 166 ,
HAL_DATA_TO_TIME_CONFIG = 167 ,
HALXAMPLE_USER_TLV_32 = 168 ,
HAL_MPDU_INFO = 169 ,
HAL_PDG_USER_SETUP = 170 ,
HAL_TX_11AH_SETUP = 171 ,
HAL_REO_UPDATE_RX_REO_QUEUE_STATUS = 172 ,
HAL_TX_PEER_ENTRY = 173 ,
HAL_TX_RAW_OR_NATIVE_FRAME_SETUP = 174 ,
HALXAMPLE_USER_TLV_44 = 175 ,
HAL_TX_FLUSH = 176 ,
HAL_TX_FLUSH_REQ = 177 ,
HAL_TQM_WRITE_CMD_STATUS = 178 ,
HAL_TQM_GET_MPDU_QUEUE_STATS = 179 ,
HAL_TQM_GET_MSDU_FLOW_STATS = 180 ,
HALXAMPLE_USER_CTLV_44 = 181 ,
HAL_TX_FES_STATUS_START = 182 ,
HAL_TX_FES_STATUS_USER_PPDU = 183 ,
HAL_TX_FES_STATUS_USER_RESPONSE = 184 ,
HAL_TX_FES_STATUS_END = 185 ,
HAL_RX_TRIG_INFO = 186 ,
HAL_RXPCU_TX_SETUP_CLEAR = 187 ,
HAL_RX_FRAME_BITMAP_REQ = 188 ,
HAL_RX_FRAME_BITMAP_ACK = 189 ,
HAL_COEX_RX_STATUS = 190 ,
HAL_RX_START_PARAM = 191 ,
HAL_RX_PPDU_START = 192 ,
HAL_RX_PPDU_END = 193 ,
HAL_RX_MPDU_START = 194 ,
HAL_RX_MPDU_END = 195 ,
HAL_RX_MSDU_START = 196 ,
HAL_RX_MSDU_END = 197 ,
HAL_RX_ATTENTION = 198 ,
HAL_RECEIVED_RESPONSE_INFO = 199 ,
HAL_RX_PHY_SLEEP = 200 ,
HAL_RX_HEADER = 201 ,
HAL_RX_PEER_ENTRY = 202 ,
HAL_RX_FLUSH = 203 ,
HAL_RX_RESPONSE_REQUIRED_INFO = 204 ,
HAL_RX_FRAMELESS_BAR_DETAILS = 205 ,
HAL_TQM_GET_MPDU_QUEUE_STATS_STATUS = 206 ,
HAL_TQM_GET_MSDU_FLOW_STATS_STATUS = 207 ,
HAL_TX_CBF_INFO = 208 ,
HAL_PCU_PPDU_SETUP_USER = 209 ,
HAL_RX_MPDU_PCU_START = 210 ,
HAL_RX_PM_INFO = 211 ,
HAL_RX_USER_PPDU_END = 212 ,
HAL_RX_PRE_PPDU_START = 213 ,
HAL_RX_PREAMBLE = 214 ,
HAL_TX_FES_SETUP_COMPLETE = 215 ,
HAL_TX_LAST_MPDU_FETCHED = 216 ,
HAL_TXDMA_STOP_REQUEST = 217 ,
HAL_RXPCU_SETUP = 218 ,
HAL_RXPCU_USER_SETUP = 219 ,
HAL_TX_FES_STATUS_ACK_OR_BA = 220 ,
HAL_TQM_ACKED_MPDU = 221 ,
HAL_COEX_TX_RESP = 222 ,
HAL_COEX_TX_STATUS = 223 ,
HAL_MACTX_COEX_PHY_CTRL = 224 ,
HAL_COEX_STATUS_BROADCAST = 225 ,
HAL_RESPONSE_START_STATUS = 226 ,
HAL_RESPONSEND_STATUS = 227 ,
HAL_CRYPTO_STATUS = 228 ,
HAL_RECEIVED_TRIGGER_INFO = 229 ,
HAL_COEX_TX_STOP_CTRL = 230 ,
HAL_RX_PPDU_ACK_REPORT = 231 ,
HAL_RX_PPDU_NO_ACK_REPORT = 232 ,
HAL_SCH_COEX_STATUS = 233 ,
HAL_SCHEDULER_COMMAND_STATUS = 234 ,
HAL_SCHEDULER_RX_PPDU_NO_RESPONSE_STATUS = 235 ,
HAL_TX_FES_STATUS_PROT = 236 ,
HAL_TX_FES_STATUS_START_PPDU = 237 ,
HAL_TX_FES_STATUS_START_PROT = 238 ,
HAL_TXPCU_PHYTX_DEBUG32 = 239 ,
HAL_TXPCU_PHYTX_OTHER_TRANSMIT_INFO32 = 240 ,
HAL_TX_MPDU_COUNT_TRANSFERND = 241 ,
HAL_WHO_ANCHOR_OFFSET = 242 ,
HAL_WHO_ANCHOR_VALUE = 243 ,
HAL_WHO_CCE_INFO = 244 ,
HAL_WHO_COMMIT = 245 ,
HAL_WHO_COMMIT_DONE = 246 ,
HAL_WHO_FLUSH = 247 ,
HAL_WHO_L2_LLC = 248 ,
HAL_WHO_L2_PAYLOAD = 249 ,
HAL_WHO_L3_CHECKSUM = 250 ,
HAL_WHO_L3_INFO = 251 ,
HAL_WHO_L4_CHECKSUM = 252 ,
HAL_WHO_L4_INFO = 253 ,
HAL_WHO_MSDU = 254 ,
HAL_WHO_MSDU_MISC = 255 ,
HAL_WHO_PACKET_DATA = 256 ,
HAL_WHO_PACKET_HDR = 257 ,
HAL_WHO_PPDU_END = 258 ,
HAL_WHO_PPDU_START = 259 ,
HAL_WHO_TSO = 260 ,
HAL_WHO_WMAC_HEADER_PV0 = 261 ,
HAL_WHO_WMAC_HEADER_PV1 = 262 ,
HAL_WHO_WMAC_IV = 263 ,
HAL_MPDU_INFO_END = 264 ,
HAL_MPDU_INFO_BITMAP = 265 ,
HAL_TX_QUEUE_EXTENSION = 266 ,
HAL_SCHEDULER_SELFGEN_RESPONSE_STATUS = 267 ,
HAL_TQM_UPDATE_TX_MPDU_COUNT_STATUS = 268 ,
HAL_TQM_ACKED_MPDU_STATUS = 269 ,
HAL_TQM_ADD_MSDU_STATUS = 270 ,
HAL_TQM_LIST_GEN_DONE = 271 ,
HAL_WHO_TERMINATE = 272 ,
HAL_TX_LAST_MPDU_END = 273 ,
HAL_TX_CV_DATA = 274 ,
HAL_PPDU_TX_END = 275 ,
HAL_PROT_TX_END = 276 ,
HAL_MPDU_INFO_GLOBAL_END = 277 ,
HAL_TQM_SCH_INSTR_GLOBAL_END = 278 ,
HAL_RX_PPDU_END_USER_STATS = 279 ,
HAL_RX_PPDU_END_USER_STATS_EXT = 280 ,
HAL_REO_GET_QUEUE_STATS = 281 ,
HAL_REO_FLUSH_QUEUE = 282 ,
HAL_REO_FLUSH_CACHE = 283 ,
HAL_REO_UNBLOCK_CACHE = 284 ,
HAL_REO_GET_QUEUE_STATS_STATUS = 285 ,
HAL_REO_FLUSH_QUEUE_STATUS = 286 ,
HAL_REO_FLUSH_CACHE_STATUS = 287 ,
HAL_REO_UNBLOCK_CACHE_STATUS = 288 ,
HAL_TQM_FLUSH_CACHE = 289 ,
HAL_TQM_UNBLOCK_CACHE = 290 ,
HAL_TQM_FLUSH_CACHE_STATUS = 291 ,
HAL_TQM_UNBLOCK_CACHE_STATUS = 292 ,
HAL_RX_PPDU_END_STATUS_DONE = 293 ,
HAL_RX_STATUS_BUFFER_DONE = 294 ,
HAL_TX_DATA_SYNC = 297 ,
HAL_PHYRX_CBF_READ_REQUEST_ACK = 298 ,
HAL_TQM_GET_MPDU_HEAD_INFO = 299 ,
HAL_TQM_SYNC_CMD = 300 ,
HAL_TQM_GET_MPDU_HEAD_INFO_STATUS = 301 ,
HAL_TQM_SYNC_CMD_STATUS = 302 ,
HAL_TQM_THRESHOLD_DROP_NOTIFICATION_STATUS = 303 ,
HAL_TQM_DESCRIPTOR_THRESHOLD_REACHED_STATUS = 304 ,
HAL_REO_FLUSH_TIMEOUT_LIST = 305 ,
HAL_REO_FLUSH_TIMEOUT_LIST_STATUS = 306 ,
HAL_REO_DESCRIPTOR_THRESHOLD_REACHED_STATUS = 307 ,
HAL_SCHEDULER_RX_SIFS_RESPONSE_TRIGGER_STATUS = 308 ,
HALXAMPLE_USER_TLV_32_NAME = 309 ,
HAL_RX_PPDU_START_USER_INFO = 310 ,
HAL_RX_RING_MASK = 311 ,
HAL_COEX_MAC_NAP = 312 ,
HAL_RXPCU_PPDU_END_INFO = 313 ,
HAL_WHO_MESH_CONTROL = 314 ,
HAL_PDG_SW_MODE_BW_START = 315 ,
HAL_PDG_SW_MODE_BW_END = 316 ,
HAL_PDG_WAIT_FOR_MAC_REQUEST = 317 ,
HAL_PDG_WAIT_FOR_PHY_REQUEST = 318 ,
HAL_SCHEDULER_END = 319 ,
HAL_RX_PPDU_START_DROPPED = 320 ,
HAL_RX_PPDU_END_DROPPED = 321 ,
HAL_RX_PPDU_END_STATUS_DONE_DROPPED = 322 ,
HAL_RX_MPDU_START_DROPPED = 323 ,
HAL_RX_MSDU_START_DROPPED = 324 ,
HAL_RX_MSDU_END_DROPPED = 325 ,
HAL_RX_MPDU_END_DROPPED = 326 ,
HAL_RX_ATTENTION_DROPPED = 327 ,
HAL_TXPCU_USER_SETUP = 328 ,
HAL_RXPCU_USER_SETUP_EXT = 329 ,
HAL_CMD_PART_0_END = 330 ,
HAL_MACTX_SYNTH_ON = 331 ,
HAL_SCH_CRITICAL_TLV_REFERENCE = 332 ,
HAL_TQM_MPDU_GLOBAL_START = 333 ,
HALXAMPLE_TLV_32 = 334 ,
HAL_TQM_UPDATE_TX_MSDU_FLOW = 335 ,
HAL_TQM_UPDATE_TX_MPDU_QUEUE_HEAD = 336 ,
HAL_TQM_UPDATE_TX_MSDU_FLOW_STATUS = 337 ,
HAL_TQM_UPDATE_TX_MPDU_QUEUE_HEAD_STATUS = 338 ,
HAL_REO_UPDATE_RX_REO_QUEUE = 339 ,
HAL_TQM_MPDU_QUEUEMPTY_STATUS = 340 ,
HAL_TQM_2_SCH_MPDU_AVAILABLE = 341 ,
HAL_PDG_TRIG_RESPONSE = 342 ,
HAL_TRIGGER_RESPONSE_TX_DONE = 343 ,
HAL_ABORT_FROM_PHYRX_DETAILS = 344 ,
HAL_SCH_TQM_CMD_WRAPPER = 345 ,
HAL_MPDUS_AVAILABLE = 346 ,
HAL_RECEIVED_RESPONSE_INFO_PART2 = 347 ,
HAL_PHYRX_TX_START_TIMING = 348 ,
HAL_TXPCU_PREAMBLE_DONE = 349 ,
HAL_NDP_PREAMBLE_DONE = 350 ,
HAL_SCH_TQM_CMD_WRAPPER_RBO_DROP = 351 ,
HAL_SCH_TQM_CMD_WRAPPER_CONT_DROP = 352 ,
HAL_MACTX_CLEAR_PREV_TX_INFO = 353 ,
HAL_TX_PUNCTURE_SETUP = 354 ,
HAL_R2R_STATUS_END = 355 ,
HAL_MACTX_PREFETCH_CV_COMMON = 356 ,
HAL_END_OF_FLUSH_MARKER = 357 ,
HAL_MACTX_MU_UPLINK_COMMON_PUNC = 358 ,
HAL_MACTX_MU_UPLINK_USER_SETUP_PUNC = 359 ,
HAL_RECEIVED_RESPONSE_USER_7_0 = 360 ,
HAL_RECEIVED_RESPONSE_USER_15_8 = 361 ,
HAL_RECEIVED_RESPONSE_USER_23_16 = 362 ,
HAL_RECEIVED_RESPONSE_USER_31_24 = 363 ,
HAL_RECEIVED_RESPONSE_USER_36_32 = 364 ,
HAL_TX_LOOPBACK_SETUP = 365 ,
HAL_PHYRX_OTHER_RECEIVE_INFO_RU_DETAILS = 366 ,
HAL_SCH_WAIT_INSTR_TX_PATH = 367 ,
HAL_MACTX_OTHER_TRANSMIT_INFO_TX2TX = 368 ,
HAL_MACTX_OTHER_TRANSMIT_INFOMUPHY_SETUP = 369 ,
HAL_PHYRX_OTHER_RECEIVE_INFOVM_DETAILS = 370 ,
HAL_TX_WUR_DATA = 371 ,
HAL_RX_PPDU_END_START = 372 ,
HAL_RX_PPDU_END_MIDDLE = 373 ,
HAL_RX_PPDU_END_LAST = 374 ,
HAL_MACTX_BACKOFF_BASED_TRANSMISSION = 375 ,
HAL_MACTX_OTHER_TRANSMIT_INFO_DL_OFDMA_TX = 376 ,
HAL_SRP_INFO = 377 ,
HAL_OBSS_SR_INFO = 378 ,
HAL_SCHEDULER_SW_MSG_STATUS = 379 ,
HAL_HWSCH_RXPCU_MAC_INFO_ANNOUNCEMENT = 380 ,
HAL_RXPCU_SETUP_COMPLETE = 381 ,
HAL_SNOOP_PPDU_START = 382 ,
HAL_SNOOP_MPDU_USR_DBG_INFO = 383 ,
HAL_SNOOP_MSDU_USR_DBG_INFO = 384 ,
HAL_SNOOP_MSDU_USR_DATA = 385 ,
HAL_SNOOP_MPDU_USR_STAT_INFO = 386 ,
HAL_SNOOP_PPDU_END = 387 ,
HAL_SNOOP_SPARE = 388 ,
HAL_PHYRX_OTHER_RECEIVE_INFO_MU_RSSI_COMMON = 390 ,
HAL_PHYRX_OTHER_RECEIVE_INFO_MU_RSSI_USER = 391 ,
HAL_MACTX_OTHER_TRANSMIT_INFO_SCH_DETAILS = 392 ,
HAL_PHYRX_OTHER_RECEIVE_INFO_108PVM_DETAILS = 393 ,
HAL_SCH_TLV_WRAPPER = 394 ,
HAL_SCHEDULER_STATUS_WRAPPER = 395 ,
HAL_MPDU_INFO_6X = 396 ,
HAL_MACTX_11AZ_USER_DESC_PER_USER = 397 ,
HAL_MACTX_U_SIGHT_SU_MU = 398 ,
HAL_MACTX_U_SIGHT_TB = 399 ,
HAL_PHYRX_U_SIGHT_SU_MU = 403 ,
HAL_PHYRX_U_SIGHT_TB = 404 ,
HAL_MACRX_LMR_READ_REQUEST = 408 ,
HAL_MACRX_LMR_DATA_REQUEST = 409 ,
HAL_PHYRX_LMR_TRANSFER_DONE = 410 ,
HAL_PHYRX_LMR_TRANSFER_ABORT = 411 ,
HAL_PHYRX_LMR_READ_REQUEST_ACK = 412 ,
HAL_MACRX_SECURE_LTF_SEQ_PTR = 413 ,
HAL_PHYRX_USER_INFO_MU_UL = 414 ,
HAL_MPDU_QUEUE_OVERVIEW = 415 ,
HAL_SCHEDULER_NAV_INFO = 416 ,
HAL_LMR_PEER_ENTRY = 418 ,
HAL_LMR_MPDU_START = 419 ,
HAL_LMR_DATA = 420 ,
HAL_LMR_MPDU_END = 421 ,
HAL_REO_GET_QUEUE_1K_STATS_STATUS = 422 ,
HAL_RX_FRAME_1K_BITMAP_ACK = 423 ,
HAL_TX_FES_STATUS_1K_BA = 424 ,
HAL_TQM_ACKED_1K_MPDU = 425 ,
HAL_MACRX_INBSS_OBSS_IND = 426 ,
HAL_PHYRX_LOCATION = 427 ,
HAL_MLO_TX_NOTIFICATION_SU = 428 ,
HAL_MLO_TX_NOTIFICATION_MU = 429 ,
HAL_MLO_TX_REQ_SU = 430 ,
HAL_MLO_TX_REQ_MU = 431 ,
HAL_MLO_TX_RESP = 432 ,
HAL_MLO_RX_NOTIFICATION = 433 ,
HAL_MLO_BKOFF_TRUNC_REQ = 434 ,
HAL_MLO_TBTT_NOTIFICATION = 435 ,
HAL_MLO_MESSAGE = 436 ,
HAL_MLO_TS_SYNC_MSG = 437 ,
HAL_MLO_FES_SETUP = 438 ,
HAL_MLO_PDG_FES_SETUP_SU = 439 ,
HAL_MLO_PDG_FES_SETUP_MU = 440 ,
HAL_MPDU_INFO_1K_BITMAP = 441 ,
HAL_MON_BUF_ADDR = 442 ,
HAL_TX_FRAG_STATE = 443 ,
HAL_MACTXHT_SIG_USR_OFDMA = 446 ,
HAL_PHYRXHT_SIG_CMN_PUNC = 448 ,
HAL_PHYRXHT_SIG_CMN_OFDMA = 450 ,
HAL_PHYRXHT_SIG_USR_OFDMA = 454 ,
HAL_PHYRX_PKT_END_PART1 = 456 ,
HAL_MACTXXPECT_NDP_RECEPTION = 457 ,
HAL_MACTX_SECURE_LTF_SEQ_PTR = 458 ,
HAL_MLO_PDG_BKOFF_TRUNC_NOTIFY = 460 ,
HAL_PHYRX_11AZ_INTEGRITY_DATA = 461 ,
HAL_PHYTX_LOCATION = 462 ,
HAL_PHYTX_11AZ_INTEGRITY_DATA = 463 ,
HAL_MACTXHT_SIG_USR_SU = 466 ,
HAL_MACTXHT_SIG_USR_MU_MIMO = 467 ,
HAL_PHYRXHT_SIG_USR_SU = 468 ,
HAL_PHYRXHT_SIG_USR_MU_MIMO = 469 ,
HAL_PHYRX_GENERIC_U_SIG = 470 ,
HAL_PHYRX_GENERICHT_SIG = 471 ,
HAL_OVERWRITE_RESP_START = 472 ,
HAL_OVERWRITE_RESP_PREAMBLE_INFO = 473 ,
HAL_OVERWRITE_RESP_FRAME_INFO = 474 ,
HAL_OVERWRITE_RESP_END = 475 ,
HAL_RXPCUARLY_RX_INDICATION = 476 ,
HAL_MON_DROP = 477 ,
HAL_MACRX_MU_UPLINK_COMMON_SNIFF = 478 ,
HAL_MACRX_MU_UPLINK_USER_SETUP_SNIFF = 479 ,
HAL_MACRX_MU_UPLINK_USER_SEL_SNIFF = 480 ,
HAL_MACRX_MU_UPLINK_FCS_STATUS_SNIFF = 481 ,
HAL_MACTX_PREFETCH_CV_DMA = 482 ,
HAL_MACTX_PREFETCH_CV_PER_USER = 483 ,
HAL_PHYRX_OTHER_RECEIVE_INFO_ALL_SIGB_DETAILS = 484 ,
HAL_MACTX_BF_PARAMS_UPDATE_COMMON = 485 ,
HAL_MACTX_BF_PARAMS_UPDATE_PER_USER = 486 ,
HAL_RANGING_USER_DETAILS = 487 ,
HAL_PHYTX_CV_CORR_STATUS = 488 ,
HAL_PHYTX_CV_CORR_COMMON = 489 ,
HAL_PHYTX_CV_CORR_USER = 490 ,
HAL_MACTX_CV_CORR_COMMON = 491 ,
HAL_MACTX_CV_CORR_MAC_INFO_GROUP = 492 ,
HAL_BW_PUNCTUREVAL_WRAPPER = 493 ,
HAL_MACTX_RX_NOTIFICATION_FOR_PHY = 494 ,
HAL_MACTX_TX_NOTIFICATION_FOR_PHY = 495 ,
HAL_MACTX_MU_UPLINK_COMMON_PER_BW = 496 ,
HAL_MACTX_MU_UPLINK_USER_SETUP_PER_BW = 497 ,
HAL_RX_PPDU_END_USER_STATS_EXT2 = 498 ,
HAL_FW2SW_MON = 499 ,
HAL_WSI_DIRECT_MESSAGE = 500 ,
HAL_MACTXMLSR_PRE_SWITCH = 501 ,
HAL_MACTXMLSR_SWITCH = 502 ,
HAL_MACTXMLSR_SWITCH_BACK = 503 ,
HAL_PHYTXMLSR_SWITCH_ACK = 504 ,
HAL_PHYTXMLSR_SWITCH_BACK_ACK = 505 ,
HAL_SPARE_REUSE_TAG_0 = 506 ,
HAL_SPARE_REUSE_TAG_1 = 507 ,
HAL_SPARE_REUSE_TAG_2 = 508 ,
HAL_SPARE_REUSE_TAG_3 = 509 ,
HAL_TCL_DATA_CMD = 510,
HAL_TLV_BASE = 511 ,
};
#define HAL_TLV_HDR_TAG GENMASK(9, 1)
#define HAL_TLV_HDR_LEN GENMASK(25, 10)
#define HAL_TLV_USR_ID GENMASK(31, 26)
#define HAL_TLV_ALIGN 4
struct hal_tlv_hdr {
__le32 tl;
u8 value[];
} __packed;
#define HAL_TLV_64_HDR_TAG GENMASK(9, 1)
#define HAL_TLV_64_HDR_LEN GENMASK(21, 10)
struct hal_tlv_64_hdr {
u64 tl;
u8 value[];
} __packed;
#define RX_MPDU_DESC_INFO0_MSDU_COUNT GENMASK(7, 0)
#define RX_MPDU_DESC_INFO0_FRAG_FLAG BIT(8)
#define RX_MPDU_DESC_INFO0_MPDU_RETRY BIT(9)
#define RX_MPDU_DESC_INFO0_AMPDU_FLAG BIT(10)
#define RX_MPDU_DESC_INFO0_BAR_FRAME BIT(11)
#define RX_MPDU_DESC_INFO0_VALID_PN BIT(12)
#define RX_MPDU_DESC_INFO0_RAW_MPDU BIT(13)
#define RX_MPDU_DESC_INFO0_MORE_FRAG_FLAG BIT(14)
#define RX_MPDU_DESC_INFO0_SRC_INFO GENMASK(26, 15)
#define RX_MPDU_DESC_INFO0_MPDU_QOS_CTRL_VALID BIT(27)
#define RX_MPDU_DESC_INFO0_TID GENMASK(31, 28)
#define RX_MPDU_DESC_META_DATA_PEER_ID GENMASK(15, 0)
struct rx_mpdu_desc {
__le32 info0;
__le32 peer_meta_data;
} __packed;
enum hal_rx_msdu_desc_reo_dest_ind {
HAL_RX_MSDU_DESC_REO_DEST_IND_TCL,
HAL_RX_MSDU_DESC_REO_DEST_IND_SW1,
HAL_RX_MSDU_DESC_REO_DEST_IND_SW2,
HAL_RX_MSDU_DESC_REO_DEST_IND_SW3,
HAL_RX_MSDU_DESC_REO_DEST_IND_SW4,
HAL_RX_MSDU_DESC_REO_DEST_IND_RELEASE,
HAL_RX_MSDU_DESC_REO_DEST_IND_FW,
HAL_RX_MSDU_DESC_REO_DEST_IND_SW5,
HAL_RX_MSDU_DESC_REO_DEST_IND_SW6,
HAL_RX_MSDU_DESC_REO_DEST_IND_SW7,
HAL_RX_MSDU_DESC_REO_DEST_IND_SW8,
};
#define RX_MSDU_DESC_INFO0_FIRST_MSDU_IN_MPDU BIT(0)
#define RX_MSDU_DESC_INFO0_LAST_MSDU_IN_MPDU BIT(1)
#define RX_MSDU_DESC_INFO0_MSDU_CONTINUATION BIT(2)
#define RX_MSDU_DESC_INFO0_MSDU_LENGTH GENMASK(16, 3)
#define RX_MSDU_DESC_INFO0_MSDU_DROP BIT(17)
#define RX_MSDU_DESC_INFO0_VALID_SA BIT(18)
#define RX_MSDU_DESC_INFO0_VALID_DA BIT(19)
#define RX_MSDU_DESC_INFO0_DA_MCBC BIT(20)
#define RX_MSDU_DESC_INFO0_L3_HDR_PAD_MSB BIT(21)
#define RX_MSDU_DESC_INFO0_TCP_UDP_CHKSUM_FAIL BIT(22)
#define RX_MSDU_DESC_INFO0_IP_CHKSUM_FAIL BIT(23)
#define RX_MSDU_DESC_INFO0_FROM_DS BIT(24)
#define RX_MSDU_DESC_INFO0_TO_DS BIT(25)
#define RX_MSDU_DESC_INFO0_INTRA_BSS BIT(26)
#define RX_MSDU_DESC_INFO0_DST_CHIP_ID GENMASK(28, 27)
#define RX_MSDU_DESC_INFO0_DECAP_FORMAT GENMASK(30, 29)
#define HAL_RX_MSDU_PKT_LENGTH_GET(val) \
(u32_get_bits((val), RX_MSDU_DESC_INFO0_MSDU_LENGTH))
struct rx_msdu_desc {
__le32 info0;
} __packed;
#define RX_MSDU_EXT_DESC_INFO0_REO_DEST_IND GENMASK(4, 0)
#define RX_MSDU_EXT_DESC_INFO0_SERVICE_CODE GENMASK(13, 5)
#define RX_MSDU_EXT_DESC_INFO0_PRIORITY_VALID BIT(14)
#define RX_MSDU_EXT_DESC_INFO0_DATA_OFFSET GENMASK(26, 15)
#define RX_MSDU_EXT_DESC_INFO0_SRC_LINK_ID GENMASK(29, 27)
struct rx_msdu_ext_desc {
__le32 info0;
} __packed;
enum hal_reo_dest_ring_buffer_type {
HAL_REO_DEST_RING_BUFFER_TYPE_MSDU,
HAL_REO_DEST_RING_BUFFER_TYPE_LINK_DESC,
};
enum hal_reo_dest_ring_push_reason {
HAL_REO_DEST_RING_PUSH_REASON_ERR_DETECTED,
HAL_REO_DEST_RING_PUSH_REASON_ROUTING_INSTRUCTION,
};
enum hal_reo_dest_ring_error_code {
HAL_REO_DEST_RING_ERROR_CODE_DESC_ADDR_ZERO,
HAL_REO_DEST_RING_ERROR_CODE_DESC_INVALID,
HAL_REO_DEST_RING_ERROR_CODE_AMPDU_IN_NON_BA,
HAL_REO_DEST_RING_ERROR_CODE_NON_BA_DUPLICATE,
HAL_REO_DEST_RING_ERROR_CODE_BA_DUPLICATE,
HAL_REO_DEST_RING_ERROR_CODE_FRAME_2K_JUMP,
HAL_REO_DEST_RING_ERROR_CODE_BAR_2K_JUMP,
HAL_REO_DEST_RING_ERROR_CODE_FRAME_OOR,
HAL_REO_DEST_RING_ERROR_CODE_BAR_OOR,
HAL_REO_DEST_RING_ERROR_CODE_NO_BA_SESSION,
HAL_REO_DEST_RING_ERROR_CODE_FRAME_SN_EQUALS_SSN,
HAL_REO_DEST_RING_ERROR_CODE_PN_CHECK_FAILED,
HAL_REO_DEST_RING_ERROR_CODE_2K_ERR_FLAG_SET,
HAL_REO_DEST_RING_ERROR_CODE_PN_ERR_FLAG_SET,
HAL_REO_DEST_RING_ERROR_CODE_DESC_BLOCKED,
HAL_REO_DEST_RING_ERROR_CODE_MAX,
};
#define HAL_REO_DEST_RING_INFO0_BUFFER_TYPE BIT(0)
#define HAL_REO_DEST_RING_INFO0_PUSH_REASON GENMASK(2, 1)
#define HAL_REO_DEST_RING_INFO0_ERROR_CODE GENMASK(7, 3)
#define HAL_REO_DEST_RING_INFO0_MSDU_DATA_SIZE GENMASK(11, 8)
#define HAL_REO_DEST_RING_INFO0_SW_EXCEPTION BIT(12)
#define HAL_REO_DEST_RING_INFO0_SRC_LINK_ID GENMASK(15, 13)
#define HAL_REO_DEST_RING_INFO0_SIGNATURE GENMASK(19, 16)
#define HAL_REO_DEST_RING_INFO0_RING_ID GENMASK(27, 20)
#define HAL_REO_DEST_RING_INFO0_LOOPING_COUNT GENMASK(31, 28)
struct hal_reo_dest_ring {
struct ath12k_buffer_addr buf_addr_info;
struct rx_mpdu_desc rx_mpdu_info;
struct rx_msdu_desc rx_msdu_info;
__le32 buf_va_lo;
__le32 buf_va_hi;
__le32 info0;
} __packed;
#define HAL_REO_TO_PPE_RING_INFO0_DATA_LENGTH GENMASK(15, 0)
#define HAL_REO_TO_PPE_RING_INFO0_DATA_OFFSET GENMASK(23, 16)
#define HAL_REO_TO_PPE_RING_INFO0_POOL_ID GENMASK(28, 24)
#define HAL_REO_TO_PPE_RING_INFO0_PREHEADER BIT(29)
#define HAL_REO_TO_PPE_RING_INFO0_TSO_EN BIT(30)
#define HAL_REO_TO_PPE_RING_INFO0_MORE BIT(31)
struct hal_reo_to_ppe_ring {
__le32 buffer_addr;
__le32 info0;
} __packed;
enum hal_reo_entr_rxdma_push_reason {
HAL_REO_ENTR_RING_RXDMA_PUSH_REASON_ERR_DETECTED,
HAL_REO_ENTR_RING_RXDMA_PUSH_REASON_ROUTING_INSTRUCTION,
HAL_REO_ENTR_RING_RXDMA_PUSH_REASON_RX_FLUSH,
};
enum hal_reo_entr_rxdma_ecode {
HAL_REO_ENTR_RING_RXDMA_ECODE_OVERFLOW_ERR,
HAL_REO_ENTR_RING_RXDMA_ECODE_MPDU_LEN_ERR,
HAL_REO_ENTR_RING_RXDMA_ECODE_FCS_ERR,
HAL_REO_ENTR_RING_RXDMA_ECODE_DECRYPT_ERR,
HAL_REO_ENTR_RING_RXDMA_ECODE_TKIP_MIC_ERR,
HAL_REO_ENTR_RING_RXDMA_ECODE_UNECRYPTED_ERR,
HAL_REO_ENTR_RING_RXDMA_ECODE_MSDU_LEN_ERR,
HAL_REO_ENTR_RING_RXDMA_ECODE_MSDU_LIMIT_ERR,
HAL_REO_ENTR_RING_RXDMA_ECODE_WIFI_PARSE_ERR,
HAL_REO_ENTR_RING_RXDMA_ECODE_AMSDU_PARSE_ERR,
HAL_REO_ENTR_RING_RXDMA_ECODE_SA_TIMEOUT_ERR,
HAL_REO_ENTR_RING_RXDMA_ECODE_DA_TIMEOUT_ERR,
HAL_REO_ENTR_RING_RXDMA_ECODE_FLOW_TIMEOUT_ERR,
HAL_REO_ENTR_RING_RXDMA_ECODE_FLUSH_REQUEST_ERR,
HAL_REO_ENTR_RING_RXDMA_ECODE_AMSDU_FRAG_ERR,
HAL_REO_ENTR_RING_RXDMA_ECODE_MAX,
};
enum hal_rx_reo_dest_ring {
HAL_RX_REO_DEST_RING_TCL,
HAL_RX_REO_DEST_RING_SW1,
HAL_RX_REO_DEST_RING_SW2,
HAL_RX_REO_DEST_RING_SW3,
HAL_RX_REO_DEST_RING_SW4,
HAL_RX_REO_DEST_RING_RELEASE,
HAL_RX_REO_DEST_RING_FW,
HAL_RX_REO_DEST_RING_SW5,
HAL_RX_REO_DEST_RING_SW6,
HAL_RX_REO_DEST_RING_SW7,
HAL_RX_REO_DEST_RING_SW8,
};
#define HAL_REO_ENTR_RING_INFO0_QUEUE_ADDR_HI GENMASK(7, 0)
#define HAL_REO_ENTR_RING_INFO0_MPDU_BYTE_COUNT GENMASK(21, 8)
#define HAL_REO_ENTR_RING_INFO0_DEST_IND GENMASK(26, 22)
#define HAL_REO_ENTR_RING_INFO0_FRAMELESS_BAR BIT(27)
#define HAL_REO_ENTR_RING_INFO1_RXDMA_PUSH_REASON GENMASK(1, 0)
#define HAL_REO_ENTR_RING_INFO1_RXDMA_ERROR_CODE GENMASK(6, 2)
#define HAL_REO_ENTR_RING_INFO1_MPDU_FRAG_NUM GENMASK(10, 7)
#define HAL_REO_ENTR_RING_INFO1_SW_EXCEPTION BIT(11)
#define HAL_REO_ENTR_RING_INFO1_SW_EXCEPT_MPDU_DELINK BIT(12)
#define HAL_REO_ENTR_RING_INFO1_SW_EXCEPTION_RING_VLD BIT(13)
#define HAL_REO_ENTR_RING_INFO1_SW_EXCEPTION_RING GENMASK(18, 14)
#define HAL_REO_ENTR_RING_INFO1_MPDU_SEQ_NUM GENMASK(30, 19)
#define HAL_REO_ENTR_RING_INFO2_PHY_PPDU_ID GENMASK(15, 0)
#define HAL_REO_ENTR_RING_INFO2_SRC_LINK_ID GENMASK(18, 16)
#define HAL_REO_ENTR_RING_INFO2_RING_ID GENMASK(27, 20)
#define HAL_REO_ENTR_RING_INFO2_LOOPING_COUNT GENMASK(31, 28)
struct hal_reo_entrance_ring {
struct ath12k_buffer_addr buf_addr_info;
struct rx_mpdu_desc rx_mpdu_info;
__le32 queue_addr_lo;
__le32 info0;
__le32 info1;
__le32 info2;
} __packed;
#define HAL_REO_CMD_HDR_INFO0_CMD_NUMBER GENMASK(15, 0)
#define HAL_REO_CMD_HDR_INFO0_STATUS_REQUIRED BIT(16)
struct hal_reo_cmd_hdr {
__le32 info0;
} __packed;
#define HAL_REO_GET_QUEUE_STATS_INFO0_QUEUE_ADDR_HI GENMASK(7, 0)
#define HAL_REO_GET_QUEUE_STATS_INFO0_CLEAR_STATS BIT(8)
struct hal_reo_get_queue_stats {
struct hal_reo_cmd_hdr cmd;
__le32 queue_addr_lo;
__le32 info0;
__le32 rsvd0[6];
__le32 tlv64_pad;
} __packed;
#define HAL_REO_FLUSH_QUEUE_INFO0_DESC_ADDR_HI GENMASK(7, 0)
#define HAL_REO_FLUSH_QUEUE_INFO0_BLOCK_DESC_ADDR BIT(8)
#define HAL_REO_FLUSH_QUEUE_INFO0_BLOCK_RESRC_IDX GENMASK(10, 9)
struct hal_reo_flush_queue {
struct hal_reo_cmd_hdr cmd;
__le32 desc_addr_lo;
__le32 info0;
__le32 rsvd0[6];
} __packed;
#define HAL_REO_FLUSH_CACHE_INFO0_CACHE_ADDR_HI GENMASK(7, 0)
#define HAL_REO_FLUSH_CACHE_INFO0_FWD_ALL_MPDUS BIT(8)
#define HAL_REO_FLUSH_CACHE_INFO0_RELEASE_BLOCK_IDX BIT(9)
#define HAL_REO_FLUSH_CACHE_INFO0_BLOCK_RESRC_IDX GENMASK(11, 10)
#define HAL_REO_FLUSH_CACHE_INFO0_FLUSH_WO_INVALIDATE BIT(12)
#define HAL_REO_FLUSH_CACHE_INFO0_BLOCK_CACHE_USAGE BIT(13)
#define HAL_REO_FLUSH_CACHE_INFO0_FLUSH_ALL BIT(14)
struct hal_reo_flush_cache {
struct hal_reo_cmd_hdr cmd;
__le32 cache_addr_lo;
__le32 info0;
__le32 rsvd0[6];
} __packed;
#define HAL_TCL_DATA_CMD_INFO0_CMD_TYPE BIT(0)
#define HAL_TCL_DATA_CMD_INFO0_DESC_TYPE BIT(1)
#define HAL_TCL_DATA_CMD_INFO0_BANK_ID GENMASK(7, 2)
#define HAL_TCL_DATA_CMD_INFO0_TX_NOTIFY_FRAME GENMASK(10, 8)
#define HAL_TCL_DATA_CMD_INFO0_HDR_LEN_READ_SEL BIT(11)
#define HAL_TCL_DATA_CMD_INFO0_BUF_TIMESTAMP GENMASK(30, 12)
#define HAL_TCL_DATA_CMD_INFO0_BUF_TIMESTAMP_VLD BIT(31)
#define HAL_TCL_DATA_CMD_INFO1_CMD_NUM GENMASK(31, 16)
#define HAL_TCL_DATA_CMD_INFO2_DATA_LEN GENMASK(15, 0)
#define HAL_TCL_DATA_CMD_INFO2_IP4_CKSUM_EN BIT(16)
#define HAL_TCL_DATA_CMD_INFO2_UDP4_CKSUM_EN BIT(17)
#define HAL_TCL_DATA_CMD_INFO2_UDP6_CKSUM_EN BIT(18)
#define HAL_TCL_DATA_CMD_INFO2_TCP4_CKSUM_EN BIT(19)
#define HAL_TCL_DATA_CMD_INFO2_TCP6_CKSUM_EN BIT(20)
#define HAL_TCL_DATA_CMD_INFO2_TO_FW BIT(21)
#define HAL_TCL_DATA_CMD_INFO2_PKT_OFFSET GENMASK(31, 23)
#define HAL_TCL_DATA_CMD_INFO3_TID_OVERWRITE BIT(0)
#define HAL_TCL_DATA_CMD_INFO3_FLOW_OVERRIDE_EN BIT(1)
#define HAL_TCL_DATA_CMD_INFO3_CLASSIFY_INFO_SEL GENMASK(3, 2)
#define HAL_TCL_DATA_CMD_INFO3_TID GENMASK(7, 4)
#define HAL_TCL_DATA_CMD_INFO3_FLOW_OVERRIDE BIT(8)
#define HAL_TCL_DATA_CMD_INFO3_PMAC_ID GENMASK(10, 9)
#define HAL_TCL_DATA_CMD_INFO3_MSDU_COLOR GENMASK(12, 11)
#define HAL_TCL_DATA_CMD_INFO3_VDEV_ID GENMASK(31, 24)
#define HAL_TCL_DATA_CMD_INFO4_SEARCH_INDEX GENMASK(19, 0)
#define HAL_TCL_DATA_CMD_INFO4_CACHE_SET_NUM GENMASK(23, 20)
#define HAL_TCL_DATA_CMD_INFO4_IDX_LOOKUP_OVERRIDE BIT(24)
#define HAL_TCL_DATA_CMD_INFO5_RING_ID GENMASK(27, 20)
#define HAL_TCL_DATA_CMD_INFO5_LOOPING_COUNT GENMASK(31, 28)
enum hal_encrypt_type {
HAL_ENCRYPT_TYPE_WEP_40,
HAL_ENCRYPT_TYPE_WEP_104,
HAL_ENCRYPT_TYPE_TKIP_NO_MIC,
HAL_ENCRYPT_TYPE_WEP_128,
HAL_ENCRYPT_TYPE_TKIP_MIC,
HAL_ENCRYPT_TYPE_WAPI,
HAL_ENCRYPT_TYPE_CCMP_128,
HAL_ENCRYPT_TYPE_OPEN,
HAL_ENCRYPT_TYPE_CCMP_256,
HAL_ENCRYPT_TYPE_GCMP_128,
HAL_ENCRYPT_TYPE_AES_GCMP_256,
HAL_ENCRYPT_TYPE_WAPI_GCM_SM4,
};
enum hal_tcl_encap_type {
HAL_TCL_ENCAP_TYPE_RAW,
HAL_TCL_ENCAP_TYPE_NATIVE_WIFI,
HAL_TCL_ENCAP_TYPE_ETHERNET,
HAL_TCL_ENCAP_TYPE_802_3 = 3,
};
enum hal_tcl_desc_type {
HAL_TCL_DESC_TYPE_BUFFER,
HAL_TCL_DESC_TYPE_EXT_DESC,
};
enum hal_wbm_htt_tx_comp_status {
HAL_WBM_REL_HTT_TX_COMP_STATUS_OK,
HAL_WBM_REL_HTT_TX_COMP_STATUS_DROP,
HAL_WBM_REL_HTT_TX_COMP_STATUS_TTL,
HAL_WBM_REL_HTT_TX_COMP_STATUS_REINJ,
HAL_WBM_REL_HTT_TX_COMP_STATUS_INSPECT,
HAL_WBM_REL_HTT_TX_COMP_STATUS_MEC_NOTIFY,
HAL_WBM_REL_HTT_TX_COMP_STATUS_MAX,
};
struct hal_tcl_data_cmd {
struct ath12k_buffer_addr buf_addr_info;
__le32 info0;
__le32 info1;
__le32 info2;
__le32 info3;
__le32 info4;
__le32 info5;
} __packed;
#define HAL_TCL_DESC_LEN sizeof(struct hal_tcl_data_cmd)
#define HAL_TX_MSDU_EXT_INFO0_BUF_PTR_LO GENMASK(31, 0)
#define HAL_TX_MSDU_EXT_INFO1_BUF_PTR_HI GENMASK(7, 0)
#define HAL_TX_MSDU_EXT_INFO1_EXTN_OVERRIDE BIT(8)
#define HAL_TX_MSDU_EXT_INFO1_ENCAP_TYPE GENMASK(10, 9)
#define HAL_TX_MSDU_EXT_INFO1_ENCRYPT_TYPE GENMASK(14, 11)
#define HAL_TX_MSDU_EXT_INFO1_BUF_LEN GENMASK(31, 16)
struct hal_tx_msdu_ext_desc {
__le32 rsvd0[6];
__le32 info0;
__le32 info1;
__le32 rsvd1[10];
};
struct hal_tcl_gse_cmd {
__le32 ctrl_buf_addr_lo;
__le32 info0;
__le32 meta_data[2];
__le32 rsvd0[2];
__le32 info1;
} __packed;
enum hal_tcl_cache_op_res {
HAL_TCL_CACHE_OP_RES_DONE,
HAL_TCL_CACHE_OP_RES_NOT_FOUND,
HAL_TCL_CACHE_OP_RES_TIMEOUT,
};
struct hal_tcl_status_ring {
__le32 info0;
__le32 msdu_byte_count;
__le32 msdu_timestamp;
__le32 meta_data[2];
__le32 info1;
__le32 rsvd0;
__le32 info2;
} __packed;
#define HAL_CE_SRC_DESC_ADDR_INFO_ADDR_HI GENMASK(7, 0)
#define HAL_CE_SRC_DESC_ADDR_INFO_HASH_EN BIT(8)
#define HAL_CE_SRC_DESC_ADDR_INFO_BYTE_SWAP BIT(9)
#define HAL_CE_SRC_DESC_ADDR_INFO_DEST_SWAP BIT(10)
#define HAL_CE_SRC_DESC_ADDR_INFO_GATHER BIT(11)
#define HAL_CE_SRC_DESC_ADDR_INFO_LEN GENMASK(31, 16)
#define HAL_CE_SRC_DESC_META_INFO_DATA GENMASK(15, 0)
#define HAL_CE_SRC_DESC_FLAGS_RING_ID GENMASK(27, 20)
#define HAL_CE_SRC_DESC_FLAGS_LOOP_CNT HAL_SRNG_DESC_LOOP_CNT
struct hal_ce_srng_src_desc {
__le32 buffer_addr_low;
__le32 buffer_addr_info;
__le32 meta_info;
__le32 flags;
} __packed;
#define HAL_CE_DEST_DESC_ADDR_INFO_ADDR_HI GENMASK(7, 0)
#define HAL_CE_DEST_DESC_ADDR_INFO_RING_ID GENMASK(27, 20)
#define HAL_CE_DEST_DESC_ADDR_INFO_LOOP_CNT HAL_SRNG_DESC_LOOP_CNT
struct hal_ce_srng_dest_desc {
__le32 buffer_addr_low;
__le32 buffer_addr_info;
} __packed;
#define HAL_CE_DST_STATUS_DESC_FLAGS_HASH_EN BIT(8)
#define HAL_CE_DST_STATUS_DESC_FLAGS_BYTE_SWAP BIT(9)
#define HAL_CE_DST_STATUS_DESC_FLAGS_DEST_SWAP BIT(10)
#define HAL_CE_DST_STATUS_DESC_FLAGS_GATHER BIT(11)
#define HAL_CE_DST_STATUS_DESC_FLAGS_LEN GENMASK(31, 16)
#define HAL_CE_DST_STATUS_DESC_META_INFO_DATA GENMASK(15, 0)
#define HAL_CE_DST_STATUS_DESC_META_INFO_RING_ID GENMASK(27, 20)
#define HAL_CE_DST_STATUS_DESC_META_INFO_LOOP_CNT HAL_SRNG_DESC_LOOP_CNT
struct hal_ce_srng_dst_status_desc {
__le32 flags;
__le32 toeplitz_hash0;
__le32 toeplitz_hash1;
__le32 meta_info;
} __packed;
#define HAL_TX_RATE_STATS_INFO0_VALID BIT(0)
#define HAL_TX_RATE_STATS_INFO0_BW GENMASK(3, 1)
#define HAL_TX_RATE_STATS_INFO0_PKT_TYPE GENMASK(7, 4)
#define HAL_TX_RATE_STATS_INFO0_STBC BIT(8)
#define HAL_TX_RATE_STATS_INFO0_LDPC BIT(9)
#define HAL_TX_RATE_STATS_INFO0_SGI GENMASK(11, 10)
#define HAL_TX_RATE_STATS_INFO0_MCS GENMASK(15, 12)
#define HAL_TX_RATE_STATS_INFO0_OFDMA_TX BIT(16)
#define HAL_TX_RATE_STATS_INFO0_TONES_IN_RU GENMASK(28, 17)
enum hal_tx_rate_stats_bw {
HAL_TX_RATE_STATS_BW_20,
HAL_TX_RATE_STATS_BW_40,
HAL_TX_RATE_STATS_BW_80,
HAL_TX_RATE_STATS_BW_160,
};
enum hal_tx_rate_stats_pkt_type {
HAL_TX_RATE_STATS_PKT_TYPE_11A,
HAL_TX_RATE_STATS_PKT_TYPE_11B,
HAL_TX_RATE_STATS_PKT_TYPE_11N,
HAL_TX_RATE_STATS_PKT_TYPE_11AC,
HAL_TX_RATE_STATS_PKT_TYPE_11AX,
HAL_TX_RATE_STATS_PKT_TYPE_11BA,
HAL_TX_RATE_STATS_PKT_TYPE_11BE,
};
enum hal_tx_rate_stats_sgi {
HAL_TX_RATE_STATS_SGI_08US,
HAL_TX_RATE_STATS_SGI_04US,
HAL_TX_RATE_STATS_SGI_16US,
HAL_TX_RATE_STATS_SGI_32US,
};
struct hal_tx_rate_stats {
__le32 info0;
__le32 tsf;
} __packed;
struct hal_wbm_link_desc {
struct ath12k_buffer_addr buf_addr_info;
} __packed;
enum hal_wbm_rel_src_module {
HAL_WBM_REL_SRC_MODULE_TQM,
HAL_WBM_REL_SRC_MODULE_RXDMA,
HAL_WBM_REL_SRC_MODULE_REO,
HAL_WBM_REL_SRC_MODULE_FW,
HAL_WBM_REL_SRC_MODULE_SW,
};
enum hal_wbm_rel_desc_type {
HAL_WBM_REL_DESC_TYPE_REL_MSDU,
HAL_WBM_REL_DESC_TYPE_MSDU_LINK,
HAL_WBM_REL_DESC_TYPE_MPDU_LINK,
HAL_WBM_REL_DESC_TYPE_MSDU_EXT,
HAL_WBM_REL_DESC_TYPE_QUEUE_EXT,
};
enum hal_wbm_rel_bm_act {
HAL_WBM_REL_BM_ACT_PUT_IN_IDLE,
HAL_WBM_REL_BM_ACT_REL_MSDU,
};
#define HAL_WBM_COMPL_RX_INFO0_REL_SRC_MODULE GENMASK(2, 0)
#define HAL_WBM_COMPL_RX_INFO0_BM_ACTION GENMASK(5, 3)
#define HAL_WBM_COMPL_RX_INFO0_DESC_TYPE GENMASK(8, 6)
#define HAL_WBM_COMPL_RX_INFO0_RBM GENMASK(12, 9)
#define HAL_WBM_COMPL_RX_INFO0_RXDMA_PUSH_REASON GENMASK(18, 17)
#define HAL_WBM_COMPL_RX_INFO0_RXDMA_ERROR_CODE GENMASK(23, 19)
#define HAL_WBM_COMPL_RX_INFO0_REO_PUSH_REASON GENMASK(25, 24)
#define HAL_WBM_COMPL_RX_INFO0_REO_ERROR_CODE GENMASK(30, 26)
#define HAL_WBM_COMPL_RX_INFO0_WBM_INTERNAL_ERROR BIT(31)
#define HAL_WBM_COMPL_RX_INFO1_PHY_ADDR_HI GENMASK(7, 0)
#define HAL_WBM_COMPL_RX_INFO1_SW_COOKIE GENMASK(27, 8)
#define HAL_WBM_COMPL_RX_INFO1_LOOPING_COUNT GENMASK(31, 28)
struct hal_wbm_completion_ring_rx {
__le32 addr_lo;
__le32 addr_hi;
__le32 info0;
struct rx_mpdu_desc rx_mpdu_info;
struct rx_msdu_desc rx_msdu_info;
__le32 phy_addr_lo;
__le32 info1;
} __packed;
#define HAL_WBM_COMPL_TX_INFO0_REL_SRC_MODULE GENMASK(2, 0)
#define HAL_WBM_COMPL_TX_INFO0_DESC_TYPE GENMASK(8, 6)
#define HAL_WBM_COMPL_TX_INFO0_RBM GENMASK(12, 9)
#define HAL_WBM_COMPL_TX_INFO0_TQM_RELEASE_REASON GENMASK(16, 13)
#define HAL_WBM_COMPL_TX_INFO0_RBM_OVERRIDE_VLD BIT(17)
#define HAL_WBM_COMPL_TX_INFO0_SW_COOKIE_LO GENMASK(29, 18)
#define HAL_WBM_COMPL_TX_INFO0_CC_DONE BIT(30)
#define HAL_WBM_COMPL_TX_INFO0_WBM_INTERNAL_ERROR BIT(31)
#define HAL_WBM_COMPL_TX_INFO1_TQM_STATUS_NUMBER GENMASK(23, 0)
#define HAL_WBM_COMPL_TX_INFO1_TRANSMIT_COUNT GENMASK(30, 24)
#define HAL_WBM_COMPL_TX_INFO1_SW_REL_DETAILS_VALID BIT(31)
#define HAL_WBM_COMPL_TX_INFO2_ACK_FRAME_RSSI GENMASK(7, 0)
#define HAL_WBM_COMPL_TX_INFO2_FIRST_MSDU BIT(8)
#define HAL_WBM_COMPL_TX_INFO2_LAST_MSDU BIT(9)
#define HAL_WBM_COMPL_TX_INFO2_FW_TX_NOTIF_FRAME GENMASK(12, 10)
#define HAL_WBM_COMPL_TX_INFO2_BUFFER_TIMESTAMP GENMASK(31, 13)
#define HAL_WBM_COMPL_TX_INFO3_PEER_ID GENMASK(15, 0)
#define HAL_WBM_COMPL_TX_INFO3_TID GENMASK(19, 16)
#define HAL_WBM_COMPL_TX_INFO3_SW_COOKIE_HI GENMASK(27, 20)
#define HAL_WBM_COMPL_TX_INFO3_LOOPING_COUNT GENMASK(31, 28)
struct hal_wbm_completion_ring_tx {
__le32 buf_va_lo;
__le32 buf_va_hi;
__le32 info0;
__le32 info1;
__le32 info2;
struct hal_tx_rate_stats rate_stats;
__le32 info3;
} __packed;
#define HAL_WBM_RELEASE_TX_INFO0_REL_SRC_MODULE GENMASK(2, 0)
#define HAL_WBM_RELEASE_TX_INFO0_BM_ACTION GENMASK(5, 3)
#define HAL_WBM_RELEASE_TX_INFO0_DESC_TYPE GENMASK(8, 6)
#define HAL_WBM_RELEASE_TX_INFO0_FIRST_MSDU_IDX GENMASK(12, 9)
#define HAL_WBM_RELEASE_TX_INFO0_TQM_RELEASE_REASON GENMASK(18, 13)
#define HAL_WBM_RELEASE_TX_INFO0_RBM_OVERRIDE_VLD BIT(17)
#define HAL_WBM_RELEASE_TX_INFO0_SW_BUFFER_COOKIE_11_0 GENMASK(29, 18)
#define HAL_WBM_RELEASE_TX_INFO0_WBM_INTERNAL_ERROR BIT(31)
#define HAL_WBM_RELEASE_TX_INFO1_TQM_STATUS_NUMBER GENMASK(23, 0)
#define HAL_WBM_RELEASE_TX_INFO1_TRANSMIT_COUNT GENMASK(30, 24)
#define HAL_WBM_RELEASE_TX_INFO1_SW_REL_DETAILS_VALID BIT(31)
#define HAL_WBM_RELEASE_TX_INFO2_ACK_FRAME_RSSI GENMASK(7, 0)
#define HAL_WBM_RELEASE_TX_INFO2_FIRST_MSDU BIT(8)
#define HAL_WBM_RELEASE_TX_INFO2_LAST_MSDU BIT(9)
#define HAL_WBM_RELEASE_TX_INFO2_FW_TX_NOTIF_FRAME GENMASK(12, 10)
#define HAL_WBM_RELEASE_TX_INFO2_BUFFER_TIMESTAMP GENMASK(31, 13)
#define HAL_WBM_RELEASE_TX_INFO3_PEER_ID GENMASK(15, 0)
#define HAL_WBM_RELEASE_TX_INFO3_TID GENMASK(19, 16)
#define HAL_WBM_RELEASE_TX_INFO3_SW_BUFFER_COOKIE_19_12 GENMASK(27, 20)
#define HAL_WBM_RELEASE_TX_INFO3_LOOPING_COUNT GENMASK(31, 28)
struct hal_wbm_release_ring_tx {
struct ath12k_buffer_addr buf_addr_info;
__le32 info0;
__le32 info1;
__le32 info2;
struct hal_tx_rate_stats rate_stats;
__le32 info3;
} __packed;
#define HAL_WBM_RELEASE_RX_INFO0_REL_SRC_MODULE GENMASK(2, 0)
#define HAL_WBM_RELEASE_RX_INFO0_BM_ACTION GENMASK(5, 3)
#define HAL_WBM_RELEASE_RX_INFO0_DESC_TYPE GENMASK(8, 6)
#define HAL_WBM_RELEASE_RX_INFO0_FIRST_MSDU_IDX GENMASK(12, 9)
#define HAL_WBM_RELEASE_RX_INFO0_CC_STATUS BIT(16)
#define HAL_WBM_RELEASE_RX_INFO0_RXDMA_PUSH_REASON GENMASK(18, 17)
#define HAL_WBM_RELEASE_RX_INFO0_RXDMA_ERROR_CODE GENMASK(23, 19)
#define HAL_WBM_RELEASE_RX_INFO0_REO_PUSH_REASON GENMASK(25, 24)
#define HAL_WBM_RELEASE_RX_INFO0_REO_ERROR_CODE GENMASK(30, 26)
#define HAL_WBM_RELEASE_RX_INFO0_WBM_INTERNAL_ERROR BIT(31)
#define HAL_WBM_RELEASE_RX_INFO2_RING_ID GENMASK(27, 20)
#define HAL_WBM_RELEASE_RX_INFO2_LOOPING_COUNT GENMASK(31, 28)
struct hal_wbm_release_ring_rx {
struct ath12k_buffer_addr buf_addr_info;
__le32 info0;
struct rx_mpdu_desc rx_mpdu_info;
struct rx_msdu_desc rx_msdu_info;
__le32 info1;
__le32 info2;
} __packed;
#define HAL_WBM_RELEASE_RX_CC_INFO0_RBM GENMASK(12, 9)
#define HAL_WBM_RELEASE_RX_CC_INFO1_COOKIE GENMASK(27, 8)
struct hal_wbm_release_ring_cc_rx {
__le32 buf_va_lo;
__le32 buf_va_hi;
__le32 info0;
struct rx_mpdu_desc rx_mpdu_info;
struct rx_msdu_desc rx_msdu_info;
__le32 buf_pa_lo;
__le32 info1;
} __packed;
#define HAL_WBM_RELEASE_INFO0_REL_SRC_MODULE GENMASK(2, 0)
#define HAL_WBM_RELEASE_INFO0_BM_ACTION GENMASK(5, 3)
#define HAL_WBM_RELEASE_INFO0_DESC_TYPE GENMASK(8, 6)
#define HAL_WBM_RELEASE_INFO0_RXDMA_PUSH_REASON GENMASK(18, 17)
#define HAL_WBM_RELEASE_INFO0_RXDMA_ERROR_CODE GENMASK(23, 19)
#define HAL_WBM_RELEASE_INFO0_REO_PUSH_REASON GENMASK(25, 24)
#define HAL_WBM_RELEASE_INFO0_REO_ERROR_CODE GENMASK(30, 26)
#define HAL_WBM_RELEASE_INFO0_WBM_INTERNAL_ERROR BIT(31)
#define HAL_WBM_RELEASE_INFO3_FIRST_MSDU BIT(0)
#define HAL_WBM_RELEASE_INFO3_LAST_MSDU BIT(1)
#define HAL_WBM_RELEASE_INFO3_CONTINUATION BIT(2)
#define HAL_WBM_RELEASE_INFO5_LOOPING_COUNT GENMASK(31, 28)
struct hal_wbm_release_ring {
struct ath12k_buffer_addr buf_addr_info;
__le32 info0;
__le32 info1;
__le32 info2;
__le32 info3;
__le32 info4;
__le32 info5;
} __packed;
enum hal_wbm_tqm_rel_reason {
HAL_WBM_TQM_REL_REASON_FRAME_ACKED,
HAL_WBM_TQM_REL_REASON_CMD_REMOVE_MPDU,
HAL_WBM_TQM_REL_REASON_CMD_REMOVE_TX,
HAL_WBM_TQM_REL_REASON_CMD_REMOVE_NOTX,
HAL_WBM_TQM_REL_REASON_CMD_REMOVE_AGED_FRAMES,
HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON1,
HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON2,
HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON3,
};
struct hal_wbm_buffer_ring {
struct ath12k_buffer_addr buf_addr_info;
};
enum hal_mon_end_reason {
HAL_MON_STATUS_BUFFER_FULL,
HAL_MON_FLUSH_DETECTED,
HAL_MON_END_OF_PPDU,
HAL_MON_PPDU_TRUNCATED,
};
#define HAL_SW_MONITOR_RING_INFO0_RXDMA_PUSH_REASON GENMASK(1, 0)
#define HAL_SW_MONITOR_RING_INFO0_RXDMA_ERROR_CODE GENMASK(6, 2)
#define HAL_SW_MONITOR_RING_INFO0_MPDU_FRAGMENT_NUMBER GENMASK(10, 7)
#define HAL_SW_MONITOR_RING_INFO0_FRAMELESS_BAR BIT(11)
#define HAL_SW_MONITOR_RING_INFO0_STATUS_BUF_COUNT GENMASK(15, 12)
#define HAL_SW_MONITOR_RING_INFO0_END_OF_PPDU BIT(16)
#define HAL_SW_MONITOR_RING_INFO1_PHY_PPDU_ID GENMASK(15, 0)
#define HAL_SW_MONITOR_RING_INFO1_RING_ID GENMASK(27, 20)
#define HAL_SW_MONITOR_RING_INFO1_LOOPING_COUNT GENMASK(31, 28)
struct hal_sw_monitor_ring {
struct ath12k_buffer_addr buf_addr_info;
struct rx_mpdu_desc rx_mpdu_info;
struct ath12k_buffer_addr status_buff_addr_info;
__le32 info0;
__le32 info1;
} __packed;
enum hal_desc_owner {
HAL_DESC_OWNER_WBM,
HAL_DESC_OWNER_SW,
HAL_DESC_OWNER_TQM,
HAL_DESC_OWNER_RXDMA,
HAL_DESC_OWNER_REO,
HAL_DESC_OWNER_SWITCH,
};
enum hal_desc_buf_type {
HAL_DESC_BUF_TYPE_TX_MSDU_LINK,
HAL_DESC_BUF_TYPE_TX_MPDU_LINK,
HAL_DESC_BUF_TYPE_TX_MPDU_QUEUE_HEAD,
HAL_DESC_BUF_TYPE_TX_MPDU_QUEUE_EXT,
HAL_DESC_BUF_TYPE_TX_FLOW,
HAL_DESC_BUF_TYPE_TX_BUFFER,
HAL_DESC_BUF_TYPE_RX_MSDU_LINK,
HAL_DESC_BUF_TYPE_RX_MPDU_LINK,
HAL_DESC_BUF_TYPE_RX_REO_QUEUE,
HAL_DESC_BUF_TYPE_RX_REO_QUEUE_EXT,
HAL_DESC_BUF_TYPE_RX_BUFFER,
HAL_DESC_BUF_TYPE_IDLE_LINK,
};
#define HAL_DESC_REO_OWNED 4
#define HAL_DESC_REO_QUEUE_DESC 8
#define HAL_DESC_REO_QUEUE_EXT_DESC 9
#define HAL_DESC_REO_NON_QOS_TID 16
#define HAL_DESC_HDR_INFO0_OWNER GENMASK(3, 0)
#define HAL_DESC_HDR_INFO0_BUF_TYPE GENMASK(7, 4)
#define HAL_DESC_HDR_INFO0_DBG_RESERVED GENMASK(31, 8)
struct hal_desc_header {
__le32 info0;
} __packed;
struct hal_rx_mpdu_link_ptr {
struct ath12k_buffer_addr addr_info;
} __packed;
struct hal_rx_msdu_details {
struct ath12k_buffer_addr buf_addr_info;
struct rx_msdu_desc rx_msdu_info;
struct rx_msdu_ext_desc rx_msdu_ext_info;
} __packed;
#define HAL_RX_MSDU_LNK_INFO0_RX_QUEUE_NUMBER GENMASK(15, 0)
#define HAL_RX_MSDU_LNK_INFO0_FIRST_MSDU_LNK BIT(16)
struct hal_rx_msdu_link {
struct hal_desc_header desc_hdr;
struct ath12k_buffer_addr buf_addr_info;
__le32 info0;
__le32 pn[4];
struct hal_rx_msdu_details msdu_link[6];
} __packed;
struct hal_rx_reo_queue_ext {
struct hal_desc_header desc_hdr;
__le32 rsvd;
struct hal_rx_mpdu_link_ptr mpdu_link[15];
} __packed;
enum hal_rx_reo_queue_pn_size {
HAL_RX_REO_QUEUE_PN_SIZE_24,
HAL_RX_REO_QUEUE_PN_SIZE_48,
HAL_RX_REO_QUEUE_PN_SIZE_128,
};
#define HAL_RX_REO_QUEUE_RX_QUEUE_NUMBER GENMASK(15, 0)
#define HAL_RX_REO_QUEUE_INFO0_VLD BIT(0)
#define HAL_RX_REO_QUEUE_INFO0_ASSOC_LNK_DESC_COUNTER GENMASK(2, 1)
#define HAL_RX_REO_QUEUE_INFO0_DIS_DUP_DETECTION BIT(3)
#define HAL_RX_REO_QUEUE_INFO0_SOFT_REORDER_EN BIT(4)
#define HAL_RX_REO_QUEUE_INFO0_AC GENMASK(6, 5)
#define HAL_RX_REO_QUEUE_INFO0_BAR BIT(7)
#define HAL_RX_REO_QUEUE_INFO0_RETRY BIT(8)
#define HAL_RX_REO_QUEUE_INFO0_CHECK_2K_MODE BIT(9)
#define HAL_RX_REO_QUEUE_INFO0_OOR_MODE BIT(10)
#define HAL_RX_REO_QUEUE_INFO0_BA_WINDOW_SIZE GENMASK(20, 11)
#define HAL_RX_REO_QUEUE_INFO0_PN_CHECK BIT(21)
#define HAL_RX_REO_QUEUE_INFO0_EVEN_PN BIT(22)
#define HAL_RX_REO_QUEUE_INFO0_UNEVEN_PN BIT(23)
#define HAL_RX_REO_QUEUE_INFO0_PN_HANDLE_ENABLE BIT(24)
#define HAL_RX_REO_QUEUE_INFO0_PN_SIZE GENMASK(26, 25)
#define HAL_RX_REO_QUEUE_INFO0_IGNORE_AMPDU_FLG BIT(27)
#define HAL_RX_REO_QUEUE_INFO1_SVLD BIT(0)
#define HAL_RX_REO_QUEUE_INFO1_SSN GENMASK(12, 1)
#define HAL_RX_REO_QUEUE_INFO1_CURRENT_IDX GENMASK(22, 13)
#define HAL_RX_REO_QUEUE_INFO1_SEQ_2K_ERR BIT(23)
#define HAL_RX_REO_QUEUE_INFO1_PN_ERR BIT(24)
#define HAL_RX_REO_QUEUE_INFO1_PN_VALID BIT(31)
#define HAL_RX_REO_QUEUE_INFO2_MPDU_COUNT GENMASK(6, 0)
#define HAL_RX_REO_QUEUE_INFO2_MSDU_COUNT (31, 7)
#define HAL_RX_REO_QUEUE_INFO3_TIMEOUT_COUNT GENMASK(9, 4)
#define HAL_RX_REO_QUEUE_INFO3_FWD_DUE_TO_BAR_CNT GENMASK(15, 10)
#define HAL_RX_REO_QUEUE_INFO3_DUPLICATE_COUNT GENMASK(31, 16)
#define HAL_RX_REO_QUEUE_INFO4_FRAME_IN_ORD_COUNT GENMASK(23, 0)
#define HAL_RX_REO_QUEUE_INFO4_BAR_RECVD_COUNT GENMASK(31, 24)
#define HAL_RX_REO_QUEUE_INFO5_LATE_RX_MPDU_COUNT GENMASK(11, 0)
#define HAL_RX_REO_QUEUE_INFO5_WINDOW_JUMP_2K GENMASK(15, 12)
#define HAL_RX_REO_QUEUE_INFO5_HOLE_COUNT GENMASK(31, 16)
struct hal_rx_reo_queue {
struct hal_desc_header desc_hdr;
__le32 rx_queue_num;
__le32 info0;
__le32 info1;
__le32 pn[4];
__le32 last_rx_enqueue_timestamp;
__le32 last_rx_dequeue_timestamp;
__le32 next_aging_queue[2];
__le32 prev_aging_queue[2];
__le32 rx_bitmap[9];
__le32 info2;
__le32 info3;
__le32 info4;
__le32 processed_mpdus;
__le32 processed_msdus;
__le32 processed_total_bytes;
__le32 info5;
__le32 rsvd[2];
struct hal_rx_reo_queue_ext ext_desc[];
} __packed;
#define HAL_REO_UPD_RX_QUEUE_INFO0_QUEUE_ADDR_HI GENMASK(7, 0)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_RX_QUEUE_NUM BIT(8)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_VLD BIT(9)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_ASSOC_LNK_DESC_CNT BIT(10)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_DIS_DUP_DETECTION BIT(11)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SOFT_REORDER_EN BIT(12)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_AC BIT(13)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_BAR BIT(14)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_RETRY BIT(15)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_CHECK_2K_MODE BIT(16)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_OOR_MODE BIT(17)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_BA_WINDOW_SIZE BIT(18)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_CHECK BIT(19)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_EVEN_PN BIT(20)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_UNEVEN_PN BIT(21)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_HANDLE_ENABLE BIT(22)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_SIZE BIT(23)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_IGNORE_AMPDU_FLG BIT(24)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SVLD BIT(25)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SSN BIT(26)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SEQ_2K_ERR BIT(27)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_ERR BIT(28)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_VALID BIT(29)
#define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN BIT(30)
#define HAL_REO_UPD_RX_QUEUE_INFO1_RX_QUEUE_NUMBER GENMASK(15, 0)
#define HAL_REO_UPD_RX_QUEUE_INFO1_VLD BIT(16)
#define HAL_REO_UPD_RX_QUEUE_INFO1_ASSOC_LNK_DESC_COUNTER GENMASK(18, 17)
#define HAL_REO_UPD_RX_QUEUE_INFO1_DIS_DUP_DETECTION BIT(19)
#define HAL_REO_UPD_RX_QUEUE_INFO1_SOFT_REORDER_EN BIT(20)
#define HAL_REO_UPD_RX_QUEUE_INFO1_AC GENMASK(22, 21)
#define HAL_REO_UPD_RX_QUEUE_INFO1_BAR BIT(23)
#define HAL_REO_UPD_RX_QUEUE_INFO1_RETRY BIT(24)
#define HAL_REO_UPD_RX_QUEUE_INFO1_CHECK_2K_MODE BIT(25)
#define HAL_REO_UPD_RX_QUEUE_INFO1_OOR_MODE BIT(26)
#define HAL_REO_UPD_RX_QUEUE_INFO1_PN_CHECK BIT(27)
#define HAL_REO_UPD_RX_QUEUE_INFO1_EVEN_PN BIT(28)
#define HAL_REO_UPD_RX_QUEUE_INFO1_UNEVEN_PN BIT(29)
#define HAL_REO_UPD_RX_QUEUE_INFO1_PN_HANDLE_ENABLE BIT(30)
#define HAL_REO_UPD_RX_QUEUE_INFO1_IGNORE_AMPDU_FLG BIT(31)
#define HAL_REO_UPD_RX_QUEUE_INFO2_BA_WINDOW_SIZE GENMASK(7, 0)
#define HAL_REO_UPD_RX_QUEUE_INFO2_PN_SIZE GENMASK(9, 8)
#define HAL_REO_UPD_RX_QUEUE_INFO2_SVLD BIT(10)
#define HAL_REO_UPD_RX_QUEUE_INFO2_SSN GENMASK(22, 11)
#define HAL_REO_UPD_RX_QUEUE_INFO2_SEQ_2K_ERR BIT(23)
#define HAL_REO_UPD_RX_QUEUE_INFO2_PN_ERR BIT(24)
#define HAL_REO_UPD_RX_QUEUE_INFO2_PN_VALID BIT(25)
struct hal_reo_update_rx_queue {
struct hal_reo_cmd_hdr cmd;
__le32 queue_addr_lo;
__le32 info0;
__le32 info1;
__le32 info2;
__le32 pn[4];
} __packed;
#define HAL_REO_UNBLOCK_CACHE_INFO0_UNBLK_CACHE BIT(0)
#define HAL_REO_UNBLOCK_CACHE_INFO0_RESOURCE_IDX GENMASK(2, 1)
struct hal_reo_unblock_cache {
struct hal_reo_cmd_hdr cmd;
__le32 info0;
__le32 rsvd[7];
} __packed;
enum hal_reo_exec_status {
HAL_REO_EXEC_STATUS_SUCCESS,
HAL_REO_EXEC_STATUS_BLOCKED,
HAL_REO_EXEC_STATUS_FAILED,
HAL_REO_EXEC_STATUS_RESOURCE_BLOCKED,
};
#define HAL_REO_STATUS_HDR_INFO0_STATUS_NUM GENMASK(15, 0)
#define HAL_REO_STATUS_HDR_INFO0_EXEC_TIME GENMASK(25, 16)
#define HAL_REO_STATUS_HDR_INFO0_EXEC_STATUS GENMASK(27, 26)
struct hal_reo_status_hdr {
__le32 info0;
__le32 timestamp;
} __packed;
#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO0_SSN GENMASK(11, 0)
#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO0_CUR_IDX GENMASK(21, 12)
#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO1_MPDU_COUNT GENMASK(6, 0)
#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO1_MSDU_COUNT GENMASK(31, 7)
#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_WINDOW_JMP2K GENMASK(3, 0)
#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_TIMEOUT_COUNT GENMASK(9, 4)
#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_FDTB_COUNT GENMASK(15, 10)
#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_DUPLICATE_COUNT GENMASK(31, 16)
#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO3_FIO_COUNT GENMASK(23, 0)
#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO3_BAR_RCVD_CNT GENMASK(31, 24)
#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_LATE_RX_MPDU GENMASK(11, 0)
#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_HOLE_COUNT GENMASK(27, 12)
#define HAL_REO_GET_QUEUE_STATS_STATUS_INFO5_LOOPING_CNT GENMASK(31, 28)
struct hal_reo_get_queue_stats_status {
struct hal_reo_status_hdr hdr;
__le32 info0;
__le32 pn[4];
__le32 last_rx_enqueue_timestamp;
__le32 last_rx_dequeue_timestamp;
__le32 rx_bitmap[9];
__le32 info1;
__le32 info2;
__le32 info3;
__le32 num_mpdu_frames;
__le32 num_msdu_frames;
__le32 total_bytes;
__le32 info4;
__le32 info5;
} __packed;
#define HAL_REO_STATUS_LOOP_CNT GENMASK(31, 28)
#define HAL_REO_FLUSH_QUEUE_INFO0_ERR_DETECTED BIT(0)
#define HAL_REO_FLUSH_QUEUE_INFO0_RSVD GENMASK(31, 1)
#define HAL_REO_FLUSH_QUEUE_INFO1_RSVD GENMASK(27, 0)
struct hal_reo_flush_queue_status {
struct hal_reo_status_hdr hdr;
__le32 info0;
__le32 rsvd0[21];
__le32 info1;
} __packed;
#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_IS_ERR BIT(0)
#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_BLOCK_ERR_CODE GENMASK(2, 1)
#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_STATUS_HIT BIT(8)
#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_DESC_TYPE GENMASK(11, 9)
#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_CLIENT_ID GENMASK(15, 12)
#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_ERR GENMASK(17, 16)
#define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_COUNT GENMASK(25, 18)
struct hal_reo_flush_cache_status {
struct hal_reo_status_hdr hdr;
__le32 info0;
__le32 rsvd0[21];
__le32 info1;
} __packed;
#define HAL_REO_UNBLOCK_CACHE_STATUS_INFO0_IS_ERR BIT(0)
#define HAL_REO_UNBLOCK_CACHE_STATUS_INFO0_TYPE BIT(1)
struct hal_reo_unblock_cache_status {
struct hal_reo_status_hdr hdr;
__le32 info0;
__le32 rsvd0[21];
__le32 info1;
} __packed;
#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO0_IS_ERR BIT(0)
#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO0_LIST_EMPTY BIT(1)
#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO1_REL_DESC_COUNT GENMASK(15, 0)
#define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO1_FWD_BUF_COUNT GENMASK(31, 16)
struct hal_reo_flush_timeout_list_status {
struct hal_reo_status_hdr hdr;
__le32 info0;
__le32 info1;
__le32 rsvd0[20];
__le32 info2;
} __packed;
#define HAL_REO_DESC_THRESH_STATUS_INFO0_THRESH_INDEX GENMASK(1, 0)
#define HAL_REO_DESC_THRESH_STATUS_INFO1_LINK_DESC_COUNTER0 GENMASK(23, 0)
#define HAL_REO_DESC_THRESH_STATUS_INFO2_LINK_DESC_COUNTER1 GENMASK(23, 0)
#define HAL_REO_DESC_THRESH_STATUS_INFO3_LINK_DESC_COUNTER2 GENMASK(23, 0)
#define HAL_REO_DESC_THRESH_STATUS_INFO4_LINK_DESC_COUNTER_SUM GENMASK(25, 0)
struct hal_reo_desc_thresh_reached_status {
struct hal_reo_status_hdr hdr;
__le32 info0;
__le32 info1;
__le32 info2;
__le32 info3;
__le32 info4;
__le32 rsvd0[17];
__le32 info5;
} __packed;
#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_DATA_LENGTH GENMASK(13, 0)
#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_L4_CSUM_STATUS BIT(14)
#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_L3_CSUM_STATUS BIT(15)
#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_PID GENMASK(27, 24)
#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_QDISC BIT(28)
#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_MULTICAST BIT(29)
#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_MORE BIT(30)
#define HAL_TCL_ENTRANCE_FROM_PPE_RING_INFO0_VALID_TOGGLE BIT(31)
struct hal_tcl_entrance_from_ppe_ring {
__le32 buffer_addr;
__le32 info0;
} __packed;
struct hal_mon_buf_ring {
__le32 paddr_lo;
__le32 paddr_hi;
__le64 cookie;
};
#define HAL_MON_DEST_COOKIE_BUF_ID GENMASK(17, 0)
#define HAL_MON_DEST_INFO0_END_OFFSET GENMASK(15, 0)
#define HAL_MON_DEST_INFO0_FLUSH_DETECTED BIT(16)
#define HAL_MON_DEST_INFO0_END_OF_PPDU BIT(17)
#define HAL_MON_DEST_INFO0_INITIATOR BIT(18)
#define HAL_MON_DEST_INFO0_EMPTY_DESC BIT(19)
#define HAL_MON_DEST_INFO0_RING_ID GENMASK(27, 20)
#define HAL_MON_DEST_INFO0_LOOPING_COUNT GENMASK(31, 28)
struct hal_mon_dest_desc {
__le32 cookie;
__le32 reserved;
__le32 ppdu_id;
__le32 info0;
};
#endif /* ATH12K_HAL_DESC_H */