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 214 215 <legal all> 216 217 doppler_indication 218 219 0: No Doppler support 220 221 1: Doppler support 222 223 <legal all> 224 225 reserved_0a 226 227 <legal 0> 228 229 txop_duration 230 231 Indicates the remaining time in the current TXOP 232 233 234 235 Field Used by MAC HW 236 237 <legal all> 238 239 reserved_1a 240 241 Note: spec indicates this shall be set to 1 242 243 <legal 1> 244 245 num_ltf_symbols 246 247 Indicates the number of HE-LTF symbols 248 249 250 251 0: 1 LTF 252 253 1: 2 LTFs 254 255 2: 4 LTFs 256 257 3: 6 LTFs 258 259 4: 8 LTFs 260 261 262 263 <legal all> 264 265 ldpc_extra_symbol 266 267 If LDPC, 268 269 0: LDPC extra symbol not present 270 271 1: LDPC extra symbol present 272 273 Else 274 275 Set to 1 276 277 <legal all> 278 279 stbc 280 281 Indicates whether STBC is applied 282 283 0: No STBC 284 285 1: STBC 286 287 <legal all> 288 289 packet_extension_a_factor 290 291 the packet extension duration of the trigger-based PPDU 292 response with these two bits indicating the a-factor 293 294 295 296 <enum 0 a_factor_4> 297 298 <enum 1 a_factor_1> 299 300 <enum 2 a_factor_2> 301 302 <enum 3 a_factor_3> 303 304 305 306 <legal all> 307 308 packet_extension_pe_disambiguity 309 310 the packet extension duration of the trigger-based PPDU 311 response with this bit indicating the PE-Disambiguity 312 313 <legal all> 314 315 crc 316 317 CRC for HE-SIG-A contents. 318 319 <legal all> 320 321 tail 322 323 <legal 0> 324 325 reserved_1b 326 327 <legal 0> 328 */ 329 330 331 /* Description HE_SIG_A_MU_DL_INFO_0_DL_UL_FLAG 332 333 Differentiates between DL and UL transmission 334 335 336 337 <enum 0 DL_UL_FLAG_IS_DL_OR_TDLS> 338 339 <enum 1 DL_UL_FLAG_IS_UL> 340 341 NOTE: This is unsupported for HE MU format (including 342 MU_SU) Tx in Napier and Hastings80. 343 344 <legal all> 345 */ 346 #define HE_SIG_A_MU_DL_INFO_0_DL_UL_FLAG_OFFSET 0x00000000 347 #define HE_SIG_A_MU_DL_INFO_0_DL_UL_FLAG_LSB 0 348 #define HE_SIG_A_MU_DL_INFO_0_DL_UL_FLAG_MASK 0x00000001 349 350 /* Description HE_SIG_A_MU_DL_INFO_0_MCS_OF_SIG_B 351 352 Indicates the MCS of HE-SIG-B 353 354 <legal 0-5> 355 */ 356 #define HE_SIG_A_MU_DL_INFO_0_MCS_OF_SIG_B_OFFSET 0x00000000 357 #define HE_SIG_A_MU_DL_INFO_0_MCS_OF_SIG_B_LSB 1 358 #define HE_SIG_A_MU_DL_INFO_0_MCS_OF_SIG_B_MASK 0x0000000e 359 360 /* Description HE_SIG_A_MU_DL_INFO_0_DCM_OF_SIG_B 361 362 Indicates whether dual sub-carrier modulation is applied 363 to HE-SIG-B 364 365 366 367 0: No DCM for HE_SIG_B 368 369 1: DCM for HE_SIG_B 370 371 <legal all> 372 */ 373 #define HE_SIG_A_MU_DL_INFO_0_DCM_OF_SIG_B_OFFSET 0x00000000 374 #define HE_SIG_A_MU_DL_INFO_0_DCM_OF_SIG_B_LSB 4 375 #define HE_SIG_A_MU_DL_INFO_0_DCM_OF_SIG_B_MASK 0x00000010 376 377 /* Description HE_SIG_A_MU_DL_INFO_0_BSS_COLOR_ID 378 379 BSS color ID 380 381 382 383 Field Used by MAC HW 384 385 <legal all> 386 */ 387 #define HE_SIG_A_MU_DL_INFO_0_BSS_COLOR_ID_OFFSET 0x00000000 388 #define HE_SIG_A_MU_DL_INFO_0_BSS_COLOR_ID_LSB 5 389 #define HE_SIG_A_MU_DL_INFO_0_BSS_COLOR_ID_MASK 0x000007e0 390 391 /* Description HE_SIG_A_MU_DL_INFO_0_SPATIAL_REUSE 392 393 Spatial reuse 394 395 396 397 For 20MHz one SR field corresponding to entire 20MHz 398 (other 3 fields indicate identical values) 399 400 For 40MHz two SR fields for each 20MHz (other 2 fields 401 indicate identical values) 402 403 For 80MHz four SR fields for each 20MHz 404 405 For 160MHz four SR fields for each 40MHz 406 407 <legal all> 408 */ 409 #define HE_SIG_A_MU_DL_INFO_0_SPATIAL_REUSE_OFFSET 0x00000000 410 #define HE_SIG_A_MU_DL_INFO_0_SPATIAL_REUSE_LSB 11 411 #define HE_SIG_A_MU_DL_INFO_0_SPATIAL_REUSE_MASK 0x00007800 412 413 /* Description HE_SIG_A_MU_DL_INFO_0_TRANSMIT_BW 414 415 Bandwidth of the PPDU. 416 417 418 419 <enum 0 HE_SIG_A_MU_DL_BW20> 20 Mhz 420 421 <enum 1 HE_SIG_A_MU_DL_BW40> 40 Mhz 422 423 <enum 2 HE_SIG_A_MU_DL_BW80> 80 MHz non-preamble 424 puncturing mode 425 426 <enum 3 HE_SIG_A_MU_DL_BW160> 160 MHz and 80+80 MHz 427 non-preamble puncturing mode 428 429 <enum 4 HE_SIG_A_MU_DL_BW80_SEC_20_PUNC> for preamble 430 puncturing in 80 MHz, where in the preamble only the 431 secondary 20 MHz is punctured 432 433 <enum 5 HE_SIG_A_MU_DL_BW80_20_PUNC_IN_SEC_40> for 434 preamble puncturing in 80 MHz, where in the preamble only 435 one of the two 20 MHz sub-channels in secondary 40 MHz is 436 punctured. 437 438 <enum 6 HE_SIG_A_MU_DL_BW160_SEC_20_PUNC> for preamble 439 puncturing in 160 MHz or 80+80 MHz, where in the primary 80 440 MHz of the preamble only the secondary 20 MHz is punctured. 441 442 <enum 7 HE_SIG_A_MU_DL_BW160_SEC_40_80_PUNC> for 443 preamble puncturing in 160 MHz or 80+80 MHz, where in the 444 primary 80 MHz of the preamble the primary 40 MHz is 445 present. 446 447 448 449 On RX side, Field Used by MAC HW 450 451 <legal 0-7> 452 */ 453 #define HE_SIG_A_MU_DL_INFO_0_TRANSMIT_BW_OFFSET 0x00000000 454 #define HE_SIG_A_MU_DL_INFO_0_TRANSMIT_BW_LSB 15 455 #define HE_SIG_A_MU_DL_INFO_0_TRANSMIT_BW_MASK 0x00038000 456 457 /* Description HE_SIG_A_MU_DL_INFO_0_NUM_SIG_B_SYMBOLS 458 459 Number of symbols 460 461 462 463 For OFDMA, the actual number of symbols is 1 larger then 464 indicated in this field. 465 466 467 468 For MU-MIMO this is equal to the number of users - 1: 469 the following encoding is used: 470 471 1 => 2 users 472 473 2 => 3 users 474 475 Etc. 476 477 478 479 <legal all> 480 */ 481 #define HE_SIG_A_MU_DL_INFO_0_NUM_SIG_B_SYMBOLS_OFFSET 0x00000000 482 #define HE_SIG_A_MU_DL_INFO_0_NUM_SIG_B_SYMBOLS_LSB 18 483 #define HE_SIG_A_MU_DL_INFO_0_NUM_SIG_B_SYMBOLS_MASK 0x003c0000 484 485 /* Description HE_SIG_A_MU_DL_INFO_0_COMP_MODE_SIG_B 486 487 Indicates the compression mode of HE-SIG-B 488 489 490 491 0: Regular [uncomp mode] 492 493 1: compressed mode (full-BW MU-MIMO only) 494 495 <legal all> 496 */ 497 #define HE_SIG_A_MU_DL_INFO_0_COMP_MODE_SIG_B_OFFSET 0x00000000 498 #define HE_SIG_A_MU_DL_INFO_0_COMP_MODE_SIG_B_LSB 22 499 #define HE_SIG_A_MU_DL_INFO_0_COMP_MODE_SIG_B_MASK 0x00400000 500 501 /* Description HE_SIG_A_MU_DL_INFO_0_CP_LTF_SIZE 502 503 Indicates the CP and HE-LTF type 504 505 506 507 <enum 0 MU_FourX_LTF_0_8CP> 4xLTF + 0.8 us CP 508 509 <enum 1 MU_TwoX_LTF_0_8CP> 2x LTF + 0.8 µs CP 510 511 <enum 2 MU_TwoX_LTF_1_6CP> 2x LTF + 1.6 µs CP 512 513 <enum 3 MU_FourX_LTF_3_2CP> 4x LTF + 3.2 µs CP 514 515 516 517 518 519 <legal all> 520 */ 521 #define HE_SIG_A_MU_DL_INFO_0_CP_LTF_SIZE_OFFSET 0x00000000 522 #define HE_SIG_A_MU_DL_INFO_0_CP_LTF_SIZE_LSB 23 523 #define HE_SIG_A_MU_DL_INFO_0_CP_LTF_SIZE_MASK 0x01800000 524 525 /* Description HE_SIG_A_MU_DL_INFO_0_DOPPLER_INDICATION 526 527 0: No Doppler support 528 529 1: Doppler support 530 531 <legal all> 532 */ 533 #define HE_SIG_A_MU_DL_INFO_0_DOPPLER_INDICATION_OFFSET 0x00000000 534 #define HE_SIG_A_MU_DL_INFO_0_DOPPLER_INDICATION_LSB 25 535 #define HE_SIG_A_MU_DL_INFO_0_DOPPLER_INDICATION_MASK 0x02000000 536 537 /* Description HE_SIG_A_MU_DL_INFO_0_RESERVED_0A 538 539 <legal 0> 540 */ 541 #define HE_SIG_A_MU_DL_INFO_0_RESERVED_0A_OFFSET 0x00000000 542 #define HE_SIG_A_MU_DL_INFO_0_RESERVED_0A_LSB 26 543 #define HE_SIG_A_MU_DL_INFO_0_RESERVED_0A_MASK 0xfc000000 544 545 /* Description HE_SIG_A_MU_DL_INFO_1_TXOP_DURATION 546 547 Indicates the remaining time in the current TXOP 548 549 550 551 Field Used by MAC HW 552 553 <legal all> 554 */ 555 #define HE_SIG_A_MU_DL_INFO_1_TXOP_DURATION_OFFSET 0x00000004 556 #define HE_SIG_A_MU_DL_INFO_1_TXOP_DURATION_LSB 0 557 #define HE_SIG_A_MU_DL_INFO_1_TXOP_DURATION_MASK 0x0000007f 558 559 /* Description HE_SIG_A_MU_DL_INFO_1_RESERVED_1A 560 561 Note: spec indicates this shall be set to 1 562 563 <legal 1> 564 */ 565 #define HE_SIG_A_MU_DL_INFO_1_RESERVED_1A_OFFSET 0x00000004 566 #define HE_SIG_A_MU_DL_INFO_1_RESERVED_1A_LSB 7 567 #define HE_SIG_A_MU_DL_INFO_1_RESERVED_1A_MASK 0x00000080 568 569 /* Description HE_SIG_A_MU_DL_INFO_1_NUM_LTF_SYMBOLS 570 571 Indicates the number of HE-LTF symbols 572 573 574 575 0: 1 LTF 576 577 1: 2 LTFs 578 579 2: 4 LTFs 580 581 3: 6 LTFs 582 583 4: 8 LTFs 584 585 586 587 <legal all> 588 */ 589 #define HE_SIG_A_MU_DL_INFO_1_NUM_LTF_SYMBOLS_OFFSET 0x00000004 590 #define HE_SIG_A_MU_DL_INFO_1_NUM_LTF_SYMBOLS_LSB 8 591 #define HE_SIG_A_MU_DL_INFO_1_NUM_LTF_SYMBOLS_MASK 0x00000700 592 593 /* Description HE_SIG_A_MU_DL_INFO_1_LDPC_EXTRA_SYMBOL 594 595 If LDPC, 596 597 0: LDPC extra symbol not present 598 599 1: LDPC extra symbol present 600 601 Else 602 603 Set to 1 604 605 <legal all> 606 */ 607 #define HE_SIG_A_MU_DL_INFO_1_LDPC_EXTRA_SYMBOL_OFFSET 0x00000004 608 #define HE_SIG_A_MU_DL_INFO_1_LDPC_EXTRA_SYMBOL_LSB 11 609 #define HE_SIG_A_MU_DL_INFO_1_LDPC_EXTRA_SYMBOL_MASK 0x00000800 610 611 /* Description HE_SIG_A_MU_DL_INFO_1_STBC 612 613 Indicates whether STBC is applied 614 615 0: No STBC 616 617 1: STBC 618 619 <legal all> 620 */ 621 #define HE_SIG_A_MU_DL_INFO_1_STBC_OFFSET 0x00000004 622 #define HE_SIG_A_MU_DL_INFO_1_STBC_LSB 12 623 #define HE_SIG_A_MU_DL_INFO_1_STBC_MASK 0x00001000 624 625 /* Description HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_A_FACTOR 626 627 the packet extension duration of the trigger-based PPDU 628 response with these two bits indicating the a-factor 629 630 631 632 <enum 0 a_factor_4> 633 634 <enum 1 a_factor_1> 635 636 <enum 2 a_factor_2> 637 638 <enum 3 a_factor_3> 639 640 641 642 <legal all> 643 */ 644 #define HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_A_FACTOR_OFFSET 0x00000004 645 #define HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_A_FACTOR_LSB 13 646 #define HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_A_FACTOR_MASK 0x00006000 647 648 /* Description HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_PE_DISAMBIGUITY 649 650 the packet extension duration of the trigger-based PPDU 651 response with this bit indicating the PE-Disambiguity 652 653 <legal all> 654 */ 655 #define HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_PE_DISAMBIGUITY_OFFSET 0x00000004 656 #define HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_PE_DISAMBIGUITY_LSB 15 657 #define HE_SIG_A_MU_DL_INFO_1_PACKET_EXTENSION_PE_DISAMBIGUITY_MASK 0x00008000 658 659 /* Description HE_SIG_A_MU_DL_INFO_1_CRC 660 661 CRC for HE-SIG-A contents. 662 663 <legal all> 664 */ 665 #define HE_SIG_A_MU_DL_INFO_1_CRC_OFFSET 0x00000004 666 #define HE_SIG_A_MU_DL_INFO_1_CRC_LSB 16 667 #define HE_SIG_A_MU_DL_INFO_1_CRC_MASK 0x000f0000 668 669 /* Description HE_SIG_A_MU_DL_INFO_1_TAIL 670 671 <legal 0> 672 */ 673 #define HE_SIG_A_MU_DL_INFO_1_TAIL_OFFSET 0x00000004 674 #define HE_SIG_A_MU_DL_INFO_1_TAIL_LSB 20 675 #define HE_SIG_A_MU_DL_INFO_1_TAIL_MASK 0x03f00000 676 677 /* Description HE_SIG_A_MU_DL_INFO_1_RESERVED_1B 678 679 <legal 0> 680 */ 681 #define HE_SIG_A_MU_DL_INFO_1_RESERVED_1B_OFFSET 0x00000004 682 #define HE_SIG_A_MU_DL_INFO_1_RESERVED_1B_LSB 26 683 #define HE_SIG_A_MU_DL_INFO_1_RESERVED_1B_MASK 0xfc000000 684 685 686 #endif // _HE_SIG_A_MU_DL_INFO_H_ 687