1 /* 2 * Copyright (c) 2018 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 #ifndef _RX_MSDU_START_H_ 20 #define _RX_MSDU_START_H_ 21 #if !defined(__ASSEMBLER__) 22 #endif 23 24 25 // ################ START SUMMARY ################# 26 // 27 // Dword Fields 28 // 0 rxpcu_mpdu_filter_in_category[1:0], sw_frame_group_id[8:2], reserved_0[15:9], phy_ppdu_id[31:16] 29 // 1 msdu_length[13:0], reserved_1a[14], ipsec_esp[15], l3_offset[22:16], ipsec_ah[23], l4_offset[31:24] 30 // 2 msdu_number[7:0], decap_format[9:8], ipv4_proto[10], ipv6_proto[11], tcp_proto[12], udp_proto[13], ip_frag[14], tcp_only_ack[15], da_is_bcast_mcast[16], toeplitz_hash_sel[18:17], ip_fixed_header_valid[19], ip_extn_header_valid[20], tcp_udp_header_valid[21], mesh_control_present[22], ldpc[23], ip4_protocol_ip6_next_header[31:24] 31 // 3 toeplitz_hash_2_or_4[31:0] 32 // 4 flow_id_toeplitz[31:0] 33 // 5 user_rssi[7:0], pkt_type[11:8], stbc[12], sgi[14:13], rate_mcs[18:15], receive_bandwidth[20:19], reception_type[23:21], mimo_ss_bitmap[31:24] 34 // 6 ppdu_start_timestamp[31:0] 35 // 7 sw_phy_meta_data[31:0] 36 // 37 // ################ END SUMMARY ################# 38 39 #define NUM_OF_DWORDS_RX_MSDU_START 8 40 41 struct rx_msdu_start { 42 uint32_t rxpcu_mpdu_filter_in_category : 2, //[1:0] 43 sw_frame_group_id : 7, //[8:2] 44 reserved_0 : 7, //[15:9] 45 phy_ppdu_id : 16; //[31:16] 46 uint32_t msdu_length : 14, //[13:0] 47 reserved_1a : 1, //[14] 48 ipsec_esp : 1, //[15] 49 l3_offset : 7, //[22:16] 50 ipsec_ah : 1, //[23] 51 l4_offset : 8; //[31:24] 52 uint32_t msdu_number : 8, //[7:0] 53 decap_format : 2, //[9:8] 54 ipv4_proto : 1, //[10] 55 ipv6_proto : 1, //[11] 56 tcp_proto : 1, //[12] 57 udp_proto : 1, //[13] 58 ip_frag : 1, //[14] 59 tcp_only_ack : 1, //[15] 60 da_is_bcast_mcast : 1, //[16] 61 toeplitz_hash_sel : 2, //[18:17] 62 ip_fixed_header_valid : 1, //[19] 63 ip_extn_header_valid : 1, //[20] 64 tcp_udp_header_valid : 1, //[21] 65 mesh_control_present : 1, //[22] 66 ldpc : 1, //[23] 67 ip4_protocol_ip6_next_header : 8; //[31:24] 68 uint32_t toeplitz_hash_2_or_4 : 32; //[31:0] 69 uint32_t flow_id_toeplitz : 32; //[31:0] 70 uint32_t user_rssi : 8, //[7:0] 71 pkt_type : 4, //[11:8] 72 stbc : 1, //[12] 73 sgi : 2, //[14:13] 74 rate_mcs : 4, //[18:15] 75 receive_bandwidth : 2, //[20:19] 76 reception_type : 3, //[23:21] 77 mimo_ss_bitmap : 8; //[31:24] 78 uint32_t ppdu_start_timestamp : 32; //[31:0] 79 uint32_t sw_phy_meta_data : 32; //[31:0] 80 }; 81 82 /* 83 84 rxpcu_mpdu_filter_in_category 85 86 Field indicates what the reason was that this MPDU frame 87 was allowed to come into the receive path by RXPCU 88 89 <enum 0 rxpcu_filter_pass> This MPDU passed the normal 90 frame filter programming of rxpcu 91 92 <enum 1 rxpcu_monitor_client> This MPDU did NOT pass the 93 regular frame filter and would have been dropped, were it 94 not for the frame fitting into the 'monitor_client' 95 category. 96 97 <enum 2 rxpcu_monitor_other> This MPDU did NOT pass the 98 regular frame filter and also did not pass the 99 rxpcu_monitor_client filter. It would have been dropped 100 accept that it did pass the 'monitor_other' category. 101 102 <legal 0-2> 103 104 sw_frame_group_id 105 106 SW processes frames based on certain classifications. 107 This field indicates to what sw classification this MPDU is 108 mapped. 109 110 The classification is given in priority order 111 112 113 114 <enum 0 sw_frame_group_NDP_frame> 115 116 117 118 <enum 1 sw_frame_group_Multicast_data> 119 120 <enum 2 sw_frame_group_Unicast_data> 121 122 <enum 3 sw_frame_group_Null_data > This includes mpdus 123 of type Data Null as well as QoS Data Null 124 125 126 127 <enum 4 sw_frame_group_mgmt_0000 > 128 129 <enum 5 sw_frame_group_mgmt_0001 > 130 131 <enum 6 sw_frame_group_mgmt_0010 > 132 133 <enum 7 sw_frame_group_mgmt_0011 > 134 135 <enum 8 sw_frame_group_mgmt_0100 > 136 137 <enum 9 sw_frame_group_mgmt_0101 > 138 139 <enum 10 sw_frame_group_mgmt_0110 > 140 141 <enum 11 sw_frame_group_mgmt_0111 > 142 143 <enum 12 sw_frame_group_mgmt_1000 > 144 145 <enum 13 sw_frame_group_mgmt_1001 > 146 147 <enum 14 sw_frame_group_mgmt_1010 > 148 149 <enum 15 sw_frame_group_mgmt_1011 > 150 151 <enum 16 sw_frame_group_mgmt_1100 > 152 153 <enum 17 sw_frame_group_mgmt_1101 > 154 155 <enum 18 sw_frame_group_mgmt_1110 > 156 157 <enum 19 sw_frame_group_mgmt_1111 > 158 159 160 161 <enum 20 sw_frame_group_ctrl_0000 > 162 163 <enum 21 sw_frame_group_ctrl_0001 > 164 165 <enum 22 sw_frame_group_ctrl_0010 > 166 167 <enum 23 sw_frame_group_ctrl_0011 > 168 169 <enum 24 sw_frame_group_ctrl_0100 > 170 171 <enum 25 sw_frame_group_ctrl_0101 > 172 173 <enum 26 sw_frame_group_ctrl_0110 > 174 175 <enum 27 sw_frame_group_ctrl_0111 > 176 177 <enum 28 sw_frame_group_ctrl_1000 > 178 179 <enum 29 sw_frame_group_ctrl_1001 > 180 181 <enum 30 sw_frame_group_ctrl_1010 > 182 183 <enum 31 sw_frame_group_ctrl_1011 > 184 185 <enum 32 sw_frame_group_ctrl_1100 > 186 187 <enum 33 sw_frame_group_ctrl_1101 > 188 189 <enum 34 sw_frame_group_ctrl_1110 > 190 191 <enum 35 sw_frame_group_ctrl_1111 > 192 193 194 195 <enum 36 sw_frame_group_unsupported> This covers type 3 196 and protocol version != 0 197 198 199 200 201 202 203 <legal 0-37> 204 205 reserved_0 206 207 <legal 0> 208 209 phy_ppdu_id 210 211 A ppdu counter value that PHY increments for every PPDU 212 received. The counter value wraps around 213 214 <legal all> 215 216 msdu_length 217 218 MSDU length in bytes after decapsulation. 219 220 221 222 This field is still valid for MPDU frames without 223 224 reserved_1a 225 226 <legal 0> 227 228 ipsec_esp 229 230 Set if IPv4/v6 packet is using IPsec ESP 231 232 l3_offset 233 234 Depending upon mode bit, this field either indicates the 235 L3 offset in bytes from the start of the RX_HEADER or the IP 236 offset in bytes from the start of the packet after 237 decapsulation. The latter is only valid if ipv4_proto or 238 ipv6_proto is set. 239 240 ipsec_ah 241 242 Set if IPv4/v6 packet is using IPsec AH 243 244 l4_offset 245 246 Depending upon mode bit, this field either indicates the 247 L4 offset nin bytes from the start of RX_HEADER(only valid 248 if either ipv4_proto or ipv6_proto is set to 1) or indicates 249 the offset in bytes to the start of TCP or UDP header from 250 the start of the IP header after decapsulation(Only valid if 251 tcp_proto or udp_proto is set). The value 0 indicates that 252 the offset is longer than 127 bytes. 253 254 msdu_number 255 256 Indicates the MSDU number within a MPDU. This value is 257 reset to zero at the start of each MPDU. If the number of 258 MSDU exceeds 255 this number will wrap using modulo 256. 259 260 decap_format 261 262 Indicates the format after decapsulation: 263 264 265 266 <enum 0 RAW> No encapsulation 267 268 <enum 1 Native_WiFi> 269 270 <enum 2 Ethernet> Ethernet 2 (DIX) or 802.3 (uses 271 SNAP/LLC) 272 273 <enum 3 802_3> Indicate Ethernet 274 275 276 277 <legal all> 278 279 ipv4_proto 280 281 Set if L2 layer indicates IPv4 protocol. 282 283 ipv6_proto 284 285 Set if L2 layer indicates IPv6 protocol. 286 287 tcp_proto 288 289 Set if the ipv4_proto or ipv6_proto are set and the IP 290 protocol indicates TCP. 291 292 udp_proto 293 294 Set if the ipv4_proto or ipv6_proto are set and the IP 295 protocol indicates UDP. 296 297 ip_frag 298 299 Indicates that either the IP More frag bit is set or IP 300 frag number is non-zero. If set indicates that this is a 301 fragmented IP packet. 302 303 tcp_only_ack 304 305 Set if only the TCP Ack bit is set in the TCP flags and 306 if the TCP payload is 0. 307 308 da_is_bcast_mcast 309 310 The destination address is broadcast or multicast. 311 312 toeplitz_hash_sel 313 314 Actual choosen Hash. 315 316 317 318 0 -> Toeplitz hash of 2-tuple (IP source address, IP 319 destination address)1 -> Toeplitz hash of 4-tuple (IP source 320 address, IP destination address, L4 (TCP/UDP) source port, 321 L4 (TCP/UDP) destination port) 322 323 2 -> Toeplitz of flow_id 324 325 3 -> Zero is used 326 327 <legal all> 328 329 ip_fixed_header_valid 330 331 Fixed 20-byte IPv4 header or 40-byte IPv6 header parsed 332 fully within first 256 bytes of the packet 333 334 ip_extn_header_valid 335 336 IPv6/IPv6 header, including IPv4 options and 337 recognizable extension headers parsed fully within first 256 338 bytes of the packet 339 340 tcp_udp_header_valid 341 342 Fixed 20-byte TCP (excluding TCP options) or 8-byte UDP 343 header parsed fully within first 256 bytes of the packet 344 345 mesh_control_present 346 347 When set, this MSDU includes the 'Mesh Control' field 348 349 <legal all> 350 351 ldpc 352 353 When set, indicates that LDPC coding was used. 354 355 <legal all> 356 357 ip4_protocol_ip6_next_header 358 359 For IPv4 this is the 8 bit protocol field (when 360 ipv4_proto is set). For IPv6 this is the 8 bit next_header 361 field (when ipv6_proto is set). 362 363 toeplitz_hash_2_or_4 364 365 Controlled by RxOLE register - If register bit set to 0, 366 Toeplitz hash is computed over 2-tuple IPv4 or IPv6 src/dest 367 addresses; otherwise, toeplitz hash is computed over 4-tuple 368 IPv4 or IPv6 src/dest addresses and src/dest ports 369 370 flow_id_toeplitz 371 372 Toeplitz hash of 5-tuple 373 374 {IP source address, IP destination address, IP source 375 port, IP destination port, L4 protocol} in case of 376 non-IPSec. 377 378 In case of IPSec - Toeplitz hash of 4-tuple 379 380 {IP source address, IP destination address, SPI, L4 381 protocol} 382 383 384 385 The relevant Toeplitz key registers are provided in 386 RxOLE's instance of common parser module. These registers 387 are separate from the Toeplitz keys used by ASE/FSE modules 388 inside RxOLE.The actual value will be passed on from common 389 parser module to RxOLE in one of the WHO_* TLVs. 390 391 <legal all> 392 393 user_rssi 394 395 RSSI for this user 396 397 <legal all> 398 399 pkt_type 400 401 Packet type: 402 403 <enum 0 dot11a>802.11a PPDU type 404 405 <enum 1 dot11b>802.11b PPDU type 406 407 <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type 408 409 <enum 3 dot11ac>802.11ac PPDU type 410 411 <enum 4 dot11ax>802.11ax PPDU type 412 413 stbc 414 415 When set, use STBC transmission rates 416 417 sgi 418 419 Field only valid when pkt type is HT, VHT or HE. 420 421 422 423 <enum 0 0_8_us_sgi > Legacy normal GI. Can also be 424 used for HE 425 426 <enum 1 0_4_us_sgi > Legacy short GI. Can also be 427 used for HE 428 429 <enum 2 1_6_us_sgi > HE related GI 430 431 <enum 3 3_2_us_sgi > HE related GI 432 433 <legal 0 - 3> 434 435 rate_mcs 436 437 For details, refer to MCS_TYPE description 438 439 Note: This is rate in case of 11a/11b 440 441 442 443 <legal all> 444 445 receive_bandwidth 446 447 Full receive Bandwidth 448 449 450 451 <enum 0 full_rx_bw_20_mhz> 452 453 <enum 1 full_rx_bw_40_mhz> 454 455 <enum 2 full_rx_bw_80_mhz> 456 457 <enum 3 full_rx_bw_160_mhz> 458 459 460 461 <legal 0-3> 462 463 reception_type 464 465 Indicates what type of reception this is. 466 467 <enum 0 reception_type_SU > Basic SU reception (not 468 part of OFDMA or MIMO) 469 470 <enum 1 reception_type_MU_MIMO > This is related to 471 DL type of reception 472 473 <enum 2 reception_type_MU_OFDMA > This is related 474 to DL type of reception 475 476 <enum 3 reception_type_MU_OFDMA_MIMO > This is 477 related to DL type of reception 478 479 <enum 4 reception_type_UL_MU_MIMO > This is related 480 to UL type of reception 481 482 <enum 5 reception_type_UL_MU_OFDMA > This is 483 related to UL type of reception 484 485 <enum 6 reception_type_UL_MU_OFDMA_MIMO > This is 486 related to UL type of reception 487 488 489 490 <legal 0-6> 491 492 mimo_ss_bitmap 493 494 Field only valid when Reception_type = 495 reception_type_MU_MIMO or reception_type_MU_OFDMA_MIMO 496 497 498 499 Bitmap, with each bit indicating if the related spatial 500 stream is used for this STA 501 502 LSB related to SS 0 503 504 505 506 0: spatial stream not used for this reception 507 508 1: spatial stream used for this reception 509 510 511 512 <legal all> 513 514 ppdu_start_timestamp 515 516 Timestamp that indicates when the PPDU that contained 517 this MPDU started on the medium. 518 519 <legal all> 520 521 sw_phy_meta_data 522 523 SW programmed Meta data provided by the PHY. 524 525 526 527 Can be used for SW to indicate the channel the device is 528 on. 529 530 <legal all> 531 */ 532 533 534 /* Description RX_MSDU_START_0_RXPCU_MPDU_FILTER_IN_CATEGORY 535 536 Field indicates what the reason was that this MPDU frame 537 was allowed to come into the receive path by RXPCU 538 539 <enum 0 rxpcu_filter_pass> This MPDU passed the normal 540 frame filter programming of rxpcu 541 542 <enum 1 rxpcu_monitor_client> This MPDU did NOT pass the 543 regular frame filter and would have been dropped, were it 544 not for the frame fitting into the 'monitor_client' 545 category. 546 547 <enum 2 rxpcu_monitor_other> This MPDU did NOT pass the 548 regular frame filter and also did not pass the 549 rxpcu_monitor_client filter. It would have been dropped 550 accept that it did pass the 'monitor_other' category. 551 552 <legal 0-2> 553 */ 554 #define RX_MSDU_START_0_RXPCU_MPDU_FILTER_IN_CATEGORY_OFFSET 0x00000000 555 #define RX_MSDU_START_0_RXPCU_MPDU_FILTER_IN_CATEGORY_LSB 0 556 #define RX_MSDU_START_0_RXPCU_MPDU_FILTER_IN_CATEGORY_MASK 0x00000003 557 558 /* Description RX_MSDU_START_0_SW_FRAME_GROUP_ID 559 560 SW processes frames based on certain classifications. 561 This field indicates to what sw classification this MPDU is 562 mapped. 563 564 The classification is given in priority order 565 566 567 568 <enum 0 sw_frame_group_NDP_frame> 569 570 571 572 <enum 1 sw_frame_group_Multicast_data> 573 574 <enum 2 sw_frame_group_Unicast_data> 575 576 <enum 3 sw_frame_group_Null_data > This includes mpdus 577 of type Data Null as well as QoS Data Null 578 579 580 581 <enum 4 sw_frame_group_mgmt_0000 > 582 583 <enum 5 sw_frame_group_mgmt_0001 > 584 585 <enum 6 sw_frame_group_mgmt_0010 > 586 587 <enum 7 sw_frame_group_mgmt_0011 > 588 589 <enum 8 sw_frame_group_mgmt_0100 > 590 591 <enum 9 sw_frame_group_mgmt_0101 > 592 593 <enum 10 sw_frame_group_mgmt_0110 > 594 595 <enum 11 sw_frame_group_mgmt_0111 > 596 597 <enum 12 sw_frame_group_mgmt_1000 > 598 599 <enum 13 sw_frame_group_mgmt_1001 > 600 601 <enum 14 sw_frame_group_mgmt_1010 > 602 603 <enum 15 sw_frame_group_mgmt_1011 > 604 605 <enum 16 sw_frame_group_mgmt_1100 > 606 607 <enum 17 sw_frame_group_mgmt_1101 > 608 609 <enum 18 sw_frame_group_mgmt_1110 > 610 611 <enum 19 sw_frame_group_mgmt_1111 > 612 613 614 615 <enum 20 sw_frame_group_ctrl_0000 > 616 617 <enum 21 sw_frame_group_ctrl_0001 > 618 619 <enum 22 sw_frame_group_ctrl_0010 > 620 621 <enum 23 sw_frame_group_ctrl_0011 > 622 623 <enum 24 sw_frame_group_ctrl_0100 > 624 625 <enum 25 sw_frame_group_ctrl_0101 > 626 627 <enum 26 sw_frame_group_ctrl_0110 > 628 629 <enum 27 sw_frame_group_ctrl_0111 > 630 631 <enum 28 sw_frame_group_ctrl_1000 > 632 633 <enum 29 sw_frame_group_ctrl_1001 > 634 635 <enum 30 sw_frame_group_ctrl_1010 > 636 637 <enum 31 sw_frame_group_ctrl_1011 > 638 639 <enum 32 sw_frame_group_ctrl_1100 > 640 641 <enum 33 sw_frame_group_ctrl_1101 > 642 643 <enum 34 sw_frame_group_ctrl_1110 > 644 645 <enum 35 sw_frame_group_ctrl_1111 > 646 647 648 649 <enum 36 sw_frame_group_unsupported> This covers type 3 650 and protocol version != 0 651 652 653 654 655 656 657 <legal 0-37> 658 */ 659 #define RX_MSDU_START_0_SW_FRAME_GROUP_ID_OFFSET 0x00000000 660 #define RX_MSDU_START_0_SW_FRAME_GROUP_ID_LSB 2 661 #define RX_MSDU_START_0_SW_FRAME_GROUP_ID_MASK 0x000001fc 662 663 /* Description RX_MSDU_START_0_RESERVED_0 664 665 <legal 0> 666 */ 667 #define RX_MSDU_START_0_RESERVED_0_OFFSET 0x00000000 668 #define RX_MSDU_START_0_RESERVED_0_LSB 9 669 #define RX_MSDU_START_0_RESERVED_0_MASK 0x0000fe00 670 671 /* Description RX_MSDU_START_0_PHY_PPDU_ID 672 673 A ppdu counter value that PHY increments for every PPDU 674 received. The counter value wraps around 675 676 <legal all> 677 */ 678 #define RX_MSDU_START_0_PHY_PPDU_ID_OFFSET 0x00000000 679 #define RX_MSDU_START_0_PHY_PPDU_ID_LSB 16 680 #define RX_MSDU_START_0_PHY_PPDU_ID_MASK 0xffff0000 681 682 /* Description RX_MSDU_START_1_MSDU_LENGTH 683 684 MSDU length in bytes after decapsulation. 685 686 687 688 This field is still valid for MPDU frames without 689 */ 690 #define RX_MSDU_START_1_MSDU_LENGTH_OFFSET 0x00000004 691 #define RX_MSDU_START_1_MSDU_LENGTH_LSB 0 692 #define RX_MSDU_START_1_MSDU_LENGTH_MASK 0x00003fff 693 694 /* Description RX_MSDU_START_1_RESERVED_1A 695 696 <legal 0> 697 */ 698 #define RX_MSDU_START_1_RESERVED_1A_OFFSET 0x00000004 699 #define RX_MSDU_START_1_RESERVED_1A_LSB 14 700 #define RX_MSDU_START_1_RESERVED_1A_MASK 0x00004000 701 702 /* Description RX_MSDU_START_1_IPSEC_ESP 703 704 Set if IPv4/v6 packet is using IPsec ESP 705 */ 706 #define RX_MSDU_START_1_IPSEC_ESP_OFFSET 0x00000004 707 #define RX_MSDU_START_1_IPSEC_ESP_LSB 15 708 #define RX_MSDU_START_1_IPSEC_ESP_MASK 0x00008000 709 710 /* Description RX_MSDU_START_1_L3_OFFSET 711 712 Depending upon mode bit, this field either indicates the 713 L3 offset in bytes from the start of the RX_HEADER or the IP 714 offset in bytes from the start of the packet after 715 decapsulation. The latter is only valid if ipv4_proto or 716 ipv6_proto is set. 717 */ 718 #define RX_MSDU_START_1_L3_OFFSET_OFFSET 0x00000004 719 #define RX_MSDU_START_1_L3_OFFSET_LSB 16 720 #define RX_MSDU_START_1_L3_OFFSET_MASK 0x007f0000 721 722 /* Description RX_MSDU_START_1_IPSEC_AH 723 724 Set if IPv4/v6 packet is using IPsec AH 725 */ 726 #define RX_MSDU_START_1_IPSEC_AH_OFFSET 0x00000004 727 #define RX_MSDU_START_1_IPSEC_AH_LSB 23 728 #define RX_MSDU_START_1_IPSEC_AH_MASK 0x00800000 729 730 /* Description RX_MSDU_START_1_L4_OFFSET 731 732 Depending upon mode bit, this field either indicates the 733 L4 offset nin bytes from the start of RX_HEADER(only valid 734 if either ipv4_proto or ipv6_proto is set to 1) or indicates 735 the offset in bytes to the start of TCP or UDP header from 736 the start of the IP header after decapsulation(Only valid if 737 tcp_proto or udp_proto is set). The value 0 indicates that 738 the offset is longer than 127 bytes. 739 */ 740 #define RX_MSDU_START_1_L4_OFFSET_OFFSET 0x00000004 741 #define RX_MSDU_START_1_L4_OFFSET_LSB 24 742 #define RX_MSDU_START_1_L4_OFFSET_MASK 0xff000000 743 744 /* Description RX_MSDU_START_2_MSDU_NUMBER 745 746 Indicates the MSDU number within a MPDU. This value is 747 reset to zero at the start of each MPDU. If the number of 748 MSDU exceeds 255 this number will wrap using modulo 256. 749 */ 750 #define RX_MSDU_START_2_MSDU_NUMBER_OFFSET 0x00000008 751 #define RX_MSDU_START_2_MSDU_NUMBER_LSB 0 752 #define RX_MSDU_START_2_MSDU_NUMBER_MASK 0x000000ff 753 754 /* Description RX_MSDU_START_2_DECAP_FORMAT 755 756 Indicates the format after decapsulation: 757 758 759 760 <enum 0 RAW> No encapsulation 761 762 <enum 1 Native_WiFi> 763 764 <enum 2 Ethernet> Ethernet 2 (DIX) or 802.3 (uses 765 SNAP/LLC) 766 767 <enum 3 802_3> Indicate Ethernet 768 769 770 771 <legal all> 772 */ 773 #define RX_MSDU_START_2_DECAP_FORMAT_OFFSET 0x00000008 774 #define RX_MSDU_START_2_DECAP_FORMAT_LSB 8 775 #define RX_MSDU_START_2_DECAP_FORMAT_MASK 0x00000300 776 777 /* Description RX_MSDU_START_2_IPV4_PROTO 778 779 Set if L2 layer indicates IPv4 protocol. 780 */ 781 #define RX_MSDU_START_2_IPV4_PROTO_OFFSET 0x00000008 782 #define RX_MSDU_START_2_IPV4_PROTO_LSB 10 783 #define RX_MSDU_START_2_IPV4_PROTO_MASK 0x00000400 784 785 /* Description RX_MSDU_START_2_IPV6_PROTO 786 787 Set if L2 layer indicates IPv6 protocol. 788 */ 789 #define RX_MSDU_START_2_IPV6_PROTO_OFFSET 0x00000008 790 #define RX_MSDU_START_2_IPV6_PROTO_LSB 11 791 #define RX_MSDU_START_2_IPV6_PROTO_MASK 0x00000800 792 793 /* Description RX_MSDU_START_2_TCP_PROTO 794 795 Set if the ipv4_proto or ipv6_proto are set and the IP 796 protocol indicates TCP. 797 */ 798 #define RX_MSDU_START_2_TCP_PROTO_OFFSET 0x00000008 799 #define RX_MSDU_START_2_TCP_PROTO_LSB 12 800 #define RX_MSDU_START_2_TCP_PROTO_MASK 0x00001000 801 802 /* Description RX_MSDU_START_2_UDP_PROTO 803 804 Set if the ipv4_proto or ipv6_proto are set and the IP 805 protocol indicates UDP. 806 */ 807 #define RX_MSDU_START_2_UDP_PROTO_OFFSET 0x00000008 808 #define RX_MSDU_START_2_UDP_PROTO_LSB 13 809 #define RX_MSDU_START_2_UDP_PROTO_MASK 0x00002000 810 811 /* Description RX_MSDU_START_2_IP_FRAG 812 813 Indicates that either the IP More frag bit is set or IP 814 frag number is non-zero. If set indicates that this is a 815 fragmented IP packet. 816 */ 817 #define RX_MSDU_START_2_IP_FRAG_OFFSET 0x00000008 818 #define RX_MSDU_START_2_IP_FRAG_LSB 14 819 #define RX_MSDU_START_2_IP_FRAG_MASK 0x00004000 820 821 /* Description RX_MSDU_START_2_TCP_ONLY_ACK 822 823 Set if only the TCP Ack bit is set in the TCP flags and 824 if the TCP payload is 0. 825 */ 826 #define RX_MSDU_START_2_TCP_ONLY_ACK_OFFSET 0x00000008 827 #define RX_MSDU_START_2_TCP_ONLY_ACK_LSB 15 828 #define RX_MSDU_START_2_TCP_ONLY_ACK_MASK 0x00008000 829 830 /* Description RX_MSDU_START_2_DA_IS_BCAST_MCAST 831 832 The destination address is broadcast or multicast. 833 */ 834 #define RX_MSDU_START_2_DA_IS_BCAST_MCAST_OFFSET 0x00000008 835 #define RX_MSDU_START_2_DA_IS_BCAST_MCAST_LSB 16 836 #define RX_MSDU_START_2_DA_IS_BCAST_MCAST_MASK 0x00010000 837 838 /* Description RX_MSDU_START_2_TOEPLITZ_HASH_SEL 839 840 Actual choosen Hash. 841 842 843 844 0 -> Toeplitz hash of 2-tuple (IP source address, IP 845 destination address)1 -> Toeplitz hash of 4-tuple (IP source 846 address, IP destination address, L4 (TCP/UDP) source port, 847 L4 (TCP/UDP) destination port) 848 849 2 -> Toeplitz of flow_id 850 851 3 -> Zero is used 852 853 <legal all> 854 */ 855 #define RX_MSDU_START_2_TOEPLITZ_HASH_SEL_OFFSET 0x00000008 856 #define RX_MSDU_START_2_TOEPLITZ_HASH_SEL_LSB 17 857 #define RX_MSDU_START_2_TOEPLITZ_HASH_SEL_MASK 0x00060000 858 859 /* Description RX_MSDU_START_2_IP_FIXED_HEADER_VALID 860 861 Fixed 20-byte IPv4 header or 40-byte IPv6 header parsed 862 fully within first 256 bytes of the packet 863 */ 864 #define RX_MSDU_START_2_IP_FIXED_HEADER_VALID_OFFSET 0x00000008 865 #define RX_MSDU_START_2_IP_FIXED_HEADER_VALID_LSB 19 866 #define RX_MSDU_START_2_IP_FIXED_HEADER_VALID_MASK 0x00080000 867 868 /* Description RX_MSDU_START_2_IP_EXTN_HEADER_VALID 869 870 IPv6/IPv6 header, including IPv4 options and 871 recognizable extension headers parsed fully within first 256 872 bytes of the packet 873 */ 874 #define RX_MSDU_START_2_IP_EXTN_HEADER_VALID_OFFSET 0x00000008 875 #define RX_MSDU_START_2_IP_EXTN_HEADER_VALID_LSB 20 876 #define RX_MSDU_START_2_IP_EXTN_HEADER_VALID_MASK 0x00100000 877 878 /* Description RX_MSDU_START_2_TCP_UDP_HEADER_VALID 879 880 Fixed 20-byte TCP (excluding TCP options) or 8-byte UDP 881 header parsed fully within first 256 bytes of the packet 882 */ 883 #define RX_MSDU_START_2_TCP_UDP_HEADER_VALID_OFFSET 0x00000008 884 #define RX_MSDU_START_2_TCP_UDP_HEADER_VALID_LSB 21 885 #define RX_MSDU_START_2_TCP_UDP_HEADER_VALID_MASK 0x00200000 886 887 /* Description RX_MSDU_START_2_MESH_CONTROL_PRESENT 888 889 When set, this MSDU includes the 'Mesh Control' field 890 891 <legal all> 892 */ 893 #define RX_MSDU_START_2_MESH_CONTROL_PRESENT_OFFSET 0x00000008 894 #define RX_MSDU_START_2_MESH_CONTROL_PRESENT_LSB 22 895 #define RX_MSDU_START_2_MESH_CONTROL_PRESENT_MASK 0x00400000 896 897 /* Description RX_MSDU_START_2_LDPC 898 899 When set, indicates that LDPC coding was used. 900 901 <legal all> 902 */ 903 #define RX_MSDU_START_2_LDPC_OFFSET 0x00000008 904 #define RX_MSDU_START_2_LDPC_LSB 23 905 #define RX_MSDU_START_2_LDPC_MASK 0x00800000 906 907 /* Description RX_MSDU_START_2_IP4_PROTOCOL_IP6_NEXT_HEADER 908 909 For IPv4 this is the 8 bit protocol field (when 910 ipv4_proto is set). For IPv6 this is the 8 bit next_header 911 field (when ipv6_proto is set). 912 */ 913 #define RX_MSDU_START_2_IP4_PROTOCOL_IP6_NEXT_HEADER_OFFSET 0x00000008 914 #define RX_MSDU_START_2_IP4_PROTOCOL_IP6_NEXT_HEADER_LSB 24 915 #define RX_MSDU_START_2_IP4_PROTOCOL_IP6_NEXT_HEADER_MASK 0xff000000 916 917 /* Description RX_MSDU_START_3_TOEPLITZ_HASH_2_OR_4 918 919 Controlled by RxOLE register - If register bit set to 0, 920 Toeplitz hash is computed over 2-tuple IPv4 or IPv6 src/dest 921 addresses; otherwise, toeplitz hash is computed over 4-tuple 922 IPv4 or IPv6 src/dest addresses and src/dest ports 923 */ 924 #define RX_MSDU_START_3_TOEPLITZ_HASH_2_OR_4_OFFSET 0x0000000c 925 #define RX_MSDU_START_3_TOEPLITZ_HASH_2_OR_4_LSB 0 926 #define RX_MSDU_START_3_TOEPLITZ_HASH_2_OR_4_MASK 0xffffffff 927 928 /* Description RX_MSDU_START_4_FLOW_ID_TOEPLITZ 929 930 Toeplitz hash of 5-tuple 931 932 {IP source address, IP destination address, IP source 933 port, IP destination port, L4 protocol} in case of 934 non-IPSec. 935 936 In case of IPSec - Toeplitz hash of 4-tuple 937 938 {IP source address, IP destination address, SPI, L4 939 protocol} 940 941 942 943 The relevant Toeplitz key registers are provided in 944 RxOLE's instance of common parser module. These registers 945 are separate from the Toeplitz keys used by ASE/FSE modules 946 inside RxOLE.The actual value will be passed on from common 947 parser module to RxOLE in one of the WHO_* TLVs. 948 949 <legal all> 950 */ 951 #define RX_MSDU_START_4_FLOW_ID_TOEPLITZ_OFFSET 0x00000010 952 #define RX_MSDU_START_4_FLOW_ID_TOEPLITZ_LSB 0 953 #define RX_MSDU_START_4_FLOW_ID_TOEPLITZ_MASK 0xffffffff 954 955 /* Description RX_MSDU_START_5_USER_RSSI 956 957 RSSI for this user 958 959 <legal all> 960 */ 961 #define RX_MSDU_START_5_USER_RSSI_OFFSET 0x00000014 962 #define RX_MSDU_START_5_USER_RSSI_LSB 0 963 #define RX_MSDU_START_5_USER_RSSI_MASK 0x000000ff 964 965 /* Description RX_MSDU_START_5_PKT_TYPE 966 967 Packet type: 968 969 <enum 0 dot11a>802.11a PPDU type 970 971 <enum 1 dot11b>802.11b PPDU type 972 973 <enum 2 dot11n_mm>802.11n Mixed Mode PPDU type 974 975 <enum 3 dot11ac>802.11ac PPDU type 976 977 <enum 4 dot11ax>802.11ax PPDU type 978 */ 979 #define RX_MSDU_START_5_PKT_TYPE_OFFSET 0x00000014 980 #define RX_MSDU_START_5_PKT_TYPE_LSB 8 981 #define RX_MSDU_START_5_PKT_TYPE_MASK 0x00000f00 982 983 /* Description RX_MSDU_START_5_STBC 984 985 When set, use STBC transmission rates 986 */ 987 #define RX_MSDU_START_5_STBC_OFFSET 0x00000014 988 #define RX_MSDU_START_5_STBC_LSB 12 989 #define RX_MSDU_START_5_STBC_MASK 0x00001000 990 991 /* Description RX_MSDU_START_5_SGI 992 993 Field only valid when pkt type is HT, VHT or HE. 994 995 996 997 <enum 0 0_8_us_sgi > Legacy normal GI. Can also be 998 used for HE 999 1000 <enum 1 0_4_us_sgi > Legacy short GI. Can also be 1001 used for HE 1002 1003 <enum 2 1_6_us_sgi > HE related GI 1004 1005 <enum 3 3_2_us_sgi > HE related GI 1006 1007 <legal 0 - 3> 1008 */ 1009 #define RX_MSDU_START_5_SGI_OFFSET 0x00000014 1010 #define RX_MSDU_START_5_SGI_LSB 13 1011 #define RX_MSDU_START_5_SGI_MASK 0x00006000 1012 1013 /* Description RX_MSDU_START_5_RATE_MCS 1014 1015 For details, refer to MCS_TYPE description 1016 1017 Note: This is rate in case of 11a/11b 1018 1019 1020 1021 <legal all> 1022 */ 1023 #define RX_MSDU_START_5_RATE_MCS_OFFSET 0x00000014 1024 #define RX_MSDU_START_5_RATE_MCS_LSB 15 1025 #define RX_MSDU_START_5_RATE_MCS_MASK 0x00078000 1026 1027 /* Description RX_MSDU_START_5_RECEIVE_BANDWIDTH 1028 1029 Full receive Bandwidth 1030 1031 1032 1033 <enum 0 full_rx_bw_20_mhz> 1034 1035 <enum 1 full_rx_bw_40_mhz> 1036 1037 <enum 2 full_rx_bw_80_mhz> 1038 1039 <enum 3 full_rx_bw_160_mhz> 1040 1041 1042 1043 <legal 0-3> 1044 */ 1045 #define RX_MSDU_START_5_RECEIVE_BANDWIDTH_OFFSET 0x00000014 1046 #define RX_MSDU_START_5_RECEIVE_BANDWIDTH_LSB 19 1047 #define RX_MSDU_START_5_RECEIVE_BANDWIDTH_MASK 0x00180000 1048 1049 /* Description RX_MSDU_START_5_RECEPTION_TYPE 1050 1051 Indicates what type of reception this is. 1052 1053 <enum 0 reception_type_SU > Basic SU reception (not 1054 part of OFDMA or MIMO) 1055 1056 <enum 1 reception_type_MU_MIMO > This is related to 1057 DL type of reception 1058 1059 <enum 2 reception_type_MU_OFDMA > This is related 1060 to DL type of reception 1061 1062 <enum 3 reception_type_MU_OFDMA_MIMO > This is 1063 related to DL type of reception 1064 1065 <enum 4 reception_type_UL_MU_MIMO > This is related 1066 to UL type of reception 1067 1068 <enum 5 reception_type_UL_MU_OFDMA > This is 1069 related to UL type of reception 1070 1071 <enum 6 reception_type_UL_MU_OFDMA_MIMO > This is 1072 related to UL type of reception 1073 1074 1075 1076 <legal 0-6> 1077 */ 1078 #define RX_MSDU_START_5_RECEPTION_TYPE_OFFSET 0x00000014 1079 #define RX_MSDU_START_5_RECEPTION_TYPE_LSB 21 1080 #define RX_MSDU_START_5_RECEPTION_TYPE_MASK 0x00e00000 1081 1082 /* Description RX_MSDU_START_5_MIMO_SS_BITMAP 1083 1084 Field only valid when Reception_type = 1085 reception_type_MU_MIMO or reception_type_MU_OFDMA_MIMO 1086 1087 1088 1089 Bitmap, with each bit indicating if the related spatial 1090 stream is used for this STA 1091 1092 LSB related to SS 0 1093 1094 1095 1096 0: spatial stream not used for this reception 1097 1098 1: spatial stream used for this reception 1099 1100 1101 1102 <legal all> 1103 */ 1104 #define RX_MSDU_START_5_MIMO_SS_BITMAP_OFFSET 0x00000014 1105 #define RX_MSDU_START_5_MIMO_SS_BITMAP_LSB 24 1106 #define RX_MSDU_START_5_MIMO_SS_BITMAP_MASK 0xff000000 1107 1108 /* Description RX_MSDU_START_6_PPDU_START_TIMESTAMP 1109 1110 Timestamp that indicates when the PPDU that contained 1111 this MPDU started on the medium. 1112 1113 <legal all> 1114 */ 1115 #define RX_MSDU_START_6_PPDU_START_TIMESTAMP_OFFSET 0x00000018 1116 #define RX_MSDU_START_6_PPDU_START_TIMESTAMP_LSB 0 1117 #define RX_MSDU_START_6_PPDU_START_TIMESTAMP_MASK 0xffffffff 1118 1119 /* Description RX_MSDU_START_7_SW_PHY_META_DATA 1120 1121 SW programmed Meta data provided by the PHY. 1122 1123 1124 1125 Can be used for SW to indicate the channel the device is 1126 on. 1127 1128 <legal all> 1129 */ 1130 #define RX_MSDU_START_7_SW_PHY_META_DATA_OFFSET 0x0000001c 1131 #define RX_MSDU_START_7_SW_PHY_META_DATA_LSB 0 1132 #define RX_MSDU_START_7_SW_PHY_META_DATA_MASK 0xffffffff 1133 1134 1135 #endif // _RX_MSDU_START_H_ 1136