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