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