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