1 /* 2 * Copyright (c) 2019, 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 #ifndef _RX_MSDU_DESC_INFO_H_ 18 #define _RX_MSDU_DESC_INFO_H_ 19 #if !defined(__ASSEMBLER__) 20 #endif 21 22 23 // ################ START SUMMARY ################# 24 // 25 // Dword Fields 26 // 0 first_msdu_in_mpdu_flag[0], last_msdu_in_mpdu_flag[1], msdu_continuation[2], msdu_length[16:3], reo_destination_indication[21:17], msdu_drop[22], sa_is_valid[23], sa_idx_timeout[24], da_is_valid[25], da_is_mcbc[26], da_idx_timeout[27], reserved_0a[31:28] 27 // 1 reserved_1a[31:0] 28 // 29 // ################ END SUMMARY ################# 30 31 #define NUM_OF_DWORDS_RX_MSDU_DESC_INFO 2 32 33 struct rx_msdu_desc_info { 34 uint32_t first_msdu_in_mpdu_flag : 1, //[0] 35 last_msdu_in_mpdu_flag : 1, //[1] 36 msdu_continuation : 1, //[2] 37 msdu_length : 14, //[16:3] 38 reo_destination_indication : 5, //[21:17] 39 msdu_drop : 1, //[22] 40 sa_is_valid : 1, //[23] 41 sa_idx_timeout : 1, //[24] 42 da_is_valid : 1, //[25] 43 da_is_mcbc : 1, //[26] 44 da_idx_timeout : 1, //[27] 45 reserved_0a : 4; //[31:28] 46 uint32_t reserved_1a : 32; //[31:0] 47 }; 48 49 /* 50 51 first_msdu_in_mpdu_flag 52 53 Parsed from RX_MSDU_END TLV . In the case MSDU spans 54 over multiple buffers, this field will be valid in the Last 55 buffer used by the MSDU 56 57 58 59 <enum 0 Not_first_msdu> This is not the first MSDU in 60 the MPDU. 61 62 <enum 1 first_msdu> This MSDU is the first one in the 63 MPDU. 64 65 66 67 <legal all> 68 69 last_msdu_in_mpdu_flag 70 71 Consumer: WBM/REO/SW/FW 72 73 Producer: RXDMA 74 75 76 77 Parsed from RX_MSDU_END TLV . In the case MSDU spans 78 over multiple buffers, this field will be valid in the Last 79 buffer used by the MSDU 80 81 82 83 <enum 0 Not_last_msdu> There are more MSDUs linked to 84 this MSDU that belongs to this MPDU 85 86 <enum 1 Last_msdu> this MSDU is the last one in the 87 MPDU. This setting is only allowed in combination with 88 'Msdu_continuation' set to 0. This implies that when an msdu 89 is spread out over multiple buffers and thus 90 msdu_continuation is set, only for the very last buffer of 91 the msdu, can the 'last_msdu_in_mpdu_flag' be set. 92 93 94 95 When both first_msdu_in_mpdu_flag and 96 last_msdu_in_mpdu_flag are set, the MPDU that this MSDU 97 belongs to only contains a single MSDU. 98 99 100 101 102 103 <legal all> 104 105 msdu_continuation 106 107 When set, this MSDU buffer was not able to hold the 108 entire MSDU. The next buffer will therefor contain 109 additional information related to this MSDU. 110 111 112 113 <legal all> 114 115 msdu_length 116 117 Parsed from RX_MSDU_START TLV . In the case MSDU spans 118 over multiple buffers, this field will be valid in the First 119 buffer used by MSDU. 120 121 122 123 Full MSDU length in bytes after decapsulation. 124 125 126 127 This field is still valid for MPDU frames without 128 A-MSDU. It still represents MSDU length after decapsulation 129 130 131 132 Or in case of RAW MPDUs, it indicates the length of the 133 entire MPDU (without FCS field) 134 135 <legal all> 136 137 reo_destination_indication 138 139 Parsed from RX_MSDU_END TLV . In the case MSDU spans 140 over multiple buffers, this field will be valid in the Last 141 buffer used by the MSDU 142 143 144 145 The ID of the REO exit ring where the MSDU frame shall 146 push after (MPDU level) reordering has finished. 147 148 149 150 <enum 0 reo_destination_tcl> Reo will push the frame 151 into the REO2TCL ring 152 153 <enum 1 reo_destination_sw1> Reo will push the frame 154 into the REO2SW1 ring 155 156 <enum 2 reo_destination_sw2> Reo will push the frame 157 into the REO2SW2 ring 158 159 <enum 3 reo_destination_sw3> Reo will push the frame 160 into the REO2SW3 ring 161 162 <enum 4 reo_destination_sw4> Reo will push the frame 163 into the REO2SW4 ring 164 165 <enum 5 reo_destination_release> Reo will push the frame 166 into the REO_release ring 167 168 <enum 6 reo_destination_fw> Reo will push the frame into 169 the REO2FW ring 170 171 <enum 7 reo_destination_sw5> Reo will push the frame 172 into the REO2SW5 ring 173 174 <enum 8 reo_destination_sw6> Reo will push the frame 175 into the REO2SW6 ring 176 177 <enum 9 reo_destination_9> REO remaps this <enum 10 178 reo_destination_10> REO remaps this 179 180 <enum 11 reo_destination_11> REO remaps this 181 182 <enum 12 reo_destination_12> REO remaps this <enum 13 183 reo_destination_13> REO remaps this 184 185 <enum 14 reo_destination_14> REO remaps this 186 187 <enum 15 reo_destination_15> REO remaps this 188 189 <enum 16 reo_destination_16> REO remaps this 190 191 <enum 17 reo_destination_17> REO remaps this 192 193 <enum 18 reo_destination_18> REO remaps this 194 195 <enum 19 reo_destination_19> REO remaps this 196 197 <enum 20 reo_destination_20> REO remaps this 198 199 <enum 21 reo_destination_21> REO remaps this 200 201 <enum 22 reo_destination_22> REO remaps this 202 203 <enum 23 reo_destination_23> REO remaps this 204 205 <enum 24 reo_destination_24> REO remaps this 206 207 <enum 25 reo_destination_25> REO remaps this 208 209 <enum 26 reo_destination_26> REO remaps this 210 211 <enum 27 reo_destination_27> REO remaps this 212 213 <enum 28 reo_destination_28> REO remaps this 214 215 <enum 29 reo_destination_29> REO remaps this 216 217 <enum 30 reo_destination_30> REO remaps this 218 219 <enum 31 reo_destination_31> REO remaps this 220 221 222 223 <legal all> 224 225 msdu_drop 226 227 Parsed from RX_MSDU_END TLV . In the case MSDU spans 228 over multiple buffers, this field will be valid in the Last 229 buffer used by the MSDU 230 231 232 233 When set, REO shall drop this MSDU and not forward it to 234 any other ring... 235 236 <legal all> 237 238 sa_is_valid 239 240 Parsed from RX_MSDU_END TLV . In the case MSDU spans 241 over multiple buffers, this field will be valid in the Last 242 buffer used by the MSDU 243 244 245 246 Indicates that OLE found a valid SA entry for this MSDU 247 248 <legal all> 249 250 sa_idx_timeout 251 252 Parsed from RX_MSDU_END TLV . In the case MSDU spans 253 over multiple buffers, this field will be valid in the Last 254 buffer used by the MSDU 255 256 257 258 Indicates an unsuccessful MAC source address search due 259 to the expiring of the search timer for this MSDU 260 261 <legal all> 262 263 da_is_valid 264 265 Parsed from RX_MSDU_END TLV . In the case MSDU spans 266 over multiple buffers, this field will be valid in the Last 267 buffer used by the MSDU 268 269 270 271 Indicates that OLE found a valid DA entry for this MSDU 272 273 <legal all> 274 275 da_is_mcbc 276 277 Field Only valid if da_is_valid is set 278 279 280 281 Indicates the DA address was a Multicast of Broadcast 282 address for this MSDU 283 284 <legal all> 285 286 da_idx_timeout 287 288 Parsed from RX_MSDU_END TLV . In the case MSDU spans 289 over multiple buffers, this field will be valid in the Last 290 buffer used by the MSDU 291 292 293 294 Indicates an unsuccessful MAC destination address search 295 due to the expiring of the search timer for this MSDU 296 297 <legal all> 298 299 reserved_0a 300 301 <legal 0> 302 303 reserved_1a 304 305 <legal 0> 306 */ 307 308 309 /* Description RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG 310 311 Parsed from RX_MSDU_END TLV . In the case MSDU spans 312 over multiple buffers, this field will be valid in the Last 313 buffer used by the MSDU 314 315 316 317 <enum 0 Not_first_msdu> This is not the first MSDU in 318 the MPDU. 319 320 <enum 1 first_msdu> This MSDU is the first one in the 321 MPDU. 322 323 324 325 <legal all> 326 */ 327 #define RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG_OFFSET 0x00000000 328 #define RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG_LSB 0 329 #define RX_MSDU_DESC_INFO_0_FIRST_MSDU_IN_MPDU_FLAG_MASK 0x00000001 330 331 /* Description RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG 332 333 Consumer: WBM/REO/SW/FW 334 335 Producer: RXDMA 336 337 338 339 Parsed from RX_MSDU_END TLV . In the case MSDU spans 340 over multiple buffers, this field will be valid in the Last 341 buffer used by the MSDU 342 343 344 345 <enum 0 Not_last_msdu> There are more MSDUs linked to 346 this MSDU that belongs to this MPDU 347 348 <enum 1 Last_msdu> this MSDU is the last one in the 349 MPDU. This setting is only allowed in combination with 350 'Msdu_continuation' set to 0. This implies that when an msdu 351 is spread out over multiple buffers and thus 352 msdu_continuation is set, only for the very last buffer of 353 the msdu, can the 'last_msdu_in_mpdu_flag' be set. 354 355 356 357 When both first_msdu_in_mpdu_flag and 358 last_msdu_in_mpdu_flag are set, the MPDU that this MSDU 359 belongs to only contains a single MSDU. 360 361 362 363 364 365 <legal all> 366 */ 367 #define RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG_OFFSET 0x00000000 368 #define RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG_LSB 1 369 #define RX_MSDU_DESC_INFO_0_LAST_MSDU_IN_MPDU_FLAG_MASK 0x00000002 370 371 /* Description RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION 372 373 When set, this MSDU buffer was not able to hold the 374 entire MSDU. The next buffer will therefor contain 375 additional information related to this MSDU. 376 377 378 379 <legal all> 380 */ 381 #define RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION_OFFSET 0x00000000 382 #define RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION_LSB 2 383 #define RX_MSDU_DESC_INFO_0_MSDU_CONTINUATION_MASK 0x00000004 384 385 /* Description RX_MSDU_DESC_INFO_0_MSDU_LENGTH 386 387 Parsed from RX_MSDU_START TLV . In the case MSDU spans 388 over multiple buffers, this field will be valid in the First 389 buffer used by MSDU. 390 391 392 393 Full MSDU length in bytes after decapsulation. 394 395 396 397 This field is still valid for MPDU frames without 398 A-MSDU. It still represents MSDU length after decapsulation 399 400 401 402 Or in case of RAW MPDUs, it indicates the length of the 403 entire MPDU (without FCS field) 404 405 <legal all> 406 */ 407 #define RX_MSDU_DESC_INFO_0_MSDU_LENGTH_OFFSET 0x00000000 408 #define RX_MSDU_DESC_INFO_0_MSDU_LENGTH_LSB 3 409 #define RX_MSDU_DESC_INFO_0_MSDU_LENGTH_MASK 0x0001fff8 410 411 /* Description RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION 412 413 Parsed from RX_MSDU_END TLV . In the case MSDU spans 414 over multiple buffers, this field will be valid in the Last 415 buffer used by the MSDU 416 417 418 419 The ID of the REO exit ring where the MSDU frame shall 420 push after (MPDU level) reordering has finished. 421 422 423 424 <enum 0 reo_destination_tcl> Reo will push the frame 425 into the REO2TCL ring 426 427 <enum 1 reo_destination_sw1> Reo will push the frame 428 into the REO2SW1 ring 429 430 <enum 2 reo_destination_sw2> Reo will push the frame 431 into the REO2SW2 ring 432 433 <enum 3 reo_destination_sw3> Reo will push the frame 434 into the REO2SW3 ring 435 436 <enum 4 reo_destination_sw4> Reo will push the frame 437 into the REO2SW4 ring 438 439 <enum 5 reo_destination_release> Reo will push the frame 440 into the REO_release ring 441 442 <enum 6 reo_destination_fw> Reo will push the frame into 443 the REO2FW ring 444 445 <enum 7 reo_destination_sw5> Reo will push the frame 446 into the REO2SW5 ring 447 448 <enum 8 reo_destination_sw6> Reo will push the frame 449 into the REO2SW6 ring 450 451 <enum 9 reo_destination_9> REO remaps this <enum 10 452 reo_destination_10> REO remaps this 453 454 <enum 11 reo_destination_11> REO remaps this 455 456 <enum 12 reo_destination_12> REO remaps this <enum 13 457 reo_destination_13> REO remaps this 458 459 <enum 14 reo_destination_14> REO remaps this 460 461 <enum 15 reo_destination_15> REO remaps this 462 463 <enum 16 reo_destination_16> REO remaps this 464 465 <enum 17 reo_destination_17> REO remaps this 466 467 <enum 18 reo_destination_18> REO remaps this 468 469 <enum 19 reo_destination_19> REO remaps this 470 471 <enum 20 reo_destination_20> REO remaps this 472 473 <enum 21 reo_destination_21> REO remaps this 474 475 <enum 22 reo_destination_22> REO remaps this 476 477 <enum 23 reo_destination_23> REO remaps this 478 479 <enum 24 reo_destination_24> REO remaps this 480 481 <enum 25 reo_destination_25> REO remaps this 482 483 <enum 26 reo_destination_26> REO remaps this 484 485 <enum 27 reo_destination_27> REO remaps this 486 487 <enum 28 reo_destination_28> REO remaps this 488 489 <enum 29 reo_destination_29> REO remaps this 490 491 <enum 30 reo_destination_30> REO remaps this 492 493 <enum 31 reo_destination_31> REO remaps this 494 495 496 497 <legal all> 498 */ 499 #define RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION_OFFSET 0x00000000 500 #define RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION_LSB 17 501 #define RX_MSDU_DESC_INFO_0_REO_DESTINATION_INDICATION_MASK 0x003e0000 502 503 /* Description RX_MSDU_DESC_INFO_0_MSDU_DROP 504 505 Parsed from RX_MSDU_END TLV . In the case MSDU spans 506 over multiple buffers, this field will be valid in the Last 507 buffer used by the MSDU 508 509 510 511 When set, REO shall drop this MSDU and not forward it to 512 any other ring... 513 514 <legal all> 515 */ 516 #define RX_MSDU_DESC_INFO_0_MSDU_DROP_OFFSET 0x00000000 517 #define RX_MSDU_DESC_INFO_0_MSDU_DROP_LSB 22 518 #define RX_MSDU_DESC_INFO_0_MSDU_DROP_MASK 0x00400000 519 520 /* Description RX_MSDU_DESC_INFO_0_SA_IS_VALID 521 522 Parsed from RX_MSDU_END TLV . In the case MSDU spans 523 over multiple buffers, this field will be valid in the Last 524 buffer used by the MSDU 525 526 527 528 Indicates that OLE found a valid SA entry for this MSDU 529 530 <legal all> 531 */ 532 #define RX_MSDU_DESC_INFO_0_SA_IS_VALID_OFFSET 0x00000000 533 #define RX_MSDU_DESC_INFO_0_SA_IS_VALID_LSB 23 534 #define RX_MSDU_DESC_INFO_0_SA_IS_VALID_MASK 0x00800000 535 536 /* Description RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT 537 538 Parsed from RX_MSDU_END TLV . In the case MSDU spans 539 over multiple buffers, this field will be valid in the Last 540 buffer used by the MSDU 541 542 543 544 Indicates an unsuccessful MAC source address search due 545 to the expiring of the search timer for this MSDU 546 547 <legal all> 548 */ 549 #define RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT_OFFSET 0x00000000 550 #define RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT_LSB 24 551 #define RX_MSDU_DESC_INFO_0_SA_IDX_TIMEOUT_MASK 0x01000000 552 553 /* Description RX_MSDU_DESC_INFO_0_DA_IS_VALID 554 555 Parsed from RX_MSDU_END TLV . In the case MSDU spans 556 over multiple buffers, this field will be valid in the Last 557 buffer used by the MSDU 558 559 560 561 Indicates that OLE found a valid DA entry for this MSDU 562 563 <legal all> 564 */ 565 #define RX_MSDU_DESC_INFO_0_DA_IS_VALID_OFFSET 0x00000000 566 #define RX_MSDU_DESC_INFO_0_DA_IS_VALID_LSB 25 567 #define RX_MSDU_DESC_INFO_0_DA_IS_VALID_MASK 0x02000000 568 569 /* Description RX_MSDU_DESC_INFO_0_DA_IS_MCBC 570 571 Field Only valid if da_is_valid is set 572 573 574 575 Indicates the DA address was a Multicast of Broadcast 576 address for this MSDU 577 578 <legal all> 579 */ 580 #define RX_MSDU_DESC_INFO_0_DA_IS_MCBC_OFFSET 0x00000000 581 #define RX_MSDU_DESC_INFO_0_DA_IS_MCBC_LSB 26 582 #define RX_MSDU_DESC_INFO_0_DA_IS_MCBC_MASK 0x04000000 583 584 /* Description RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT 585 586 Parsed from RX_MSDU_END TLV . In the case MSDU spans 587 over multiple buffers, this field will be valid in the Last 588 buffer used by the MSDU 589 590 591 592 Indicates an unsuccessful MAC destination address search 593 due to the expiring of the search timer for this MSDU 594 595 <legal all> 596 */ 597 #define RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT_OFFSET 0x00000000 598 #define RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT_LSB 27 599 #define RX_MSDU_DESC_INFO_0_DA_IDX_TIMEOUT_MASK 0x08000000 600 601 /* Description RX_MSDU_DESC_INFO_0_RESERVED_0A 602 603 <legal 0> 604 */ 605 #define RX_MSDU_DESC_INFO_0_RESERVED_0A_OFFSET 0x00000000 606 #define RX_MSDU_DESC_INFO_0_RESERVED_0A_LSB 28 607 #define RX_MSDU_DESC_INFO_0_RESERVED_0A_MASK 0xf0000000 608 609 /* Description RX_MSDU_DESC_INFO_1_RESERVED_1A 610 611 <legal 0> 612 */ 613 #define RX_MSDU_DESC_INFO_1_RESERVED_1A_OFFSET 0x00000004 614 #define RX_MSDU_DESC_INFO_1_RESERVED_1A_LSB 0 615 #define RX_MSDU_DESC_INFO_1_RESERVED_1A_MASK 0xffffffff 616 617 618 #endif // _RX_MSDU_DESC_INFO_H_ 619