1 /* 2 * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 // 20 // DO NOT EDIT! This file is automatically generated 21 // These definitions are tied to a particular hardware layout 22 23 24 #ifndef _BUFFER_ADDR_INFO_H_ 25 #define _BUFFER_ADDR_INFO_H_ 26 #if !defined(__ASSEMBLER__) 27 #endif 28 29 30 // ################ START SUMMARY ################# 31 // 32 // Dword Fields 33 // 0 buffer_addr_31_0[31:0] 34 // 1 buffer_addr_39_32[7:0], return_buffer_manager[10:8], sw_buffer_cookie[31:11] 35 // 36 // ################ END SUMMARY ################# 37 38 #define NUM_OF_DWORDS_BUFFER_ADDR_INFO 2 39 40 struct buffer_addr_info { 41 uint32_t buffer_addr_31_0 : 32; //[31:0] 42 uint32_t buffer_addr_39_32 : 8, //[7:0] 43 return_buffer_manager : 3, //[10:8] 44 sw_buffer_cookie : 21; //[31:11] 45 }; 46 47 /* 48 49 buffer_addr_31_0 50 51 Address (lower 32 bits) of the MSDU buffer OR 52 MSDU_EXTENSION descriptor OR Link Descriptor 53 54 55 56 In case of 'NULL' pointer, this field is set to 0 57 58 <legal all> 59 60 buffer_addr_39_32 61 62 Address (upper 8 bits) of the MSDU buffer OR 63 MSDU_EXTENSION descriptor OR Link Descriptor 64 65 66 67 In case of 'NULL' pointer, this field is set to 0 68 69 <legal all> 70 71 return_buffer_manager 72 73 Consumer: WBM 74 75 Producer: SW/FW 76 77 78 79 In case of 'NULL' pointer, this field is set to 0 80 81 82 83 Indicates to which buffer manager the buffer OR 84 MSDU_EXTENSION descriptor OR link descriptor that is being 85 pointed to shall be returned after the frame has been 86 processed. It is used by WBM for routing purposes. 87 88 89 90 <enum 0 WBM_IDLE_BUF_LIST> This buffer shall be returned 91 to the WMB buffer idle list 92 93 <enum 1 WBM_IDLE_DESC_LIST> This buffer shall be 94 returned to the WMB idle link descriptor idle list 95 96 <enum 2 FW_BM> This buffer shall be returned to the FW 97 98 <enum 3 SW0_BM> This buffer shall be returned to the SW, 99 ring 0 100 101 <enum 4 SW1_BM> This buffer shall be returned to the SW, 102 ring 1 103 104 <enum 5 SW2_BM> This buffer shall be returned to the SW, 105 ring 2 106 107 <enum 6 SW3_BM> This buffer shall be returned to the SW, 108 ring 3 109 110 111 112 <legal 0-6> 113 114 sw_buffer_cookie 115 116 Cookie field exclusively used by SW. 117 118 119 120 In case of 'NULL' pointer, this field is set to 0 121 122 123 124 HW ignores the contents, accept that it passes the 125 programmed value on to other descriptors together with the 126 physical address 127 128 129 130 Field can be used by SW to for example associate the 131 buffers physical address with the virtual address 132 133 The bit definitions as used by SW are within SW HLD 134 specification 135 136 137 138 NOTE: 139 140 The two most significant bits can have a special meaning 141 in case this struct is embedded in a TX_MPDU_DETAILS STRUCT, 142 and field transmit_bw_restriction is set 143 144 Sw_buffer_cookie[20:19] = 2'b00: 20 MHz TX only 145 146 Sw_buffer_cookie[20:19] = 2'b01: 40 MHz TX only 147 148 Sw_buffer_cookie[20:19] = 2'b10: 80 MHz TX only 149 150 Sw_buffer_cookie[20:19] = 2'b11: 160 MHz TX only 151 152 153 154 <legal all> 155 */ 156 157 158 /* Description BUFFER_ADDR_INFO_0_BUFFER_ADDR_31_0 159 160 Address (lower 32 bits) of the MSDU buffer OR 161 MSDU_EXTENSION descriptor OR Link Descriptor 162 163 164 165 In case of 'NULL' pointer, this field is set to 0 166 167 <legal all> 168 */ 169 #define BUFFER_ADDR_INFO_0_BUFFER_ADDR_31_0_OFFSET 0x00000000 170 #define BUFFER_ADDR_INFO_0_BUFFER_ADDR_31_0_LSB 0 171 #define BUFFER_ADDR_INFO_0_BUFFER_ADDR_31_0_MASK 0xffffffff 172 173 /* Description BUFFER_ADDR_INFO_1_BUFFER_ADDR_39_32 174 175 Address (upper 8 bits) of the MSDU buffer OR 176 MSDU_EXTENSION descriptor OR Link Descriptor 177 178 179 180 In case of 'NULL' pointer, this field is set to 0 181 182 <legal all> 183 */ 184 #define BUFFER_ADDR_INFO_1_BUFFER_ADDR_39_32_OFFSET 0x00000004 185 #define BUFFER_ADDR_INFO_1_BUFFER_ADDR_39_32_LSB 0 186 #define BUFFER_ADDR_INFO_1_BUFFER_ADDR_39_32_MASK 0x000000ff 187 188 /* Description BUFFER_ADDR_INFO_1_RETURN_BUFFER_MANAGER 189 190 Consumer: WBM 191 192 Producer: SW/FW 193 194 195 196 In case of 'NULL' pointer, this field is set to 0 197 198 199 200 Indicates to which buffer manager the buffer OR 201 MSDU_EXTENSION descriptor OR link descriptor that is being 202 pointed to shall be returned after the frame has been 203 processed. It is used by WBM for routing purposes. 204 205 206 207 <enum 0 WBM_IDLE_BUF_LIST> This buffer shall be returned 208 to the WMB buffer idle list 209 210 <enum 1 WBM_IDLE_DESC_LIST> This buffer shall be 211 returned to the WMB idle link descriptor idle list 212 213 <enum 2 FW_BM> This buffer shall be returned to the FW 214 215 <enum 3 SW0_BM> This buffer shall be returned to the SW, 216 ring 0 217 218 <enum 4 SW1_BM> This buffer shall be returned to the SW, 219 ring 1 220 221 <enum 5 SW2_BM> This buffer shall be returned to the SW, 222 ring 2 223 224 <enum 6 SW3_BM> This buffer shall be returned to the SW, 225 ring 3 226 227 228 229 <legal 0-6> 230 */ 231 #define BUFFER_ADDR_INFO_1_RETURN_BUFFER_MANAGER_OFFSET 0x00000004 232 #define BUFFER_ADDR_INFO_1_RETURN_BUFFER_MANAGER_LSB 8 233 #define BUFFER_ADDR_INFO_1_RETURN_BUFFER_MANAGER_MASK 0x00000700 234 235 /* Description BUFFER_ADDR_INFO_1_SW_BUFFER_COOKIE 236 237 Cookie field exclusively used by SW. 238 239 240 241 In case of 'NULL' pointer, this field is set to 0 242 243 244 245 HW ignores the contents, accept that it passes the 246 programmed value on to other descriptors together with the 247 physical address 248 249 250 251 Field can be used by SW to for example associate the 252 buffers physical address with the virtual address 253 254 The bit definitions as used by SW are within SW HLD 255 specification 256 257 258 259 NOTE: 260 261 The two most significant bits can have a special meaning 262 in case this struct is embedded in a TX_MPDU_DETAILS STRUCT, 263 and field transmit_bw_restriction is set 264 265 Sw_buffer_cookie[20:19] = 2'b00: 20 MHz TX only 266 267 Sw_buffer_cookie[20:19] = 2'b01: 40 MHz TX only 268 269 Sw_buffer_cookie[20:19] = 2'b10: 80 MHz TX only 270 271 Sw_buffer_cookie[20:19] = 2'b11: 160 MHz TX only 272 273 274 275 <legal all> 276 */ 277 #define BUFFER_ADDR_INFO_1_SW_BUFFER_COOKIE_OFFSET 0x00000004 278 #define BUFFER_ADDR_INFO_1_SW_BUFFER_COOKIE_LSB 11 279 #define BUFFER_ADDR_INFO_1_SW_BUFFER_COOKIE_MASK 0xfffff800 280 281 282 #endif // _BUFFER_ADDR_INFO_H_ 283