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 _HE_SIG_A_MU_DL_INFO_H_ 18 #define _HE_SIG_A_MU_DL_INFO_H_ 19 #if !defined(__ASSEMBLER__) 20 #endif 21 22 23 // ################ START SUMMARY ################# 24 // 25 // Dword Fields 26 // 0 dl_ul_flag[0], mcs_of_sig_b[3:1], dcm_of_sig_b[4], bss_color_id[10:5], spatial_reuse[14:11], transmit_bw[17:15], num_sig_b_symbols[21:18], comp_mode_sig_b[22], cp_ltf_size[24:23], doppler_indication[25], reserved_0a[31:26] 27 // 1 txop_duration[6:0], reserved_1a[7], num_ltf_symbols[10:8], ldpc_extra_symbol[11], stbc[12], packet_extension_a_factor[14:13], packet_extension_pe_disambiguity[15], crc[19:16], tail[25:20], reserved_1b[31:26] 28 // 29 // ################ END SUMMARY ################# 30 31 #define NUM_OF_DWORDS_HE_SIG_A_MU_DL_INFO 2 32 33 struct he_sig_a_mu_dl_info { 34 uint32_t dl_ul_flag : 1, //[0] 35 mcs_of_sig_b : 3, //[3:1] 36 dcm_of_sig_b : 1, //[4] 37 bss_color_id : 6, //[10:5] 38 spatial_reuse : 4, //[14:11] 39 transmit_bw : 3, //[17:15] 40 num_sig_b_symbols : 4, //[21:18] 41 comp_mode_sig_b : 1, //[22] 42 cp_ltf_size : 2, //[24:23] 43 doppler_indication : 1, //[25] 44 reserved_0a : 6; //[31:26] 45 uint32_t txop_duration : 7, //[6:0] 46 reserved_1a : 1, //[7] 47 num_ltf_symbols : 3, //[10:8] 48 ldpc_extra_symbol : 1, //[11] 49 stbc : 1, //[12] 50 packet_extension_a_factor : 2, //[14:13] 51 packet_extension_pe_disambiguity: 1, //[15] 52 crc : 4, //[19:16] 53 tail : 6, //[25:20] 54 reserved_1b : 6; //[31:26] 55 }; 56 57 /* 58 59 dl_ul_flag 60 61 Differentiates between DL and UL transmission 62 63 64 65 <enum 0 DL_UL_FLAG_IS_DL_OR_TDLS> 66 67 <enum 1 DL_UL_FLAG_IS_UL> 68 69 NOTE: This is unsupported for HE MU format (including 70 MU_SU) Tx in Napier and Hastings80. 71 72 <legal all> 73 74 mcs_of_sig_b 75 76 Indicates the MCS of HE-SIG-B 77 78 <legal 0-5> 79 80 dcm_of_sig_b 81 82 Indicates whether dual sub-carrier modulation is applied 83 to HE-SIG-B 84 85 86 87 0: No DCM for HE_SIG_B 88 89 1: DCM for HE_SIG_B 90 91 <legal all> 92 93 bss_color_id 94 95 BSS color ID 96 97 98 99 Field Used by MAC HW 100 101 <legal all> 102 103 spatial_reuse 104 105 Spatial reuse 106 107 108 109 For 20MHz one SR field corresponding to entire 20MHz 110 (other 3 fields indicate identical values) 111 112 For 40MHz two SR fields for each 20MHz (other 2 fields 113 indicate identical values) 114 115 For 80MHz four SR fields for each 20MHz 116 117 For 160MHz four SR fields for each 40MHz 118 119 <legal all> 120 121 transmit_bw 122 123 Bandwidth of the PPDU. 124 125 126 127 <enum 0 HE_SIG_A_MU_DL_BW20> 20 Mhz 128 129 <enum 1 HE_SIG_A_MU_DL_BW40> 40 Mhz 130 131 <enum 2 HE_SIG_A_MU_DL_BW80> 80 MHz non-preamble 132 puncturing mode 133 134 <enum 3 HE_SIG_A_MU_DL_BW160> 160 MHz and 80+80 MHz 135 non-preamble puncturing mode 136 137 <enum 4 HE_SIG_A_MU_DL_BW80_SEC_20_PUNC> for preamble 138 puncturing in 80 MHz, where in the preamble only the 139 secondary 20 MHz is punctured 140 141 <enum 5 HE_SIG_A_MU_DL_BW80_20_PUNC_IN_SEC_40> for 142 preamble puncturing in 80 MHz, where in the preamble only 143 one of the two 20 MHz sub-channels in secondary 40 MHz is 144 punctured. 145 146 <enum 6 HE_SIG_A_MU_DL_BW160_SEC_20_PUNC> for preamble 147 puncturing in 160 MHz or 80+80 MHz, where in the primary 80 148 MHz of the preamble only the secondary 20 MHz is punctured. 149 150 <enum 7 HE_SIG_A_MU_DL_BW160_SEC_40_80_PUNC> for 151 preamble puncturing in 160 MHz or 80+80 MHz, where in the 152 primary 80 MHz of the preamble the primary 40 MHz is 153 present. 154 155 156 157 On RX side, Field Used by MAC HW 158 159 <legal 0-7> 160 161 num_sig_b_symbols 162 163 Number of symbols 164 165 166 167 For OFDMA, the actual number of symbols is 1 larger then 168 indicated in this field. 169 170 171 172 For MU-MIMO this is equal to the number of users - 1: 173 the following encoding is used: 174 175 1 => 2 users 176 177 2 => 3 users 178 179 Etc. 180 181 182 183 <legal all> 184 185 comp_mode_sig_b 186 187 Indicates the compression mode of HE-SIG-B 188 189 190 191 0: Regular [uncomp mode] 192 193 1: compressed mode (full-BW MU-MIMO only) 194 195 <legal all> 196 197 cp_ltf_size 198 199 Indicates the CP and HE-LTF type 200 201 202 203 <enum 0 MU_FourX_LTF_0_8CP> 4xLTF + 0.8 us CP 204 205 <enum 1 MU_TwoX_LTF_0_8CP> 2x LTF + 0.8 µs CP 206 207 <enum 2 MU_TwoX_LTF_1_6CP> 2x LTF + 1.6 µs CP 208 209 <enum 3 MU_FourX_LTF_3_2CP> 4x LTF + 3.2 µs CP 210 211 212 213 NOTE: for MU no proprietary modes (for now) 214 215 216 217 <legal all> 218 219 doppler_indication 220 221 0: No Doppler support 222 223 1: Doppler support 224 225 <legal all> 226 227 reserved_0a 228 229 <legal 0> 230 231 txop_duration 232 233 Indicates the remaining time in the current TXOP 234 235 236 237 Field Used by MAC HW 238 239 <legal all> 240 241 reserved_1a 242 243 Note: spec indicates this shall be set to 1 244 245 <legal 1> 246 247 num_ltf_symbols 248 249 Indicates the number of HE-LTF symbols 250 251 252 253 0: 1 LTF 254 255 1: 2 LTFs 256 257 2: 4 LTFs 258 259 3: 6 LTFs 260 261 4: 8 LTFs 262 263 264 265 <legal all> 266 267 ldpc_extra_symbol 268 269 If LDPC, 270 271 0: LDPC extra symbol not present 272 273 1: LDPC extra symbol present 274 275 Else 276 277 Set to 1 278 279 <legal all> 280 281 stbc 282 283 Indicates whether STBC is applied 284 285 0: No STBC 286 287 1: STBC 288 289 <legal all> 290 291 packet_extension_a_factor 292 293 the packet extension duration of the trigger-based PPDU 294 response with these two bits indicating the a-factor 295 296 297 298 <enum 0 a_factor_4> 299 300 <enum 1 a_factor_1> 301 302 <enum 2 a_factor_2> 303 304 <enum 3 a_factor_3> 305 306 307 308 <legal all> 309 310 packet_extension_pe_disambiguity 311 312 the packet extension duration of the trigger-based PPDU 313 response with this bit indicating the PE-Disambiguity 314 315 <legal all> 316 317 crc 318 319 CRC for HE-SIG-A contents. 320 321 <legal all> 322 323 tail 324 325 <legal 0> 326 327 reserved_1b 328 329 <legal 0> 330 */ 331 332 333 /* Description HE_SIG_A_MU_DL_INFO_0_DL_UL_FLAG 334 335 Differentiates between DL and UL transmission 336 337 338 339 <enum 0 DL_UL_FLAG_IS_DL_OR_TDLS> 340 341 <enum 1 DL_UL_FLAG_IS_UL> 342 343 NOTE: This is unsupported for HE MU format (including 344 MU_SU) Tx in Napier and Hastings80. 345 346 <legal all> 347 */ 348 #define HE_SIG_A_MU_DL_INFO_0_DL_UL_FLAG_OFFSET 0x00000000 349 #define HE_SIG_A_MU_DL_INFO_0_DL_UL_FLAG_LSB 0 350 #define HE_SIG_A_MU_DL_INFO_0_DL_UL_FLAG_MASK 0x00000001 351 352 /* Description HE_SIG_A_MU_DL_INFO_0_MCS_OF_SIG_B 353 354 Indicates the MCS of HE-SIG-B 355 356 <legal 0-5> 357 */ 358 #define HE_SIG_A_MU_DL_INFO_0_MCS_OF_SIG_B_OFFSET 0x00000000 359 #define HE_SIG_A_MU_DL_INFO_0_MCS_OF_SIG_B_LSB 1 360 #define HE_SIG_A_MU_DL_INFO_0_MCS_OF_SIG_B_MASK 0x0000000e 361 362 /* Description HE_SIG_A_MU_DL_INFO_0_DCM_OF_SIG_B 363 364 Indicates whether dual sub-carrier modulation is applied 365 to HE-SIG-B 366 367 368 369 0: No DCM for HE_SIG_B 370 371 1: DCM for HE_SIG_B 372 373 <legal all> 374 */ 375 #define HE_SIG_A_MU_DL_INFO_0_DCM_OF_SIG_B_OFFSET 0x00000000 376 #define HE_SIG_A_MU_DL_INFO_0_DCM_OF_SIG_B_LSB 4 377 #define HE_SIG_A_MU_DL_INFO_0_DCM_OF_SIG_B_MASK 0x00000010 378 379 /* Description HE_SIG_A_MU_DL_INFO_0_BSS_COLOR_ID 380 381 BSS color ID 382 383 384 385 Field Used by MAC HW 386 387 <legal all> 388 */ 389 #define HE_SIG_A_MU_DL_INFO_0_BSS_COLOR_ID_OFFSET 0x00000000 390 #define HE_SIG_A_MU_DL_INFO_0_BSS_COLOR_ID_LSB 5 391 #define HE_SIG_A_MU_DL_INFO_0_BSS_COLOR_ID_MASK 0x000007e0 392 393 /* Description HE_SIG_A_MU_DL_INFO_0_SPATIAL_REUSE 394 395 Spatial reuse 396 397 398 399 For 20MHz one SR field corresponding to entire 20MHz 400 (other 3 fields indicate identical values) 401 402 For 40MHz two SR fields for each 20MHz (other 2 fields 403 indicate identical values) 404 405 For 80MHz four SR fields for each 20MHz 406 407 For 160MHz four SR fields for each 40MHz 408 409 <legal all> 410 */ 411 #define HE_SIG_A_MU_DL_INFO_0_SPATIAL_REUSE_OFFSET 0x00000000 412 #define HE_SIG_A_MU_DL_INFO_0_SPATIAL_REUSE_LSB 11 413 #define HE_SIG_A_MU_DL_INFO_0_SPATIAL_REUSE_MASK 0x00007800 414 415 /* Description HE_SIG_A_MU_DL_INFO_0_TRANSMIT_BW 416 417 Bandwidth of the PPDU. 418 419 420 421 <enum 0 HE_SIG_A_MU_DL_BW20> 20 Mhz 422 423 <enum 1 HE_SIG_A_MU_DL_BW40> 40 Mhz 424 425 <enum 2 HE_SIG_A_MU_DL_BW80> 80 MHz non-preamble 426 puncturing mode 427 428 <enum 3 HE_SIG_A_MU_DL_BW160> 160 MHz and 80+80 MHz 429 non-preamble puncturing mode 430 431 <enum 4 HE_SIG_A_MU_DL_BW80_SEC_20_PUNC> for preamble 432 puncturing in 80 MHz, where in the preamble only the 433 secondary 20 MHz is punctured 434 435 <enum 5 HE_SIG_A_MU_DL_BW80_20_PUNC_IN_SEC_40> for 436 preamble puncturing in 80 MHz, where in the preamble only 437 one of the two 20 MHz sub-channels in secondary 40 MHz is 438 punctured. 439 440 <enum 6 HE_SIG_A_MU_DL_BW160_SEC_20_PUNC> for preamble 441 puncturing in 160 MHz or 80+80 MHz, where in the primary 80 442 MHz of the preamble only the secondary 20 MHz is punctured. 443 444 <enum 7 HE_SIG_A_MU_DL_BW160_SEC_40_80_PUNC> for 445 preamble puncturing in 160 MHz or 80+80 MHz, where in the 446 primary 80 MHz of the preamble the primary 40 MHz is 447 present. 448 449 450 451 On RX side, Field Used by MAC HW 452 453 <legal 0-7> 454 */ 455 #define HE_SIG_A_MU_DL_INFO_0_TRANSMIT_BW_OFFSET 0x00000000 456 #define HE_SIG_A_MU_DL_INFO_0_TRANSMIT_BW_LSB 15 457 #define HE_SIG_A_MU_DL_INFO_0_TRANSMIT_BW_MASK 0x00038000 458 459 /* Description HE_SIG_A_MU_DL_INFO_0_NUM_SIG_B_SYMBOLS 460 461 Number of symbols 462 463 464 465 For OFDMA, the actual number of symbols is 1 larger then 466 indicated in this field. 467 468 469 470 For MU-MIMO this is equal to the number of users - 1: 471 the following encoding is used: 472 473 1 => 2 users 474 475 2 => 3 users 476 477 Etc. 478 479 480 481 <legal all> 482 */ 483 #define HE_SIG_A_MU_DL_INFO_0_NUM_SIG_B_SYMBOLS_OFFSET 0x00000000 484 #define HE_SIG_A_MU_DL_INFO_0_NUM_SIG_B_SYMBOLS_LSB 18 485 #define HE_SIG_A_MU_DL_INFO_0_NUM_SIG_B_SYMBOLS_MASK 0x003c0000 486 487 /* Description HE_SIG_A_MU_DL_INFO_0_COMP_MODE_SIG_B 488 489 Indicates the compression mode of HE-SIG-B 490 491 492 493 0: Regular [uncomp mode] 494 495 1: compressed mode (full-BW MU-MIMO only) 496 497 <legal all> 498 */ 499 #define HE_SIG_A_MU_DL_INFO_0_COMP_MODE_SIG_B_OFFSET 0x00000000 500 #define HE_SIG_A_MU_DL_INFO_0_COMP_MODE_SIG_B_LSB 22 501 #define HE_SIG_A_MU_DL_INFO_0_COMP_MODE_SIG_B_MASK 0x00400000 502 503 /* Description HE_SIG_A_MU_DL_INFO_0_CP_LTF_SIZE 504 505 Indicates the CP and HE-LTF type 506 507 508 509 <enum 0 MU_FourX_LTF_0_8CP> 4xLTF + 0.8 us CP 510 511 <enum 1 MU_TwoX_LTF_0_8CP> 2x LTF + 0.8 µs CP 512 513 <enum 2 MU_TwoX_LTF_1_6CP> 2x LTF + 1.6 µs CP 514 515 <enum 3 MU_FourX_LTF_3_2CP> 4x LTF + 3.2 µs CP 516 517 518 519 NOTE: for MU no proprietary modes (for now) 520 521 522 523 <legal all> 524 */ 525 #define HE_SIG_A_MU_DL_INFO_0_CP_LTF_SIZE_OFFSET 0x00000000 526 #define HE_SIG_A_MU_DL_INFO_0_CP_LTF_SIZE_LSB 23 527 #define HE_SIG_A_MU_DL_INFO_0_CP_LTF_SIZE_MASK 0x01800000 528 529 /* Description HE_SIG_A_MU_DL_INFO_0_DOPPLER_INDICATION 530 531 0: No Doppler support 532 533 1: Doppler support 534 535 <legal all> 536 */ 537 #define HE_SIG_A_MU_DL_INFO_0_DOPPLER_INDICATION_OFFSET 0x00000000 538 #define HE_SIG_A_MU_DL_INFO_0_DOPPLER_INDICATION_LSB 25 539 #define HE_SIG_A_MU_DL_INFO_0_DOPPLER_INDICATION_MASK 0x02000000 540 541 /* Description HE_SIG_A_MU_DL_INFO_0_RESERVED_0A 542 543 <legal 0> 544 */ 545 #define HE_SIG_A_MU_DL_INFO_0_RESERVED_0A_OFFSET 0x00000000 546 #define HE_SIG_A_MU_DL_INFO_0_RESERVED_0A_LSB 26 547 #define HE_SIG_A_MU_DL_INFO_0_RESERVED_0A_MASK 0xfc000000 548 549 /* Description HE_SIG_A_MU_DL_INFO_1_TXOP_DURATION 550 551 Indicates the remaining time in the current TXOP 552 553 554 555 Field Used by MAC HW 556 557 <legal all> 558 */ 559 #define HE_SIG_A_MU_DL_INFO_1_TXOP_DURATION_OFFSET 0x00000004 560 #define HE_SIG_A_MU_DL_INFO_1_TXOP_DURATION_LSB 0 561 #define HE_SIG_A_MU_DL_INFO_1_TXOP_DURATION_MASK 0x0000007f 562 563 /* Description HE_SIG_A_MU_DL_INFO_1_RESERVED_1A 564 565 Note: spec indicates this shall be set to 1 566 567 <legal 1> 568 */ 569 #define HE_SIG_A_MU_DL_INFO_1_RESERVED_1A_OFFSET 0x00000004 570 #define HE_SIG_A_MU_DL_INFO_1_RESERVED_1A_LSB 7 571 #define HE_SIG_A_MU_DL_INFO_1_RESERVED_1A_MASK 0x00000080 572 573 /* Description HE_SIG_A_MU_DL_INFO_1_NUM_LTF_SYMBOLS 574 575 Indicates the number of HE-LTF symbols 576 577 578 579 0: 1 LTF 580 581 1: 2 LTFs 582 583 2: 4 LTFs 584 585 3: 6 LTFs 586 587 4: 8 LTFs 588 589 590 591 <legal all> 592 */ 593 #define HE_SIG_A_MU_DL_INFO_1_NUM_LTF_SYMBOLS_OFFSET 0x00000004 594 #define HE_SIG_A_MU_DL_INFO_1_NUM_LTF_SYMBOLS_LSB 8 595 #define HE_SIG_A_MU_DL_INFO_1_NUM_LTF_SYMBOLS_MASK 0x00000700 596 597 /* Description HE_SIG_A_MU_DL_INFO_1_LDPC_EXTRA_SYMBOL 598 599 If LDPC, 600 601 0: LDPC extra symbol not present 602 603 1: LDPC extra symbol present 604 605 Else 606 607 Set to 1 608 609 <legal all> 610 */ 611 #define HE_SIG_A_MU_DL_INFO_1_LDPC_EXTRA_SYMBOL_OFFSET 0x00000004 612 #define HE_SIG_A_MU_DL_INFO_1_LDPC_EXTRA_SYMBOL_LSB 11 613 #define HE_SIG_A_MU_DL_INFO_1_LDPC_EXTRA_SYMBOL_MASK 0x00000800 614 615 /* Description HE_SIG_A_MU_DL_INFO_1_STBC 616 617 Indicates whether STBC is applied 618 619 0: No STBC 620 621 1: STBC 622 623 <legal all> 624 */ 625 #define HE_SIG_A_MU_DL_INFO_1_STBC_OFFSET 0x00000004 626 #define HE_SIG_A_MU_DL_INFO_1_STBC_LSB 12 627 #define HE_SIG_A_MU_DL_INFO_1_STBC_MASK 0x00001000 628 629 /* Description HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_A_FACTOR 630 631 the packet extension duration of the trigger-based PPDU 632 response with these two bits indicating the a-factor 633 634 635 636 <enum 0 a_factor_4> 637 638 <enum 1 a_factor_1> 639 640 <enum 2 a_factor_2> 641 642 <enum 3 a_factor_3> 643 644 645 646 <legal all> 647 */ 648 #define HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_A_FACTOR_OFFSET 0x00000004 649 #define HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_A_FACTOR_LSB 13 650 #define HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_A_FACTOR_MASK 0x00006000 651 652 /* Description HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_PE_DISAMBIGUITY 653 654 the packet extension duration of the trigger-based PPDU 655 response with this bit indicating the PE-Disambiguity 656 657 <legal all> 658 */ 659 #define HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_PE_DISAMBIGUITY_OFFSET 0x00000004 660 #define HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_PE_DISAMBIGUITY_LSB 15 661 #define HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_PE_DISAMBIGUITY_MASK 0x00008000 662 663 /* Description HE_SIG_A_MU_DL_INFO_1_CRC 664 665 CRC for HE-SIG-A contents. 666 667 <legal all> 668 */ 669 #define HE_SIG_A_MU_DL_INFO_1_CRC_OFFSET 0x00000004 670 #define HE_SIG_A_MU_DL_INFO_1_CRC_LSB 16 671 #define HE_SIG_A_MU_DL_INFO_1_CRC_MASK 0x000f0000 672 673 /* Description HE_SIG_A_MU_DL_INFO_1_TAIL 674 675 <legal 0> 676 */ 677 #define HE_SIG_A_MU_DL_INFO_1_TAIL_OFFSET 0x00000004 678 #define HE_SIG_A_MU_DL_INFO_1_TAIL_LSB 20 679 #define HE_SIG_A_MU_DL_INFO_1_TAIL_MASK 0x03f00000 680 681 /* Description HE_SIG_A_MU_DL_INFO_1_RESERVED_1B 682 683 <legal 0> 684 */ 685 #define HE_SIG_A_MU_DL_INFO_1_RESERVED_1B_OFFSET 0x00000004 686 #define HE_SIG_A_MU_DL_INFO_1_RESERVED_1B_LSB 26 687 #define HE_SIG_A_MU_DL_INFO_1_RESERVED_1B_MASK 0xfc000000 688 689 690 #endif // _HE_SIG_A_MU_DL_INFO_H_ 691