1 /* 2 * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 19 #ifndef _HE_SIG_A_SU_INFO_H_ 20 #define _HE_SIG_A_SU_INFO_H_ 21 #if !defined(__ASSEMBLER__) 22 #endif 23 24 25 // ################ START SUMMARY ################# 26 // 27 // Dword Fields 28 // 0 format_indication[0], beam_change[1], dl_ul_flag[2], transmit_mcs[6:3], dcm[7], bss_color_id[13:8], reserved_0a[14], spatial_reuse[18:15], transmit_bw[20:19], cp_ltf_size[22:21], nsts[25:23], reserved_0b[31:26] 29 // 1 txop_duration[6:0], coding[7], ldpc_extra_symbol[8], stbc[9], txbf[10], packet_extension_a_factor[12:11], packet_extension_pe_disambiguity[13], reserved_1a[14], doppler_indication[15], crc[19:16], tail[25:20], dot11ax_su_extended[26], dot11ax_ext_ru_size[30:27], rx_ndp[31] 30 // 31 // ################ END SUMMARY ################# 32 33 #define NUM_OF_DWORDS_HE_SIG_A_SU_INFO 2 34 35 struct he_sig_a_su_info { 36 uint32_t format_indication : 1, //[0] 37 beam_change : 1, //[1] 38 dl_ul_flag : 1, //[2] 39 transmit_mcs : 4, //[6:3] 40 dcm : 1, //[7] 41 bss_color_id : 6, //[13:8] 42 reserved_0a : 1, //[14] 43 spatial_reuse : 4, //[18:15] 44 transmit_bw : 2, //[20:19] 45 cp_ltf_size : 2, //[22:21] 46 nsts : 3, //[25:23] 47 reserved_0b : 6; //[31:26] 48 uint32_t txop_duration : 7, //[6:0] 49 coding : 1, //[7] 50 ldpc_extra_symbol : 1, //[8] 51 stbc : 1, //[9] 52 txbf : 1, //[10] 53 packet_extension_a_factor : 2, //[12:11] 54 packet_extension_pe_disambiguity: 1, //[13] 55 reserved_1a : 1, //[14] 56 doppler_indication : 1, //[15] 57 crc : 4, //[19:16] 58 tail : 6, //[25:20] 59 dot11ax_su_extended : 1, //[26] 60 dot11ax_ext_ru_size : 4, //[30:27] 61 rx_ndp : 1; //[31] 62 }; 63 64 /* 65 66 format_indication 67 68 <enum 0 HE_SIGA_FORMAT_HE_TRIG> 69 70 <enum 1 HE_SIGA_FORMAT_SU_OR_EXT_SU> 71 72 <legal all> 73 74 beam_change 75 76 Indicates whether spatial mapping is changed between 77 legacy and HE portion of preamble. If not, channel 78 estimation can include legacy preamble to improve accuracy 79 80 <legal all> 81 82 dl_ul_flag 83 84 Differentiates between DL and UL transmission 85 86 87 88 <enum 0 DL_UL_FLAG_IS_DL_OR_TDLS> 89 90 <enum 1 DL_UL_FLAG_IS_UL> 91 92 <legal all> 93 94 transmit_mcs 95 96 Indicates the data MCS 97 98 99 100 Field Used by MAC HW 101 102 <legal all> 103 104 dcm 105 106 107 0: No DCM 108 109 1:DCM 110 111 <legal all> 112 113 bss_color_id 114 115 BSS color ID 116 117 118 119 Field Used by MAC HW 120 121 <legal all> 122 123 reserved_0a 124 125 Note: spec indicates this shall be set to 1 126 127 <legal 1> 128 129 spatial_reuse 130 131 Spatial reuse 132 133 134 135 For 20MHz one SR field corresponding to entire 20MHz 136 (other 3 fields indicate identical values) 137 138 For 40MHz two SR fields for each 20MHz (other 2 fields 139 indicate identical values) 140 141 For 80MHz four SR fields for each 20MHz 142 143 For 160MHz four SR fields for each 40MHz 144 145 <legal all> 146 147 transmit_bw 148 149 Bandwidth of the PPDU. 150 151 152 153 For HE SU PPDU 154 155 156 <enum 0 HE_SIG_A_BW20> 20 Mhz 157 158 <enum 1 HE_SIG_A_BW40> 40 Mhz 159 160 <enum 2 HE_SIG_A_BW80> 80 Mhz 161 162 <enum 3 HE_SIG_A_BW160> 160 MHz or 80+80 MHz 163 164 165 166 For HE Extended Range SU PPDU 167 168 Set to 0 for 242-tone RU 169 Set to 1 for right 106-tone RU within the primary 20 MHz 170 171 172 173 On RX side, Field Used by MAC HW 174 175 <legal all> 176 177 cp_ltf_size 178 179 Indicates the CP and HE-LTF type 180 181 182 <legal all> 183 184 nsts 185 186 187 188 189 For HE SU PPDU 190 191 192 193 For HE Extended Range PPDU 194 195 <legal all> 196 197 reserved_0b 198 199 <legal 0> 200 201 txop_duration 202 203 Indicates the remaining time in the current TXOP 204 205 206 207 Field Used by MAC HW 208 209 <legal all> 210 211 coding 212 213 Distinguishes between BCC and LDPC coding. 214 215 216 217 0: BCC 218 219 1: LDPC 220 221 <legal all> 222 223 ldpc_extra_symbol 224 225 If LDPC, 226 227 0: LDPC extra symbol not present 228 229 1: LDPC extra symbol present 230 231 Else 232 233 Set to 1 234 235 <legal all> 236 237 stbc 238 239 Indicates whether STBC is applied 240 241 0: No STBC 242 243 1: STBC 244 245 <legal all> 246 247 txbf 248 249 Indicates whether beamforming is applied 250 251 0: No beamforming 252 253 1: beamforming 254 255 <legal all> 256 257 packet_extension_a_factor 258 259 Common trigger info 260 261 262 263 the packet extension duration of the trigger-based PPDU 264 response with these two bits indicating the a-factor 265 266 267 268 <enum 0 a_factor_4> 269 270 <enum 1 a_factor_1> 271 272 <enum 2 a_factor_2> 273 274 <enum 3 a_factor_3> 275 276 277 278 <legal all> 279 280 packet_extension_pe_disambiguity 281 282 Common trigger info 283 284 285 286 the packet extension duration of the trigger-based PPDU 287 response with this bit indicating the PE-Disambiguity 288 289 <legal all> 290 291 reserved_1a 292 293 Note: per standard, set to 1 294 295 <legal 1> 296 297 doppler_indication 298 299 0: No Doppler support 300 301 1: Doppler support 302 303 <legal all> 304 305 crc 306 307 CRC for HE-SIG-A contents. 308 309 <legal all> 310 311 tail 312 313 <legal 0> 314 315 dot11ax_su_extended 316 317 TX side: 318 319 Set to 0 320 321 322 323 RX side: 324 325 On RX side, evaluated by MAC HW. This is the only way 326 for MAC RX to know that this was an HE_SIG_A_SU received in 327 'extended' format 328 329 330 331 332 <legal all> 333 334 dot11ax_ext_ru_size 335 336 TX side: 337 338 Set to 0 339 340 341 342 RX side: 343 344 Field only contains valid info when dot11ax_su_extended 345 is set. 346 347 348 349 On RX side, evaluated by MAC HW. This is the only way 350 for MAC RX to know what the number of based RUs was in this 351 extended range reception. It is used by the MAC to determine 352 the RU size for the response... 353 354 <legal all> 355 356 rx_ndp 357 358 TX side: 359 360 Set to 0 361 362 363 364 RX side:Valid on RX side only, and looked at by MAC HW 365 366 367 368 When set, PHY has received (expected) NDP frame 369 370 <legal all> 371 */ 372 373 374 /* Description HE_SIG_A_SU_INFO_0_FORMAT_INDICATION 375 376 <enum 0 HE_SIGA_FORMAT_HE_TRIG> 377 378 <enum 1 HE_SIGA_FORMAT_SU_OR_EXT_SU> 379 380 <legal all> 381 */ 382 #define HE_SIG_A_SU_INFO_0_FORMAT_INDICATION_OFFSET 0x00000000 383 #define HE_SIG_A_SU_INFO_0_FORMAT_INDICATION_LSB 0 384 #define HE_SIG_A_SU_INFO_0_FORMAT_INDICATION_MASK 0x00000001 385 386 /* Description HE_SIG_A_SU_INFO_0_BEAM_CHANGE 387 388 Indicates whether spatial mapping is changed between 389 legacy and HE portion of preamble. If not, channel 390 estimation can include legacy preamble to improve accuracy 391 392 <legal all> 393 */ 394 #define HE_SIG_A_SU_INFO_0_BEAM_CHANGE_OFFSET 0x00000000 395 #define HE_SIG_A_SU_INFO_0_BEAM_CHANGE_LSB 1 396 #define HE_SIG_A_SU_INFO_0_BEAM_CHANGE_MASK 0x00000002 397 398 /* Description HE_SIG_A_SU_INFO_0_DL_UL_FLAG 399 400 Differentiates between DL and UL transmission 401 402 403 404 <enum 0 DL_UL_FLAG_IS_DL_OR_TDLS> 405 406 <enum 1 DL_UL_FLAG_IS_UL> 407 408 <legal all> 409 */ 410 #define HE_SIG_A_SU_INFO_0_DL_UL_FLAG_OFFSET 0x00000000 411 #define HE_SIG_A_SU_INFO_0_DL_UL_FLAG_LSB 2 412 #define HE_SIG_A_SU_INFO_0_DL_UL_FLAG_MASK 0x00000004 413 414 /* Description HE_SIG_A_SU_INFO_0_TRANSMIT_MCS 415 416 Indicates the data MCS 417 418 419 420 Field Used by MAC HW 421 422 <legal all> 423 */ 424 #define HE_SIG_A_SU_INFO_0_TRANSMIT_MCS_OFFSET 0x00000000 425 #define HE_SIG_A_SU_INFO_0_TRANSMIT_MCS_LSB 3 426 #define HE_SIG_A_SU_INFO_0_TRANSMIT_MCS_MASK 0x00000078 427 428 /* Description HE_SIG_A_SU_INFO_0_DCM 429 430 431 0: No DCM 432 433 1:DCM 434 435 <legal all> 436 */ 437 #define HE_SIG_A_SU_INFO_0_DCM_OFFSET 0x00000000 438 #define HE_SIG_A_SU_INFO_0_DCM_LSB 7 439 #define HE_SIG_A_SU_INFO_0_DCM_MASK 0x00000080 440 441 /* Description HE_SIG_A_SU_INFO_0_BSS_COLOR_ID 442 443 BSS color ID 444 445 446 447 Field Used by MAC HW 448 449 <legal all> 450 */ 451 #define HE_SIG_A_SU_INFO_0_BSS_COLOR_ID_OFFSET 0x00000000 452 #define HE_SIG_A_SU_INFO_0_BSS_COLOR_ID_LSB 8 453 #define HE_SIG_A_SU_INFO_0_BSS_COLOR_ID_MASK 0x00003f00 454 455 /* Description HE_SIG_A_SU_INFO_0_RESERVED_0A 456 457 Note: spec indicates this shall be set to 1 458 459 <legal 1> 460 */ 461 #define HE_SIG_A_SU_INFO_0_RESERVED_0A_OFFSET 0x00000000 462 #define HE_SIG_A_SU_INFO_0_RESERVED_0A_LSB 14 463 #define HE_SIG_A_SU_INFO_0_RESERVED_0A_MASK 0x00004000 464 465 /* Description HE_SIG_A_SU_INFO_0_SPATIAL_REUSE 466 467 Spatial reuse 468 469 470 471 For 20MHz one SR field corresponding to entire 20MHz 472 (other 3 fields indicate identical values) 473 474 For 40MHz two SR fields for each 20MHz (other 2 fields 475 indicate identical values) 476 477 For 80MHz four SR fields for each 20MHz 478 479 For 160MHz four SR fields for each 40MHz 480 481 <legal all> 482 */ 483 #define HE_SIG_A_SU_INFO_0_SPATIAL_REUSE_OFFSET 0x00000000 484 #define HE_SIG_A_SU_INFO_0_SPATIAL_REUSE_LSB 15 485 #define HE_SIG_A_SU_INFO_0_SPATIAL_REUSE_MASK 0x00078000 486 487 /* Description HE_SIG_A_SU_INFO_0_TRANSMIT_BW 488 489 Bandwidth of the PPDU. 490 491 492 493 For HE SU PPDU 494 495 496 <enum 0 HE_SIG_A_BW20> 20 Mhz 497 498 <enum 1 HE_SIG_A_BW40> 40 Mhz 499 500 <enum 2 HE_SIG_A_BW80> 80 Mhz 501 502 <enum 3 HE_SIG_A_BW160> 160 MHz or 80+80 MHz 503 504 505 506 For HE Extended Range SU PPDU 507 508 Set to 0 for 242-tone RU 509 Set to 1 for right 106-tone RU within the primary 20 MHz 510 511 512 513 On RX side, Field Used by MAC HW 514 515 <legal all> 516 */ 517 #define HE_SIG_A_SU_INFO_0_TRANSMIT_BW_OFFSET 0x00000000 518 #define HE_SIG_A_SU_INFO_0_TRANSMIT_BW_LSB 19 519 #define HE_SIG_A_SU_INFO_0_TRANSMIT_BW_MASK 0x00180000 520 521 /* Description HE_SIG_A_SU_INFO_0_CP_LTF_SIZE 522 523 Indicates the CP and HE-LTF type 524 525 <legal all> 526 */ 527 #define HE_SIG_A_SU_INFO_0_CP_LTF_SIZE_OFFSET 0x00000000 528 #define HE_SIG_A_SU_INFO_0_CP_LTF_SIZE_LSB 21 529 #define HE_SIG_A_SU_INFO_0_CP_LTF_SIZE_MASK 0x00600000 530 531 /* Description HE_SIG_A_SU_INFO_0_NSTS 532 533 534 535 536 For HE SU PPDU 537 538 539 540 For HE Extended Range PPDU 541 542 <legal all> 543 */ 544 #define HE_SIG_A_SU_INFO_0_NSTS_OFFSET 0x00000000 545 #define HE_SIG_A_SU_INFO_0_NSTS_LSB 23 546 #define HE_SIG_A_SU_INFO_0_NSTS_MASK 0x03800000 547 548 /* Description HE_SIG_A_SU_INFO_0_RESERVED_0B 549 550 <legal 0> 551 */ 552 #define HE_SIG_A_SU_INFO_0_RESERVED_0B_OFFSET 0x00000000 553 #define HE_SIG_A_SU_INFO_0_RESERVED_0B_LSB 26 554 #define HE_SIG_A_SU_INFO_0_RESERVED_0B_MASK 0xfc000000 555 556 /* Description HE_SIG_A_SU_INFO_1_TXOP_DURATION 557 558 Indicates the remaining time in the current TXOP 559 560 561 562 Field Used by MAC HW 563 564 <legal all> 565 */ 566 #define HE_SIG_A_SU_INFO_1_TXOP_DURATION_OFFSET 0x00000004 567 #define HE_SIG_A_SU_INFO_1_TXOP_DURATION_LSB 0 568 #define HE_SIG_A_SU_INFO_1_TXOP_DURATION_MASK 0x0000007f 569 570 /* Description HE_SIG_A_SU_INFO_1_CODING 571 572 Distinguishes between BCC and LDPC coding. 573 574 575 576 0: BCC 577 578 1: LDPC 579 580 <legal all> 581 */ 582 #define HE_SIG_A_SU_INFO_1_CODING_OFFSET 0x00000004 583 #define HE_SIG_A_SU_INFO_1_CODING_LSB 7 584 #define HE_SIG_A_SU_INFO_1_CODING_MASK 0x00000080 585 586 /* Description HE_SIG_A_SU_INFO_1_LDPC_EXTRA_SYMBOL 587 588 If LDPC, 589 590 0: LDPC extra symbol not present 591 592 1: LDPC extra symbol present 593 594 Else 595 596 Set to 1 597 598 <legal all> 599 */ 600 #define HE_SIG_A_SU_INFO_1_LDPC_EXTRA_SYMBOL_OFFSET 0x00000004 601 #define HE_SIG_A_SU_INFO_1_LDPC_EXTRA_SYMBOL_LSB 8 602 #define HE_SIG_A_SU_INFO_1_LDPC_EXTRA_SYMBOL_MASK 0x00000100 603 604 /* Description HE_SIG_A_SU_INFO_1_STBC 605 606 Indicates whether STBC is applied 607 608 0: No STBC 609 610 1: STBC 611 612 <legal all> 613 */ 614 #define HE_SIG_A_SU_INFO_1_STBC_OFFSET 0x00000004 615 #define HE_SIG_A_SU_INFO_1_STBC_LSB 9 616 #define HE_SIG_A_SU_INFO_1_STBC_MASK 0x00000200 617 618 /* Description HE_SIG_A_SU_INFO_1_TXBF 619 620 Indicates whether beamforming is applied 621 622 0: No beamforming 623 624 1: beamforming 625 626 <legal all> 627 */ 628 #define HE_SIG_A_SU_INFO_1_TXBF_OFFSET 0x00000004 629 #define HE_SIG_A_SU_INFO_1_TXBF_LSB 10 630 #define HE_SIG_A_SU_INFO_1_TXBF_MASK 0x00000400 631 632 /* Description HE_SIG_A_SU_INFO_1_PACKET_EXTENSION_A_FACTOR 633 634 Common trigger info 635 636 637 638 the packet extension duration of the trigger-based PPDU 639 response with these two bits indicating the a-factor 640 641 642 643 <enum 0 a_factor_4> 644 645 <enum 1 a_factor_1> 646 647 <enum 2 a_factor_2> 648 649 <enum 3 a_factor_3> 650 651 652 653 <legal all> 654 */ 655 #define HE_SIG_A_SU_INFO_1_PACKET_EXTENSION_A_FACTOR_OFFSET 0x00000004 656 #define HE_SIG_A_SU_INFO_1_PACKET_EXTENSION_A_FACTOR_LSB 11 657 #define HE_SIG_A_SU_INFO_1_PACKET_EXTENSION_A_FACTOR_MASK 0x00001800 658 659 /* Description HE_SIG_A_SU_INFO_1_PACKET_EXTENSION_PE_DISAMBIGUITY 660 661 Common trigger info 662 663 664 665 the packet extension duration of the trigger-based PPDU 666 response with this bit indicating the PE-Disambiguity 667 668 <legal all> 669 */ 670 #define HE_SIG_A_SU_INFO_1_PACKET_EXTENSION_PE_DISAMBIGUITY_OFFSET 0x00000004 671 #define HE_SIG_A_SU_INFO_1_PACKET_EXTENSION_PE_DISAMBIGUITY_LSB 13 672 #define HE_SIG_A_SU_INFO_1_PACKET_EXTENSION_PE_DISAMBIGUITY_MASK 0x00002000 673 674 /* Description HE_SIG_A_SU_INFO_1_RESERVED_1A 675 676 Note: per standard, set to 1 677 678 <legal 1> 679 */ 680 #define HE_SIG_A_SU_INFO_1_RESERVED_1A_OFFSET 0x00000004 681 #define HE_SIG_A_SU_INFO_1_RESERVED_1A_LSB 14 682 #define HE_SIG_A_SU_INFO_1_RESERVED_1A_MASK 0x00004000 683 684 /* Description HE_SIG_A_SU_INFO_1_DOPPLER_INDICATION 685 686 0: No Doppler support 687 688 1: Doppler support 689 690 <legal all> 691 */ 692 #define HE_SIG_A_SU_INFO_1_DOPPLER_INDICATION_OFFSET 0x00000004 693 #define HE_SIG_A_SU_INFO_1_DOPPLER_INDICATION_LSB 15 694 #define HE_SIG_A_SU_INFO_1_DOPPLER_INDICATION_MASK 0x00008000 695 696 /* Description HE_SIG_A_SU_INFO_1_CRC 697 698 CRC for HE-SIG-A contents. 699 700 <legal all> 701 */ 702 #define HE_SIG_A_SU_INFO_1_CRC_OFFSET 0x00000004 703 #define HE_SIG_A_SU_INFO_1_CRC_LSB 16 704 #define HE_SIG_A_SU_INFO_1_CRC_MASK 0x000f0000 705 706 /* Description HE_SIG_A_SU_INFO_1_TAIL 707 708 <legal 0> 709 */ 710 #define HE_SIG_A_SU_INFO_1_TAIL_OFFSET 0x00000004 711 #define HE_SIG_A_SU_INFO_1_TAIL_LSB 20 712 #define HE_SIG_A_SU_INFO_1_TAIL_MASK 0x03f00000 713 714 /* Description HE_SIG_A_SU_INFO_1_DOT11AX_SU_EXTENDED 715 716 TX side: 717 718 Set to 0 719 720 721 722 RX side: 723 724 On RX side, evaluated by MAC HW. This is the only way 725 for MAC RX to know that this was an HE_SIG_A_SU received in 726 'extended' format 727 728 729 730 731 <legal all> 732 */ 733 #define HE_SIG_A_SU_INFO_1_DOT11AX_SU_EXTENDED_OFFSET 0x00000004 734 #define HE_SIG_A_SU_INFO_1_DOT11AX_SU_EXTENDED_LSB 26 735 #define HE_SIG_A_SU_INFO_1_DOT11AX_SU_EXTENDED_MASK 0x04000000 736 737 /* Description HE_SIG_A_SU_INFO_1_DOT11AX_EXT_RU_SIZE 738 739 TX side: 740 741 Set to 0 742 743 744 745 RX side: 746 747 Field only contains valid info when dot11ax_su_extended 748 is set. 749 750 751 752 On RX side, evaluated by MAC HW. This is the only way 753 for MAC RX to know what the number of based RUs was in this 754 extended range reception. It is used by the MAC to determine 755 the RU size for the response... 756 757 <legal all> 758 */ 759 #define HE_SIG_A_SU_INFO_1_DOT11AX_EXT_RU_SIZE_OFFSET 0x00000004 760 #define HE_SIG_A_SU_INFO_1_DOT11AX_EXT_RU_SIZE_LSB 27 761 #define HE_SIG_A_SU_INFO_1_DOT11AX_EXT_RU_SIZE_MASK 0x78000000 762 763 /* Description HE_SIG_A_SU_INFO_1_RX_NDP 764 765 TX side: 766 767 Set to 0 768 769 770 771 RX side:Valid on RX side only, and looked at by MAC HW 772 773 774 775 When set, PHY has received (expected) NDP frame 776 777 <legal all> 778 */ 779 #define HE_SIG_A_SU_INFO_1_RX_NDP_OFFSET 0x00000004 780 #define HE_SIG_A_SU_INFO_1_RX_NDP_LSB 31 781 #define HE_SIG_A_SU_INFO_1_RX_NDP_MASK 0x80000000 782 783 784 #endif // _HE_SIG_A_SU_INFO_H_ 785