1 /* 2 * Copyright (c) 2021 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for any 5 * purpose with or without fee is hereby granted, provided that the above 6 * copyright notice and this permission notice appear in all copies. 7 * 8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15 */ 16 17 // $ATH_LICENSE_HW_HDR_C$ 18 // 19 // DO NOT EDIT! This file is automatically generated 20 // These definitions are tied to a particular hardware layout 21 22 23 #ifndef _RX_MPDU_DESC_INFO_H_ 24 #define _RX_MPDU_DESC_INFO_H_ 25 #if !defined(__ASSEMBLER__) 26 #endif 27 28 29 // ################ START SUMMARY ################# 30 // 31 // Dword Fields 32 // 0 msdu_count[7:0], mpdu_sequence_number[19:8], fragment_flag[20], mpdu_retry_bit[21], ampdu_flag[22], bar_frame[23], pn_fields_contain_valid_info[24], sa_is_valid[25], sa_idx_timeout[26], da_is_valid[27], da_is_mcbc[28], da_idx_timeout[29], raw_mpdu[30], more_fragment_flag[31] 33 // 1 peer_meta_data[31:0] 34 // 35 // ################ END SUMMARY ################# 36 37 #define NUM_OF_DWORDS_RX_MPDU_DESC_INFO 2 38 39 struct rx_mpdu_desc_info { 40 uint32_t msdu_count : 8, //[7:0] 41 mpdu_sequence_number : 12, //[19:8] 42 fragment_flag : 1, //[20] 43 mpdu_retry_bit : 1, //[21] 44 ampdu_flag : 1, //[22] 45 bar_frame : 1, //[23] 46 pn_fields_contain_valid_info : 1, //[24] 47 sa_is_valid : 1, //[25] 48 sa_idx_timeout : 1, //[26] 49 da_is_valid : 1, //[27] 50 da_is_mcbc : 1, //[28] 51 da_idx_timeout : 1, //[29] 52 raw_mpdu : 1, //[30] 53 more_fragment_flag : 1; //[31] 54 uint32_t peer_meta_data : 32; //[31:0] 55 }; 56 57 /* 58 59 msdu_count 60 61 Consumer: REO/SW/FW 62 63 Producer: RXDMA 64 65 66 67 The number of MSDUs within the MPDU 68 69 <legal all> 70 71 mpdu_sequence_number 72 73 Consumer: REO/SW/FW 74 75 Producer: RXDMA 76 77 78 79 The field can have two different meanings based on the 80 setting of field 'BAR_frame': 81 82 83 84 'BAR_frame' is NOT set: 85 86 The MPDU sequence number of the received frame. 87 88 89 90 'BAR_frame' is set. 91 92 The MPDU Start sequence number from the BAR frame 93 94 <legal all> 95 96 fragment_flag 97 98 Consumer: REO/SW/FW 99 100 Producer: RXDMA 101 102 103 104 When set, this MPDU is a fragment and REO should forward 105 this fragment MPDU to the REO destination ring without any 106 reorder checks, pn checks or bitmap update. This implies 107 that REO is forwarding the pointer to the MSDU link 108 descriptor. The destination ring is coming from a 109 programmable register setting in REO 110 111 112 113 <legal all> 114 115 mpdu_retry_bit 116 117 Consumer: REO/SW/FW 118 119 Producer: RXDMA 120 121 122 123 The retry bit setting from the MPDU header of the 124 received frame 125 126 <legal all> 127 128 ampdu_flag 129 130 Consumer: REO/SW/FW 131 132 Producer: RXDMA 133 134 135 136 When set, the MPDU was received as part of an A-MPDU. 137 138 <legal all> 139 140 bar_frame 141 142 Consumer: REO/SW/FW 143 144 Producer: RXDMA 145 146 147 148 When set, the received frame is a BAR frame. After 149 processing, this frame shall be pushed to SW or deleted. 150 151 <legal all> 152 153 pn_fields_contain_valid_info 154 155 Consumer: REO/SW/FW 156 157 Producer: RXDMA 158 159 160 161 Copied here by RXDMA from RX_MPDU_END 162 163 When not set, REO will Not perform a PN sequence number 164 check 165 166 sa_is_valid 167 168 When set, OLE found a valid SA entry for all MSDUs in 169 this MPDU 170 171 <legal all> 172 173 sa_idx_timeout 174 175 When set, at least 1 MSDU within the MPDU has an 176 unsuccessful MAC source address search due to the expiration 177 of the search timer. 178 179 <legal all> 180 181 da_is_valid 182 183 When set, OLE found a valid DA entry for all MSDUs in 184 this MPDU 185 186 <legal all> 187 188 da_is_mcbc 189 190 Field Only valid if da_is_valid is set 191 192 193 194 When set, at least one of the DA addresses is a 195 Multicast or Broadcast address. 196 197 <legal all> 198 199 da_idx_timeout 200 201 When set, at least 1 MSDU within the MPDU has an 202 unsuccessful MAC destination address search due to the 203 expiration of the search timer. 204 205 <legal all> 206 207 raw_mpdu 208 209 Field only valid when first_msdu_in_mpdu_flag is set. 210 211 212 213 When set, the contents in the MSDU buffer contains a 214 'RAW' MPDU. This 'RAW' MPDU might be spread out over 215 multiple MSDU buffers. 216 217 <legal all> 218 219 more_fragment_flag 220 221 The More Fragment bit setting from the MPDU header of 222 the received frame 223 224 225 226 <legal all> 227 228 peer_meta_data 229 230 Meta data that SW has programmed in the Peer table entry 231 of the transmitting STA. 232 233 <legal all> 234 */ 235 236 237 /* Description RX_MPDU_DESC_INFO_0_MSDU_COUNT 238 239 Consumer: REO/SW/FW 240 241 Producer: RXDMA 242 243 244 245 The number of MSDUs within the MPDU 246 247 <legal all> 248 */ 249 #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_OFFSET 0x00000000 250 #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_LSB 0 251 #define RX_MPDU_DESC_INFO_0_MSDU_COUNT_MASK 0x000000ff 252 253 /* Description RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER 254 255 Consumer: REO/SW/FW 256 257 Producer: RXDMA 258 259 260 261 The field can have two different meanings based on the 262 setting of field 'BAR_frame': 263 264 265 266 'BAR_frame' is NOT set: 267 268 The MPDU sequence number of the received frame. 269 270 271 272 'BAR_frame' is set. 273 274 The MPDU Start sequence number from the BAR frame 275 276 <legal all> 277 */ 278 #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_OFFSET 0x00000000 279 #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_LSB 8 280 #define RX_MPDU_DESC_INFO_0_MPDU_SEQUENCE_NUMBER_MASK 0x000fff00 281 282 /* Description RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG 283 284 Consumer: REO/SW/FW 285 286 Producer: RXDMA 287 288 289 290 When set, this MPDU is a fragment and REO should forward 291 this fragment MPDU to the REO destination ring without any 292 reorder checks, pn checks or bitmap update. This implies 293 that REO is forwarding the pointer to the MSDU link 294 descriptor. The destination ring is coming from a 295 programmable register setting in REO 296 297 298 299 <legal all> 300 */ 301 #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_OFFSET 0x00000000 302 #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_LSB 20 303 #define RX_MPDU_DESC_INFO_0_FRAGMENT_FLAG_MASK 0x00100000 304 305 /* Description RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT 306 307 Consumer: REO/SW/FW 308 309 Producer: RXDMA 310 311 312 313 The retry bit setting from the MPDU header of the 314 received frame 315 316 <legal all> 317 */ 318 #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_OFFSET 0x00000000 319 #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_LSB 21 320 #define RX_MPDU_DESC_INFO_0_MPDU_RETRY_BIT_MASK 0x00200000 321 322 /* Description RX_MPDU_DESC_INFO_0_AMPDU_FLAG 323 324 Consumer: REO/SW/FW 325 326 Producer: RXDMA 327 328 329 330 When set, the MPDU was received as part of an A-MPDU. 331 332 <legal all> 333 */ 334 #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_OFFSET 0x00000000 335 #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_LSB 22 336 #define RX_MPDU_DESC_INFO_0_AMPDU_FLAG_MASK 0x00400000 337 338 /* Description RX_MPDU_DESC_INFO_0_BAR_FRAME 339 340 Consumer: REO/SW/FW 341 342 Producer: RXDMA 343 344 345 346 When set, the received frame is a BAR frame. After 347 processing, this frame shall be pushed to SW or deleted. 348 349 <legal all> 350 */ 351 #define RX_MPDU_DESC_INFO_0_BAR_FRAME_OFFSET 0x00000000 352 #define RX_MPDU_DESC_INFO_0_BAR_FRAME_LSB 23 353 #define RX_MPDU_DESC_INFO_0_BAR_FRAME_MASK 0x00800000 354 355 /* Description RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO 356 357 Consumer: REO/SW/FW 358 359 Producer: RXDMA 360 361 362 363 Copied here by RXDMA from RX_MPDU_END 364 365 When not set, REO will Not perform a PN sequence number 366 check 367 */ 368 #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_OFFSET 0x00000000 369 #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_LSB 24 370 #define RX_MPDU_DESC_INFO_0_PN_FIELDS_CONTAIN_VALID_INFO_MASK 0x01000000 371 372 /* Description RX_MPDU_DESC_INFO_0_SA_IS_VALID 373 374 When set, OLE found a valid SA entry for all MSDUs in 375 this MPDU 376 377 <legal all> 378 */ 379 #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_OFFSET 0x00000000 380 #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_LSB 25 381 #define RX_MPDU_DESC_INFO_0_SA_IS_VALID_MASK 0x02000000 382 383 /* Description RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT 384 385 When set, at least 1 MSDU within the MPDU has an 386 unsuccessful MAC source address search due to the expiration 387 of the search timer. 388 389 <legal all> 390 */ 391 #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_OFFSET 0x00000000 392 #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_LSB 26 393 #define RX_MPDU_DESC_INFO_0_SA_IDX_TIMEOUT_MASK 0x04000000 394 395 /* Description RX_MPDU_DESC_INFO_0_DA_IS_VALID 396 397 When set, OLE found a valid DA entry for all MSDUs in 398 this MPDU 399 400 <legal all> 401 */ 402 #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_OFFSET 0x00000000 403 #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_LSB 27 404 #define RX_MPDU_DESC_INFO_0_DA_IS_VALID_MASK 0x08000000 405 406 /* Description RX_MPDU_DESC_INFO_0_DA_IS_MCBC 407 408 Field Only valid if da_is_valid is set 409 410 411 412 When set, at least one of the DA addresses is a 413 Multicast or Broadcast address. 414 415 <legal all> 416 */ 417 #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_OFFSET 0x00000000 418 #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_LSB 28 419 #define RX_MPDU_DESC_INFO_0_DA_IS_MCBC_MASK 0x10000000 420 421 /* Description RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT 422 423 When set, at least 1 MSDU within the MPDU has an 424 unsuccessful MAC destination address search due to the 425 expiration of the search timer. 426 427 <legal all> 428 */ 429 #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_OFFSET 0x00000000 430 #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_LSB 29 431 #define RX_MPDU_DESC_INFO_0_DA_IDX_TIMEOUT_MASK 0x20000000 432 433 /* Description RX_MPDU_DESC_INFO_0_RAW_MPDU 434 435 Field only valid when first_msdu_in_mpdu_flag is set. 436 437 438 439 When set, the contents in the MSDU buffer contains a 440 'RAW' MPDU. This 'RAW' MPDU might be spread out over 441 multiple MSDU buffers. 442 443 <legal all> 444 */ 445 #define RX_MPDU_DESC_INFO_0_RAW_MPDU_OFFSET 0x00000000 446 #define RX_MPDU_DESC_INFO_0_RAW_MPDU_LSB 30 447 #define RX_MPDU_DESC_INFO_0_RAW_MPDU_MASK 0x40000000 448 449 /* Description RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG 450 451 The More Fragment bit setting from the MPDU header of 452 the received frame 453 454 455 456 <legal all> 457 */ 458 #define RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG_OFFSET 0x00000000 459 #define RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG_LSB 31 460 #define RX_MPDU_DESC_INFO_0_MORE_FRAGMENT_FLAG_MASK 0x80000000 461 462 /* Description RX_MPDU_DESC_INFO_1_PEER_META_DATA 463 464 Meta data that SW has programmed in the Peer table entry 465 of the transmitting STA. 466 467 <legal all> 468 */ 469 #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_OFFSET 0x00000004 470 #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_LSB 0 471 #define RX_MPDU_DESC_INFO_1_PEER_META_DATA_MASK 0xffffffff 472 473 474 #endif // _RX_MPDU_DESC_INFO_H_ 475