1*4882a593Smuzhiyun /* SPDX-License-Identifier: BSD-3-Clause-Clear */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. 4*4882a593Smuzhiyun */ 5*4882a593Smuzhiyun #include "core.h" 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun #ifndef ATH11K_HAL_DESC_H 8*4882a593Smuzhiyun #define ATH11K_HAL_DESC_H 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun #define BUFFER_ADDR_INFO0_ADDR GENMASK(31, 0) 11*4882a593Smuzhiyun 12*4882a593Smuzhiyun #define BUFFER_ADDR_INFO1_ADDR GENMASK(7, 0) 13*4882a593Smuzhiyun #define BUFFER_ADDR_INFO1_RET_BUF_MGR GENMASK(10, 8) 14*4882a593Smuzhiyun #define BUFFER_ADDR_INFO1_SW_COOKIE GENMASK(31, 11) 15*4882a593Smuzhiyun 16*4882a593Smuzhiyun struct ath11k_buffer_addr { 17*4882a593Smuzhiyun u32 info0; 18*4882a593Smuzhiyun u32 info1; 19*4882a593Smuzhiyun } __packed; 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun /* ath11k_buffer_addr 22*4882a593Smuzhiyun * 23*4882a593Smuzhiyun * info0 24*4882a593Smuzhiyun * Address (lower 32 bits) of the msdu buffer or msdu extension 25*4882a593Smuzhiyun * descriptor or Link descriptor 26*4882a593Smuzhiyun * 27*4882a593Smuzhiyun * addr 28*4882a593Smuzhiyun * Address (upper 8 bits) of the msdu buffer or msdu extension 29*4882a593Smuzhiyun * descriptor or Link descriptor 30*4882a593Smuzhiyun * 31*4882a593Smuzhiyun * return_buffer_manager (RBM) 32*4882a593Smuzhiyun * Consumer: WBM 33*4882a593Smuzhiyun * Producer: SW/FW 34*4882a593Smuzhiyun * Indicates to which buffer manager the buffer or MSDU_EXTENSION 35*4882a593Smuzhiyun * descriptor or link descriptor that is being pointed to shall be 36*4882a593Smuzhiyun * returned after the frame has been processed. It is used by WBM 37*4882a593Smuzhiyun * for routing purposes. 38*4882a593Smuzhiyun * 39*4882a593Smuzhiyun * Values are defined in enum %HAL_RX_BUF_RBM_ 40*4882a593Smuzhiyun * 41*4882a593Smuzhiyun * sw_buffer_cookie 42*4882a593Smuzhiyun * Cookie field exclusively used by SW. HW ignores the contents, 43*4882a593Smuzhiyun * accept that it passes the programmed value on to other 44*4882a593Smuzhiyun * descriptors together with the physical address. 45*4882a593Smuzhiyun * 46*4882a593Smuzhiyun * Field can be used by SW to for example associate the buffers 47*4882a593Smuzhiyun * physical address with the virtual address. 48*4882a593Smuzhiyun */ 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun enum hal_tlv_tag { 51*4882a593Smuzhiyun HAL_MACTX_CBF_START = 0 /* 0x0 */, 52*4882a593Smuzhiyun HAL_PHYRX_DATA = 1 /* 0x1 */, 53*4882a593Smuzhiyun HAL_PHYRX_CBF_DATA_RESP = 2 /* 0x2 */, 54*4882a593Smuzhiyun HAL_PHYRX_ABORT_REQUEST = 3 /* 0x3 */, 55*4882a593Smuzhiyun HAL_PHYRX_USER_ABORT_NOTIFICATION = 4 /* 0x4 */, 56*4882a593Smuzhiyun HAL_MACTX_DATA_RESP = 5 /* 0x5 */, 57*4882a593Smuzhiyun HAL_MACTX_CBF_DATA = 6 /* 0x6 */, 58*4882a593Smuzhiyun HAL_MACTX_CBF_DONE = 7 /* 0x7 */, 59*4882a593Smuzhiyun HAL_MACRX_CBF_READ_REQUEST = 8 /* 0x8 */, 60*4882a593Smuzhiyun HAL_MACRX_CBF_DATA_REQUEST = 9 /* 0x9 */, 61*4882a593Smuzhiyun HAL_MACRX_EXPECT_NDP_RECEPTION = 10 /* 0xa */, 62*4882a593Smuzhiyun HAL_MACRX_FREEZE_CAPTURE_CHANNEL = 11 /* 0xb */, 63*4882a593Smuzhiyun HAL_MACRX_NDP_TIMEOUT = 12 /* 0xc */, 64*4882a593Smuzhiyun HAL_MACRX_ABORT_ACK = 13 /* 0xd */, 65*4882a593Smuzhiyun HAL_MACRX_REQ_IMPLICIT_FB = 14 /* 0xe */, 66*4882a593Smuzhiyun HAL_MACRX_CHAIN_MASK = 15 /* 0xf */, 67*4882a593Smuzhiyun HAL_MACRX_NAP_USER = 16 /* 0x10 */, 68*4882a593Smuzhiyun HAL_MACRX_ABORT_REQUEST = 17 /* 0x11 */, 69*4882a593Smuzhiyun HAL_PHYTX_OTHER_TRANSMIT_INFO16 = 18 /* 0x12 */, 70*4882a593Smuzhiyun HAL_PHYTX_ABORT_ACK = 19 /* 0x13 */, 71*4882a593Smuzhiyun HAL_PHYTX_ABORT_REQUEST = 20 /* 0x14 */, 72*4882a593Smuzhiyun HAL_PHYTX_PKT_END = 21 /* 0x15 */, 73*4882a593Smuzhiyun HAL_PHYTX_PPDU_HEADER_INFO_REQUEST = 22 /* 0x16 */, 74*4882a593Smuzhiyun HAL_PHYTX_REQUEST_CTRL_INFO = 23 /* 0x17 */, 75*4882a593Smuzhiyun HAL_PHYTX_DATA_REQUEST = 24 /* 0x18 */, 76*4882a593Smuzhiyun HAL_PHYTX_BF_CV_LOADING_DONE = 25 /* 0x19 */, 77*4882a593Smuzhiyun HAL_PHYTX_NAP_ACK = 26 /* 0x1a */, 78*4882a593Smuzhiyun HAL_PHYTX_NAP_DONE = 27 /* 0x1b */, 79*4882a593Smuzhiyun HAL_PHYTX_OFF_ACK = 28 /* 0x1c */, 80*4882a593Smuzhiyun HAL_PHYTX_ON_ACK = 29 /* 0x1d */, 81*4882a593Smuzhiyun HAL_PHYTX_SYNTH_OFF_ACK = 30 /* 0x1e */, 82*4882a593Smuzhiyun HAL_PHYTX_DEBUG16 = 31 /* 0x1f */, 83*4882a593Smuzhiyun HAL_MACTX_ABORT_REQUEST = 32 /* 0x20 */, 84*4882a593Smuzhiyun HAL_MACTX_ABORT_ACK = 33 /* 0x21 */, 85*4882a593Smuzhiyun HAL_MACTX_PKT_END = 34 /* 0x22 */, 86*4882a593Smuzhiyun HAL_MACTX_PRE_PHY_DESC = 35 /* 0x23 */, 87*4882a593Smuzhiyun HAL_MACTX_BF_PARAMS_COMMON = 36 /* 0x24 */, 88*4882a593Smuzhiyun HAL_MACTX_BF_PARAMS_PER_USER = 37 /* 0x25 */, 89*4882a593Smuzhiyun HAL_MACTX_PREFETCH_CV = 38 /* 0x26 */, 90*4882a593Smuzhiyun HAL_MACTX_USER_DESC_COMMON = 39 /* 0x27 */, 91*4882a593Smuzhiyun HAL_MACTX_USER_DESC_PER_USER = 40 /* 0x28 */, 92*4882a593Smuzhiyun HAL_EXAMPLE_USER_TLV_16 = 41 /* 0x29 */, 93*4882a593Smuzhiyun HAL_EXAMPLE_TLV_16 = 42 /* 0x2a */, 94*4882a593Smuzhiyun HAL_MACTX_PHY_OFF = 43 /* 0x2b */, 95*4882a593Smuzhiyun HAL_MACTX_PHY_ON = 44 /* 0x2c */, 96*4882a593Smuzhiyun HAL_MACTX_SYNTH_OFF = 45 /* 0x2d */, 97*4882a593Smuzhiyun HAL_MACTX_EXPECT_CBF_COMMON = 46 /* 0x2e */, 98*4882a593Smuzhiyun HAL_MACTX_EXPECT_CBF_PER_USER = 47 /* 0x2f */, 99*4882a593Smuzhiyun HAL_MACTX_PHY_DESC = 48 /* 0x30 */, 100*4882a593Smuzhiyun HAL_MACTX_L_SIG_A = 49 /* 0x31 */, 101*4882a593Smuzhiyun HAL_MACTX_L_SIG_B = 50 /* 0x32 */, 102*4882a593Smuzhiyun HAL_MACTX_HT_SIG = 51 /* 0x33 */, 103*4882a593Smuzhiyun HAL_MACTX_VHT_SIG_A = 52 /* 0x34 */, 104*4882a593Smuzhiyun HAL_MACTX_VHT_SIG_B_SU20 = 53 /* 0x35 */, 105*4882a593Smuzhiyun HAL_MACTX_VHT_SIG_B_SU40 = 54 /* 0x36 */, 106*4882a593Smuzhiyun HAL_MACTX_VHT_SIG_B_SU80 = 55 /* 0x37 */, 107*4882a593Smuzhiyun HAL_MACTX_VHT_SIG_B_SU160 = 56 /* 0x38 */, 108*4882a593Smuzhiyun HAL_MACTX_VHT_SIG_B_MU20 = 57 /* 0x39 */, 109*4882a593Smuzhiyun HAL_MACTX_VHT_SIG_B_MU40 = 58 /* 0x3a */, 110*4882a593Smuzhiyun HAL_MACTX_VHT_SIG_B_MU80 = 59 /* 0x3b */, 111*4882a593Smuzhiyun HAL_MACTX_VHT_SIG_B_MU160 = 60 /* 0x3c */, 112*4882a593Smuzhiyun HAL_MACTX_SERVICE = 61 /* 0x3d */, 113*4882a593Smuzhiyun HAL_MACTX_HE_SIG_A_SU = 62 /* 0x3e */, 114*4882a593Smuzhiyun HAL_MACTX_HE_SIG_A_MU_DL = 63 /* 0x3f */, 115*4882a593Smuzhiyun HAL_MACTX_HE_SIG_A_MU_UL = 64 /* 0x40 */, 116*4882a593Smuzhiyun HAL_MACTX_HE_SIG_B1_MU = 65 /* 0x41 */, 117*4882a593Smuzhiyun HAL_MACTX_HE_SIG_B2_MU = 66 /* 0x42 */, 118*4882a593Smuzhiyun HAL_MACTX_HE_SIG_B2_OFDMA = 67 /* 0x43 */, 119*4882a593Smuzhiyun HAL_MACTX_DELETE_CV = 68 /* 0x44 */, 120*4882a593Smuzhiyun HAL_MACTX_MU_UPLINK_COMMON = 69 /* 0x45 */, 121*4882a593Smuzhiyun HAL_MACTX_MU_UPLINK_USER_SETUP = 70 /* 0x46 */, 122*4882a593Smuzhiyun HAL_MACTX_OTHER_TRANSMIT_INFO = 71 /* 0x47 */, 123*4882a593Smuzhiyun HAL_MACTX_PHY_NAP = 72 /* 0x48 */, 124*4882a593Smuzhiyun HAL_MACTX_DEBUG = 73 /* 0x49 */, 125*4882a593Smuzhiyun HAL_PHYRX_ABORT_ACK = 74 /* 0x4a */, 126*4882a593Smuzhiyun HAL_PHYRX_GENERATED_CBF_DETAILS = 75 /* 0x4b */, 127*4882a593Smuzhiyun HAL_PHYRX_RSSI_LEGACY = 76 /* 0x4c */, 128*4882a593Smuzhiyun HAL_PHYRX_RSSI_HT = 77 /* 0x4d */, 129*4882a593Smuzhiyun HAL_PHYRX_USER_INFO = 78 /* 0x4e */, 130*4882a593Smuzhiyun HAL_PHYRX_PKT_END = 79 /* 0x4f */, 131*4882a593Smuzhiyun HAL_PHYRX_DEBUG = 80 /* 0x50 */, 132*4882a593Smuzhiyun HAL_PHYRX_CBF_TRANSFER_DONE = 81 /* 0x51 */, 133*4882a593Smuzhiyun HAL_PHYRX_CBF_TRANSFER_ABORT = 82 /* 0x52 */, 134*4882a593Smuzhiyun HAL_PHYRX_L_SIG_A = 83 /* 0x53 */, 135*4882a593Smuzhiyun HAL_PHYRX_L_SIG_B = 84 /* 0x54 */, 136*4882a593Smuzhiyun HAL_PHYRX_HT_SIG = 85 /* 0x55 */, 137*4882a593Smuzhiyun HAL_PHYRX_VHT_SIG_A = 86 /* 0x56 */, 138*4882a593Smuzhiyun HAL_PHYRX_VHT_SIG_B_SU20 = 87 /* 0x57 */, 139*4882a593Smuzhiyun HAL_PHYRX_VHT_SIG_B_SU40 = 88 /* 0x58 */, 140*4882a593Smuzhiyun HAL_PHYRX_VHT_SIG_B_SU80 = 89 /* 0x59 */, 141*4882a593Smuzhiyun HAL_PHYRX_VHT_SIG_B_SU160 = 90 /* 0x5a */, 142*4882a593Smuzhiyun HAL_PHYRX_VHT_SIG_B_MU20 = 91 /* 0x5b */, 143*4882a593Smuzhiyun HAL_PHYRX_VHT_SIG_B_MU40 = 92 /* 0x5c */, 144*4882a593Smuzhiyun HAL_PHYRX_VHT_SIG_B_MU80 = 93 /* 0x5d */, 145*4882a593Smuzhiyun HAL_PHYRX_VHT_SIG_B_MU160 = 94 /* 0x5e */, 146*4882a593Smuzhiyun HAL_PHYRX_HE_SIG_A_SU = 95 /* 0x5f */, 147*4882a593Smuzhiyun HAL_PHYRX_HE_SIG_A_MU_DL = 96 /* 0x60 */, 148*4882a593Smuzhiyun HAL_PHYRX_HE_SIG_A_MU_UL = 97 /* 0x61 */, 149*4882a593Smuzhiyun HAL_PHYRX_HE_SIG_B1_MU = 98 /* 0x62 */, 150*4882a593Smuzhiyun HAL_PHYRX_HE_SIG_B2_MU = 99 /* 0x63 */, 151*4882a593Smuzhiyun HAL_PHYRX_HE_SIG_B2_OFDMA = 100 /* 0x64 */, 152*4882a593Smuzhiyun HAL_PHYRX_OTHER_RECEIVE_INFO = 101 /* 0x65 */, 153*4882a593Smuzhiyun HAL_PHYRX_COMMON_USER_INFO = 102 /* 0x66 */, 154*4882a593Smuzhiyun HAL_PHYRX_DATA_DONE = 103 /* 0x67 */, 155*4882a593Smuzhiyun HAL_RECEIVE_RSSI_INFO = 104 /* 0x68 */, 156*4882a593Smuzhiyun HAL_RECEIVE_USER_INFO = 105 /* 0x69 */, 157*4882a593Smuzhiyun HAL_MIMO_CONTROL_INFO = 106 /* 0x6a */, 158*4882a593Smuzhiyun HAL_RX_LOCATION_INFO = 107 /* 0x6b */, 159*4882a593Smuzhiyun HAL_COEX_TX_REQ = 108 /* 0x6c */, 160*4882a593Smuzhiyun HAL_DUMMY = 109 /* 0x6d */, 161*4882a593Smuzhiyun HAL_RX_TIMING_OFFSET_INFO = 110 /* 0x6e */, 162*4882a593Smuzhiyun HAL_EXAMPLE_TLV_32_NAME = 111 /* 0x6f */, 163*4882a593Smuzhiyun HAL_MPDU_LIMIT = 112 /* 0x70 */, 164*4882a593Smuzhiyun HAL_NA_LENGTH_END = 113 /* 0x71 */, 165*4882a593Smuzhiyun HAL_OLE_BUF_STATUS = 114 /* 0x72 */, 166*4882a593Smuzhiyun HAL_PCU_PPDU_SETUP_DONE = 115 /* 0x73 */, 167*4882a593Smuzhiyun HAL_PCU_PPDU_SETUP_END = 116 /* 0x74 */, 168*4882a593Smuzhiyun HAL_PCU_PPDU_SETUP_INIT = 117 /* 0x75 */, 169*4882a593Smuzhiyun HAL_PCU_PPDU_SETUP_START = 118 /* 0x76 */, 170*4882a593Smuzhiyun HAL_PDG_FES_SETUP = 119 /* 0x77 */, 171*4882a593Smuzhiyun HAL_PDG_RESPONSE = 120 /* 0x78 */, 172*4882a593Smuzhiyun HAL_PDG_TX_REQ = 121 /* 0x79 */, 173*4882a593Smuzhiyun HAL_SCH_WAIT_INSTR = 122 /* 0x7a */, 174*4882a593Smuzhiyun HAL_SCHEDULER_TLV = 123 /* 0x7b */, 175*4882a593Smuzhiyun HAL_TQM_FLOW_EMPTY_STATUS = 124 /* 0x7c */, 176*4882a593Smuzhiyun HAL_TQM_FLOW_NOT_EMPTY_STATUS = 125 /* 0x7d */, 177*4882a593Smuzhiyun HAL_TQM_GEN_MPDU_LENGTH_LIST = 126 /* 0x7e */, 178*4882a593Smuzhiyun HAL_TQM_GEN_MPDU_LENGTH_LIST_STATUS = 127 /* 0x7f */, 179*4882a593Smuzhiyun HAL_TQM_GEN_MPDUS = 128 /* 0x80 */, 180*4882a593Smuzhiyun HAL_TQM_GEN_MPDUS_STATUS = 129 /* 0x81 */, 181*4882a593Smuzhiyun HAL_TQM_REMOVE_MPDU = 130 /* 0x82 */, 182*4882a593Smuzhiyun HAL_TQM_REMOVE_MPDU_STATUS = 131 /* 0x83 */, 183*4882a593Smuzhiyun HAL_TQM_REMOVE_MSDU = 132 /* 0x84 */, 184*4882a593Smuzhiyun HAL_TQM_REMOVE_MSDU_STATUS = 133 /* 0x85 */, 185*4882a593Smuzhiyun HAL_TQM_UPDATE_TX_MPDU_COUNT = 134 /* 0x86 */, 186*4882a593Smuzhiyun HAL_TQM_WRITE_CMD = 135 /* 0x87 */, 187*4882a593Smuzhiyun HAL_OFDMA_TRIGGER_DETAILS = 136 /* 0x88 */, 188*4882a593Smuzhiyun HAL_TX_DATA = 137 /* 0x89 */, 189*4882a593Smuzhiyun HAL_TX_FES_SETUP = 138 /* 0x8a */, 190*4882a593Smuzhiyun HAL_RX_PACKET = 139 /* 0x8b */, 191*4882a593Smuzhiyun HAL_EXPECTED_RESPONSE = 140 /* 0x8c */, 192*4882a593Smuzhiyun HAL_TX_MPDU_END = 141 /* 0x8d */, 193*4882a593Smuzhiyun HAL_TX_MPDU_START = 142 /* 0x8e */, 194*4882a593Smuzhiyun HAL_TX_MSDU_END = 143 /* 0x8f */, 195*4882a593Smuzhiyun HAL_TX_MSDU_START = 144 /* 0x90 */, 196*4882a593Smuzhiyun HAL_TX_SW_MODE_SETUP = 145 /* 0x91 */, 197*4882a593Smuzhiyun HAL_TXPCU_BUFFER_STATUS = 146 /* 0x92 */, 198*4882a593Smuzhiyun HAL_TXPCU_USER_BUFFER_STATUS = 147 /* 0x93 */, 199*4882a593Smuzhiyun HAL_DATA_TO_TIME_CONFIG = 148 /* 0x94 */, 200*4882a593Smuzhiyun HAL_EXAMPLE_USER_TLV_32 = 149 /* 0x95 */, 201*4882a593Smuzhiyun HAL_MPDU_INFO = 150 /* 0x96 */, 202*4882a593Smuzhiyun HAL_PDG_USER_SETUP = 151 /* 0x97 */, 203*4882a593Smuzhiyun HAL_TX_11AH_SETUP = 152 /* 0x98 */, 204*4882a593Smuzhiyun HAL_REO_UPDATE_RX_REO_QUEUE_STATUS = 153 /* 0x99 */, 205*4882a593Smuzhiyun HAL_TX_PEER_ENTRY = 154 /* 0x9a */, 206*4882a593Smuzhiyun HAL_TX_RAW_OR_NATIVE_FRAME_SETUP = 155 /* 0x9b */, 207*4882a593Smuzhiyun HAL_EXAMPLE_STRUCT_NAME = 156 /* 0x9c */, 208*4882a593Smuzhiyun HAL_PCU_PPDU_SETUP_END_INFO = 157 /* 0x9d */, 209*4882a593Smuzhiyun HAL_PPDU_RATE_SETTING = 158 /* 0x9e */, 210*4882a593Smuzhiyun HAL_PROT_RATE_SETTING = 159 /* 0x9f */, 211*4882a593Smuzhiyun HAL_RX_MPDU_DETAILS = 160 /* 0xa0 */, 212*4882a593Smuzhiyun HAL_EXAMPLE_USER_TLV_42 = 161 /* 0xa1 */, 213*4882a593Smuzhiyun HAL_RX_MSDU_LINK = 162 /* 0xa2 */, 214*4882a593Smuzhiyun HAL_RX_REO_QUEUE = 163 /* 0xa3 */, 215*4882a593Smuzhiyun HAL_ADDR_SEARCH_ENTRY = 164 /* 0xa4 */, 216*4882a593Smuzhiyun HAL_SCHEDULER_CMD = 165 /* 0xa5 */, 217*4882a593Smuzhiyun HAL_TX_FLUSH = 166 /* 0xa6 */, 218*4882a593Smuzhiyun HAL_TQM_ENTRANCE_RING = 167 /* 0xa7 */, 219*4882a593Smuzhiyun HAL_TX_DATA_WORD = 168 /* 0xa8 */, 220*4882a593Smuzhiyun HAL_TX_MPDU_DETAILS = 169 /* 0xa9 */, 221*4882a593Smuzhiyun HAL_TX_MPDU_LINK = 170 /* 0xaa */, 222*4882a593Smuzhiyun HAL_TX_MPDU_LINK_PTR = 171 /* 0xab */, 223*4882a593Smuzhiyun HAL_TX_MPDU_QUEUE_HEAD = 172 /* 0xac */, 224*4882a593Smuzhiyun HAL_TX_MPDU_QUEUE_EXT = 173 /* 0xad */, 225*4882a593Smuzhiyun HAL_TX_MPDU_QUEUE_EXT_PTR = 174 /* 0xae */, 226*4882a593Smuzhiyun HAL_TX_MSDU_DETAILS = 175 /* 0xaf */, 227*4882a593Smuzhiyun HAL_TX_MSDU_EXTENSION = 176 /* 0xb0 */, 228*4882a593Smuzhiyun HAL_TX_MSDU_FLOW = 177 /* 0xb1 */, 229*4882a593Smuzhiyun HAL_TX_MSDU_LINK = 178 /* 0xb2 */, 230*4882a593Smuzhiyun HAL_TX_MSDU_LINK_ENTRY_PTR = 179 /* 0xb3 */, 231*4882a593Smuzhiyun HAL_RESPONSE_RATE_SETTING = 180 /* 0xb4 */, 232*4882a593Smuzhiyun HAL_TXPCU_BUFFER_BASICS = 181 /* 0xb5 */, 233*4882a593Smuzhiyun HAL_UNIFORM_DESCRIPTOR_HEADER = 182 /* 0xb6 */, 234*4882a593Smuzhiyun HAL_UNIFORM_TQM_CMD_HEADER = 183 /* 0xb7 */, 235*4882a593Smuzhiyun HAL_UNIFORM_TQM_STATUS_HEADER = 184 /* 0xb8 */, 236*4882a593Smuzhiyun HAL_USER_RATE_SETTING = 185 /* 0xb9 */, 237*4882a593Smuzhiyun HAL_WBM_BUFFER_RING = 186 /* 0xba */, 238*4882a593Smuzhiyun HAL_WBM_LINK_DESCRIPTOR_RING = 187 /* 0xbb */, 239*4882a593Smuzhiyun HAL_WBM_RELEASE_RING = 188 /* 0xbc */, 240*4882a593Smuzhiyun HAL_TX_FLUSH_REQ = 189 /* 0xbd */, 241*4882a593Smuzhiyun HAL_RX_MSDU_DETAILS = 190 /* 0xbe */, 242*4882a593Smuzhiyun HAL_TQM_WRITE_CMD_STATUS = 191 /* 0xbf */, 243*4882a593Smuzhiyun HAL_TQM_GET_MPDU_QUEUE_STATS = 192 /* 0xc0 */, 244*4882a593Smuzhiyun HAL_TQM_GET_MSDU_FLOW_STATS = 193 /* 0xc1 */, 245*4882a593Smuzhiyun HAL_EXAMPLE_USER_CTLV_32 = 194 /* 0xc2 */, 246*4882a593Smuzhiyun HAL_TX_FES_STATUS_START = 195 /* 0xc3 */, 247*4882a593Smuzhiyun HAL_TX_FES_STATUS_USER_PPDU = 196 /* 0xc4 */, 248*4882a593Smuzhiyun HAL_TX_FES_STATUS_USER_RESPONSE = 197 /* 0xc5 */, 249*4882a593Smuzhiyun HAL_TX_FES_STATUS_END = 198 /* 0xc6 */, 250*4882a593Smuzhiyun HAL_RX_TRIG_INFO = 199 /* 0xc7 */, 251*4882a593Smuzhiyun HAL_RXPCU_TX_SETUP_CLEAR = 200 /* 0xc8 */, 252*4882a593Smuzhiyun HAL_RX_FRAME_BITMAP_REQ = 201 /* 0xc9 */, 253*4882a593Smuzhiyun HAL_RX_FRAME_BITMAP_ACK = 202 /* 0xca */, 254*4882a593Smuzhiyun HAL_COEX_RX_STATUS = 203 /* 0xcb */, 255*4882a593Smuzhiyun HAL_RX_START_PARAM = 204 /* 0xcc */, 256*4882a593Smuzhiyun HAL_RX_PPDU_START = 205 /* 0xcd */, 257*4882a593Smuzhiyun HAL_RX_PPDU_END = 206 /* 0xce */, 258*4882a593Smuzhiyun HAL_RX_MPDU_START = 207 /* 0xcf */, 259*4882a593Smuzhiyun HAL_RX_MPDU_END = 208 /* 0xd0 */, 260*4882a593Smuzhiyun HAL_RX_MSDU_START = 209 /* 0xd1 */, 261*4882a593Smuzhiyun HAL_RX_MSDU_END = 210 /* 0xd2 */, 262*4882a593Smuzhiyun HAL_RX_ATTENTION = 211 /* 0xd3 */, 263*4882a593Smuzhiyun HAL_RECEIVED_RESPONSE_INFO = 212 /* 0xd4 */, 264*4882a593Smuzhiyun HAL_RX_PHY_SLEEP = 213 /* 0xd5 */, 265*4882a593Smuzhiyun HAL_RX_HEADER = 214 /* 0xd6 */, 266*4882a593Smuzhiyun HAL_RX_PEER_ENTRY = 215 /* 0xd7 */, 267*4882a593Smuzhiyun HAL_RX_FLUSH = 216 /* 0xd8 */, 268*4882a593Smuzhiyun HAL_RX_RESPONSE_REQUIRED_INFO = 217 /* 0xd9 */, 269*4882a593Smuzhiyun HAL_RX_FRAMELESS_BAR_DETAILS = 218 /* 0xda */, 270*4882a593Smuzhiyun HAL_TQM_GET_MPDU_QUEUE_STATS_STATUS = 219 /* 0xdb */, 271*4882a593Smuzhiyun HAL_TQM_GET_MSDU_FLOW_STATS_STATUS = 220 /* 0xdc */, 272*4882a593Smuzhiyun HAL_TX_CBF_INFO = 221 /* 0xdd */, 273*4882a593Smuzhiyun HAL_PCU_PPDU_SETUP_USER = 222 /* 0xde */, 274*4882a593Smuzhiyun HAL_RX_MPDU_PCU_START = 223 /* 0xdf */, 275*4882a593Smuzhiyun HAL_RX_PM_INFO = 224 /* 0xe0 */, 276*4882a593Smuzhiyun HAL_RX_USER_PPDU_END = 225 /* 0xe1 */, 277*4882a593Smuzhiyun HAL_RX_PRE_PPDU_START = 226 /* 0xe2 */, 278*4882a593Smuzhiyun HAL_RX_PREAMBLE = 227 /* 0xe3 */, 279*4882a593Smuzhiyun HAL_TX_FES_SETUP_COMPLETE = 228 /* 0xe4 */, 280*4882a593Smuzhiyun HAL_TX_LAST_MPDU_FETCHED = 229 /* 0xe5 */, 281*4882a593Smuzhiyun HAL_TXDMA_STOP_REQUEST = 230 /* 0xe6 */, 282*4882a593Smuzhiyun HAL_RXPCU_SETUP = 231 /* 0xe7 */, 283*4882a593Smuzhiyun HAL_RXPCU_USER_SETUP = 232 /* 0xe8 */, 284*4882a593Smuzhiyun HAL_TX_FES_STATUS_ACK_OR_BA = 233 /* 0xe9 */, 285*4882a593Smuzhiyun HAL_TQM_ACKED_MPDU = 234 /* 0xea */, 286*4882a593Smuzhiyun HAL_COEX_TX_RESP = 235 /* 0xeb */, 287*4882a593Smuzhiyun HAL_COEX_TX_STATUS = 236 /* 0xec */, 288*4882a593Smuzhiyun HAL_MACTX_COEX_PHY_CTRL = 237 /* 0xed */, 289*4882a593Smuzhiyun HAL_COEX_STATUS_BROADCAST = 238 /* 0xee */, 290*4882a593Smuzhiyun HAL_RESPONSE_START_STATUS = 239 /* 0xef */, 291*4882a593Smuzhiyun HAL_RESPONSE_END_STATUS = 240 /* 0xf0 */, 292*4882a593Smuzhiyun HAL_CRYPTO_STATUS = 241 /* 0xf1 */, 293*4882a593Smuzhiyun HAL_RECEIVED_TRIGGER_INFO = 242 /* 0xf2 */, 294*4882a593Smuzhiyun HAL_REO_ENTRANCE_RING = 243 /* 0xf3 */, 295*4882a593Smuzhiyun HAL_RX_MPDU_LINK = 244 /* 0xf4 */, 296*4882a593Smuzhiyun HAL_COEX_TX_STOP_CTRL = 245 /* 0xf5 */, 297*4882a593Smuzhiyun HAL_RX_PPDU_ACK_REPORT = 246 /* 0xf6 */, 298*4882a593Smuzhiyun HAL_RX_PPDU_NO_ACK_REPORT = 247 /* 0xf7 */, 299*4882a593Smuzhiyun HAL_SCH_COEX_STATUS = 248 /* 0xf8 */, 300*4882a593Smuzhiyun HAL_SCHEDULER_COMMAND_STATUS = 249 /* 0xf9 */, 301*4882a593Smuzhiyun HAL_SCHEDULER_RX_PPDU_NO_RESPONSE_STATUS = 250 /* 0xfa */, 302*4882a593Smuzhiyun HAL_TX_FES_STATUS_PROT = 251 /* 0xfb */, 303*4882a593Smuzhiyun HAL_TX_FES_STATUS_START_PPDU = 252 /* 0xfc */, 304*4882a593Smuzhiyun HAL_TX_FES_STATUS_START_PROT = 253 /* 0xfd */, 305*4882a593Smuzhiyun HAL_TXPCU_PHYTX_DEBUG32 = 254 /* 0xfe */, 306*4882a593Smuzhiyun HAL_TXPCU_PHYTX_OTHER_TRANSMIT_INFO32 = 255 /* 0xff */, 307*4882a593Smuzhiyun HAL_TX_MPDU_COUNT_TRANSFER_END = 256 /* 0x100 */, 308*4882a593Smuzhiyun HAL_WHO_ANCHOR_OFFSET = 257 /* 0x101 */, 309*4882a593Smuzhiyun HAL_WHO_ANCHOR_VALUE = 258 /* 0x102 */, 310*4882a593Smuzhiyun HAL_WHO_CCE_INFO = 259 /* 0x103 */, 311*4882a593Smuzhiyun HAL_WHO_COMMIT = 260 /* 0x104 */, 312*4882a593Smuzhiyun HAL_WHO_COMMIT_DONE = 261 /* 0x105 */, 313*4882a593Smuzhiyun HAL_WHO_FLUSH = 262 /* 0x106 */, 314*4882a593Smuzhiyun HAL_WHO_L2_LLC = 263 /* 0x107 */, 315*4882a593Smuzhiyun HAL_WHO_L2_PAYLOAD = 264 /* 0x108 */, 316*4882a593Smuzhiyun HAL_WHO_L3_CHECKSUM = 265 /* 0x109 */, 317*4882a593Smuzhiyun HAL_WHO_L3_INFO = 266 /* 0x10a */, 318*4882a593Smuzhiyun HAL_WHO_L4_CHECKSUM = 267 /* 0x10b */, 319*4882a593Smuzhiyun HAL_WHO_L4_INFO = 268 /* 0x10c */, 320*4882a593Smuzhiyun HAL_WHO_MSDU = 269 /* 0x10d */, 321*4882a593Smuzhiyun HAL_WHO_MSDU_MISC = 270 /* 0x10e */, 322*4882a593Smuzhiyun HAL_WHO_PACKET_DATA = 271 /* 0x10f */, 323*4882a593Smuzhiyun HAL_WHO_PACKET_HDR = 272 /* 0x110 */, 324*4882a593Smuzhiyun HAL_WHO_PPDU_END = 273 /* 0x111 */, 325*4882a593Smuzhiyun HAL_WHO_PPDU_START = 274 /* 0x112 */, 326*4882a593Smuzhiyun HAL_WHO_TSO = 275 /* 0x113 */, 327*4882a593Smuzhiyun HAL_WHO_WMAC_HEADER_PV0 = 276 /* 0x114 */, 328*4882a593Smuzhiyun HAL_WHO_WMAC_HEADER_PV1 = 277 /* 0x115 */, 329*4882a593Smuzhiyun HAL_WHO_WMAC_IV = 278 /* 0x116 */, 330*4882a593Smuzhiyun HAL_MPDU_INFO_END = 279 /* 0x117 */, 331*4882a593Smuzhiyun HAL_MPDU_INFO_BITMAP = 280 /* 0x118 */, 332*4882a593Smuzhiyun HAL_TX_QUEUE_EXTENSION = 281 /* 0x119 */, 333*4882a593Smuzhiyun HAL_RX_PEER_ENTRY_DETAILS = 282 /* 0x11a */, 334*4882a593Smuzhiyun HAL_RX_REO_QUEUE_REFERENCE = 283 /* 0x11b */, 335*4882a593Smuzhiyun HAL_RX_REO_QUEUE_EXT = 284 /* 0x11c */, 336*4882a593Smuzhiyun HAL_SCHEDULER_SELFGEN_RESPONSE_STATUS = 285 /* 0x11d */, 337*4882a593Smuzhiyun HAL_TQM_UPDATE_TX_MPDU_COUNT_STATUS = 286 /* 0x11e */, 338*4882a593Smuzhiyun HAL_TQM_ACKED_MPDU_STATUS = 287 /* 0x11f */, 339*4882a593Smuzhiyun HAL_TQM_ADD_MSDU_STATUS = 288 /* 0x120 */, 340*4882a593Smuzhiyun HAL_RX_MPDU_LINK_PTR = 289 /* 0x121 */, 341*4882a593Smuzhiyun HAL_REO_DESTINATION_RING = 290 /* 0x122 */, 342*4882a593Smuzhiyun HAL_TQM_LIST_GEN_DONE = 291 /* 0x123 */, 343*4882a593Smuzhiyun HAL_WHO_TERMINATE = 292 /* 0x124 */, 344*4882a593Smuzhiyun HAL_TX_LAST_MPDU_END = 293 /* 0x125 */, 345*4882a593Smuzhiyun HAL_TX_CV_DATA = 294 /* 0x126 */, 346*4882a593Smuzhiyun HAL_TCL_ENTRANCE_FROM_PPE_RING = 295 /* 0x127 */, 347*4882a593Smuzhiyun HAL_PPDU_TX_END = 296 /* 0x128 */, 348*4882a593Smuzhiyun HAL_PROT_TX_END = 297 /* 0x129 */, 349*4882a593Smuzhiyun HAL_PDG_RESPONSE_RATE_SETTING = 298 /* 0x12a */, 350*4882a593Smuzhiyun HAL_MPDU_INFO_GLOBAL_END = 299 /* 0x12b */, 351*4882a593Smuzhiyun HAL_TQM_SCH_INSTR_GLOBAL_END = 300 /* 0x12c */, 352*4882a593Smuzhiyun HAL_RX_PPDU_END_USER_STATS = 301 /* 0x12d */, 353*4882a593Smuzhiyun HAL_RX_PPDU_END_USER_STATS_EXT = 302 /* 0x12e */, 354*4882a593Smuzhiyun HAL_NO_ACK_REPORT = 303 /* 0x12f */, 355*4882a593Smuzhiyun HAL_ACK_REPORT = 304 /* 0x130 */, 356*4882a593Smuzhiyun HAL_UNIFORM_REO_CMD_HEADER = 305 /* 0x131 */, 357*4882a593Smuzhiyun HAL_REO_GET_QUEUE_STATS = 306 /* 0x132 */, 358*4882a593Smuzhiyun HAL_REO_FLUSH_QUEUE = 307 /* 0x133 */, 359*4882a593Smuzhiyun HAL_REO_FLUSH_CACHE = 308 /* 0x134 */, 360*4882a593Smuzhiyun HAL_REO_UNBLOCK_CACHE = 309 /* 0x135 */, 361*4882a593Smuzhiyun HAL_UNIFORM_REO_STATUS_HEADER = 310 /* 0x136 */, 362*4882a593Smuzhiyun HAL_REO_GET_QUEUE_STATS_STATUS = 311 /* 0x137 */, 363*4882a593Smuzhiyun HAL_REO_FLUSH_QUEUE_STATUS = 312 /* 0x138 */, 364*4882a593Smuzhiyun HAL_REO_FLUSH_CACHE_STATUS = 313 /* 0x139 */, 365*4882a593Smuzhiyun HAL_REO_UNBLOCK_CACHE_STATUS = 314 /* 0x13a */, 366*4882a593Smuzhiyun HAL_TQM_FLUSH_CACHE = 315 /* 0x13b */, 367*4882a593Smuzhiyun HAL_TQM_UNBLOCK_CACHE = 316 /* 0x13c */, 368*4882a593Smuzhiyun HAL_TQM_FLUSH_CACHE_STATUS = 317 /* 0x13d */, 369*4882a593Smuzhiyun HAL_TQM_UNBLOCK_CACHE_STATUS = 318 /* 0x13e */, 370*4882a593Smuzhiyun HAL_RX_PPDU_END_STATUS_DONE = 319 /* 0x13f */, 371*4882a593Smuzhiyun HAL_RX_STATUS_BUFFER_DONE = 320 /* 0x140 */, 372*4882a593Smuzhiyun HAL_BUFFER_ADDR_INFO = 321 /* 0x141 */, 373*4882a593Smuzhiyun HAL_RX_MSDU_DESC_INFO = 322 /* 0x142 */, 374*4882a593Smuzhiyun HAL_RX_MPDU_DESC_INFO = 323 /* 0x143 */, 375*4882a593Smuzhiyun HAL_TCL_DATA_CMD = 324 /* 0x144 */, 376*4882a593Smuzhiyun HAL_TCL_GSE_CMD = 325 /* 0x145 */, 377*4882a593Smuzhiyun HAL_TCL_EXIT_BASE = 326 /* 0x146 */, 378*4882a593Smuzhiyun HAL_TCL_COMPACT_EXIT_RING = 327 /* 0x147 */, 379*4882a593Smuzhiyun HAL_TCL_REGULAR_EXIT_RING = 328 /* 0x148 */, 380*4882a593Smuzhiyun HAL_TCL_EXTENDED_EXIT_RING = 329 /* 0x149 */, 381*4882a593Smuzhiyun HAL_UPLINK_COMMON_INFO = 330 /* 0x14a */, 382*4882a593Smuzhiyun HAL_UPLINK_USER_SETUP_INFO = 331 /* 0x14b */, 383*4882a593Smuzhiyun HAL_TX_DATA_SYNC = 332 /* 0x14c */, 384*4882a593Smuzhiyun HAL_PHYRX_CBF_READ_REQUEST_ACK = 333 /* 0x14d */, 385*4882a593Smuzhiyun HAL_TCL_STATUS_RING = 334 /* 0x14e */, 386*4882a593Smuzhiyun HAL_TQM_GET_MPDU_HEAD_INFO = 335 /* 0x14f */, 387*4882a593Smuzhiyun HAL_TQM_SYNC_CMD = 336 /* 0x150 */, 388*4882a593Smuzhiyun HAL_TQM_GET_MPDU_HEAD_INFO_STATUS = 337 /* 0x151 */, 389*4882a593Smuzhiyun HAL_TQM_SYNC_CMD_STATUS = 338 /* 0x152 */, 390*4882a593Smuzhiyun HAL_TQM_THRESHOLD_DROP_NOTIFICATION_STATUS = 339 /* 0x153 */, 391*4882a593Smuzhiyun HAL_TQM_DESCRIPTOR_THRESHOLD_REACHED_STATUS = 340 /* 0x154 */, 392*4882a593Smuzhiyun HAL_REO_FLUSH_TIMEOUT_LIST = 341 /* 0x155 */, 393*4882a593Smuzhiyun HAL_REO_FLUSH_TIMEOUT_LIST_STATUS = 342 /* 0x156 */, 394*4882a593Smuzhiyun HAL_REO_TO_PPE_RING = 343 /* 0x157 */, 395*4882a593Smuzhiyun HAL_RX_MPDU_INFO = 344 /* 0x158 */, 396*4882a593Smuzhiyun HAL_REO_DESCRIPTOR_THRESHOLD_REACHED_STATUS = 345 /* 0x159 */, 397*4882a593Smuzhiyun HAL_SCHEDULER_RX_SIFS_RESPONSE_TRIGGER_STATUS = 346 /* 0x15a */, 398*4882a593Smuzhiyun HAL_EXAMPLE_USER_TLV_32_NAME = 347 /* 0x15b */, 399*4882a593Smuzhiyun HAL_RX_PPDU_START_USER_INFO = 348 /* 0x15c */, 400*4882a593Smuzhiyun HAL_RX_RXPCU_CLASSIFICATION_OVERVIEW = 349 /* 0x15d */, 401*4882a593Smuzhiyun HAL_RX_RING_MASK = 350 /* 0x15e */, 402*4882a593Smuzhiyun HAL_WHO_CLASSIFY_INFO = 351 /* 0x15f */, 403*4882a593Smuzhiyun HAL_TXPT_CLASSIFY_INFO = 352 /* 0x160 */, 404*4882a593Smuzhiyun HAL_RXPT_CLASSIFY_INFO = 353 /* 0x161 */, 405*4882a593Smuzhiyun HAL_TX_FLOW_SEARCH_ENTRY = 354 /* 0x162 */, 406*4882a593Smuzhiyun HAL_RX_FLOW_SEARCH_ENTRY = 355 /* 0x163 */, 407*4882a593Smuzhiyun HAL_RECEIVED_TRIGGER_INFO_DETAILS = 356 /* 0x164 */, 408*4882a593Smuzhiyun HAL_COEX_MAC_NAP = 357 /* 0x165 */, 409*4882a593Smuzhiyun HAL_MACRX_ABORT_REQUEST_INFO = 358 /* 0x166 */, 410*4882a593Smuzhiyun HAL_MACTX_ABORT_REQUEST_INFO = 359 /* 0x167 */, 411*4882a593Smuzhiyun HAL_PHYRX_ABORT_REQUEST_INFO = 360 /* 0x168 */, 412*4882a593Smuzhiyun HAL_PHYTX_ABORT_REQUEST_INFO = 361 /* 0x169 */, 413*4882a593Smuzhiyun HAL_RXPCU_PPDU_END_INFO = 362 /* 0x16a */, 414*4882a593Smuzhiyun HAL_WHO_MESH_CONTROL = 363 /* 0x16b */, 415*4882a593Smuzhiyun HAL_L_SIG_A_INFO = 364 /* 0x16c */, 416*4882a593Smuzhiyun HAL_L_SIG_B_INFO = 365 /* 0x16d */, 417*4882a593Smuzhiyun HAL_HT_SIG_INFO = 366 /* 0x16e */, 418*4882a593Smuzhiyun HAL_VHT_SIG_A_INFO = 367 /* 0x16f */, 419*4882a593Smuzhiyun HAL_VHT_SIG_B_SU20_INFO = 368 /* 0x170 */, 420*4882a593Smuzhiyun HAL_VHT_SIG_B_SU40_INFO = 369 /* 0x171 */, 421*4882a593Smuzhiyun HAL_VHT_SIG_B_SU80_INFO = 370 /* 0x172 */, 422*4882a593Smuzhiyun HAL_VHT_SIG_B_SU160_INFO = 371 /* 0x173 */, 423*4882a593Smuzhiyun HAL_VHT_SIG_B_MU20_INFO = 372 /* 0x174 */, 424*4882a593Smuzhiyun HAL_VHT_SIG_B_MU40_INFO = 373 /* 0x175 */, 425*4882a593Smuzhiyun HAL_VHT_SIG_B_MU80_INFO = 374 /* 0x176 */, 426*4882a593Smuzhiyun HAL_VHT_SIG_B_MU160_INFO = 375 /* 0x177 */, 427*4882a593Smuzhiyun HAL_SERVICE_INFO = 376 /* 0x178 */, 428*4882a593Smuzhiyun HAL_HE_SIG_A_SU_INFO = 377 /* 0x179 */, 429*4882a593Smuzhiyun HAL_HE_SIG_A_MU_DL_INFO = 378 /* 0x17a */, 430*4882a593Smuzhiyun HAL_HE_SIG_A_MU_UL_INFO = 379 /* 0x17b */, 431*4882a593Smuzhiyun HAL_HE_SIG_B1_MU_INFO = 380 /* 0x17c */, 432*4882a593Smuzhiyun HAL_HE_SIG_B2_MU_INFO = 381 /* 0x17d */, 433*4882a593Smuzhiyun HAL_HE_SIG_B2_OFDMA_INFO = 382 /* 0x17e */, 434*4882a593Smuzhiyun HAL_PDG_SW_MODE_BW_START = 383 /* 0x17f */, 435*4882a593Smuzhiyun HAL_PDG_SW_MODE_BW_END = 384 /* 0x180 */, 436*4882a593Smuzhiyun HAL_PDG_WAIT_FOR_MAC_REQUEST = 385 /* 0x181 */, 437*4882a593Smuzhiyun HAL_PDG_WAIT_FOR_PHY_REQUEST = 386 /* 0x182 */, 438*4882a593Smuzhiyun HAL_SCHEDULER_END = 387 /* 0x183 */, 439*4882a593Smuzhiyun HAL_PEER_TABLE_ENTRY = 388 /* 0x184 */, 440*4882a593Smuzhiyun HAL_SW_PEER_INFO = 389 /* 0x185 */, 441*4882a593Smuzhiyun HAL_RXOLE_CCE_CLASSIFY_INFO = 390 /* 0x186 */, 442*4882a593Smuzhiyun HAL_TCL_CCE_CLASSIFY_INFO = 391 /* 0x187 */, 443*4882a593Smuzhiyun HAL_RXOLE_CCE_INFO = 392 /* 0x188 */, 444*4882a593Smuzhiyun HAL_TCL_CCE_INFO = 393 /* 0x189 */, 445*4882a593Smuzhiyun HAL_TCL_CCE_SUPERRULE = 394 /* 0x18a */, 446*4882a593Smuzhiyun HAL_CCE_RULE = 395 /* 0x18b */, 447*4882a593Smuzhiyun HAL_RX_PPDU_START_DROPPED = 396 /* 0x18c */, 448*4882a593Smuzhiyun HAL_RX_PPDU_END_DROPPED = 397 /* 0x18d */, 449*4882a593Smuzhiyun HAL_RX_PPDU_END_STATUS_DONE_DROPPED = 398 /* 0x18e */, 450*4882a593Smuzhiyun HAL_RX_MPDU_START_DROPPED = 399 /* 0x18f */, 451*4882a593Smuzhiyun HAL_RX_MSDU_START_DROPPED = 400 /* 0x190 */, 452*4882a593Smuzhiyun HAL_RX_MSDU_END_DROPPED = 401 /* 0x191 */, 453*4882a593Smuzhiyun HAL_RX_MPDU_END_DROPPED = 402 /* 0x192 */, 454*4882a593Smuzhiyun HAL_RX_ATTENTION_DROPPED = 403 /* 0x193 */, 455*4882a593Smuzhiyun HAL_TXPCU_USER_SETUP = 404 /* 0x194 */, 456*4882a593Smuzhiyun HAL_RXPCU_USER_SETUP_EXT = 405 /* 0x195 */, 457*4882a593Smuzhiyun HAL_CE_SRC_DESC = 406 /* 0x196 */, 458*4882a593Smuzhiyun HAL_CE_STAT_DESC = 407 /* 0x197 */, 459*4882a593Smuzhiyun HAL_RXOLE_CCE_SUPERRULE = 408 /* 0x198 */, 460*4882a593Smuzhiyun HAL_TX_RATE_STATS_INFO = 409 /* 0x199 */, 461*4882a593Smuzhiyun HAL_CMD_PART_0_END = 410 /* 0x19a */, 462*4882a593Smuzhiyun HAL_MACTX_SYNTH_ON = 411 /* 0x19b */, 463*4882a593Smuzhiyun HAL_SCH_CRITICAL_TLV_REFERENCE = 412 /* 0x19c */, 464*4882a593Smuzhiyun HAL_TQM_MPDU_GLOBAL_START = 413 /* 0x19d */, 465*4882a593Smuzhiyun HAL_EXAMPLE_TLV_32 = 414 /* 0x19e */, 466*4882a593Smuzhiyun HAL_TQM_UPDATE_TX_MSDU_FLOW = 415 /* 0x19f */, 467*4882a593Smuzhiyun HAL_TQM_UPDATE_TX_MPDU_QUEUE_HEAD = 416 /* 0x1a0 */, 468*4882a593Smuzhiyun HAL_TQM_UPDATE_TX_MSDU_FLOW_STATUS = 417 /* 0x1a1 */, 469*4882a593Smuzhiyun HAL_TQM_UPDATE_TX_MPDU_QUEUE_HEAD_STATUS = 418 /* 0x1a2 */, 470*4882a593Smuzhiyun HAL_REO_UPDATE_RX_REO_QUEUE = 419 /* 0x1a3 */, 471*4882a593Smuzhiyun HAL_CE_DST_DESC = 420 /* 0x1a4 */, 472*4882a593Smuzhiyun HAL_TLV_BASE = 511 /* 0x1ff */, 473*4882a593Smuzhiyun }; 474*4882a593Smuzhiyun 475*4882a593Smuzhiyun #define HAL_TLV_HDR_TAG GENMASK(9, 1) 476*4882a593Smuzhiyun #define HAL_TLV_HDR_LEN GENMASK(25, 10) 477*4882a593Smuzhiyun 478*4882a593Smuzhiyun #define HAL_TLV_ALIGN 4 479*4882a593Smuzhiyun 480*4882a593Smuzhiyun struct hal_tlv_hdr { 481*4882a593Smuzhiyun u32 tl; 482*4882a593Smuzhiyun u8 value[]; 483*4882a593Smuzhiyun } __packed; 484*4882a593Smuzhiyun 485*4882a593Smuzhiyun #define RX_MPDU_DESC_INFO0_MSDU_COUNT GENMASK(7, 0) 486*4882a593Smuzhiyun #define RX_MPDU_DESC_INFO0_SEQ_NUM GENMASK(19, 8) 487*4882a593Smuzhiyun #define RX_MPDU_DESC_INFO0_FRAG_FLAG BIT(20) 488*4882a593Smuzhiyun #define RX_MPDU_DESC_INFO0_MPDU_RETRY BIT(21) 489*4882a593Smuzhiyun #define RX_MPDU_DESC_INFO0_AMPDU_FLAG BIT(22) 490*4882a593Smuzhiyun #define RX_MPDU_DESC_INFO0_BAR_FRAME BIT(23) 491*4882a593Smuzhiyun #define RX_MPDU_DESC_INFO0_VALID_PN BIT(24) 492*4882a593Smuzhiyun #define RX_MPDU_DESC_INFO0_VALID_SA BIT(25) 493*4882a593Smuzhiyun #define RX_MPDU_DESC_INFO0_SA_IDX_TIMEOUT BIT(26) 494*4882a593Smuzhiyun #define RX_MPDU_DESC_INFO0_VALID_DA BIT(27) 495*4882a593Smuzhiyun #define RX_MPDU_DESC_INFO0_DA_MCBC BIT(28) 496*4882a593Smuzhiyun #define RX_MPDU_DESC_INFO0_DA_IDX_TIMEOUT BIT(29) 497*4882a593Smuzhiyun #define RX_MPDU_DESC_INFO0_RAW_MPDU BIT(30) 498*4882a593Smuzhiyun 499*4882a593Smuzhiyun struct rx_mpdu_desc { 500*4882a593Smuzhiyun u32 info0; /* %RX_MPDU_DESC_INFO */ 501*4882a593Smuzhiyun u32 meta_data; 502*4882a593Smuzhiyun } __packed; 503*4882a593Smuzhiyun 504*4882a593Smuzhiyun /* rx_mpdu_desc 505*4882a593Smuzhiyun * Producer: RXDMA 506*4882a593Smuzhiyun * Consumer: REO/SW/FW 507*4882a593Smuzhiyun * 508*4882a593Smuzhiyun * msdu_count 509*4882a593Smuzhiyun * The number of MSDUs within the MPDU 510*4882a593Smuzhiyun * 511*4882a593Smuzhiyun * mpdu_sequence_number 512*4882a593Smuzhiyun * The field can have two different meanings based on the setting 513*4882a593Smuzhiyun * of field 'bar_frame'. If 'bar_frame' is set, it means the MPDU 514*4882a593Smuzhiyun * start sequence number from the BAR frame otherwise it means 515*4882a593Smuzhiyun * the MPDU sequence number of the received frame. 516*4882a593Smuzhiyun * 517*4882a593Smuzhiyun * fragment_flag 518*4882a593Smuzhiyun * When set, this MPDU is a fragment and REO should forward this 519*4882a593Smuzhiyun * fragment MPDU to the REO destination ring without any reorder 520*4882a593Smuzhiyun * checks, pn checks or bitmap update. This implies that REO is 521*4882a593Smuzhiyun * forwarding the pointer to the MSDU link descriptor. 522*4882a593Smuzhiyun * 523*4882a593Smuzhiyun * mpdu_retry_bit 524*4882a593Smuzhiyun * The retry bit setting from the MPDU header of the received frame 525*4882a593Smuzhiyun * 526*4882a593Smuzhiyun * ampdu_flag 527*4882a593Smuzhiyun * Indicates the MPDU was received as part of an A-MPDU. 528*4882a593Smuzhiyun * 529*4882a593Smuzhiyun * bar_frame 530*4882a593Smuzhiyun * Indicates the received frame is a BAR frame. After processing, 531*4882a593Smuzhiyun * this frame shall be pushed to SW or deleted. 532*4882a593Smuzhiyun * 533*4882a593Smuzhiyun * valid_pn 534*4882a593Smuzhiyun * When not set, REO will not perform a PN sequence number check. 535*4882a593Smuzhiyun * 536*4882a593Smuzhiyun * valid_sa 537*4882a593Smuzhiyun * Indicates OLE found a valid SA entry for all MSDUs in this MPDU. 538*4882a593Smuzhiyun * 539*4882a593Smuzhiyun * sa_idx_timeout 540*4882a593Smuzhiyun * Indicates, at least 1 MSDU within the MPDU has an unsuccessful 541*4882a593Smuzhiyun * MAC source address search due to the expiration of search timer. 542*4882a593Smuzhiyun * 543*4882a593Smuzhiyun * valid_da 544*4882a593Smuzhiyun * When set, OLE found a valid DA entry for all MSDUs in this MPDU. 545*4882a593Smuzhiyun * 546*4882a593Smuzhiyun * da_mcbc 547*4882a593Smuzhiyun * Field Only valid if valid_da is set. Indicates at least one of 548*4882a593Smuzhiyun * the DA addresses is a Multicast or Broadcast address. 549*4882a593Smuzhiyun * 550*4882a593Smuzhiyun * da_idx_timeout 551*4882a593Smuzhiyun * Indicates, at least 1 MSDU within the MPDU has an unsuccessful 552*4882a593Smuzhiyun * MAC destination address search due to the expiration of search 553*4882a593Smuzhiyun * timer. 554*4882a593Smuzhiyun * 555*4882a593Smuzhiyun * raw_mpdu 556*4882a593Smuzhiyun * Field only valid when first_msdu_in_mpdu_flag is set. Indicates 557*4882a593Smuzhiyun * the contents in the MSDU buffer contains a 'RAW' MPDU. 558*4882a593Smuzhiyun */ 559*4882a593Smuzhiyun 560*4882a593Smuzhiyun enum hal_rx_msdu_desc_reo_dest_ind { 561*4882a593Smuzhiyun HAL_RX_MSDU_DESC_REO_DEST_IND_TCL, 562*4882a593Smuzhiyun HAL_RX_MSDU_DESC_REO_DEST_IND_SW1, 563*4882a593Smuzhiyun HAL_RX_MSDU_DESC_REO_DEST_IND_SW2, 564*4882a593Smuzhiyun HAL_RX_MSDU_DESC_REO_DEST_IND_SW3, 565*4882a593Smuzhiyun HAL_RX_MSDU_DESC_REO_DEST_IND_SW4, 566*4882a593Smuzhiyun HAL_RX_MSDU_DESC_REO_DEST_IND_RELEASE, 567*4882a593Smuzhiyun HAL_RX_MSDU_DESC_REO_DEST_IND_FW, 568*4882a593Smuzhiyun }; 569*4882a593Smuzhiyun 570*4882a593Smuzhiyun #define RX_MSDU_DESC_INFO0_FIRST_MSDU_IN_MPDU BIT(0) 571*4882a593Smuzhiyun #define RX_MSDU_DESC_INFO0_LAST_MSDU_IN_MPDU BIT(1) 572*4882a593Smuzhiyun #define RX_MSDU_DESC_INFO0_MSDU_CONTINUATION BIT(2) 573*4882a593Smuzhiyun #define RX_MSDU_DESC_INFO0_MSDU_LENGTH GENMASK(16, 3) 574*4882a593Smuzhiyun #define RX_MSDU_DESC_INFO0_REO_DEST_IND GENMASK(21, 17) 575*4882a593Smuzhiyun #define RX_MSDU_DESC_INFO0_MSDU_DROP BIT(22) 576*4882a593Smuzhiyun #define RX_MSDU_DESC_INFO0_VALID_SA BIT(23) 577*4882a593Smuzhiyun #define RX_MSDU_DESC_INFO0_SA_IDX_TIMEOUT BIT(24) 578*4882a593Smuzhiyun #define RX_MSDU_DESC_INFO0_VALID_DA BIT(25) 579*4882a593Smuzhiyun #define RX_MSDU_DESC_INFO0_DA_MCBC BIT(26) 580*4882a593Smuzhiyun #define RX_MSDU_DESC_INFO0_DA_IDX_TIMEOUT BIT(27) 581*4882a593Smuzhiyun 582*4882a593Smuzhiyun #define HAL_RX_MSDU_PKT_LENGTH_GET(val) \ 583*4882a593Smuzhiyun (FIELD_GET(RX_MSDU_DESC_INFO0_MSDU_LENGTH, (val))) 584*4882a593Smuzhiyun 585*4882a593Smuzhiyun struct rx_msdu_desc { 586*4882a593Smuzhiyun u32 info0; 587*4882a593Smuzhiyun u32 rsvd0; 588*4882a593Smuzhiyun } __packed; 589*4882a593Smuzhiyun 590*4882a593Smuzhiyun /* rx_msdu_desc 591*4882a593Smuzhiyun * 592*4882a593Smuzhiyun * first_msdu_in_mpdu 593*4882a593Smuzhiyun * Indicates first msdu in mpdu. 594*4882a593Smuzhiyun * 595*4882a593Smuzhiyun * last_msdu_in_mpdu 596*4882a593Smuzhiyun * Indicates last msdu in mpdu. This flag can be true only when 597*4882a593Smuzhiyun * 'Msdu_continuation' set to 0. This implies that when an msdu 598*4882a593Smuzhiyun * is spread out over multiple buffers and thus msdu_continuation 599*4882a593Smuzhiyun * is set, only for the very last buffer of the msdu, can the 600*4882a593Smuzhiyun * 'last_msdu_in_mpdu' be set. 601*4882a593Smuzhiyun * 602*4882a593Smuzhiyun * When both first_msdu_in_mpdu and last_msdu_in_mpdu are set, 603*4882a593Smuzhiyun * the MPDU that this MSDU belongs to only contains a single MSDU. 604*4882a593Smuzhiyun * 605*4882a593Smuzhiyun * msdu_continuation 606*4882a593Smuzhiyun * When set, this MSDU buffer was not able to hold the entire MSDU. 607*4882a593Smuzhiyun * The next buffer will therefor contain additional information 608*4882a593Smuzhiyun * related to this MSDU. 609*4882a593Smuzhiyun * 610*4882a593Smuzhiyun * msdu_length 611*4882a593Smuzhiyun * Field is only valid in combination with the 'first_msdu_in_mpdu' 612*4882a593Smuzhiyun * being set. Full MSDU length in bytes after decapsulation. This 613*4882a593Smuzhiyun * field is still valid for MPDU frames without A-MSDU. It still 614*4882a593Smuzhiyun * represents MSDU length after decapsulation Or in case of RAW 615*4882a593Smuzhiyun * MPDUs, it indicates the length of the entire MPDU (without FCS 616*4882a593Smuzhiyun * field). 617*4882a593Smuzhiyun * 618*4882a593Smuzhiyun * reo_destination_indication 619*4882a593Smuzhiyun * The id of the reo exit ring where the msdu frame shall push 620*4882a593Smuzhiyun * after (MPDU level) reordering has finished. Values are defined 621*4882a593Smuzhiyun * in enum %HAL_RX_MSDU_DESC_REO_DEST_IND_. 622*4882a593Smuzhiyun * 623*4882a593Smuzhiyun * msdu_drop 624*4882a593Smuzhiyun * Indicates that REO shall drop this MSDU and not forward it to 625*4882a593Smuzhiyun * any other ring. 626*4882a593Smuzhiyun * 627*4882a593Smuzhiyun * valid_sa 628*4882a593Smuzhiyun * Indicates OLE found a valid SA entry for this MSDU. 629*4882a593Smuzhiyun * 630*4882a593Smuzhiyun * sa_idx_timeout 631*4882a593Smuzhiyun * Indicates, an unsuccessful MAC source address search due to 632*4882a593Smuzhiyun * the expiration of search timer for this MSDU. 633*4882a593Smuzhiyun * 634*4882a593Smuzhiyun * valid_da 635*4882a593Smuzhiyun * When set, OLE found a valid DA entry for this MSDU. 636*4882a593Smuzhiyun * 637*4882a593Smuzhiyun * da_mcbc 638*4882a593Smuzhiyun * Field Only valid if valid_da is set. Indicates the DA address 639*4882a593Smuzhiyun * is a Multicast or Broadcast address for this MSDU. 640*4882a593Smuzhiyun * 641*4882a593Smuzhiyun * da_idx_timeout 642*4882a593Smuzhiyun * Indicates, an unsuccessful MAC destination address search due 643*4882a593Smuzhiyun * to the expiration of search timer fot this MSDU. 644*4882a593Smuzhiyun */ 645*4882a593Smuzhiyun 646*4882a593Smuzhiyun enum hal_reo_dest_ring_buffer_type { 647*4882a593Smuzhiyun HAL_REO_DEST_RING_BUFFER_TYPE_MSDU, 648*4882a593Smuzhiyun HAL_REO_DEST_RING_BUFFER_TYPE_LINK_DESC, 649*4882a593Smuzhiyun }; 650*4882a593Smuzhiyun 651*4882a593Smuzhiyun enum hal_reo_dest_ring_push_reason { 652*4882a593Smuzhiyun HAL_REO_DEST_RING_PUSH_REASON_ERR_DETECTED, 653*4882a593Smuzhiyun HAL_REO_DEST_RING_PUSH_REASON_ROUTING_INSTRUCTION, 654*4882a593Smuzhiyun }; 655*4882a593Smuzhiyun 656*4882a593Smuzhiyun enum hal_reo_dest_ring_error_code { 657*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_DESC_ADDR_ZERO, 658*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_DESC_INVALID, 659*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_AMPDU_IN_NON_BA, 660*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_NON_BA_DUPLICATE, 661*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_BA_DUPLICATE, 662*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_FRAME_2K_JUMP, 663*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_BAR_2K_JUMP, 664*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_FRAME_OOR, 665*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_BAR_OOR, 666*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_NO_BA_SESSION, 667*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_FRAME_SN_EQUALS_SSN, 668*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_PN_CHECK_FAILED, 669*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_2K_ERR_FLAG_SET, 670*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_PN_ERR_FLAG_SET, 671*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_DESC_BLOCKED, 672*4882a593Smuzhiyun HAL_REO_DEST_RING_ERROR_CODE_MAX, 673*4882a593Smuzhiyun }; 674*4882a593Smuzhiyun 675*4882a593Smuzhiyun #define HAL_REO_DEST_RING_INFO0_QUEUE_ADDR_HI GENMASK(7, 0) 676*4882a593Smuzhiyun #define HAL_REO_DEST_RING_INFO0_BUFFER_TYPE BIT(8) 677*4882a593Smuzhiyun #define HAL_REO_DEST_RING_INFO0_PUSH_REASON GENMASK(10, 9) 678*4882a593Smuzhiyun #define HAL_REO_DEST_RING_INFO0_ERROR_CODE GENMASK(15, 11) 679*4882a593Smuzhiyun #define HAL_REO_DEST_RING_INFO0_RX_QUEUE_NUM GENMASK(31, 16) 680*4882a593Smuzhiyun 681*4882a593Smuzhiyun #define HAL_REO_DEST_RING_INFO1_REORDER_INFO_VALID BIT(0) 682*4882a593Smuzhiyun #define HAL_REO_DEST_RING_INFO1_REORDER_OPCODE GENMASK(4, 1) 683*4882a593Smuzhiyun #define HAL_REO_DEST_RING_INFO1_REORDER_SLOT_IDX GENMASK(12, 5) 684*4882a593Smuzhiyun 685*4882a593Smuzhiyun #define HAL_REO_DEST_RING_INFO2_RING_ID GENMASK(27, 20) 686*4882a593Smuzhiyun #define HAL_REO_DEST_RING_INFO2_LOOPING_COUNT GENMASK(31, 28) 687*4882a593Smuzhiyun 688*4882a593Smuzhiyun struct hal_reo_dest_ring { 689*4882a593Smuzhiyun struct ath11k_buffer_addr buf_addr_info; 690*4882a593Smuzhiyun struct rx_mpdu_desc rx_mpdu_info; 691*4882a593Smuzhiyun struct rx_msdu_desc rx_msdu_info; 692*4882a593Smuzhiyun u32 queue_addr_lo; 693*4882a593Smuzhiyun u32 info0; /* %HAL_REO_DEST_RING_INFO0_ */ 694*4882a593Smuzhiyun u32 info1; /* %HAL_REO_DEST_RING_INFO1_ */ 695*4882a593Smuzhiyun u32 rsvd0; 696*4882a593Smuzhiyun u32 rsvd1; 697*4882a593Smuzhiyun u32 rsvd2; 698*4882a593Smuzhiyun u32 rsvd3; 699*4882a593Smuzhiyun u32 rsvd4; 700*4882a593Smuzhiyun u32 rsvd5; 701*4882a593Smuzhiyun u32 info2; /* %HAL_REO_DEST_RING_INFO2_ */ 702*4882a593Smuzhiyun } __packed; 703*4882a593Smuzhiyun 704*4882a593Smuzhiyun /* hal_reo_dest_ring 705*4882a593Smuzhiyun * 706*4882a593Smuzhiyun * Producer: RXDMA 707*4882a593Smuzhiyun * Consumer: REO/SW/FW 708*4882a593Smuzhiyun * 709*4882a593Smuzhiyun * buf_addr_info 710*4882a593Smuzhiyun * Details of the physical address of a buffer or MSDU 711*4882a593Smuzhiyun * link descriptor. 712*4882a593Smuzhiyun * 713*4882a593Smuzhiyun * rx_mpdu_info 714*4882a593Smuzhiyun * General information related to the MPDU that is passed 715*4882a593Smuzhiyun * on from REO entrance ring to the REO destination ring. 716*4882a593Smuzhiyun * 717*4882a593Smuzhiyun * rx_msdu_info 718*4882a593Smuzhiyun * General information related to the MSDU that is passed 719*4882a593Smuzhiyun * on from RXDMA all the way to to the REO destination ring. 720*4882a593Smuzhiyun * 721*4882a593Smuzhiyun * queue_addr_lo 722*4882a593Smuzhiyun * Address (lower 32 bits) of the REO queue descriptor. 723*4882a593Smuzhiyun * 724*4882a593Smuzhiyun * queue_addr_hi 725*4882a593Smuzhiyun * Address (upper 8 bits) of the REO queue descriptor. 726*4882a593Smuzhiyun * 727*4882a593Smuzhiyun * buffer_type 728*4882a593Smuzhiyun * Indicates the type of address provided in the buf_addr_info. 729*4882a593Smuzhiyun * Values are defined in enum %HAL_REO_DEST_RING_BUFFER_TYPE_. 730*4882a593Smuzhiyun * 731*4882a593Smuzhiyun * push_reason 732*4882a593Smuzhiyun * Reason for pushing this frame to this exit ring. Values are 733*4882a593Smuzhiyun * defined in enum %HAL_REO_DEST_RING_PUSH_REASON_. 734*4882a593Smuzhiyun * 735*4882a593Smuzhiyun * error_code 736*4882a593Smuzhiyun * Valid only when 'push_reason' is set. All error codes are 737*4882a593Smuzhiyun * defined in enum %HAL_REO_DEST_RING_ERROR_CODE_. 738*4882a593Smuzhiyun * 739*4882a593Smuzhiyun * rx_queue_num 740*4882a593Smuzhiyun * Indicates the REO MPDU reorder queue id from which this frame 741*4882a593Smuzhiyun * originated. 742*4882a593Smuzhiyun * 743*4882a593Smuzhiyun * reorder_info_valid 744*4882a593Smuzhiyun * When set, REO has been instructed to not perform the actual 745*4882a593Smuzhiyun * re-ordering of frames for this queue, but just to insert 746*4882a593Smuzhiyun * the reorder opcodes. 747*4882a593Smuzhiyun * 748*4882a593Smuzhiyun * reorder_opcode 749*4882a593Smuzhiyun * Field is valid when 'reorder_info_valid' is set. This field is 750*4882a593Smuzhiyun * always valid for debug purpose as well. 751*4882a593Smuzhiyun * 752*4882a593Smuzhiyun * reorder_slot_idx 753*4882a593Smuzhiyun * Valid only when 'reorder_info_valid' is set. 754*4882a593Smuzhiyun * 755*4882a593Smuzhiyun * ring_id 756*4882a593Smuzhiyun * The buffer pointer ring id. 757*4882a593Smuzhiyun * 0 - Idle ring 758*4882a593Smuzhiyun * 1 - N refers to other rings. 759*4882a593Smuzhiyun * 760*4882a593Smuzhiyun * looping_count 761*4882a593Smuzhiyun * Indicates the number of times the producer of entries into 762*4882a593Smuzhiyun * this ring has looped around the ring. 763*4882a593Smuzhiyun */ 764*4882a593Smuzhiyun 765*4882a593Smuzhiyun enum hal_reo_entr_rxdma_ecode { 766*4882a593Smuzhiyun HAL_REO_ENTR_RING_RXDMA_ECODE_OVERFLOW_ERR, 767*4882a593Smuzhiyun HAL_REO_ENTR_RING_RXDMA_ECODE_MPDU_LEN_ERR, 768*4882a593Smuzhiyun HAL_REO_ENTR_RING_RXDMA_ECODE_FCS_ERR, 769*4882a593Smuzhiyun HAL_REO_ENTR_RING_RXDMA_ECODE_DECRYPT_ERR, 770*4882a593Smuzhiyun HAL_REO_ENTR_RING_RXDMA_ECODE_TKIP_MIC_ERR, 771*4882a593Smuzhiyun HAL_REO_ENTR_RING_RXDMA_ECODE_UNECRYPTED_ERR, 772*4882a593Smuzhiyun HAL_REO_ENTR_RING_RXDMA_ECODE_MSDU_LEN_ERR, 773*4882a593Smuzhiyun HAL_REO_ENTR_RING_RXDMA_ECODE_MSDU_LIMIT_ERR, 774*4882a593Smuzhiyun HAL_REO_ENTR_RING_RXDMA_ECODE_WIFI_PARSE_ERR, 775*4882a593Smuzhiyun HAL_REO_ENTR_RING_RXDMA_ECODE_AMSDU_PARSE_ERR, 776*4882a593Smuzhiyun HAL_REO_ENTR_RING_RXDMA_ECODE_SA_TIMEOUT_ERR, 777*4882a593Smuzhiyun HAL_REO_ENTR_RING_RXDMA_ECODE_DA_TIMEOUT_ERR, 778*4882a593Smuzhiyun HAL_REO_ENTR_RING_RXDMA_ECODE_FLOW_TIMEOUT_ERR, 779*4882a593Smuzhiyun HAL_REO_ENTR_RING_RXDMA_ECODE_FLUSH_REQUEST_ERR, 780*4882a593Smuzhiyun HAL_REO_ENTR_RING_RXDMA_ECODE_MAX, 781*4882a593Smuzhiyun }; 782*4882a593Smuzhiyun 783*4882a593Smuzhiyun #define HAL_REO_ENTR_RING_INFO0_QUEUE_ADDR_HI GENMASK(7, 0) 784*4882a593Smuzhiyun #define HAL_REO_ENTR_RING_INFO0_MPDU_BYTE_COUNT GENMASK(21, 8) 785*4882a593Smuzhiyun #define HAL_REO_ENTR_RING_INFO0_DEST_IND GENMASK(26, 22) 786*4882a593Smuzhiyun #define HAL_REO_ENTR_RING_INFO0_FRAMELESS_BAR BIT(27) 787*4882a593Smuzhiyun 788*4882a593Smuzhiyun #define HAL_REO_ENTR_RING_INFO1_RXDMA_PUSH_REASON GENMASK(1, 0) 789*4882a593Smuzhiyun #define HAL_REO_ENTR_RING_INFO1_RXDMA_ERROR_CODE GENMASK(6, 2) 790*4882a593Smuzhiyun 791*4882a593Smuzhiyun struct hal_reo_entrance_ring { 792*4882a593Smuzhiyun struct ath11k_buffer_addr buf_addr_info; 793*4882a593Smuzhiyun struct rx_mpdu_desc rx_mpdu_info; 794*4882a593Smuzhiyun u32 queue_addr_lo; 795*4882a593Smuzhiyun u32 info0; /* %HAL_REO_ENTR_RING_INFO0_ */ 796*4882a593Smuzhiyun u32 info1; /* %HAL_REO_ENTR_RING_INFO1_ */ 797*4882a593Smuzhiyun u32 info2; /* %HAL_REO_DEST_RING_INFO2_ */ 798*4882a593Smuzhiyun 799*4882a593Smuzhiyun } __packed; 800*4882a593Smuzhiyun 801*4882a593Smuzhiyun /* hal_reo_entrance_ring 802*4882a593Smuzhiyun * 803*4882a593Smuzhiyun * Producer: RXDMA 804*4882a593Smuzhiyun * Consumer: REO 805*4882a593Smuzhiyun * 806*4882a593Smuzhiyun * buf_addr_info 807*4882a593Smuzhiyun * Details of the physical address of a buffer or MSDU 808*4882a593Smuzhiyun * link descriptor. 809*4882a593Smuzhiyun * 810*4882a593Smuzhiyun * rx_mpdu_info 811*4882a593Smuzhiyun * General information related to the MPDU that is passed 812*4882a593Smuzhiyun * on from REO entrance ring to the REO destination ring. 813*4882a593Smuzhiyun * 814*4882a593Smuzhiyun * queue_addr_lo 815*4882a593Smuzhiyun * Address (lower 32 bits) of the REO queue descriptor. 816*4882a593Smuzhiyun * 817*4882a593Smuzhiyun * queue_addr_hi 818*4882a593Smuzhiyun * Address (upper 8 bits) of the REO queue descriptor. 819*4882a593Smuzhiyun * 820*4882a593Smuzhiyun * mpdu_byte_count 821*4882a593Smuzhiyun * An approximation of the number of bytes received in this MPDU. 822*4882a593Smuzhiyun * Used to keeps stats on the amount of data flowing 823*4882a593Smuzhiyun * through a queue. 824*4882a593Smuzhiyun * 825*4882a593Smuzhiyun * reo_destination_indication 826*4882a593Smuzhiyun * The id of the reo exit ring where the msdu frame shall push 827*4882a593Smuzhiyun * after (MPDU level) reordering has finished. Values are defined 828*4882a593Smuzhiyun * in enum %HAL_RX_MSDU_DESC_REO_DEST_IND_. 829*4882a593Smuzhiyun * 830*4882a593Smuzhiyun * frameless_bar 831*4882a593Smuzhiyun * Indicates that this REO entrance ring struct contains BAR info 832*4882a593Smuzhiyun * from a multi TID BAR frame. The original multi TID BAR frame 833*4882a593Smuzhiyun * itself contained all the REO info for the first TID, but all 834*4882a593Smuzhiyun * the subsequent TID info and their linkage to the REO descriptors 835*4882a593Smuzhiyun * is passed down as 'frameless' BAR info. 836*4882a593Smuzhiyun * 837*4882a593Smuzhiyun * The only fields valid in this descriptor when this bit is set 838*4882a593Smuzhiyun * are queue_addr_lo, queue_addr_hi, mpdu_sequence_number, 839*4882a593Smuzhiyun * bar_frame and peer_meta_data. 840*4882a593Smuzhiyun * 841*4882a593Smuzhiyun * rxdma_push_reason 842*4882a593Smuzhiyun * Reason for pushing this frame to this exit ring. Values are 843*4882a593Smuzhiyun * defined in enum %HAL_REO_DEST_RING_PUSH_REASON_. 844*4882a593Smuzhiyun * 845*4882a593Smuzhiyun * rxdma_error_code 846*4882a593Smuzhiyun * Valid only when 'push_reason' is set. All error codes are 847*4882a593Smuzhiyun * defined in enum %HAL_REO_ENTR_RING_RXDMA_ECODE_. 848*4882a593Smuzhiyun * 849*4882a593Smuzhiyun * ring_id 850*4882a593Smuzhiyun * The buffer pointer ring id. 851*4882a593Smuzhiyun * 0 - Idle ring 852*4882a593Smuzhiyun * 1 - N refers to other rings. 853*4882a593Smuzhiyun * 854*4882a593Smuzhiyun * looping_count 855*4882a593Smuzhiyun * Indicates the number of times the producer of entries into 856*4882a593Smuzhiyun * this ring has looped around the ring. 857*4882a593Smuzhiyun */ 858*4882a593Smuzhiyun 859*4882a593Smuzhiyun #define HAL_REO_CMD_HDR_INFO0_CMD_NUMBER GENMASK(15, 0) 860*4882a593Smuzhiyun #define HAL_REO_CMD_HDR_INFO0_STATUS_REQUIRED BIT(16) 861*4882a593Smuzhiyun 862*4882a593Smuzhiyun struct hal_reo_cmd_hdr { 863*4882a593Smuzhiyun u32 info0; 864*4882a593Smuzhiyun } __packed; 865*4882a593Smuzhiyun 866*4882a593Smuzhiyun #define HAL_REO_GET_QUEUE_STATS_INFO0_QUEUE_ADDR_HI GENMASK(7, 0) 867*4882a593Smuzhiyun #define HAL_REO_GET_QUEUE_STATS_INFO0_CLEAR_STATS BIT(8) 868*4882a593Smuzhiyun 869*4882a593Smuzhiyun struct hal_reo_get_queue_stats { 870*4882a593Smuzhiyun struct hal_reo_cmd_hdr cmd; 871*4882a593Smuzhiyun u32 queue_addr_lo; 872*4882a593Smuzhiyun u32 info0; 873*4882a593Smuzhiyun u32 rsvd0[6]; 874*4882a593Smuzhiyun } __packed; 875*4882a593Smuzhiyun 876*4882a593Smuzhiyun /* hal_reo_get_queue_stats 877*4882a593Smuzhiyun * Producer: SW 878*4882a593Smuzhiyun * Consumer: REO 879*4882a593Smuzhiyun * 880*4882a593Smuzhiyun * cmd 881*4882a593Smuzhiyun * Details for command execution tracking purposes. 882*4882a593Smuzhiyun * 883*4882a593Smuzhiyun * queue_addr_lo 884*4882a593Smuzhiyun * Address (lower 32 bits) of the REO queue descriptor. 885*4882a593Smuzhiyun * 886*4882a593Smuzhiyun * queue_addr_hi 887*4882a593Smuzhiyun * Address (upper 8 bits) of the REO queue descriptor. 888*4882a593Smuzhiyun * 889*4882a593Smuzhiyun * clear_stats 890*4882a593Smuzhiyun * Clear stats settings. When set, Clear the stats after 891*4882a593Smuzhiyun * generating the status. 892*4882a593Smuzhiyun * 893*4882a593Smuzhiyun * Following stats will be cleared. 894*4882a593Smuzhiyun * Timeout_count 895*4882a593Smuzhiyun * Forward_due_to_bar_count 896*4882a593Smuzhiyun * Duplicate_count 897*4882a593Smuzhiyun * Frames_in_order_count 898*4882a593Smuzhiyun * BAR_received_count 899*4882a593Smuzhiyun * MPDU_Frames_processed_count 900*4882a593Smuzhiyun * MSDU_Frames_processed_count 901*4882a593Smuzhiyun * Total_processed_byte_count 902*4882a593Smuzhiyun * Late_receive_MPDU_count 903*4882a593Smuzhiyun * window_jump_2k 904*4882a593Smuzhiyun * Hole_count 905*4882a593Smuzhiyun */ 906*4882a593Smuzhiyun 907*4882a593Smuzhiyun #define HAL_REO_FLUSH_QUEUE_INFO0_DESC_ADDR_HI GENMASK(7, 0) 908*4882a593Smuzhiyun #define HAL_REO_FLUSH_QUEUE_INFO0_BLOCK_DESC_ADDR BIT(8) 909*4882a593Smuzhiyun #define HAL_REO_FLUSH_QUEUE_INFO0_BLOCK_RESRC_IDX GENMASK(10, 9) 910*4882a593Smuzhiyun 911*4882a593Smuzhiyun struct hal_reo_flush_queue { 912*4882a593Smuzhiyun struct hal_reo_cmd_hdr cmd; 913*4882a593Smuzhiyun u32 desc_addr_lo; 914*4882a593Smuzhiyun u32 info0; 915*4882a593Smuzhiyun u32 rsvd0[6]; 916*4882a593Smuzhiyun } __packed; 917*4882a593Smuzhiyun 918*4882a593Smuzhiyun #define HAL_REO_FLUSH_CACHE_INFO0_CACHE_ADDR_HI GENMASK(7, 0) 919*4882a593Smuzhiyun #define HAL_REO_FLUSH_CACHE_INFO0_FWD_ALL_MPDUS BIT(8) 920*4882a593Smuzhiyun #define HAL_REO_FLUSH_CACHE_INFO0_RELEASE_BLOCK_IDX BIT(9) 921*4882a593Smuzhiyun #define HAL_REO_FLUSH_CACHE_INFO0_BLOCK_RESRC_IDX GENMASK(11, 10) 922*4882a593Smuzhiyun #define HAL_REO_FLUSH_CACHE_INFO0_FLUSH_WO_INVALIDATE BIT(12) 923*4882a593Smuzhiyun #define HAL_REO_FLUSH_CACHE_INFO0_BLOCK_CACHE_USAGE BIT(13) 924*4882a593Smuzhiyun #define HAL_REO_FLUSH_CACHE_INFO0_FLUSH_ALL BIT(14) 925*4882a593Smuzhiyun 926*4882a593Smuzhiyun struct hal_reo_flush_cache { 927*4882a593Smuzhiyun struct hal_reo_cmd_hdr cmd; 928*4882a593Smuzhiyun u32 cache_addr_lo; 929*4882a593Smuzhiyun u32 info0; 930*4882a593Smuzhiyun u32 rsvd0[6]; 931*4882a593Smuzhiyun } __packed; 932*4882a593Smuzhiyun 933*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO0_DESC_TYPE BIT(0) 934*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO0_EPD BIT(1) 935*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO0_ENCAP_TYPE GENMASK(3, 2) 936*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO0_ENCRYPT_TYPE GENMASK(7, 4) 937*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO0_SRC_BUF_SWAP BIT(8) 938*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO0_LNK_META_SWAP BIT(9) 939*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO0_SEARCH_TYPE GENMASK(13, 12) 940*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO0_ADDR_EN GENMASK(15, 14) 941*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO0_CMD_NUM GENMASK(31, 16) 942*4882a593Smuzhiyun 943*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO1_DATA_LEN GENMASK(15, 0) 944*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO1_IP4_CKSUM_EN BIT(16) 945*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO1_UDP4_CKSUM_EN BIT(17) 946*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO1_UDP6_CKSUM_EN BIT(18) 947*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO1_TCP4_CKSUM_EN BIT(19) 948*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO1_TCP6_CKSUM_EN BIT(20) 949*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO1_TO_FW BIT(21) 950*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO1_PKT_OFFSET GENMASK(31, 23) 951*4882a593Smuzhiyun 952*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO2_BUF_TIMESTAMP GENMASK(18, 0) 953*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO2_BUF_T_VALID BIT(19) 954*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO2_MESH_ENABLE BIT(20) 955*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO2_TID_OVERWRITE BIT(21) 956*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO2_TID GENMASK(25, 22) 957*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO2_LMAC_ID GENMASK(27, 26) 958*4882a593Smuzhiyun 959*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO3_DSCP_TID_TABLE_IDX GENMASK(5, 0) 960*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO3_SEARCH_INDEX GENMASK(25, 6) 961*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO3_CACHE_SET_NUM GENMASK(29, 26) 962*4882a593Smuzhiyun 963*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO4_RING_ID GENMASK(27, 20) 964*4882a593Smuzhiyun #define HAL_TCL_DATA_CMD_INFO4_LOOPING_COUNT GENMASK(31, 28) 965*4882a593Smuzhiyun 966*4882a593Smuzhiyun enum hal_encrypt_type { 967*4882a593Smuzhiyun HAL_ENCRYPT_TYPE_WEP_40, 968*4882a593Smuzhiyun HAL_ENCRYPT_TYPE_WEP_104, 969*4882a593Smuzhiyun HAL_ENCRYPT_TYPE_TKIP_NO_MIC, 970*4882a593Smuzhiyun HAL_ENCRYPT_TYPE_WEP_128, 971*4882a593Smuzhiyun HAL_ENCRYPT_TYPE_TKIP_MIC, 972*4882a593Smuzhiyun HAL_ENCRYPT_TYPE_WAPI, 973*4882a593Smuzhiyun HAL_ENCRYPT_TYPE_CCMP_128, 974*4882a593Smuzhiyun HAL_ENCRYPT_TYPE_OPEN, 975*4882a593Smuzhiyun HAL_ENCRYPT_TYPE_CCMP_256, 976*4882a593Smuzhiyun HAL_ENCRYPT_TYPE_GCMP_128, 977*4882a593Smuzhiyun HAL_ENCRYPT_TYPE_AES_GCMP_256, 978*4882a593Smuzhiyun HAL_ENCRYPT_TYPE_WAPI_GCM_SM4, 979*4882a593Smuzhiyun }; 980*4882a593Smuzhiyun 981*4882a593Smuzhiyun enum hal_tcl_encap_type { 982*4882a593Smuzhiyun HAL_TCL_ENCAP_TYPE_RAW, 983*4882a593Smuzhiyun HAL_TCL_ENCAP_TYPE_NATIVE_WIFI, 984*4882a593Smuzhiyun HAL_TCL_ENCAP_TYPE_ETHERNET, 985*4882a593Smuzhiyun HAL_TCL_ENCAP_TYPE_802_3 = 3, 986*4882a593Smuzhiyun }; 987*4882a593Smuzhiyun 988*4882a593Smuzhiyun enum hal_tcl_desc_type { 989*4882a593Smuzhiyun HAL_TCL_DESC_TYPE_BUFFER, 990*4882a593Smuzhiyun HAL_TCL_DESC_TYPE_EXT_DESC, 991*4882a593Smuzhiyun }; 992*4882a593Smuzhiyun 993*4882a593Smuzhiyun enum hal_wbm_htt_tx_comp_status { 994*4882a593Smuzhiyun HAL_WBM_REL_HTT_TX_COMP_STATUS_OK, 995*4882a593Smuzhiyun HAL_WBM_REL_HTT_TX_COMP_STATUS_DROP, 996*4882a593Smuzhiyun HAL_WBM_REL_HTT_TX_COMP_STATUS_TTL, 997*4882a593Smuzhiyun HAL_WBM_REL_HTT_TX_COMP_STATUS_REINJ, 998*4882a593Smuzhiyun HAL_WBM_REL_HTT_TX_COMP_STATUS_INSPECT, 999*4882a593Smuzhiyun HAL_WBM_REL_HTT_TX_COMP_STATUS_MEC_NOTIFY, 1000*4882a593Smuzhiyun }; 1001*4882a593Smuzhiyun 1002*4882a593Smuzhiyun struct hal_tcl_data_cmd { 1003*4882a593Smuzhiyun struct ath11k_buffer_addr buf_addr_info; 1004*4882a593Smuzhiyun u32 info0; 1005*4882a593Smuzhiyun u32 info1; 1006*4882a593Smuzhiyun u32 info2; 1007*4882a593Smuzhiyun u32 info3; 1008*4882a593Smuzhiyun u32 info4; 1009*4882a593Smuzhiyun } __packed; 1010*4882a593Smuzhiyun 1011*4882a593Smuzhiyun /* hal_tcl_data_cmd 1012*4882a593Smuzhiyun * 1013*4882a593Smuzhiyun * buf_addr_info 1014*4882a593Smuzhiyun * Details of the physical address of a buffer or MSDU 1015*4882a593Smuzhiyun * link descriptor. 1016*4882a593Smuzhiyun * 1017*4882a593Smuzhiyun * desc_type 1018*4882a593Smuzhiyun * Indicates the type of address provided in the buf_addr_info. 1019*4882a593Smuzhiyun * Values are defined in enum %HAL_REO_DEST_RING_BUFFER_TYPE_. 1020*4882a593Smuzhiyun * 1021*4882a593Smuzhiyun * epd 1022*4882a593Smuzhiyun * When this bit is set then input packet is an EPD type. 1023*4882a593Smuzhiyun * 1024*4882a593Smuzhiyun * encap_type 1025*4882a593Smuzhiyun * Indicates the encapsulation that HW will perform. Values are 1026*4882a593Smuzhiyun * defined in enum %HAL_TCL_ENCAP_TYPE_. 1027*4882a593Smuzhiyun * 1028*4882a593Smuzhiyun * encrypt_type 1029*4882a593Smuzhiyun * Field only valid for encap_type: RAW 1030*4882a593Smuzhiyun * Values are defined in enum %HAL_ENCRYPT_TYPE_. 1031*4882a593Smuzhiyun * 1032*4882a593Smuzhiyun * src_buffer_swap 1033*4882a593Smuzhiyun * Treats source memory (packet buffer) organization as big-endian. 1034*4882a593Smuzhiyun * 1'b0: Source memory is little endian 1035*4882a593Smuzhiyun * 1'b1: Source memory is big endian 1036*4882a593Smuzhiyun * 1037*4882a593Smuzhiyun * link_meta_swap 1038*4882a593Smuzhiyun * Treats link descriptor and Metadata as big-endian. 1039*4882a593Smuzhiyun * 1'b0: memory is little endian 1040*4882a593Smuzhiyun * 1'b1: memory is big endian 1041*4882a593Smuzhiyun * 1042*4882a593Smuzhiyun * search_type 1043*4882a593Smuzhiyun * Search type select 1044*4882a593Smuzhiyun * 0 - Normal search, 1 - Index based address search, 1045*4882a593Smuzhiyun * 2 - Index based flow search 1046*4882a593Smuzhiyun * 1047*4882a593Smuzhiyun * addrx_en 1048*4882a593Smuzhiyun * addry_en 1049*4882a593Smuzhiyun * Address X/Y search enable in ASE correspondingly. 1050*4882a593Smuzhiyun * 1'b0: Search disable 1051*4882a593Smuzhiyun * 1'b1: Search Enable 1052*4882a593Smuzhiyun * 1053*4882a593Smuzhiyun * cmd_num 1054*4882a593Smuzhiyun * This number can be used to match against status. 1055*4882a593Smuzhiyun * 1056*4882a593Smuzhiyun * data_length 1057*4882a593Smuzhiyun * MSDU length in case of direct descriptor. Length of link 1058*4882a593Smuzhiyun * extension descriptor in case of Link extension descriptor. 1059*4882a593Smuzhiyun * 1060*4882a593Smuzhiyun * *_checksum_en 1061*4882a593Smuzhiyun * Enable checksum replacement for ipv4, udp_over_ipv4, ipv6, 1062*4882a593Smuzhiyun * udp_over_ipv6, tcp_over_ipv4 and tcp_over_ipv6. 1063*4882a593Smuzhiyun * 1064*4882a593Smuzhiyun * to_fw 1065*4882a593Smuzhiyun * Forward packet to FW along with classification result. The 1066*4882a593Smuzhiyun * packet will not be forward to TQM when this bit is set. 1067*4882a593Smuzhiyun * 1'b0: Use classification result to forward the packet. 1068*4882a593Smuzhiyun * 1'b1: Override classification result & forward packet only to fw 1069*4882a593Smuzhiyun * 1070*4882a593Smuzhiyun * packet_offset 1071*4882a593Smuzhiyun * Packet offset from Metadata in case of direct buffer descriptor. 1072*4882a593Smuzhiyun * 1073*4882a593Smuzhiyun * buffer_timestamp 1074*4882a593Smuzhiyun * buffer_timestamp_valid 1075*4882a593Smuzhiyun * Frame system entrance timestamp. It shall be filled by first 1076*4882a593Smuzhiyun * module (SW, TCL or TQM) that sees the frames first. 1077*4882a593Smuzhiyun * 1078*4882a593Smuzhiyun * mesh_enable 1079*4882a593Smuzhiyun * For raw WiFi frames, this indicates transmission to a mesh STA, 1080*4882a593Smuzhiyun * enabling the interpretation of the 'Mesh Control Present' bit 1081*4882a593Smuzhiyun * (bit 8) of QoS Control. 1082*4882a593Smuzhiyun * For native WiFi frames, this indicates that a 'Mesh Control' 1083*4882a593Smuzhiyun * field is present between the header and the LLC. 1084*4882a593Smuzhiyun * 1085*4882a593Smuzhiyun * hlos_tid_overwrite 1086*4882a593Smuzhiyun * 1087*4882a593Smuzhiyun * When set, TCL shall ignore the IP DSCP and VLAN PCP 1088*4882a593Smuzhiyun * fields and use HLOS_TID as the final TID. Otherwise TCL 1089*4882a593Smuzhiyun * shall consider the DSCP and PCP fields as well as HLOS_TID 1090*4882a593Smuzhiyun * and choose a final TID based on the configured priority 1091*4882a593Smuzhiyun * 1092*4882a593Smuzhiyun * hlos_tid 1093*4882a593Smuzhiyun * HLOS MSDU priority 1094*4882a593Smuzhiyun * Field is used when HLOS_TID_overwrite is set. 1095*4882a593Smuzhiyun * 1096*4882a593Smuzhiyun * lmac_id 1097*4882a593Smuzhiyun * TCL uses this LMAC_ID in address search, i.e, while 1098*4882a593Smuzhiyun * finding matching entry for the packet in AST corresponding 1099*4882a593Smuzhiyun * to given LMAC_ID 1100*4882a593Smuzhiyun * 1101*4882a593Smuzhiyun * If LMAC ID is all 1s (=> value 3), it indicates wildcard 1102*4882a593Smuzhiyun * match for any MAC 1103*4882a593Smuzhiyun * 1104*4882a593Smuzhiyun * dscp_tid_table_num 1105*4882a593Smuzhiyun * DSCP to TID mapping table number that need to be used 1106*4882a593Smuzhiyun * for the MSDU. 1107*4882a593Smuzhiyun * 1108*4882a593Smuzhiyun * search_index 1109*4882a593Smuzhiyun * The index that will be used for index based address or 1110*4882a593Smuzhiyun * flow search. The field is valid when 'search_type' is 1 or 2. 1111*4882a593Smuzhiyun * 1112*4882a593Smuzhiyun * cache_set_num 1113*4882a593Smuzhiyun * 1114*4882a593Smuzhiyun * Cache set number that should be used to cache the index 1115*4882a593Smuzhiyun * based search results, for address and flow search. This 1116*4882a593Smuzhiyun * value should be equal to LSB four bits of the hash value of 1117*4882a593Smuzhiyun * match data, in case of search index points to an entry which 1118*4882a593Smuzhiyun * may be used in content based search also. The value can be 1119*4882a593Smuzhiyun * anything when the entry pointed by search index will not be 1120*4882a593Smuzhiyun * used for content based search. 1121*4882a593Smuzhiyun * 1122*4882a593Smuzhiyun * ring_id 1123*4882a593Smuzhiyun * The buffer pointer ring ID. 1124*4882a593Smuzhiyun * 0 refers to the IDLE ring 1125*4882a593Smuzhiyun * 1 - N refers to other rings 1126*4882a593Smuzhiyun * 1127*4882a593Smuzhiyun * looping_count 1128*4882a593Smuzhiyun * 1129*4882a593Smuzhiyun * A count value that indicates the number of times the 1130*4882a593Smuzhiyun * producer of entries into the Ring has looped around the 1131*4882a593Smuzhiyun * ring. 1132*4882a593Smuzhiyun * 1133*4882a593Smuzhiyun * At initialization time, this value is set to 0. On the 1134*4882a593Smuzhiyun * first loop, this value is set to 1. After the max value is 1135*4882a593Smuzhiyun * reached allowed by the number of bits for this field, the 1136*4882a593Smuzhiyun * count value continues with 0 again. 1137*4882a593Smuzhiyun * 1138*4882a593Smuzhiyun * In case SW is the consumer of the ring entries, it can 1139*4882a593Smuzhiyun * use this field to figure out up to where the producer of 1140*4882a593Smuzhiyun * entries has created new entries. This eliminates the need to 1141*4882a593Smuzhiyun * check where the head pointer' of the ring is located once 1142*4882a593Smuzhiyun * the SW starts processing an interrupt indicating that new 1143*4882a593Smuzhiyun * entries have been put into this ring... 1144*4882a593Smuzhiyun * 1145*4882a593Smuzhiyun * Also note that SW if it wants only needs to look at the 1146*4882a593Smuzhiyun * LSB bit of this count value. 1147*4882a593Smuzhiyun */ 1148*4882a593Smuzhiyun 1149*4882a593Smuzhiyun #define HAL_TCL_DESC_LEN sizeof(struct hal_tcl_data_cmd) 1150*4882a593Smuzhiyun 1151*4882a593Smuzhiyun enum hal_tcl_gse_ctrl { 1152*4882a593Smuzhiyun HAL_TCL_GSE_CTRL_RD_STAT, 1153*4882a593Smuzhiyun HAL_TCL_GSE_CTRL_SRCH_DIS, 1154*4882a593Smuzhiyun HAL_TCL_GSE_CTRL_WR_BK_SINGLE, 1155*4882a593Smuzhiyun HAL_TCL_GSE_CTRL_WR_BK_ALL, 1156*4882a593Smuzhiyun HAL_TCL_GSE_CTRL_INVAL_SINGLE, 1157*4882a593Smuzhiyun HAL_TCL_GSE_CTRL_INVAL_ALL, 1158*4882a593Smuzhiyun HAL_TCL_GSE_CTRL_WR_BK_INVAL_SINGLE, 1159*4882a593Smuzhiyun HAL_TCL_GSE_CTRL_WR_BK_INVAL_ALL, 1160*4882a593Smuzhiyun HAL_TCL_GSE_CTRL_CLR_STAT_SINGLE, 1161*4882a593Smuzhiyun }; 1162*4882a593Smuzhiyun 1163*4882a593Smuzhiyun /* hal_tcl_gse_ctrl 1164*4882a593Smuzhiyun * 1165*4882a593Smuzhiyun * rd_stat 1166*4882a593Smuzhiyun * Report or Read statistics 1167*4882a593Smuzhiyun * srch_dis 1168*4882a593Smuzhiyun * Search disable. Report only Hash. 1169*4882a593Smuzhiyun * wr_bk_single 1170*4882a593Smuzhiyun * Write Back single entry 1171*4882a593Smuzhiyun * wr_bk_all 1172*4882a593Smuzhiyun * Write Back entire cache entry 1173*4882a593Smuzhiyun * inval_single 1174*4882a593Smuzhiyun * Invalidate single cache entry 1175*4882a593Smuzhiyun * inval_all 1176*4882a593Smuzhiyun * Invalidate entire cache 1177*4882a593Smuzhiyun * wr_bk_inval_single 1178*4882a593Smuzhiyun * Write back and invalidate single entry in cache 1179*4882a593Smuzhiyun * wr_bk_inval_all 1180*4882a593Smuzhiyun * Write back and invalidate entire cache 1181*4882a593Smuzhiyun * clr_stat_single 1182*4882a593Smuzhiyun * Clear statistics for single entry 1183*4882a593Smuzhiyun */ 1184*4882a593Smuzhiyun 1185*4882a593Smuzhiyun #define HAL_TCL_GSE_CMD_INFO0_CTRL_BUF_ADDR_HI GENMASK(7, 0) 1186*4882a593Smuzhiyun #define HAL_TCL_GSE_CMD_INFO0_GSE_CTRL GENMASK(11, 8) 1187*4882a593Smuzhiyun #define HAL_TCL_GSE_CMD_INFO0_GSE_SEL BIT(12) 1188*4882a593Smuzhiyun #define HAL_TCL_GSE_CMD_INFO0_STATUS_DEST_RING_ID BIT(13) 1189*4882a593Smuzhiyun #define HAL_TCL_GSE_CMD_INFO0_SWAP BIT(14) 1190*4882a593Smuzhiyun 1191*4882a593Smuzhiyun #define HAL_TCL_GSE_CMD_INFO1_RING_ID GENMASK(27, 20) 1192*4882a593Smuzhiyun #define HAL_TCL_GSE_CMD_INFO1_LOOPING_COUNT GENMASK(31, 28) 1193*4882a593Smuzhiyun 1194*4882a593Smuzhiyun struct hal_tcl_gse_cmd { 1195*4882a593Smuzhiyun u32 ctrl_buf_addr_lo; 1196*4882a593Smuzhiyun u32 info0; 1197*4882a593Smuzhiyun u32 meta_data[2]; 1198*4882a593Smuzhiyun u32 rsvd0[2]; 1199*4882a593Smuzhiyun u32 info1; 1200*4882a593Smuzhiyun } __packed; 1201*4882a593Smuzhiyun 1202*4882a593Smuzhiyun /* hal_tcl_gse_cmd 1203*4882a593Smuzhiyun * 1204*4882a593Smuzhiyun * ctrl_buf_addr_lo, ctrl_buf_addr_hi 1205*4882a593Smuzhiyun * Address of a control buffer containing additional info needed 1206*4882a593Smuzhiyun * for this command execution. 1207*4882a593Smuzhiyun * 1208*4882a593Smuzhiyun * gse_ctrl 1209*4882a593Smuzhiyun * GSE control operations. This includes cache operations and table 1210*4882a593Smuzhiyun * entry statistics read/clear operation. Values are defined in 1211*4882a593Smuzhiyun * enum %HAL_TCL_GSE_CTRL. 1212*4882a593Smuzhiyun * 1213*4882a593Smuzhiyun * gse_sel 1214*4882a593Smuzhiyun * To select the ASE/FSE to do the operation mention by GSE_ctrl. 1215*4882a593Smuzhiyun * 0: FSE select 1: ASE select 1216*4882a593Smuzhiyun * 1217*4882a593Smuzhiyun * status_destination_ring_id 1218*4882a593Smuzhiyun * TCL status ring to which the GSE status needs to be send. 1219*4882a593Smuzhiyun * 1220*4882a593Smuzhiyun * swap 1221*4882a593Smuzhiyun * Bit to enable byte swapping of contents of buffer. 1222*4882a593Smuzhiyun * 1223*4882a593Smuzhiyun * meta_data 1224*4882a593Smuzhiyun * Meta data to be returned in the status descriptor 1225*4882a593Smuzhiyun */ 1226*4882a593Smuzhiyun 1227*4882a593Smuzhiyun enum hal_tcl_cache_op_res { 1228*4882a593Smuzhiyun HAL_TCL_CACHE_OP_RES_DONE, 1229*4882a593Smuzhiyun HAL_TCL_CACHE_OP_RES_NOT_FOUND, 1230*4882a593Smuzhiyun HAL_TCL_CACHE_OP_RES_TIMEOUT, 1231*4882a593Smuzhiyun }; 1232*4882a593Smuzhiyun 1233*4882a593Smuzhiyun #define HAL_TCL_STATUS_RING_INFO0_GSE_CTRL GENMASK(3, 0) 1234*4882a593Smuzhiyun #define HAL_TCL_STATUS_RING_INFO0_GSE_SEL BIT(4) 1235*4882a593Smuzhiyun #define HAL_TCL_STATUS_RING_INFO0_CACHE_OP_RES GENMASK(6, 5) 1236*4882a593Smuzhiyun #define HAL_TCL_STATUS_RING_INFO0_MSDU_CNT GENMASK(31, 8) 1237*4882a593Smuzhiyun 1238*4882a593Smuzhiyun #define HAL_TCL_STATUS_RING_INFO1_HASH_IDX GENMASK(19, 0) 1239*4882a593Smuzhiyun 1240*4882a593Smuzhiyun #define HAL_TCL_STATUS_RING_INFO2_RING_ID GENMASK(27, 20) 1241*4882a593Smuzhiyun #define HAL_TCL_STATUS_RING_INFO2_LOOPING_COUNT GENMASK(31, 28) 1242*4882a593Smuzhiyun 1243*4882a593Smuzhiyun struct hal_tcl_status_ring { 1244*4882a593Smuzhiyun u32 info0; 1245*4882a593Smuzhiyun u32 msdu_byte_count; 1246*4882a593Smuzhiyun u32 msdu_timestamp; 1247*4882a593Smuzhiyun u32 meta_data[2]; 1248*4882a593Smuzhiyun u32 info1; 1249*4882a593Smuzhiyun u32 rsvd0; 1250*4882a593Smuzhiyun u32 info2; 1251*4882a593Smuzhiyun } __packed; 1252*4882a593Smuzhiyun 1253*4882a593Smuzhiyun /* hal_tcl_status_ring 1254*4882a593Smuzhiyun * 1255*4882a593Smuzhiyun * gse_ctrl 1256*4882a593Smuzhiyun * GSE control operations. This includes cache operations and table 1257*4882a593Smuzhiyun * entry statistics read/clear operation. Values are defined in 1258*4882a593Smuzhiyun * enum %HAL_TCL_GSE_CTRL. 1259*4882a593Smuzhiyun * 1260*4882a593Smuzhiyun * gse_sel 1261*4882a593Smuzhiyun * To select the ASE/FSE to do the operation mention by GSE_ctrl. 1262*4882a593Smuzhiyun * 0: FSE select 1: ASE select 1263*4882a593Smuzhiyun * 1264*4882a593Smuzhiyun * cache_op_res 1265*4882a593Smuzhiyun * Cache operation result. Values are defined in enum 1266*4882a593Smuzhiyun * %HAL_TCL_CACHE_OP_RES_. 1267*4882a593Smuzhiyun * 1268*4882a593Smuzhiyun * msdu_cnt 1269*4882a593Smuzhiyun * msdu_byte_count 1270*4882a593Smuzhiyun * MSDU count of Entry and MSDU byte count for entry 1. 1271*4882a593Smuzhiyun * 1272*4882a593Smuzhiyun * hash_indx 1273*4882a593Smuzhiyun * Hash value of the entry in case of search failed or disabled. 1274*4882a593Smuzhiyun */ 1275*4882a593Smuzhiyun 1276*4882a593Smuzhiyun #define HAL_CE_SRC_DESC_ADDR_INFO_ADDR_HI GENMASK(7, 0) 1277*4882a593Smuzhiyun #define HAL_CE_SRC_DESC_ADDR_INFO_HASH_EN BIT(8) 1278*4882a593Smuzhiyun #define HAL_CE_SRC_DESC_ADDR_INFO_BYTE_SWAP BIT(9) 1279*4882a593Smuzhiyun #define HAL_CE_SRC_DESC_ADDR_INFO_DEST_SWAP BIT(10) 1280*4882a593Smuzhiyun #define HAL_CE_SRC_DESC_ADDR_INFO_GATHER BIT(11) 1281*4882a593Smuzhiyun #define HAL_CE_SRC_DESC_ADDR_INFO_LEN GENMASK(31, 16) 1282*4882a593Smuzhiyun 1283*4882a593Smuzhiyun #define HAL_CE_SRC_DESC_META_INFO_DATA GENMASK(15, 0) 1284*4882a593Smuzhiyun 1285*4882a593Smuzhiyun #define HAL_CE_SRC_DESC_FLAGS_RING_ID GENMASK(27, 20) 1286*4882a593Smuzhiyun #define HAL_CE_SRC_DESC_FLAGS_LOOP_CNT HAL_SRNG_DESC_LOOP_CNT 1287*4882a593Smuzhiyun 1288*4882a593Smuzhiyun struct hal_ce_srng_src_desc { 1289*4882a593Smuzhiyun u32 buffer_addr_low; 1290*4882a593Smuzhiyun u32 buffer_addr_info; /* %HAL_CE_SRC_DESC_ADDR_INFO_ */ 1291*4882a593Smuzhiyun u32 meta_info; /* %HAL_CE_SRC_DESC_META_INFO_ */ 1292*4882a593Smuzhiyun u32 flags; /* %HAL_CE_SRC_DESC_FLAGS_ */ 1293*4882a593Smuzhiyun } __packed; 1294*4882a593Smuzhiyun 1295*4882a593Smuzhiyun /* 1296*4882a593Smuzhiyun * hal_ce_srng_src_desc 1297*4882a593Smuzhiyun * 1298*4882a593Smuzhiyun * buffer_addr_lo 1299*4882a593Smuzhiyun * LSB 32 bits of the 40 Bit Pointer to the source buffer 1300*4882a593Smuzhiyun * 1301*4882a593Smuzhiyun * buffer_addr_hi 1302*4882a593Smuzhiyun * MSB 8 bits of the 40 Bit Pointer to the source buffer 1303*4882a593Smuzhiyun * 1304*4882a593Smuzhiyun * toeplitz_en 1305*4882a593Smuzhiyun * Enable generation of 32-bit Toeplitz-LFSR hash for 1306*4882a593Smuzhiyun * data transfer. In case of gather field in first source 1307*4882a593Smuzhiyun * ring entry of the gather copy cycle in taken into account. 1308*4882a593Smuzhiyun * 1309*4882a593Smuzhiyun * src_swap 1310*4882a593Smuzhiyun * Treats source memory organization as big-endian. For 1311*4882a593Smuzhiyun * each dword read (4 bytes), the byte 0 is swapped with byte 3 1312*4882a593Smuzhiyun * and byte 1 is swapped with byte 2. 1313*4882a593Smuzhiyun * In case of gather field in first source ring entry of 1314*4882a593Smuzhiyun * the gather copy cycle in taken into account. 1315*4882a593Smuzhiyun * 1316*4882a593Smuzhiyun * dest_swap 1317*4882a593Smuzhiyun * Treats destination memory organization as big-endian. 1318*4882a593Smuzhiyun * For each dword write (4 bytes), the byte 0 is swapped with 1319*4882a593Smuzhiyun * byte 3 and byte 1 is swapped with byte 2. 1320*4882a593Smuzhiyun * In case of gather field in first source ring entry of 1321*4882a593Smuzhiyun * the gather copy cycle in taken into account. 1322*4882a593Smuzhiyun * 1323*4882a593Smuzhiyun * gather 1324*4882a593Smuzhiyun * Enables gather of multiple copy engine source 1325*4882a593Smuzhiyun * descriptors to one destination. 1326*4882a593Smuzhiyun * 1327*4882a593Smuzhiyun * ce_res_0 1328*4882a593Smuzhiyun * Reserved 1329*4882a593Smuzhiyun * 1330*4882a593Smuzhiyun * 1331*4882a593Smuzhiyun * length 1332*4882a593Smuzhiyun * Length of the buffer in units of octets of the current 1333*4882a593Smuzhiyun * descriptor 1334*4882a593Smuzhiyun * 1335*4882a593Smuzhiyun * fw_metadata 1336*4882a593Smuzhiyun * Meta data used by FW. 1337*4882a593Smuzhiyun * In case of gather field in first source ring entry of 1338*4882a593Smuzhiyun * the gather copy cycle in taken into account. 1339*4882a593Smuzhiyun * 1340*4882a593Smuzhiyun * ce_res_1 1341*4882a593Smuzhiyun * Reserved 1342*4882a593Smuzhiyun * 1343*4882a593Smuzhiyun * ce_res_2 1344*4882a593Smuzhiyun * Reserved 1345*4882a593Smuzhiyun * 1346*4882a593Smuzhiyun * ring_id 1347*4882a593Smuzhiyun * The buffer pointer ring ID. 1348*4882a593Smuzhiyun * 0 refers to the IDLE ring 1349*4882a593Smuzhiyun * 1 - N refers to other rings 1350*4882a593Smuzhiyun * Helps with debugging when dumping ring contents. 1351*4882a593Smuzhiyun * 1352*4882a593Smuzhiyun * looping_count 1353*4882a593Smuzhiyun * A count value that indicates the number of times the 1354*4882a593Smuzhiyun * producer of entries into the Ring has looped around the 1355*4882a593Smuzhiyun * ring. 1356*4882a593Smuzhiyun * 1357*4882a593Smuzhiyun * At initialization time, this value is set to 0. On the 1358*4882a593Smuzhiyun * first loop, this value is set to 1. After the max value is 1359*4882a593Smuzhiyun * reached allowed by the number of bits for this field, the 1360*4882a593Smuzhiyun * count value continues with 0 again. 1361*4882a593Smuzhiyun * 1362*4882a593Smuzhiyun * In case SW is the consumer of the ring entries, it can 1363*4882a593Smuzhiyun * use this field to figure out up to where the producer of 1364*4882a593Smuzhiyun * entries has created new entries. This eliminates the need to 1365*4882a593Smuzhiyun * check where the head pointer' of the ring is located once 1366*4882a593Smuzhiyun * the SW starts processing an interrupt indicating that new 1367*4882a593Smuzhiyun * entries have been put into this ring... 1368*4882a593Smuzhiyun * 1369*4882a593Smuzhiyun * Also note that SW if it wants only needs to look at the 1370*4882a593Smuzhiyun * LSB bit of this count value. 1371*4882a593Smuzhiyun */ 1372*4882a593Smuzhiyun 1373*4882a593Smuzhiyun #define HAL_CE_DEST_DESC_ADDR_INFO_ADDR_HI GENMASK(7, 0) 1374*4882a593Smuzhiyun #define HAL_CE_DEST_DESC_ADDR_INFO_RING_ID GENMASK(27, 20) 1375*4882a593Smuzhiyun #define HAL_CE_DEST_DESC_ADDR_INFO_LOOP_CNT HAL_SRNG_DESC_LOOP_CNT 1376*4882a593Smuzhiyun 1377*4882a593Smuzhiyun struct hal_ce_srng_dest_desc { 1378*4882a593Smuzhiyun u32 buffer_addr_low; 1379*4882a593Smuzhiyun u32 buffer_addr_info; /* %HAL_CE_DEST_DESC_ADDR_INFO_ */ 1380*4882a593Smuzhiyun } __packed; 1381*4882a593Smuzhiyun 1382*4882a593Smuzhiyun /* hal_ce_srng_dest_desc 1383*4882a593Smuzhiyun * 1384*4882a593Smuzhiyun * dst_buffer_low 1385*4882a593Smuzhiyun * LSB 32 bits of the 40 Bit Pointer to the Destination 1386*4882a593Smuzhiyun * buffer 1387*4882a593Smuzhiyun * 1388*4882a593Smuzhiyun * dst_buffer_high 1389*4882a593Smuzhiyun * MSB 8 bits of the 40 Bit Pointer to the Destination 1390*4882a593Smuzhiyun * buffer 1391*4882a593Smuzhiyun * 1392*4882a593Smuzhiyun * ce_res_4 1393*4882a593Smuzhiyun * Reserved 1394*4882a593Smuzhiyun * 1395*4882a593Smuzhiyun * ring_id 1396*4882a593Smuzhiyun * The buffer pointer ring ID. 1397*4882a593Smuzhiyun * 0 refers to the IDLE ring 1398*4882a593Smuzhiyun * 1 - N refers to other rings 1399*4882a593Smuzhiyun * Helps with debugging when dumping ring contents. 1400*4882a593Smuzhiyun * 1401*4882a593Smuzhiyun * looping_count 1402*4882a593Smuzhiyun * A count value that indicates the number of times the 1403*4882a593Smuzhiyun * producer of entries into the Ring has looped around the 1404*4882a593Smuzhiyun * ring. 1405*4882a593Smuzhiyun * 1406*4882a593Smuzhiyun * At initialization time, this value is set to 0. On the 1407*4882a593Smuzhiyun * first loop, this value is set to 1. After the max value is 1408*4882a593Smuzhiyun * reached allowed by the number of bits for this field, the 1409*4882a593Smuzhiyun * count value continues with 0 again. 1410*4882a593Smuzhiyun * 1411*4882a593Smuzhiyun * In case SW is the consumer of the ring entries, it can 1412*4882a593Smuzhiyun * use this field to figure out up to where the producer of 1413*4882a593Smuzhiyun * entries has created new entries. This eliminates the need to 1414*4882a593Smuzhiyun * check where the head pointer' of the ring is located once 1415*4882a593Smuzhiyun * the SW starts processing an interrupt indicating that new 1416*4882a593Smuzhiyun * entries have been put into this ring... 1417*4882a593Smuzhiyun * 1418*4882a593Smuzhiyun * Also note that SW if it wants only needs to look at the 1419*4882a593Smuzhiyun * LSB bit of this count value. 1420*4882a593Smuzhiyun */ 1421*4882a593Smuzhiyun 1422*4882a593Smuzhiyun #define HAL_CE_DST_STATUS_DESC_FLAGS_HASH_EN BIT(8) 1423*4882a593Smuzhiyun #define HAL_CE_DST_STATUS_DESC_FLAGS_BYTE_SWAP BIT(9) 1424*4882a593Smuzhiyun #define HAL_CE_DST_STATUS_DESC_FLAGS_DEST_SWAP BIT(10) 1425*4882a593Smuzhiyun #define HAL_CE_DST_STATUS_DESC_FLAGS_GATHER BIT(11) 1426*4882a593Smuzhiyun #define HAL_CE_DST_STATUS_DESC_FLAGS_LEN GENMASK(31, 16) 1427*4882a593Smuzhiyun 1428*4882a593Smuzhiyun #define HAL_CE_DST_STATUS_DESC_META_INFO_DATA GENMASK(7, 0) 1429*4882a593Smuzhiyun #define HAL_CE_DST_STATUS_DESC_META_INFO_RING_ID GENMASK(27, 20) 1430*4882a593Smuzhiyun #define HAL_CE_DST_STATUS_DESC_META_INFO_LOOP_CNT HAL_SRNG_DESC_LOOP_CNT 1431*4882a593Smuzhiyun 1432*4882a593Smuzhiyun struct hal_ce_srng_dst_status_desc { 1433*4882a593Smuzhiyun u32 flags; /* %HAL_CE_DST_STATUS_DESC_FLAGS_ */ 1434*4882a593Smuzhiyun u32 toeplitz_hash0; 1435*4882a593Smuzhiyun u32 toeplitz_hash1; 1436*4882a593Smuzhiyun u32 meta_info; /* HAL_CE_DST_STATUS_DESC_META_INFO_ */ 1437*4882a593Smuzhiyun } __packed; 1438*4882a593Smuzhiyun 1439*4882a593Smuzhiyun /* hal_ce_srng_dst_status_desc 1440*4882a593Smuzhiyun * 1441*4882a593Smuzhiyun * ce_res_5 1442*4882a593Smuzhiyun * Reserved 1443*4882a593Smuzhiyun * 1444*4882a593Smuzhiyun * toeplitz_en 1445*4882a593Smuzhiyun * 1446*4882a593Smuzhiyun * src_swap 1447*4882a593Smuzhiyun * Source memory buffer swapped 1448*4882a593Smuzhiyun * 1449*4882a593Smuzhiyun * dest_swap 1450*4882a593Smuzhiyun * Destination memory buffer swapped 1451*4882a593Smuzhiyun * 1452*4882a593Smuzhiyun * gather 1453*4882a593Smuzhiyun * Gather of multiple copy engine source descriptors to one 1454*4882a593Smuzhiyun * destination enabled 1455*4882a593Smuzhiyun * 1456*4882a593Smuzhiyun * ce_res_6 1457*4882a593Smuzhiyun * Reserved 1458*4882a593Smuzhiyun * 1459*4882a593Smuzhiyun * length 1460*4882a593Smuzhiyun * Sum of all the Lengths of the source descriptor in the 1461*4882a593Smuzhiyun * gather chain 1462*4882a593Smuzhiyun * 1463*4882a593Smuzhiyun * toeplitz_hash_0 1464*4882a593Smuzhiyun * 32 LS bits of 64 bit Toeplitz LFSR hash result 1465*4882a593Smuzhiyun * 1466*4882a593Smuzhiyun * toeplitz_hash_1 1467*4882a593Smuzhiyun * 32 MS bits of 64 bit Toeplitz LFSR hash result 1468*4882a593Smuzhiyun * 1469*4882a593Smuzhiyun * fw_metadata 1470*4882a593Smuzhiyun * Meta data used by FW 1471*4882a593Smuzhiyun * In case of gather field in first source ring entry of 1472*4882a593Smuzhiyun * the gather copy cycle in taken into account. 1473*4882a593Smuzhiyun * 1474*4882a593Smuzhiyun * ce_res_7 1475*4882a593Smuzhiyun * Reserved 1476*4882a593Smuzhiyun * 1477*4882a593Smuzhiyun * ring_id 1478*4882a593Smuzhiyun * The buffer pointer ring ID. 1479*4882a593Smuzhiyun * 0 refers to the IDLE ring 1480*4882a593Smuzhiyun * 1 - N refers to other rings 1481*4882a593Smuzhiyun * Helps with debugging when dumping ring contents. 1482*4882a593Smuzhiyun * 1483*4882a593Smuzhiyun * looping_count 1484*4882a593Smuzhiyun * A count value that indicates the number of times the 1485*4882a593Smuzhiyun * producer of entries into the Ring has looped around the 1486*4882a593Smuzhiyun * ring. 1487*4882a593Smuzhiyun * 1488*4882a593Smuzhiyun * At initialization time, this value is set to 0. On the 1489*4882a593Smuzhiyun * first loop, this value is set to 1. After the max value is 1490*4882a593Smuzhiyun * reached allowed by the number of bits for this field, the 1491*4882a593Smuzhiyun * count value continues with 0 again. 1492*4882a593Smuzhiyun * 1493*4882a593Smuzhiyun * In case SW is the consumer of the ring entries, it can 1494*4882a593Smuzhiyun * use this field to figure out up to where the producer of 1495*4882a593Smuzhiyun * entries has created new entries. This eliminates the need to 1496*4882a593Smuzhiyun * check where the head pointer' of the ring is located once 1497*4882a593Smuzhiyun * the SW starts processing an interrupt indicating that new 1498*4882a593Smuzhiyun * entries have been put into this ring... 1499*4882a593Smuzhiyun * 1500*4882a593Smuzhiyun * Also note that SW if it wants only needs to look at the 1501*4882a593Smuzhiyun * LSB bit of this count value. 1502*4882a593Smuzhiyun */ 1503*4882a593Smuzhiyun 1504*4882a593Smuzhiyun #define HAL_TX_RATE_STATS_INFO0_VALID BIT(0) 1505*4882a593Smuzhiyun #define HAL_TX_RATE_STATS_INFO0_BW GENMASK(2, 1) 1506*4882a593Smuzhiyun #define HAL_TX_RATE_STATS_INFO0_PKT_TYPE GENMASK(6, 3) 1507*4882a593Smuzhiyun #define HAL_TX_RATE_STATS_INFO0_STBC BIT(7) 1508*4882a593Smuzhiyun #define HAL_TX_RATE_STATS_INFO0_LDPC BIT(8) 1509*4882a593Smuzhiyun #define HAL_TX_RATE_STATS_INFO0_SGI GENMASK(10, 9) 1510*4882a593Smuzhiyun #define HAL_TX_RATE_STATS_INFO0_MCS GENMASK(14, 11) 1511*4882a593Smuzhiyun #define HAL_TX_RATE_STATS_INFO0_OFDMA_TX BIT(15) 1512*4882a593Smuzhiyun #define HAL_TX_RATE_STATS_INFO0_TONES_IN_RU GENMASK(27, 16) 1513*4882a593Smuzhiyun 1514*4882a593Smuzhiyun enum hal_tx_rate_stats_bw { 1515*4882a593Smuzhiyun HAL_TX_RATE_STATS_BW_20, 1516*4882a593Smuzhiyun HAL_TX_RATE_STATS_BW_40, 1517*4882a593Smuzhiyun HAL_TX_RATE_STATS_BW_80, 1518*4882a593Smuzhiyun HAL_TX_RATE_STATS_BW_160, 1519*4882a593Smuzhiyun }; 1520*4882a593Smuzhiyun 1521*4882a593Smuzhiyun enum hal_tx_rate_stats_pkt_type { 1522*4882a593Smuzhiyun HAL_TX_RATE_STATS_PKT_TYPE_11A, 1523*4882a593Smuzhiyun HAL_TX_RATE_STATS_PKT_TYPE_11B, 1524*4882a593Smuzhiyun HAL_TX_RATE_STATS_PKT_TYPE_11N, 1525*4882a593Smuzhiyun HAL_TX_RATE_STATS_PKT_TYPE_11AC, 1526*4882a593Smuzhiyun HAL_TX_RATE_STATS_PKT_TYPE_11AX, 1527*4882a593Smuzhiyun }; 1528*4882a593Smuzhiyun 1529*4882a593Smuzhiyun enum hal_tx_rate_stats_sgi { 1530*4882a593Smuzhiyun HAL_TX_RATE_STATS_SGI_08US, 1531*4882a593Smuzhiyun HAL_TX_RATE_STATS_SGI_04US, 1532*4882a593Smuzhiyun HAL_TX_RATE_STATS_SGI_16US, 1533*4882a593Smuzhiyun HAL_TX_RATE_STATS_SGI_32US, 1534*4882a593Smuzhiyun }; 1535*4882a593Smuzhiyun 1536*4882a593Smuzhiyun struct hal_tx_rate_stats { 1537*4882a593Smuzhiyun u32 info0; 1538*4882a593Smuzhiyun u32 tsf; 1539*4882a593Smuzhiyun } __packed; 1540*4882a593Smuzhiyun 1541*4882a593Smuzhiyun struct hal_wbm_link_desc { 1542*4882a593Smuzhiyun struct ath11k_buffer_addr buf_addr_info; 1543*4882a593Smuzhiyun } __packed; 1544*4882a593Smuzhiyun 1545*4882a593Smuzhiyun /* hal_wbm_link_desc 1546*4882a593Smuzhiyun * 1547*4882a593Smuzhiyun * Producer: WBM 1548*4882a593Smuzhiyun * Consumer: WBM 1549*4882a593Smuzhiyun * 1550*4882a593Smuzhiyun * buf_addr_info 1551*4882a593Smuzhiyun * Details of the physical address of a buffer or MSDU 1552*4882a593Smuzhiyun * link descriptor. 1553*4882a593Smuzhiyun */ 1554*4882a593Smuzhiyun 1555*4882a593Smuzhiyun enum hal_wbm_rel_src_module { 1556*4882a593Smuzhiyun HAL_WBM_REL_SRC_MODULE_TQM, 1557*4882a593Smuzhiyun HAL_WBM_REL_SRC_MODULE_RXDMA, 1558*4882a593Smuzhiyun HAL_WBM_REL_SRC_MODULE_REO, 1559*4882a593Smuzhiyun HAL_WBM_REL_SRC_MODULE_FW, 1560*4882a593Smuzhiyun HAL_WBM_REL_SRC_MODULE_SW, 1561*4882a593Smuzhiyun }; 1562*4882a593Smuzhiyun 1563*4882a593Smuzhiyun enum hal_wbm_rel_desc_type { 1564*4882a593Smuzhiyun HAL_WBM_REL_DESC_TYPE_REL_MSDU, 1565*4882a593Smuzhiyun HAL_WBM_REL_DESC_TYPE_MSDU_LINK, 1566*4882a593Smuzhiyun HAL_WBM_REL_DESC_TYPE_MPDU_LINK, 1567*4882a593Smuzhiyun HAL_WBM_REL_DESC_TYPE_MSDU_EXT, 1568*4882a593Smuzhiyun HAL_WBM_REL_DESC_TYPE_QUEUE_EXT, 1569*4882a593Smuzhiyun }; 1570*4882a593Smuzhiyun 1571*4882a593Smuzhiyun /* hal_wbm_rel_desc_type 1572*4882a593Smuzhiyun * 1573*4882a593Smuzhiyun * msdu_buffer 1574*4882a593Smuzhiyun * The address points to an MSDU buffer 1575*4882a593Smuzhiyun * 1576*4882a593Smuzhiyun * msdu_link_descriptor 1577*4882a593Smuzhiyun * The address points to an Tx MSDU link descriptor 1578*4882a593Smuzhiyun * 1579*4882a593Smuzhiyun * mpdu_link_descriptor 1580*4882a593Smuzhiyun * The address points to an MPDU link descriptor 1581*4882a593Smuzhiyun * 1582*4882a593Smuzhiyun * msdu_ext_descriptor 1583*4882a593Smuzhiyun * The address points to an MSDU extension descriptor 1584*4882a593Smuzhiyun * 1585*4882a593Smuzhiyun * queue_ext_descriptor 1586*4882a593Smuzhiyun * The address points to an TQM queue extension descriptor. WBM should 1587*4882a593Smuzhiyun * treat this is the same way as a link descriptor. 1588*4882a593Smuzhiyun */ 1589*4882a593Smuzhiyun 1590*4882a593Smuzhiyun enum hal_wbm_rel_bm_act { 1591*4882a593Smuzhiyun HAL_WBM_REL_BM_ACT_PUT_IN_IDLE, 1592*4882a593Smuzhiyun HAL_WBM_REL_BM_ACT_REL_MSDU, 1593*4882a593Smuzhiyun }; 1594*4882a593Smuzhiyun 1595*4882a593Smuzhiyun /* hal_wbm_rel_bm_act 1596*4882a593Smuzhiyun * 1597*4882a593Smuzhiyun * put_in_idle_list 1598*4882a593Smuzhiyun * Put the buffer or descriptor back in the idle list. In case of MSDU or 1599*4882a593Smuzhiyun * MDPU link descriptor, BM does not need to check to release any 1600*4882a593Smuzhiyun * individual MSDU buffers. 1601*4882a593Smuzhiyun * 1602*4882a593Smuzhiyun * release_msdu_list 1603*4882a593Smuzhiyun * This BM action can only be used in combination with desc_type being 1604*4882a593Smuzhiyun * msdu_link_descriptor. Field first_msdu_index points out which MSDU 1605*4882a593Smuzhiyun * pointer in the MSDU link descriptor is the first of an MPDU that is 1606*4882a593Smuzhiyun * released. BM shall release all the MSDU buffers linked to this first 1607*4882a593Smuzhiyun * MSDU buffer pointer. All related MSDU buffer pointer entries shall be 1608*4882a593Smuzhiyun * set to value 0, which represents the 'NULL' pointer. When all MSDU 1609*4882a593Smuzhiyun * buffer pointers in the MSDU link descriptor are 'NULL', the MSDU link 1610*4882a593Smuzhiyun * descriptor itself shall also be released. 1611*4882a593Smuzhiyun */ 1612*4882a593Smuzhiyun 1613*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO0_REL_SRC_MODULE GENMASK(2, 0) 1614*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO0_BM_ACTION GENMASK(5, 3) 1615*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO0_DESC_TYPE GENMASK(8, 6) 1616*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO0_FIRST_MSDU_IDX GENMASK(12, 9) 1617*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO0_TQM_RELEASE_REASON GENMASK(16, 13) 1618*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO0_RXDMA_PUSH_REASON GENMASK(18, 17) 1619*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO0_RXDMA_ERROR_CODE GENMASK(23, 19) 1620*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO0_REO_PUSH_REASON GENMASK(25, 24) 1621*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO0_REO_ERROR_CODE GENMASK(30, 26) 1622*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO0_WBM_INTERNAL_ERROR BIT(31) 1623*4882a593Smuzhiyun 1624*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO1_TQM_STATUS_NUMBER GENMASK(23, 0) 1625*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO1_TRANSMIT_COUNT GENMASK(30, 24) 1626*4882a593Smuzhiyun 1627*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO2_ACK_FRAME_RSSI GENMASK(7, 0) 1628*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO2_SW_REL_DETAILS_VALID BIT(8) 1629*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO2_FIRST_MSDU BIT(9) 1630*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO2_LAST_MSDU BIT(10) 1631*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO2_MSDU_IN_AMSDU BIT(11) 1632*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO2_FW_TX_NOTIF_FRAME BIT(12) 1633*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO2_BUFFER_TIMESTAMP GENMASK(31, 13) 1634*4882a593Smuzhiyun 1635*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO3_PEER_ID GENMASK(15, 0) 1636*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO3_TID GENMASK(19, 16) 1637*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO3_RING_ID GENMASK(27, 20) 1638*4882a593Smuzhiyun #define HAL_WBM_RELEASE_INFO3_LOOPING_COUNT GENMASK(31, 28) 1639*4882a593Smuzhiyun 1640*4882a593Smuzhiyun #define HAL_WBM_REL_HTT_TX_COMP_INFO0_STATUS GENMASK(12, 9) 1641*4882a593Smuzhiyun #define HAL_WBM_REL_HTT_TX_COMP_INFO0_REINJ_REASON GENMASK(16, 13) 1642*4882a593Smuzhiyun #define HAL_WBM_REL_HTT_TX_COMP_INFO0_EXP_FRAME BIT(17) 1643*4882a593Smuzhiyun 1644*4882a593Smuzhiyun struct hal_wbm_release_ring { 1645*4882a593Smuzhiyun struct ath11k_buffer_addr buf_addr_info; 1646*4882a593Smuzhiyun u32 info0; 1647*4882a593Smuzhiyun u32 info1; 1648*4882a593Smuzhiyun u32 info2; 1649*4882a593Smuzhiyun struct hal_tx_rate_stats rate_stats; 1650*4882a593Smuzhiyun u32 info3; 1651*4882a593Smuzhiyun } __packed; 1652*4882a593Smuzhiyun 1653*4882a593Smuzhiyun /* hal_wbm_release_ring 1654*4882a593Smuzhiyun * 1655*4882a593Smuzhiyun * Producer: SW/TQM/RXDMA/REO/SWITCH 1656*4882a593Smuzhiyun * Consumer: WBM/SW/FW 1657*4882a593Smuzhiyun * 1658*4882a593Smuzhiyun * HTT tx status is overlayed on wbm_release ring on 4-byte words 2, 3, 4 and 5 1659*4882a593Smuzhiyun * for software based completions. 1660*4882a593Smuzhiyun * 1661*4882a593Smuzhiyun * buf_addr_info 1662*4882a593Smuzhiyun * Details of the physical address of the buffer or link descriptor. 1663*4882a593Smuzhiyun * 1664*4882a593Smuzhiyun * release_source_module 1665*4882a593Smuzhiyun * Indicates which module initiated the release of this buffer/descriptor. 1666*4882a593Smuzhiyun * Values are defined in enum %HAL_WBM_REL_SRC_MODULE_. 1667*4882a593Smuzhiyun * 1668*4882a593Smuzhiyun * bm_action 1669*4882a593Smuzhiyun * Field only valid when the field return_buffer_manager in 1670*4882a593Smuzhiyun * Released_buff_or_desc_addr_info indicates: 1671*4882a593Smuzhiyun * WBM_IDLE_BUF_LIST / WBM_IDLE_DESC_LIST 1672*4882a593Smuzhiyun * Values are defined in enum %HAL_WBM_REL_BM_ACT_. 1673*4882a593Smuzhiyun * 1674*4882a593Smuzhiyun * buffer_or_desc_type 1675*4882a593Smuzhiyun * Field only valid when WBM is marked as the return_buffer_manager in 1676*4882a593Smuzhiyun * the Released_Buffer_address_info. Indicates that type of buffer or 1677*4882a593Smuzhiyun * descriptor is being released. Values are in enum %HAL_WBM_REL_DESC_TYPE. 1678*4882a593Smuzhiyun * 1679*4882a593Smuzhiyun * first_msdu_index 1680*4882a593Smuzhiyun * Field only valid for the bm_action release_msdu_list. The index of the 1681*4882a593Smuzhiyun * first MSDU in an MSDU link descriptor all belonging to the same MPDU. 1682*4882a593Smuzhiyun * 1683*4882a593Smuzhiyun * tqm_release_reason 1684*4882a593Smuzhiyun * Field only valid when Release_source_module is set to release_source_TQM 1685*4882a593Smuzhiyun * Release reasons are defined in enum %HAL_WBM_TQM_REL_REASON_. 1686*4882a593Smuzhiyun * 1687*4882a593Smuzhiyun * rxdma_push_reason 1688*4882a593Smuzhiyun * reo_push_reason 1689*4882a593Smuzhiyun * Indicates why rxdma/reo pushed the frame to this ring and values are 1690*4882a593Smuzhiyun * defined in enum %HAL_REO_DEST_RING_PUSH_REASON_. 1691*4882a593Smuzhiyun * 1692*4882a593Smuzhiyun * rxdma_error_code 1693*4882a593Smuzhiyun * Field only valid when 'rxdma_push_reason' set to 'error_detected'. 1694*4882a593Smuzhiyun * Values are defined in enum %HAL_REO_ENTR_RING_RXDMA_ECODE_. 1695*4882a593Smuzhiyun * 1696*4882a593Smuzhiyun * reo_error_code 1697*4882a593Smuzhiyun * Field only valid when 'reo_push_reason' set to 'error_detected'. Values 1698*4882a593Smuzhiyun * are defined in enum %HAL_REO_DEST_RING_ERROR_CODE_. 1699*4882a593Smuzhiyun * 1700*4882a593Smuzhiyun * wbm_internal_error 1701*4882a593Smuzhiyun * Is set when WBM got a buffer pointer but the action was to push it to 1702*4882a593Smuzhiyun * the idle link descriptor ring or do link related activity OR 1703*4882a593Smuzhiyun * Is set when WBM got a link buffer pointer but the action was to push it 1704*4882a593Smuzhiyun * to the buffer descriptor ring. 1705*4882a593Smuzhiyun * 1706*4882a593Smuzhiyun * tqm_status_number 1707*4882a593Smuzhiyun * The value in this field is equal to tqm_cmd_number in TQM command. It is 1708*4882a593Smuzhiyun * used to correlate the statu with TQM commands. Only valid when 1709*4882a593Smuzhiyun * release_source_module is TQM. 1710*4882a593Smuzhiyun * 1711*4882a593Smuzhiyun * transmit_count 1712*4882a593Smuzhiyun * The number of times the frame has been transmitted, valid only when 1713*4882a593Smuzhiyun * release source in TQM. 1714*4882a593Smuzhiyun * 1715*4882a593Smuzhiyun * ack_frame_rssi 1716*4882a593Smuzhiyun * This field is only valid when the source is TQM. If this frame is 1717*4882a593Smuzhiyun * removed as the result of the reception of an ACK or BA, this field 1718*4882a593Smuzhiyun * indicates the RSSI of the received ACK or BA frame. 1719*4882a593Smuzhiyun * 1720*4882a593Smuzhiyun * sw_release_details_valid 1721*4882a593Smuzhiyun * This is set when WMB got a 'release_msdu_list' command from TQM and 1722*4882a593Smuzhiyun * return buffer manager is not WMB. WBM will then de-aggregate all MSDUs 1723*4882a593Smuzhiyun * and pass them one at a time on to the 'buffer owner'. 1724*4882a593Smuzhiyun * 1725*4882a593Smuzhiyun * first_msdu 1726*4882a593Smuzhiyun * Field only valid when SW_release_details_valid is set. 1727*4882a593Smuzhiyun * When set, this MSDU is the first MSDU pointed to in the 1728*4882a593Smuzhiyun * 'release_msdu_list' command. 1729*4882a593Smuzhiyun * 1730*4882a593Smuzhiyun * last_msdu 1731*4882a593Smuzhiyun * Field only valid when SW_release_details_valid is set. 1732*4882a593Smuzhiyun * When set, this MSDU is the last MSDU pointed to in the 1733*4882a593Smuzhiyun * 'release_msdu_list' command. 1734*4882a593Smuzhiyun * 1735*4882a593Smuzhiyun * msdu_part_of_amsdu 1736*4882a593Smuzhiyun * Field only valid when SW_release_details_valid is set. 1737*4882a593Smuzhiyun * When set, this MSDU was part of an A-MSDU in MPDU 1738*4882a593Smuzhiyun * 1739*4882a593Smuzhiyun * fw_tx_notify_frame 1740*4882a593Smuzhiyun * Field only valid when SW_release_details_valid is set. 1741*4882a593Smuzhiyun * 1742*4882a593Smuzhiyun * buffer_timestamp 1743*4882a593Smuzhiyun * Field only valid when SW_release_details_valid is set. 1744*4882a593Smuzhiyun * This is the Buffer_timestamp field from the 1745*4882a593Smuzhiyun * Timestamp in units of 1024 us 1746*4882a593Smuzhiyun * 1747*4882a593Smuzhiyun * struct hal_tx_rate_stats rate_stats 1748*4882a593Smuzhiyun * Details for command execution tracking purposes. 1749*4882a593Smuzhiyun * 1750*4882a593Smuzhiyun * sw_peer_id 1751*4882a593Smuzhiyun * tid 1752*4882a593Smuzhiyun * Field only valid when Release_source_module is set to 1753*4882a593Smuzhiyun * release_source_TQM 1754*4882a593Smuzhiyun * 1755*4882a593Smuzhiyun * 1) Release of msdu buffer due to drop_frame = 1. Flow is 1756*4882a593Smuzhiyun * not fetched and hence sw_peer_id and tid = 0 1757*4882a593Smuzhiyun * 1758*4882a593Smuzhiyun * buffer_or_desc_type = e_num 0 1759*4882a593Smuzhiyun * MSDU_rel_buffertqm_release_reason = e_num 1 1760*4882a593Smuzhiyun * tqm_rr_rem_cmd_rem 1761*4882a593Smuzhiyun * 1762*4882a593Smuzhiyun * 2) Release of msdu buffer due to Flow is not fetched and 1763*4882a593Smuzhiyun * hence sw_peer_id and tid = 0 1764*4882a593Smuzhiyun * 1765*4882a593Smuzhiyun * buffer_or_desc_type = e_num 0 1766*4882a593Smuzhiyun * MSDU_rel_buffertqm_release_reason = e_num 1 1767*4882a593Smuzhiyun * tqm_rr_rem_cmd_rem 1768*4882a593Smuzhiyun * 1769*4882a593Smuzhiyun * 3) Release of msdu link due to remove_mpdu or acked_mpdu 1770*4882a593Smuzhiyun * command. 1771*4882a593Smuzhiyun * 1772*4882a593Smuzhiyun * buffer_or_desc_type = e_num1 1773*4882a593Smuzhiyun * msdu_link_descriptortqm_release_reason can be:e_num 1 1774*4882a593Smuzhiyun * tqm_rr_rem_cmd_reme_num 2 tqm_rr_rem_cmd_tx 1775*4882a593Smuzhiyun * e_num 3 tqm_rr_rem_cmd_notxe_num 4 tqm_rr_rem_cmd_aged 1776*4882a593Smuzhiyun * 1777*4882a593Smuzhiyun * This field represents the TID from the TX_MSDU_FLOW 1778*4882a593Smuzhiyun * descriptor or TX_MPDU_QUEUE descriptor 1779*4882a593Smuzhiyun * 1780*4882a593Smuzhiyun * rind_id 1781*4882a593Smuzhiyun * For debugging. 1782*4882a593Smuzhiyun * This field is filled in by the SRNG module. 1783*4882a593Smuzhiyun * It help to identify the ring that is being looked 1784*4882a593Smuzhiyun * 1785*4882a593Smuzhiyun * looping_count 1786*4882a593Smuzhiyun * A count value that indicates the number of times the 1787*4882a593Smuzhiyun * producer of entries into the Buffer Manager Ring has looped 1788*4882a593Smuzhiyun * around the ring. 1789*4882a593Smuzhiyun * 1790*4882a593Smuzhiyun * At initialization time, this value is set to 0. On the 1791*4882a593Smuzhiyun * first loop, this value is set to 1. After the max value is 1792*4882a593Smuzhiyun * reached allowed by the number of bits for this field, the 1793*4882a593Smuzhiyun * count value continues with 0 again. 1794*4882a593Smuzhiyun * 1795*4882a593Smuzhiyun * In case SW is the consumer of the ring entries, it can 1796*4882a593Smuzhiyun * use this field to figure out up to where the producer of 1797*4882a593Smuzhiyun * entries has created new entries. This eliminates the need to 1798*4882a593Smuzhiyun * check where the head pointer' of the ring is located once 1799*4882a593Smuzhiyun * the SW starts processing an interrupt indicating that new 1800*4882a593Smuzhiyun * entries have been put into this ring... 1801*4882a593Smuzhiyun * 1802*4882a593Smuzhiyun * Also note that SW if it wants only needs to look at the 1803*4882a593Smuzhiyun * LSB bit of this count value. 1804*4882a593Smuzhiyun */ 1805*4882a593Smuzhiyun 1806*4882a593Smuzhiyun /** 1807*4882a593Smuzhiyun * enum hal_wbm_tqm_rel_reason - TQM release reason code 1808*4882a593Smuzhiyun * @HAL_WBM_TQM_REL_REASON_FRAME_ACKED: ACK or BACK received for the frame 1809*4882a593Smuzhiyun * @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_MPDU: Command remove_mpdus initiated by SW 1810*4882a593Smuzhiyun * @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_TX: Command remove transmitted_mpdus 1811*4882a593Smuzhiyun * initiated by sw. 1812*4882a593Smuzhiyun * @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_NOTX: Command remove untransmitted_mpdus 1813*4882a593Smuzhiyun * initiated by sw. 1814*4882a593Smuzhiyun * @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_AGED_FRAMES: Command remove aged msdus or 1815*4882a593Smuzhiyun * mpdus. 1816*4882a593Smuzhiyun * @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON1: Remove command initiated by 1817*4882a593Smuzhiyun * fw with fw_reason1. 1818*4882a593Smuzhiyun * @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON2: Remove command initiated by 1819*4882a593Smuzhiyun * fw with fw_reason2. 1820*4882a593Smuzhiyun * @HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON3: Remove command initiated by 1821*4882a593Smuzhiyun * fw with fw_reason3. 1822*4882a593Smuzhiyun */ 1823*4882a593Smuzhiyun enum hal_wbm_tqm_rel_reason { 1824*4882a593Smuzhiyun HAL_WBM_TQM_REL_REASON_FRAME_ACKED, 1825*4882a593Smuzhiyun HAL_WBM_TQM_REL_REASON_CMD_REMOVE_MPDU, 1826*4882a593Smuzhiyun HAL_WBM_TQM_REL_REASON_CMD_REMOVE_TX, 1827*4882a593Smuzhiyun HAL_WBM_TQM_REL_REASON_CMD_REMOVE_NOTX, 1828*4882a593Smuzhiyun HAL_WBM_TQM_REL_REASON_CMD_REMOVE_AGED_FRAMES, 1829*4882a593Smuzhiyun HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON1, 1830*4882a593Smuzhiyun HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON2, 1831*4882a593Smuzhiyun HAL_WBM_TQM_REL_REASON_CMD_REMOVE_RESEAON3, 1832*4882a593Smuzhiyun }; 1833*4882a593Smuzhiyun 1834*4882a593Smuzhiyun struct hal_wbm_buffer_ring { 1835*4882a593Smuzhiyun struct ath11k_buffer_addr buf_addr_info; 1836*4882a593Smuzhiyun }; 1837*4882a593Smuzhiyun 1838*4882a593Smuzhiyun enum hal_desc_owner { 1839*4882a593Smuzhiyun HAL_DESC_OWNER_WBM, 1840*4882a593Smuzhiyun HAL_DESC_OWNER_SW, 1841*4882a593Smuzhiyun HAL_DESC_OWNER_TQM, 1842*4882a593Smuzhiyun HAL_DESC_OWNER_RXDMA, 1843*4882a593Smuzhiyun HAL_DESC_OWNER_REO, 1844*4882a593Smuzhiyun HAL_DESC_OWNER_SWITCH, 1845*4882a593Smuzhiyun }; 1846*4882a593Smuzhiyun 1847*4882a593Smuzhiyun enum hal_desc_buf_type { 1848*4882a593Smuzhiyun HAL_DESC_BUF_TYPE_TX_MSDU_LINK, 1849*4882a593Smuzhiyun HAL_DESC_BUF_TYPE_TX_MPDU_LINK, 1850*4882a593Smuzhiyun HAL_DESC_BUF_TYPE_TX_MPDU_QUEUE_HEAD, 1851*4882a593Smuzhiyun HAL_DESC_BUF_TYPE_TX_MPDU_QUEUE_EXT, 1852*4882a593Smuzhiyun HAL_DESC_BUF_TYPE_TX_FLOW, 1853*4882a593Smuzhiyun HAL_DESC_BUF_TYPE_TX_BUFFER, 1854*4882a593Smuzhiyun HAL_DESC_BUF_TYPE_RX_MSDU_LINK, 1855*4882a593Smuzhiyun HAL_DESC_BUF_TYPE_RX_MPDU_LINK, 1856*4882a593Smuzhiyun HAL_DESC_BUF_TYPE_RX_REO_QUEUE, 1857*4882a593Smuzhiyun HAL_DESC_BUF_TYPE_RX_REO_QUEUE_EXT, 1858*4882a593Smuzhiyun HAL_DESC_BUF_TYPE_RX_BUFFER, 1859*4882a593Smuzhiyun HAL_DESC_BUF_TYPE_IDLE_LINK, 1860*4882a593Smuzhiyun }; 1861*4882a593Smuzhiyun 1862*4882a593Smuzhiyun #define HAL_DESC_REO_OWNED 4 1863*4882a593Smuzhiyun #define HAL_DESC_REO_QUEUE_DESC 8 1864*4882a593Smuzhiyun #define HAL_DESC_REO_QUEUE_EXT_DESC 9 1865*4882a593Smuzhiyun #define HAL_DESC_REO_NON_QOS_TID 16 1866*4882a593Smuzhiyun 1867*4882a593Smuzhiyun #define HAL_DESC_HDR_INFO0_OWNER GENMASK(3, 0) 1868*4882a593Smuzhiyun #define HAL_DESC_HDR_INFO0_BUF_TYPE GENMASK(7, 4) 1869*4882a593Smuzhiyun #define HAL_DESC_HDR_INFO0_DBG_RESERVED GENMASK(31, 8) 1870*4882a593Smuzhiyun 1871*4882a593Smuzhiyun struct hal_desc_header { 1872*4882a593Smuzhiyun u32 info0; 1873*4882a593Smuzhiyun } __packed; 1874*4882a593Smuzhiyun 1875*4882a593Smuzhiyun struct hal_rx_mpdu_link_ptr { 1876*4882a593Smuzhiyun struct ath11k_buffer_addr addr_info; 1877*4882a593Smuzhiyun } __packed; 1878*4882a593Smuzhiyun 1879*4882a593Smuzhiyun struct hal_rx_msdu_details { 1880*4882a593Smuzhiyun struct ath11k_buffer_addr buf_addr_info; 1881*4882a593Smuzhiyun struct rx_msdu_desc rx_msdu_info; 1882*4882a593Smuzhiyun } __packed; 1883*4882a593Smuzhiyun 1884*4882a593Smuzhiyun #define HAL_RX_MSDU_LNK_INFO0_RX_QUEUE_NUMBER GENMASK(15, 0) 1885*4882a593Smuzhiyun #define HAL_RX_MSDU_LNK_INFO0_FIRST_MSDU_LNK BIT(16) 1886*4882a593Smuzhiyun 1887*4882a593Smuzhiyun struct hal_rx_msdu_link { 1888*4882a593Smuzhiyun struct hal_desc_header desc_hdr; 1889*4882a593Smuzhiyun struct ath11k_buffer_addr buf_addr_info; 1890*4882a593Smuzhiyun u32 info0; 1891*4882a593Smuzhiyun u32 pn[4]; 1892*4882a593Smuzhiyun struct hal_rx_msdu_details msdu_link[6]; 1893*4882a593Smuzhiyun } __packed; 1894*4882a593Smuzhiyun 1895*4882a593Smuzhiyun struct hal_rx_reo_queue_ext { 1896*4882a593Smuzhiyun struct hal_desc_header desc_hdr; 1897*4882a593Smuzhiyun u32 rsvd; 1898*4882a593Smuzhiyun struct hal_rx_mpdu_link_ptr mpdu_link[15]; 1899*4882a593Smuzhiyun } __packed; 1900*4882a593Smuzhiyun 1901*4882a593Smuzhiyun /* hal_rx_reo_queue_ext 1902*4882a593Smuzhiyun * Consumer: REO 1903*4882a593Smuzhiyun * Producer: REO 1904*4882a593Smuzhiyun * 1905*4882a593Smuzhiyun * descriptor_header 1906*4882a593Smuzhiyun * Details about which module owns this struct. 1907*4882a593Smuzhiyun * 1908*4882a593Smuzhiyun * mpdu_link 1909*4882a593Smuzhiyun * Pointer to the next MPDU_link descriptor in the MPDU queue. 1910*4882a593Smuzhiyun */ 1911*4882a593Smuzhiyun 1912*4882a593Smuzhiyun enum hal_rx_reo_queue_pn_size { 1913*4882a593Smuzhiyun HAL_RX_REO_QUEUE_PN_SIZE_24, 1914*4882a593Smuzhiyun HAL_RX_REO_QUEUE_PN_SIZE_48, 1915*4882a593Smuzhiyun HAL_RX_REO_QUEUE_PN_SIZE_128, 1916*4882a593Smuzhiyun }; 1917*4882a593Smuzhiyun 1918*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_RX_QUEUE_NUMBER GENMASK(15, 0) 1919*4882a593Smuzhiyun 1920*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_VLD BIT(0) 1921*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_ASSOC_LNK_DESC_COUNTER GENMASK(2, 1) 1922*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_DIS_DUP_DETECTION BIT(3) 1923*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_SOFT_REORDER_EN BIT(4) 1924*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_AC GENMASK(6, 5) 1925*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_BAR BIT(7) 1926*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_RETRY BIT(8) 1927*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_CHECK_2K_MODE BIT(9) 1928*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_OOR_MODE BIT(10) 1929*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_BA_WINDOW_SIZE GENMASK(18, 11) 1930*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_PN_CHECK BIT(19) 1931*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_EVEN_PN BIT(20) 1932*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_UNEVEN_PN BIT(21) 1933*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_PN_HANDLE_ENABLE BIT(22) 1934*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_PN_SIZE GENMASK(24, 23) 1935*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO0_IGNORE_AMPDU_FLG BIT(25) 1936*4882a593Smuzhiyun 1937*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO1_SVLD BIT(0) 1938*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO1_SSN GENMASK(12, 1) 1939*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO1_CURRENT_IDX GENMASK(20, 13) 1940*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO1_SEQ_2K_ERR BIT(21) 1941*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO1_PN_ERR BIT(22) 1942*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO1_PN_VALID BIT(31) 1943*4882a593Smuzhiyun 1944*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO2_MPDU_COUNT GENMASK(6, 0) 1945*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO2_MSDU_COUNT (31, 7) 1946*4882a593Smuzhiyun 1947*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO3_TIMEOUT_COUNT GENMASK(9, 4) 1948*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO3_FWD_DUE_TO_BAR_CNT GENMASK(15, 10) 1949*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO3_DUPLICATE_COUNT GENMASK(31, 10) 1950*4882a593Smuzhiyun 1951*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO4_FRAME_IN_ORD_COUNT GENMASK(23, 0) 1952*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO4_BAR_RECVD_COUNT GENMASK(31, 24) 1953*4882a593Smuzhiyun 1954*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO5_LATE_RX_MPDU_COUNT GENMASK(11, 0) 1955*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO5_WINDOW_JUMP_2K GENMASK(15, 12) 1956*4882a593Smuzhiyun #define HAL_RX_REO_QUEUE_INFO5_HOLE_COUNT GENMASK(31, 16) 1957*4882a593Smuzhiyun 1958*4882a593Smuzhiyun struct hal_rx_reo_queue { 1959*4882a593Smuzhiyun struct hal_desc_header desc_hdr; 1960*4882a593Smuzhiyun u32 rx_queue_num; 1961*4882a593Smuzhiyun u32 info0; 1962*4882a593Smuzhiyun u32 info1; 1963*4882a593Smuzhiyun u32 pn[4]; 1964*4882a593Smuzhiyun u32 last_rx_enqueue_timestamp; 1965*4882a593Smuzhiyun u32 last_rx_dequeue_timestamp; 1966*4882a593Smuzhiyun u32 next_aging_queue[2]; 1967*4882a593Smuzhiyun u32 prev_aging_queue[2]; 1968*4882a593Smuzhiyun u32 rx_bitmap[8]; 1969*4882a593Smuzhiyun u32 info2; 1970*4882a593Smuzhiyun u32 info3; 1971*4882a593Smuzhiyun u32 info4; 1972*4882a593Smuzhiyun u32 processed_mpdus; 1973*4882a593Smuzhiyun u32 processed_msdus; 1974*4882a593Smuzhiyun u32 processed_total_bytes; 1975*4882a593Smuzhiyun u32 info5; 1976*4882a593Smuzhiyun u32 rsvd[3]; 1977*4882a593Smuzhiyun struct hal_rx_reo_queue_ext ext_desc[]; 1978*4882a593Smuzhiyun } __packed; 1979*4882a593Smuzhiyun 1980*4882a593Smuzhiyun /* hal_rx_reo_queue 1981*4882a593Smuzhiyun * 1982*4882a593Smuzhiyun * descriptor_header 1983*4882a593Smuzhiyun * Details about which module owns this struct. Note that sub field 1984*4882a593Smuzhiyun * Buffer_type shall be set to receive_reo_queue_descriptor. 1985*4882a593Smuzhiyun * 1986*4882a593Smuzhiyun * receive_queue_number 1987*4882a593Smuzhiyun * Indicates the MPDU queue ID to which this MPDU link descriptor belongs. 1988*4882a593Smuzhiyun * 1989*4882a593Smuzhiyun * vld 1990*4882a593Smuzhiyun * Valid bit indicating a session is established and the queue descriptor 1991*4882a593Smuzhiyun * is valid. 1992*4882a593Smuzhiyun * associated_link_descriptor_counter 1993*4882a593Smuzhiyun * Indicates which of the 3 link descriptor counters shall be incremented 1994*4882a593Smuzhiyun * or decremented when link descriptors are added or removed from this 1995*4882a593Smuzhiyun * flow queue. 1996*4882a593Smuzhiyun * disable_duplicate_detection 1997*4882a593Smuzhiyun * When set, do not perform any duplicate detection. 1998*4882a593Smuzhiyun * soft_reorder_enable 1999*4882a593Smuzhiyun * When set, REO has been instructed to not perform the actual re-ordering 2000*4882a593Smuzhiyun * of frames for this queue, but just to insert the reorder opcodes. 2001*4882a593Smuzhiyun * ac 2002*4882a593Smuzhiyun * Indicates the access category of the queue descriptor. 2003*4882a593Smuzhiyun * bar 2004*4882a593Smuzhiyun * Indicates if BAR has been received. 2005*4882a593Smuzhiyun * retry 2006*4882a593Smuzhiyun * Retry bit is checked if this bit is set. 2007*4882a593Smuzhiyun * chk_2k_mode 2008*4882a593Smuzhiyun * Indicates what type of operation is expected from Reo when the received 2009*4882a593Smuzhiyun * frame SN falls within the 2K window. 2010*4882a593Smuzhiyun * oor_mode 2011*4882a593Smuzhiyun * Indicates what type of operation is expected when the received frame 2012*4882a593Smuzhiyun * falls within the OOR window. 2013*4882a593Smuzhiyun * ba_window_size 2014*4882a593Smuzhiyun * Indicates the negotiated (window size + 1). Max of 256 bits. 2015*4882a593Smuzhiyun * 2016*4882a593Smuzhiyun * A value 255 means 256 bitmap, 63 means 64 bitmap, 0 (means non-BA 2017*4882a593Smuzhiyun * session, with window size of 0). The 3 values here are the main values 2018*4882a593Smuzhiyun * validated, but other values should work as well. 2019*4882a593Smuzhiyun * 2020*4882a593Smuzhiyun * A BA window size of 0 (=> one frame entry bitmat), means that there is 2021*4882a593Smuzhiyun * no additional rx_reo_queue_ext desc. following rx_reo_queue in memory. 2022*4882a593Smuzhiyun * A BA window size of 1 - 105, means that there is 1 rx_reo_queue_ext. 2023*4882a593Smuzhiyun * A BA window size of 106 - 210, means that there are 2 rx_reo_queue_ext. 2024*4882a593Smuzhiyun * A BA window size of 211 - 256, means that there are 3 rx_reo_queue_ext. 2025*4882a593Smuzhiyun * pn_check_needed, pn_shall_be_even, pn_shall_be_uneven, pn_handling_enable, 2026*4882a593Smuzhiyun * pn_size 2027*4882a593Smuzhiyun * REO shall perform the PN increment check, even number check, uneven 2028*4882a593Smuzhiyun * number check, PN error check and size of the PN field check. 2029*4882a593Smuzhiyun * ignore_ampdu_flag 2030*4882a593Smuzhiyun * REO shall ignore the ampdu_flag on entrance descriptor for this queue. 2031*4882a593Smuzhiyun * 2032*4882a593Smuzhiyun * svld 2033*4882a593Smuzhiyun * Sequence number in next field is valid one. 2034*4882a593Smuzhiyun * ssn 2035*4882a593Smuzhiyun * Starting Sequence number of the session. 2036*4882a593Smuzhiyun * current_index 2037*4882a593Smuzhiyun * Points to last forwarded packet 2038*4882a593Smuzhiyun * seq_2k_error_detected_flag 2039*4882a593Smuzhiyun * REO has detected a 2k error jump in the sequence number and from that 2040*4882a593Smuzhiyun * moment forward, all new frames are forwarded directly to FW, without 2041*4882a593Smuzhiyun * duplicate detect, reordering, etc. 2042*4882a593Smuzhiyun * pn_error_detected_flag 2043*4882a593Smuzhiyun * REO has detected a PN error. 2044*4882a593Smuzhiyun */ 2045*4882a593Smuzhiyun 2046*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_QUEUE_ADDR_HI GENMASK(7, 0) 2047*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_RX_QUEUE_NUM BIT(8) 2048*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_VLD BIT(9) 2049*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_ASSOC_LNK_DESC_CNT BIT(10) 2050*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_DIS_DUP_DETECTION BIT(11) 2051*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SOFT_REORDER_EN BIT(12) 2052*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_AC BIT(13) 2053*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_BAR BIT(14) 2054*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_RETRY BIT(15) 2055*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_CHECK_2K_MODE BIT(16) 2056*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_OOR_MODE BIT(17) 2057*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_BA_WINDOW_SIZE BIT(18) 2058*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_CHECK BIT(19) 2059*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_EVEN_PN BIT(20) 2060*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_UNEVEN_PN BIT(21) 2061*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_HANDLE_ENABLE BIT(22) 2062*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_SIZE BIT(23) 2063*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_IGNORE_AMPDU_FLG BIT(24) 2064*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SVLD BIT(25) 2065*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SSN BIT(26) 2066*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_SEQ_2K_ERR BIT(27) 2067*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_ERR BIT(28) 2068*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN_VALID BIT(29) 2069*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO0_UPD_PN BIT(30) 2070*4882a593Smuzhiyun 2071*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO1_RX_QUEUE_NUMBER GENMASK(15, 0) 2072*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO1_VLD BIT(16) 2073*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO1_ASSOC_LNK_DESC_COUNTER GENMASK(18, 17) 2074*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO1_DIS_DUP_DETECTION BIT(19) 2075*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO1_SOFT_REORDER_EN BIT(20) 2076*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO1_AC GENMASK(22, 21) 2077*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO1_BAR BIT(23) 2078*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO1_RETRY BIT(24) 2079*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO1_CHECK_2K_MODE BIT(25) 2080*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO1_OOR_MODE BIT(26) 2081*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO1_PN_CHECK BIT(27) 2082*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO1_EVEN_PN BIT(28) 2083*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO1_UNEVEN_PN BIT(29) 2084*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO1_PN_HANDLE_ENABLE BIT(30) 2085*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO1_IGNORE_AMPDU_FLG BIT(31) 2086*4882a593Smuzhiyun 2087*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO2_BA_WINDOW_SIZE GENMASK(7, 0) 2088*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO2_PN_SIZE GENMASK(9, 8) 2089*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO2_SVLD BIT(10) 2090*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO2_SSN GENMASK(22, 11) 2091*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO2_SEQ_2K_ERR BIT(23) 2092*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO2_PN_ERR BIT(24) 2093*4882a593Smuzhiyun #define HAL_REO_UPD_RX_QUEUE_INFO2_PN_VALID BIT(25) 2094*4882a593Smuzhiyun 2095*4882a593Smuzhiyun struct hal_reo_update_rx_queue { 2096*4882a593Smuzhiyun struct hal_reo_cmd_hdr cmd; 2097*4882a593Smuzhiyun u32 queue_addr_lo; 2098*4882a593Smuzhiyun u32 info0; 2099*4882a593Smuzhiyun u32 info1; 2100*4882a593Smuzhiyun u32 info2; 2101*4882a593Smuzhiyun u32 pn[4]; 2102*4882a593Smuzhiyun } __packed; 2103*4882a593Smuzhiyun 2104*4882a593Smuzhiyun #define HAL_REO_UNBLOCK_CACHE_INFO0_UNBLK_CACHE BIT(0) 2105*4882a593Smuzhiyun #define HAL_REO_UNBLOCK_CACHE_INFO0_RESOURCE_IDX GENMASK(2, 1) 2106*4882a593Smuzhiyun 2107*4882a593Smuzhiyun struct hal_reo_unblock_cache { 2108*4882a593Smuzhiyun struct hal_reo_cmd_hdr cmd; 2109*4882a593Smuzhiyun u32 info0; 2110*4882a593Smuzhiyun u32 rsvd[7]; 2111*4882a593Smuzhiyun } __packed; 2112*4882a593Smuzhiyun 2113*4882a593Smuzhiyun enum hal_reo_exec_status { 2114*4882a593Smuzhiyun HAL_REO_EXEC_STATUS_SUCCESS, 2115*4882a593Smuzhiyun HAL_REO_EXEC_STATUS_BLOCKED, 2116*4882a593Smuzhiyun HAL_REO_EXEC_STATUS_FAILED, 2117*4882a593Smuzhiyun HAL_REO_EXEC_STATUS_RESOURCE_BLOCKED, 2118*4882a593Smuzhiyun }; 2119*4882a593Smuzhiyun 2120*4882a593Smuzhiyun #define HAL_REO_STATUS_HDR_INFO0_STATUS_NUM GENMASK(15, 0) 2121*4882a593Smuzhiyun #define HAL_REO_STATUS_HDR_INFO0_EXEC_TIME GENMASK(25, 16) 2122*4882a593Smuzhiyun #define HAL_REO_STATUS_HDR_INFO0_EXEC_STATUS GENMASK(27, 26) 2123*4882a593Smuzhiyun 2124*4882a593Smuzhiyun struct hal_reo_status_hdr { 2125*4882a593Smuzhiyun u32 info0; 2126*4882a593Smuzhiyun u32 timestamp; 2127*4882a593Smuzhiyun } __packed; 2128*4882a593Smuzhiyun 2129*4882a593Smuzhiyun /* hal_reo_status_hdr 2130*4882a593Smuzhiyun * Producer: REO 2131*4882a593Smuzhiyun * Consumer: SW 2132*4882a593Smuzhiyun * 2133*4882a593Smuzhiyun * status_num 2134*4882a593Smuzhiyun * The value in this field is equal to value of the reo command 2135*4882a593Smuzhiyun * number. This field helps to correlate the statuses with the REO 2136*4882a593Smuzhiyun * commands. 2137*4882a593Smuzhiyun * 2138*4882a593Smuzhiyun * execution_time (in us) 2139*4882a593Smuzhiyun * The amount of time REO took to excecute the command. Note that 2140*4882a593Smuzhiyun * this time does not include the duration of the command waiting 2141*4882a593Smuzhiyun * in the command ring, before the execution started. 2142*4882a593Smuzhiyun * 2143*4882a593Smuzhiyun * execution_status 2144*4882a593Smuzhiyun * Execution status of the command. Values are defined in 2145*4882a593Smuzhiyun * enum %HAL_REO_EXEC_STATUS_. 2146*4882a593Smuzhiyun */ 2147*4882a593Smuzhiyun #define HAL_REO_GET_QUEUE_STATS_STATUS_INFO0_SSN GENMASK(11, 0) 2148*4882a593Smuzhiyun #define HAL_REO_GET_QUEUE_STATS_STATUS_INFO0_CUR_IDX GENMASK(19, 12) 2149*4882a593Smuzhiyun 2150*4882a593Smuzhiyun #define HAL_REO_GET_QUEUE_STATS_STATUS_INFO1_MPDU_COUNT GENMASK(6, 0) 2151*4882a593Smuzhiyun #define HAL_REO_GET_QUEUE_STATS_STATUS_INFO1_MSDU_COUNT GENMASK(31, 7) 2152*4882a593Smuzhiyun 2153*4882a593Smuzhiyun #define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_TIMEOUT_COUNT GENMASK(9, 4) 2154*4882a593Smuzhiyun #define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_FDTB_COUNT GENMASK(15, 10) 2155*4882a593Smuzhiyun #define HAL_REO_GET_QUEUE_STATS_STATUS_INFO2_DUPLICATE_COUNT GENMASK(31, 16) 2156*4882a593Smuzhiyun 2157*4882a593Smuzhiyun #define HAL_REO_GET_QUEUE_STATS_STATUS_INFO3_FIO_COUNT GENMASK(23, 0) 2158*4882a593Smuzhiyun #define HAL_REO_GET_QUEUE_STATS_STATUS_INFO3_BAR_RCVD_CNT GENMASK(31, 24) 2159*4882a593Smuzhiyun 2160*4882a593Smuzhiyun #define HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_LATE_RX_MPDU GENMASK(11, 0) 2161*4882a593Smuzhiyun #define HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_WINDOW_JMP2K GENMASK(15, 12) 2162*4882a593Smuzhiyun #define HAL_REO_GET_QUEUE_STATS_STATUS_INFO4_HOLE_COUNT GENMASK(31, 16) 2163*4882a593Smuzhiyun 2164*4882a593Smuzhiyun #define HAL_REO_GET_QUEUE_STATS_STATUS_INFO5_LOOPING_CNT GENMASK(31, 28) 2165*4882a593Smuzhiyun 2166*4882a593Smuzhiyun struct hal_reo_get_queue_stats_status { 2167*4882a593Smuzhiyun struct hal_reo_status_hdr hdr; 2168*4882a593Smuzhiyun u32 info0; 2169*4882a593Smuzhiyun u32 pn[4]; 2170*4882a593Smuzhiyun u32 last_rx_enqueue_timestamp; 2171*4882a593Smuzhiyun u32 last_rx_dequeue_timestamp; 2172*4882a593Smuzhiyun u32 rx_bitmap[8]; 2173*4882a593Smuzhiyun u32 info1; 2174*4882a593Smuzhiyun u32 info2; 2175*4882a593Smuzhiyun u32 info3; 2176*4882a593Smuzhiyun u32 num_mpdu_frames; 2177*4882a593Smuzhiyun u32 num_msdu_frames; 2178*4882a593Smuzhiyun u32 total_bytes; 2179*4882a593Smuzhiyun u32 info4; 2180*4882a593Smuzhiyun u32 info5; 2181*4882a593Smuzhiyun } __packed; 2182*4882a593Smuzhiyun 2183*4882a593Smuzhiyun /* hal_reo_get_queue_stats_status 2184*4882a593Smuzhiyun * Producer: REO 2185*4882a593Smuzhiyun * Consumer: SW 2186*4882a593Smuzhiyun * 2187*4882a593Smuzhiyun * status_hdr 2188*4882a593Smuzhiyun * Details that can link this status with the original command. It 2189*4882a593Smuzhiyun * also contains info on how long REO took to execute this command. 2190*4882a593Smuzhiyun * 2191*4882a593Smuzhiyun * ssn 2192*4882a593Smuzhiyun * Starting Sequence number of the session, this changes whenever 2193*4882a593Smuzhiyun * window moves (can be filled by SW then maintained by REO). 2194*4882a593Smuzhiyun * 2195*4882a593Smuzhiyun * current_index 2196*4882a593Smuzhiyun * Points to last forwarded packet. 2197*4882a593Smuzhiyun * 2198*4882a593Smuzhiyun * pn 2199*4882a593Smuzhiyun * Bits of the PN number. 2200*4882a593Smuzhiyun * 2201*4882a593Smuzhiyun * last_rx_enqueue_timestamp 2202*4882a593Smuzhiyun * last_rx_dequeue_timestamp 2203*4882a593Smuzhiyun * Timestamp of arrival of the last MPDU for this queue and 2204*4882a593Smuzhiyun * Timestamp of forwarding an MPDU accordingly. 2205*4882a593Smuzhiyun * 2206*4882a593Smuzhiyun * rx_bitmap 2207*4882a593Smuzhiyun * When a bit is set, the corresponding frame is currently held 2208*4882a593Smuzhiyun * in the re-order queue. The bitmap is Fully managed by HW. 2209*4882a593Smuzhiyun * 2210*4882a593Smuzhiyun * current_mpdu_count 2211*4882a593Smuzhiyun * current_msdu_count 2212*4882a593Smuzhiyun * The number of MPDUs and MSDUs in the queue. 2213*4882a593Smuzhiyun * 2214*4882a593Smuzhiyun * timeout_count 2215*4882a593Smuzhiyun * The number of times REO started forwarding frames even though 2216*4882a593Smuzhiyun * there is a hole in the bitmap. Forwarding reason is timeout. 2217*4882a593Smuzhiyun * 2218*4882a593Smuzhiyun * forward_due_to_bar_count 2219*4882a593Smuzhiyun * The number of times REO started forwarding frames even though 2220*4882a593Smuzhiyun * there is a hole in the bitmap. Fwd reason is reception of BAR. 2221*4882a593Smuzhiyun * 2222*4882a593Smuzhiyun * duplicate_count 2223*4882a593Smuzhiyun * The number of duplicate frames that have been detected. 2224*4882a593Smuzhiyun * 2225*4882a593Smuzhiyun * frames_in_order_count 2226*4882a593Smuzhiyun * The number of frames that have been received in order (without 2227*4882a593Smuzhiyun * a hole that prevented them from being forwarded immediately). 2228*4882a593Smuzhiyun * 2229*4882a593Smuzhiyun * bar_received_count 2230*4882a593Smuzhiyun * The number of times a BAR frame is received. 2231*4882a593Smuzhiyun * 2232*4882a593Smuzhiyun * mpdu_frames_processed_count 2233*4882a593Smuzhiyun * msdu_frames_processed_count 2234*4882a593Smuzhiyun * The total number of MPDU/MSDU frames that have been processed. 2235*4882a593Smuzhiyun * 2236*4882a593Smuzhiyun * total_bytes 2237*4882a593Smuzhiyun * An approximation of the number of bytes received for this queue. 2238*4882a593Smuzhiyun * 2239*4882a593Smuzhiyun * late_receive_mpdu_count 2240*4882a593Smuzhiyun * The number of MPDUs received after the window had already moved 2241*4882a593Smuzhiyun * on. The 'late' sequence window is defined as 2242*4882a593Smuzhiyun * (Window SSN - 256) - (Window SSN - 1). 2243*4882a593Smuzhiyun * 2244*4882a593Smuzhiyun * window_jump_2k 2245*4882a593Smuzhiyun * The number of times the window moved more than 2K 2246*4882a593Smuzhiyun * 2247*4882a593Smuzhiyun * hole_count 2248*4882a593Smuzhiyun * The number of times a hole was created in the receive bitmap. 2249*4882a593Smuzhiyun * 2250*4882a593Smuzhiyun * looping_count 2251*4882a593Smuzhiyun * A count value that indicates the number of times the producer of 2252*4882a593Smuzhiyun * entries into this Ring has looped around the ring. 2253*4882a593Smuzhiyun */ 2254*4882a593Smuzhiyun 2255*4882a593Smuzhiyun #define HAL_REO_STATUS_LOOP_CNT GENMASK(31, 28) 2256*4882a593Smuzhiyun 2257*4882a593Smuzhiyun #define HAL_REO_FLUSH_QUEUE_INFO0_ERR_DETECTED BIT(0) 2258*4882a593Smuzhiyun #define HAL_REO_FLUSH_QUEUE_INFO0_RSVD GENMASK(31, 1) 2259*4882a593Smuzhiyun #define HAL_REO_FLUSH_QUEUE_INFO1_RSVD GENMASK(27, 0) 2260*4882a593Smuzhiyun 2261*4882a593Smuzhiyun struct hal_reo_flush_queue_status { 2262*4882a593Smuzhiyun struct hal_reo_status_hdr hdr; 2263*4882a593Smuzhiyun u32 info0; 2264*4882a593Smuzhiyun u32 rsvd0[21]; 2265*4882a593Smuzhiyun u32 info1; 2266*4882a593Smuzhiyun } __packed; 2267*4882a593Smuzhiyun 2268*4882a593Smuzhiyun /* hal_reo_flush_queue_status 2269*4882a593Smuzhiyun * Producer: REO 2270*4882a593Smuzhiyun * Consumer: SW 2271*4882a593Smuzhiyun * 2272*4882a593Smuzhiyun * status_hdr 2273*4882a593Smuzhiyun * Details that can link this status with the original command. It 2274*4882a593Smuzhiyun * also contains info on how long REO took to execute this command. 2275*4882a593Smuzhiyun * 2276*4882a593Smuzhiyun * error_detected 2277*4882a593Smuzhiyun * Status of blocking resource 2278*4882a593Smuzhiyun * 2279*4882a593Smuzhiyun * 0 - No error has been detected while executing this command 2280*4882a593Smuzhiyun * 1 - Error detected. The resource to be used for blocking was 2281*4882a593Smuzhiyun * already in use. 2282*4882a593Smuzhiyun * 2283*4882a593Smuzhiyun * looping_count 2284*4882a593Smuzhiyun * A count value that indicates the number of times the producer of 2285*4882a593Smuzhiyun * entries into this Ring has looped around the ring. 2286*4882a593Smuzhiyun */ 2287*4882a593Smuzhiyun 2288*4882a593Smuzhiyun #define HAL_REO_FLUSH_CACHE_STATUS_INFO0_IS_ERR BIT(0) 2289*4882a593Smuzhiyun #define HAL_REO_FLUSH_CACHE_STATUS_INFO0_BLOCK_ERR_CODE GENMASK(2, 1) 2290*4882a593Smuzhiyun #define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_STATUS_HIT BIT(8) 2291*4882a593Smuzhiyun #define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_DESC_TYPE GENMASK(11, 9) 2292*4882a593Smuzhiyun #define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_CLIENT_ID GENMASK(15, 12) 2293*4882a593Smuzhiyun #define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_ERR GENMASK(17, 16) 2294*4882a593Smuzhiyun #define HAL_REO_FLUSH_CACHE_STATUS_INFO0_FLUSH_COUNT GENMASK(25, 18) 2295*4882a593Smuzhiyun 2296*4882a593Smuzhiyun struct hal_reo_flush_cache_status { 2297*4882a593Smuzhiyun struct hal_reo_status_hdr hdr; 2298*4882a593Smuzhiyun u32 info0; 2299*4882a593Smuzhiyun u32 rsvd0[21]; 2300*4882a593Smuzhiyun u32 info1; 2301*4882a593Smuzhiyun } __packed; 2302*4882a593Smuzhiyun 2303*4882a593Smuzhiyun /* hal_reo_flush_cache_status 2304*4882a593Smuzhiyun * Producer: REO 2305*4882a593Smuzhiyun * Consumer: SW 2306*4882a593Smuzhiyun * 2307*4882a593Smuzhiyun * status_hdr 2308*4882a593Smuzhiyun * Details that can link this status with the original command. It 2309*4882a593Smuzhiyun * also contains info on how long REO took to execute this command. 2310*4882a593Smuzhiyun * 2311*4882a593Smuzhiyun * error_detected 2312*4882a593Smuzhiyun * Status for blocking resource handling 2313*4882a593Smuzhiyun * 2314*4882a593Smuzhiyun * 0 - No error has been detected while executing this command 2315*4882a593Smuzhiyun * 1 - An error in the blocking resource management was detected 2316*4882a593Smuzhiyun * 2317*4882a593Smuzhiyun * block_error_details 2318*4882a593Smuzhiyun * only valid when error_detected is set 2319*4882a593Smuzhiyun * 2320*4882a593Smuzhiyun * 0 - No blocking related errors found 2321*4882a593Smuzhiyun * 1 - Blocking resource is already in use 2322*4882a593Smuzhiyun * 2 - Resource requested to be unblocked, was not blocked 2323*4882a593Smuzhiyun * 2324*4882a593Smuzhiyun * cache_controller_flush_status_hit 2325*4882a593Smuzhiyun * The status that the cache controller returned on executing the 2326*4882a593Smuzhiyun * flush command. 2327*4882a593Smuzhiyun * 2328*4882a593Smuzhiyun * 0 - miss; 1 - hit 2329*4882a593Smuzhiyun * 2330*4882a593Smuzhiyun * cache_controller_flush_status_desc_type 2331*4882a593Smuzhiyun * Flush descriptor type 2332*4882a593Smuzhiyun * 2333*4882a593Smuzhiyun * cache_controller_flush_status_client_id 2334*4882a593Smuzhiyun * Module who made the flush request 2335*4882a593Smuzhiyun * 2336*4882a593Smuzhiyun * In REO, this is always 0 2337*4882a593Smuzhiyun * 2338*4882a593Smuzhiyun * cache_controller_flush_status_error 2339*4882a593Smuzhiyun * Error condition 2340*4882a593Smuzhiyun * 2341*4882a593Smuzhiyun * 0 - No error found 2342*4882a593Smuzhiyun * 1 - HW interface is still busy 2343*4882a593Smuzhiyun * 2 - Line currently locked. Used for one line flush command 2344*4882a593Smuzhiyun * 3 - At least one line is still locked. 2345*4882a593Smuzhiyun * Used for cache flush command. 2346*4882a593Smuzhiyun * 2347*4882a593Smuzhiyun * cache_controller_flush_count 2348*4882a593Smuzhiyun * The number of lines that were actually flushed out 2349*4882a593Smuzhiyun * 2350*4882a593Smuzhiyun * looping_count 2351*4882a593Smuzhiyun * A count value that indicates the number of times the producer of 2352*4882a593Smuzhiyun * entries into this Ring has looped around the ring. 2353*4882a593Smuzhiyun */ 2354*4882a593Smuzhiyun 2355*4882a593Smuzhiyun #define HAL_REO_UNBLOCK_CACHE_STATUS_INFO0_IS_ERR BIT(0) 2356*4882a593Smuzhiyun #define HAL_REO_UNBLOCK_CACHE_STATUS_INFO0_TYPE BIT(1) 2357*4882a593Smuzhiyun 2358*4882a593Smuzhiyun struct hal_reo_unblock_cache_status { 2359*4882a593Smuzhiyun struct hal_reo_status_hdr hdr; 2360*4882a593Smuzhiyun u32 info0; 2361*4882a593Smuzhiyun u32 rsvd0[21]; 2362*4882a593Smuzhiyun u32 info1; 2363*4882a593Smuzhiyun } __packed; 2364*4882a593Smuzhiyun 2365*4882a593Smuzhiyun /* hal_reo_unblock_cache_status 2366*4882a593Smuzhiyun * Producer: REO 2367*4882a593Smuzhiyun * Consumer: SW 2368*4882a593Smuzhiyun * 2369*4882a593Smuzhiyun * status_hdr 2370*4882a593Smuzhiyun * Details that can link this status with the original command. It 2371*4882a593Smuzhiyun * also contains info on how long REO took to execute this command. 2372*4882a593Smuzhiyun * 2373*4882a593Smuzhiyun * error_detected 2374*4882a593Smuzhiyun * 0 - No error has been detected while executing this command 2375*4882a593Smuzhiyun * 1 - The blocking resource was not in use, and therefore it could 2376*4882a593Smuzhiyun * not be unblocked. 2377*4882a593Smuzhiyun * 2378*4882a593Smuzhiyun * unblock_type 2379*4882a593Smuzhiyun * Reference to the type of unblock command 2380*4882a593Smuzhiyun * 0 - Unblock a blocking resource 2381*4882a593Smuzhiyun * 1 - The entire cache usage is unblock 2382*4882a593Smuzhiyun * 2383*4882a593Smuzhiyun * looping_count 2384*4882a593Smuzhiyun * A count value that indicates the number of times the producer of 2385*4882a593Smuzhiyun * entries into this Ring has looped around the ring. 2386*4882a593Smuzhiyun */ 2387*4882a593Smuzhiyun 2388*4882a593Smuzhiyun #define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO0_IS_ERR BIT(0) 2389*4882a593Smuzhiyun #define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO0_LIST_EMPTY BIT(1) 2390*4882a593Smuzhiyun 2391*4882a593Smuzhiyun #define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO1_REL_DESC_COUNT GENMASK(15, 0) 2392*4882a593Smuzhiyun #define HAL_REO_FLUSH_TIMEOUT_STATUS_INFO1_FWD_BUF_COUNT GENMASK(31, 16) 2393*4882a593Smuzhiyun 2394*4882a593Smuzhiyun struct hal_reo_flush_timeout_list_status { 2395*4882a593Smuzhiyun struct hal_reo_status_hdr hdr; 2396*4882a593Smuzhiyun u32 info0; 2397*4882a593Smuzhiyun u32 info1; 2398*4882a593Smuzhiyun u32 rsvd0[20]; 2399*4882a593Smuzhiyun u32 info2; 2400*4882a593Smuzhiyun } __packed; 2401*4882a593Smuzhiyun 2402*4882a593Smuzhiyun /* hal_reo_flush_timeout_list_status 2403*4882a593Smuzhiyun * Producer: REO 2404*4882a593Smuzhiyun * Consumer: SW 2405*4882a593Smuzhiyun * 2406*4882a593Smuzhiyun * status_hdr 2407*4882a593Smuzhiyun * Details that can link this status with the original command. It 2408*4882a593Smuzhiyun * also contains info on how long REO took to execute this command. 2409*4882a593Smuzhiyun * 2410*4882a593Smuzhiyun * error_detected 2411*4882a593Smuzhiyun * 0 - No error has been detected while executing this command 2412*4882a593Smuzhiyun * 1 - Command not properly executed and returned with error 2413*4882a593Smuzhiyun * 2414*4882a593Smuzhiyun * timeout_list_empty 2415*4882a593Smuzhiyun * When set, REO has depleted the timeout list and all entries are 2416*4882a593Smuzhiyun * gone. 2417*4882a593Smuzhiyun * 2418*4882a593Smuzhiyun * release_desc_count 2419*4882a593Smuzhiyun * Producer: SW; Consumer: REO 2420*4882a593Smuzhiyun * The number of link descriptor released 2421*4882a593Smuzhiyun * 2422*4882a593Smuzhiyun * forward_buf_count 2423*4882a593Smuzhiyun * Producer: SW; Consumer: REO 2424*4882a593Smuzhiyun * The number of buffers forwarded to the REO destination rings 2425*4882a593Smuzhiyun * 2426*4882a593Smuzhiyun * looping_count 2427*4882a593Smuzhiyun * A count value that indicates the number of times the producer of 2428*4882a593Smuzhiyun * entries into this Ring has looped around the ring. 2429*4882a593Smuzhiyun */ 2430*4882a593Smuzhiyun 2431*4882a593Smuzhiyun #define HAL_REO_DESC_THRESH_STATUS_INFO0_THRESH_INDEX GENMASK(1, 0) 2432*4882a593Smuzhiyun #define HAL_REO_DESC_THRESH_STATUS_INFO1_LINK_DESC_COUNTER0 GENMASK(23, 0) 2433*4882a593Smuzhiyun #define HAL_REO_DESC_THRESH_STATUS_INFO2_LINK_DESC_COUNTER1 GENMASK(23, 0) 2434*4882a593Smuzhiyun #define HAL_REO_DESC_THRESH_STATUS_INFO3_LINK_DESC_COUNTER2 GENMASK(23, 0) 2435*4882a593Smuzhiyun #define HAL_REO_DESC_THRESH_STATUS_INFO4_LINK_DESC_COUNTER_SUM GENMASK(23, 0) 2436*4882a593Smuzhiyun 2437*4882a593Smuzhiyun struct hal_reo_desc_thresh_reached_status { 2438*4882a593Smuzhiyun struct hal_reo_status_hdr hdr; 2439*4882a593Smuzhiyun u32 info0; 2440*4882a593Smuzhiyun u32 info1; 2441*4882a593Smuzhiyun u32 info2; 2442*4882a593Smuzhiyun u32 info3; 2443*4882a593Smuzhiyun u32 info4; 2444*4882a593Smuzhiyun u32 rsvd0[17]; 2445*4882a593Smuzhiyun u32 info5; 2446*4882a593Smuzhiyun } __packed; 2447*4882a593Smuzhiyun 2448*4882a593Smuzhiyun /* hal_reo_desc_thresh_reached_status 2449*4882a593Smuzhiyun * Producer: REO 2450*4882a593Smuzhiyun * Consumer: SW 2451*4882a593Smuzhiyun * 2452*4882a593Smuzhiyun * status_hdr 2453*4882a593Smuzhiyun * Details that can link this status with the original command. It 2454*4882a593Smuzhiyun * also contains info on how long REO took to execute this command. 2455*4882a593Smuzhiyun * 2456*4882a593Smuzhiyun * threshold_index 2457*4882a593Smuzhiyun * The index of the threshold register whose value got reached 2458*4882a593Smuzhiyun * 2459*4882a593Smuzhiyun * link_descriptor_counter0 2460*4882a593Smuzhiyun * link_descriptor_counter1 2461*4882a593Smuzhiyun * link_descriptor_counter2 2462*4882a593Smuzhiyun * link_descriptor_counter_sum 2463*4882a593Smuzhiyun * Value of the respective counters at generation of this message 2464*4882a593Smuzhiyun * 2465*4882a593Smuzhiyun * looping_count 2466*4882a593Smuzhiyun * A count value that indicates the number of times the producer of 2467*4882a593Smuzhiyun * entries into this Ring has looped around the ring. 2468*4882a593Smuzhiyun */ 2469*4882a593Smuzhiyun 2470*4882a593Smuzhiyun #endif /* ATH11K_HAL_DESC_H */ 2471