1 /* 2 * Copyright (c) 2019 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 _VHT_SIG_A_INFO_H_ 25 #define _VHT_SIG_A_INFO_H_ 26 #if !defined(__ASSEMBLER__) 27 #endif 28 29 30 // ################ START SUMMARY ################# 31 // 32 // Dword Fields 33 // 0 bandwidth[1:0], vhta_reserved_0[2], stbc[3], group_id[9:4], n_sts[21:10], txop_ps_not_allowed[22], vhta_reserved_0b[23], reserved_0[31:24] 34 // 1 gi_setting[1:0], su_mu_coding[2], ldpc_extra_symbol[3], mcs[7:4], beamformed[8], vhta_reserved_1[9], crc[17:10], tail[23:18], reserved_1[31:24] 35 // 36 // ################ END SUMMARY ################# 37 38 #define NUM_OF_DWORDS_VHT_SIG_A_INFO 2 39 40 struct vht_sig_a_info { 41 uint32_t bandwidth : 2, //[1:0] 42 vhta_reserved_0 : 1, //[2] 43 stbc : 1, //[3] 44 group_id : 6, //[9:4] 45 n_sts : 12, //[21:10] 46 txop_ps_not_allowed : 1, //[22] 47 vhta_reserved_0b : 1, //[23] 48 reserved_0 : 8; //[31:24] 49 uint32_t gi_setting : 2, //[1:0] 50 su_mu_coding : 1, //[2] 51 ldpc_extra_symbol : 1, //[3] 52 mcs : 4, //[7:4] 53 beamformed : 1, //[8] 54 vhta_reserved_1 : 1, //[9] 55 crc : 8, //[17:10] 56 tail : 6, //[23:18] 57 reserved_1 : 8; //[31:24] 58 }; 59 60 /* 61 62 bandwidth 63 64 Packet bandwidth 65 66 67 68 <enum 0 20_MHZ_11AC> 69 70 <enum 1 40_MHZ_11AC> 71 72 <enum 2 80_MHZ_11AC> 73 74 <enum 3 160_MHZ_11AC> 75 76 77 78 <legal 0-3> 79 80 vhta_reserved_0 81 82 Reserved. Set to 1 by MAC, PHY should ignore 83 84 <legal 1> 85 86 stbc 87 88 Space time block coding: 89 90 <enum 0 stbc_disabled> Indicates STBC is disabled 91 92 <enum 1 stbc_enabled> Indicates STBC is enabled on 93 all streams 94 95 <legal 0-1> 96 97 group_id 98 99 In a SU VHT PPDU, if the PPDU carries MPDU(s) addressed 100 to an AP or to a mesh STA, the Group ID field is set to 0, 101 otherwise it is set to 63. In an NDP PPDU the Group ID is 102 set according to IEEE 802.11ac_D1.0 Section 9.30.6 103 (Transmission of a VHT NDP). For a MU-MIMO PPDU the Group ID 104 is set as in 802.11ac_D1.0 Section 22.3.11.3 (Group ID). 105 <legal all> 106 107 n_sts 108 109 For MU: 110 111 3 bits/user with maximum of 4 users (user u uses 112 113 vht_sig_a[0][10+3u] - vht_sig_a[0][12+3u]), u = 0, 1, 2, 114 3) 115 116 Set to 0 for 0 space time streams 117 118 Set to 1 for 1 space time stream 119 120 Set to 2 for 2 space time streams 121 122 Set to 3 for 3 space time streams 123 124 Set to 4 for 4 space time streams (not supported in Wifi 125 3.0) 126 127 Values 5-7 are reserved 128 129 In this field, references to user u should be 130 interpreted as MU user u. As described in the previous 131 chapter in this document (see chapter on User number), the 132 MU user value for a given client is defined for each MU 133 group that the client participates in. The MU user number is 134 not related to the internal user number that is used within 135 the BFer. 136 137 138 139 140 141 For SU: 142 143 vht_sig_a[0][12:10] 144 145 Set to 0 for 1 space time stream 146 147 Set to 1 for 2 space time streams 148 149 Set to 2 for 3 space time streams 150 151 Set to 3 for 4 space time streams 152 153 Set to 4 for 5 space time streams 154 155 Set to 5 for 6 space time streams 156 157 Set to 6 for 7 space time streams 158 159 Set to 7 for 8 space time streams 160 161 162 163 vht_sig_a[0][21:13] 164 165 Partial AID: 166 167 Set to the value of the TXVECTOR parameter PARTIAL_AID. 168 Partial AID provides an abbreviated indication of the 169 intended recipient(s) of the frame (see IEEE802.11ac_D1.0 170 Section 9.17a (Partial AID in VHT PPDUs)). 171 172 <legal all> 173 174 txop_ps_not_allowed 175 176 E_num 0 txop_ps_allowed Not supported: If set to by 177 VHT AP if it allows non-AP VHT STAs in TXOP power save mode 178 to enter Doze state during a TXOP 179 180 <enum 1 no_txop_ps_allowed> Otherwise 181 182 <legal 1> 183 184 vhta_reserved_0b 185 186 Reserved: Should be set to 1 by the MAC and ignored by 187 the PHY <legal 1> 188 189 reserved_0 190 191 This field is not part of HT-SIG: 192 193 Reserved: Should be set to 0 by the MAC and ignored by 194 the PHY <legal 0> 195 196 gi_setting 197 198 <enum 0 normal_gi> Indicates short guard interval 199 is not used in the data field 200 201 <enum 1 short_gi> Indicates short guard interval is 202 used in the data field 203 204 <enum 3 short_gi_ambiguity> Indicates short guard 205 interval is used in the data field and NSYM mod 10 = 9 206 207 NSYM is defined in IEEE802.11ac_D1.0 Section 22.4.3 208 (TXTIME and PSDU_LENGTH calculation). 209 210 <legal 0,1,3> 211 212 su_mu_coding 213 214 For an SU PPDU, B2 is set to 0 for BCC, 1 for LDPC For 215 an MU PPDU, if the MU[0] NSTS field is nonzero(#6773), then 216 B2 indicates the coding used for user 0; set to 0 for BCC 217 and 1 for LDPC. If the MU[0] NSTS field is 0, then this 218 field is reserved and set to 1 219 220 ldpc_extra_symbol 221 222 Set to 1 if the LDPC PPDU encoding process (if an SU 223 PPDU), or at least one LDPC user's PPDU encoding process (if 224 an MU PPDU), results in an extra OFDM symbol (or symbols) as 225 described in 22.3.10.5.4 (LDPC coding) and 22.3.10.5.5 226 (Encoding process for MU PPDUs). Set to 0 otherwise. 227 228 mcs 229 230 For SU: 231 232 Set to 0 for BPSK 1/2 233 234 Set to 1 for QPSK 1/2 235 236 Set to 2 for QPSK 3/4 237 238 Set to 3 for 16-QAM 1/2 239 240 Set to 4 for 16-QAM 3/4 241 242 Set to 5 for 64-QAM 2/3 243 244 Set to 6 for 64-QAM 3/4 245 246 Set to 7 for 64-QAM 5/6 247 248 Set to 8 for 256-QAM 3/4 249 250 Set to 9 for 256-QAM 5/6 251 252 For MU: 253 254 If NSTS for user 1 is non-zero, then vht_sig_a[1][4] 255 indicates coding for user 1: set to 0 for BCC, 1 for LDPC. 256 257 If NSTS for user 1 is set to 0, then vht_sig_a[1][4] is 258 reserved and set to 1. 259 260 If NSTS for user 2 is non-zero, then vht_sig_a[1][5] 261 indicates coding for user 2: set to 0 for BCC, 1 for LDPC. 262 263 If NSTS for user 2 is set to 0, then vht_sig_a[1][5] is 264 reserved and set to 1. 265 266 If NSTS for user 3 is non-zero, then vht_sig_a[1][6] 267 indicates coding for user 3: set to 0 for BCC, 1 for LDPC. 268 269 If NSTS for user 3 is set to 0, then vht_sig_a[1][6] is 270 reserved and set to 1. 271 272 vht_sig_a[1][7] is reserved and set to 1 273 274 <legal 0-15> 275 276 beamformed 277 278 For SU: 279 280 Set to 1 if a Beamforming steering matrix is applied to 281 the waveform in an SU transmission as described in 282 IEEE802.11ac_D1.0 Section 19.3.11.11.2 (Spatial mapping), 283 set to 0 otherwise. 284 285 For MU: 286 287 Reserved and set to 1 288 289 <legal 0-1> 290 291 vhta_reserved_1 292 293 Reserved and set to 1. <legal 1> 294 295 crc 296 297 CRC calculated as in IEEE802.11ac_D1.0 Section 298 19.3.9.4.4 (CRC calculation for HTSIG) with C7 in 299 vht_sig_a[1][10], etc. <legal all> 300 301 tail 302 303 Used to terminate the trellis of the convolutional 304 decoder. Set to 0. <legal 0> 305 306 reserved_1 307 308 This field is not part of HT-SIG: 309 310 Reserved: Should be set to 0 by the MAC and ignored by 311 the PHY <legal 0> 312 */ 313 314 315 /* Description VHT_SIG_A_INFO_0_BANDWIDTH 316 317 Packet bandwidth 318 319 320 321 <enum 0 20_MHZ_11AC> 322 323 <enum 1 40_MHZ_11AC> 324 325 <enum 2 80_MHZ_11AC> 326 327 <enum 3 160_MHZ_11AC> 328 329 330 331 <legal 0-3> 332 */ 333 #define VHT_SIG_A_INFO_0_BANDWIDTH_OFFSET 0x00000000 334 #define VHT_SIG_A_INFO_0_BANDWIDTH_LSB 0 335 #define VHT_SIG_A_INFO_0_BANDWIDTH_MASK 0x00000003 336 337 /* Description VHT_SIG_A_INFO_0_VHTA_RESERVED_0 338 339 Reserved. Set to 1 by MAC, PHY should ignore 340 341 <legal 1> 342 */ 343 #define VHT_SIG_A_INFO_0_VHTA_RESERVED_0_OFFSET 0x00000000 344 #define VHT_SIG_A_INFO_0_VHTA_RESERVED_0_LSB 2 345 #define VHT_SIG_A_INFO_0_VHTA_RESERVED_0_MASK 0x00000004 346 347 /* Description VHT_SIG_A_INFO_0_STBC 348 349 Space time block coding: 350 351 <enum 0 stbc_disabled> Indicates STBC is disabled 352 353 <enum 1 stbc_enabled> Indicates STBC is enabled on 354 all streams 355 356 <legal 0-1> 357 */ 358 #define VHT_SIG_A_INFO_0_STBC_OFFSET 0x00000000 359 #define VHT_SIG_A_INFO_0_STBC_LSB 3 360 #define VHT_SIG_A_INFO_0_STBC_MASK 0x00000008 361 362 /* Description VHT_SIG_A_INFO_0_GROUP_ID 363 364 In a SU VHT PPDU, if the PPDU carries MPDU(s) addressed 365 to an AP or to a mesh STA, the Group ID field is set to 0, 366 otherwise it is set to 63. In an NDP PPDU the Group ID is 367 set according to IEEE 802.11ac_D1.0 Section 9.30.6 368 (Transmission of a VHT NDP). For a MU-MIMO PPDU the Group ID 369 is set as in 802.11ac_D1.0 Section 22.3.11.3 (Group ID). 370 <legal all> 371 */ 372 #define VHT_SIG_A_INFO_0_GROUP_ID_OFFSET 0x00000000 373 #define VHT_SIG_A_INFO_0_GROUP_ID_LSB 4 374 #define VHT_SIG_A_INFO_0_GROUP_ID_MASK 0x000003f0 375 376 /* Description VHT_SIG_A_INFO_0_N_STS 377 378 For MU: 379 380 3 bits/user with maximum of 4 users (user u uses 381 382 vht_sig_a[0][10+3u] - vht_sig_a[0][12+3u]), u = 0, 1, 2, 383 3) 384 385 Set to 0 for 0 space time streams 386 387 Set to 1 for 1 space time stream 388 389 Set to 2 for 2 space time streams 390 391 Set to 3 for 3 space time streams 392 393 Set to 4 for 4 space time streams (not supported in Wifi 394 3.0) 395 396 Values 5-7 are reserved 397 398 In this field, references to user u should be 399 interpreted as MU user u. As described in the previous 400 chapter in this document (see chapter on User number), the 401 MU user value for a given client is defined for each MU 402 group that the client participates in. The MU user number is 403 not related to the internal user number that is used within 404 the BFer. 405 406 407 408 409 410 For SU: 411 412 vht_sig_a[0][12:10] 413 414 Set to 0 for 1 space time stream 415 416 Set to 1 for 2 space time streams 417 418 Set to 2 for 3 space time streams 419 420 Set to 3 for 4 space time streams 421 422 Set to 4 for 5 space time streams 423 424 Set to 5 for 6 space time streams 425 426 Set to 6 for 7 space time streams 427 428 Set to 7 for 8 space time streams 429 430 431 432 vht_sig_a[0][21:13] 433 434 Partial AID: 435 436 Set to the value of the TXVECTOR parameter PARTIAL_AID. 437 Partial AID provides an abbreviated indication of the 438 intended recipient(s) of the frame (see IEEE802.11ac_D1.0 439 Section 9.17a (Partial AID in VHT PPDUs)). 440 441 <legal all> 442 */ 443 #define VHT_SIG_A_INFO_0_N_STS_OFFSET 0x00000000 444 #define VHT_SIG_A_INFO_0_N_STS_LSB 10 445 #define VHT_SIG_A_INFO_0_N_STS_MASK 0x003ffc00 446 447 /* Description VHT_SIG_A_INFO_0_TXOP_PS_NOT_ALLOWED 448 449 E_num 0 txop_ps_allowed Not supported: If set to by 450 VHT AP if it allows non-AP VHT STAs in TXOP power save mode 451 to enter Doze state during a TXOP 452 453 <enum 1 no_txop_ps_allowed> Otherwise 454 455 <legal 1> 456 */ 457 #define VHT_SIG_A_INFO_0_TXOP_PS_NOT_ALLOWED_OFFSET 0x00000000 458 #define VHT_SIG_A_INFO_0_TXOP_PS_NOT_ALLOWED_LSB 22 459 #define VHT_SIG_A_INFO_0_TXOP_PS_NOT_ALLOWED_MASK 0x00400000 460 461 /* Description VHT_SIG_A_INFO_0_VHTA_RESERVED_0B 462 463 Reserved: Should be set to 1 by the MAC and ignored by 464 the PHY <legal 1> 465 */ 466 #define VHT_SIG_A_INFO_0_VHTA_RESERVED_0B_OFFSET 0x00000000 467 #define VHT_SIG_A_INFO_0_VHTA_RESERVED_0B_LSB 23 468 #define VHT_SIG_A_INFO_0_VHTA_RESERVED_0B_MASK 0x00800000 469 470 /* Description VHT_SIG_A_INFO_0_RESERVED_0 471 472 This field is not part of HT-SIG: 473 474 Reserved: Should be set to 0 by the MAC and ignored by 475 the PHY <legal 0> 476 */ 477 #define VHT_SIG_A_INFO_0_RESERVED_0_OFFSET 0x00000000 478 #define VHT_SIG_A_INFO_0_RESERVED_0_LSB 24 479 #define VHT_SIG_A_INFO_0_RESERVED_0_MASK 0xff000000 480 481 /* Description VHT_SIG_A_INFO_1_GI_SETTING 482 483 <enum 0 normal_gi> Indicates short guard interval 484 is not used in the data field 485 486 <enum 1 short_gi> Indicates short guard interval is 487 used in the data field 488 489 <enum 3 short_gi_ambiguity> Indicates short guard 490 interval is used in the data field and NSYM mod 10 = 9 491 492 NSYM is defined in IEEE802.11ac_D1.0 Section 22.4.3 493 (TXTIME and PSDU_LENGTH calculation). 494 495 <legal 0,1,3> 496 */ 497 #define VHT_SIG_A_INFO_1_GI_SETTING_OFFSET 0x00000004 498 #define VHT_SIG_A_INFO_1_GI_SETTING_LSB 0 499 #define VHT_SIG_A_INFO_1_GI_SETTING_MASK 0x00000003 500 501 /* Description VHT_SIG_A_INFO_1_SU_MU_CODING 502 503 For an SU PPDU, B2 is set to 0 for BCC, 1 for LDPC For 504 an MU PPDU, if the MU[0] NSTS field is nonzero(#6773), then 505 B2 indicates the coding used for user 0; set to 0 for BCC 506 and 1 for LDPC. If the MU[0] NSTS field is 0, then this 507 field is reserved and set to 1 508 */ 509 #define VHT_SIG_A_INFO_1_SU_MU_CODING_OFFSET 0x00000004 510 #define VHT_SIG_A_INFO_1_SU_MU_CODING_LSB 2 511 #define VHT_SIG_A_INFO_1_SU_MU_CODING_MASK 0x00000004 512 513 /* Description VHT_SIG_A_INFO_1_LDPC_EXTRA_SYMBOL 514 515 Set to 1 if the LDPC PPDU encoding process (if an SU 516 PPDU), or at least one LDPC user's PPDU encoding process (if 517 an MU PPDU), results in an extra OFDM symbol (or symbols) as 518 described in 22.3.10.5.4 (LDPC coding) and 22.3.10.5.5 519 (Encoding process for MU PPDUs). Set to 0 otherwise. 520 */ 521 #define VHT_SIG_A_INFO_1_LDPC_EXTRA_SYMBOL_OFFSET 0x00000004 522 #define VHT_SIG_A_INFO_1_LDPC_EXTRA_SYMBOL_LSB 3 523 #define VHT_SIG_A_INFO_1_LDPC_EXTRA_SYMBOL_MASK 0x00000008 524 525 /* Description VHT_SIG_A_INFO_1_MCS 526 527 For SU: 528 529 Set to 0 for BPSK 1/2 530 531 Set to 1 for QPSK 1/2 532 533 Set to 2 for QPSK 3/4 534 535 Set to 3 for 16-QAM 1/2 536 537 Set to 4 for 16-QAM 3/4 538 539 Set to 5 for 64-QAM 2/3 540 541 Set to 6 for 64-QAM 3/4 542 543 Set to 7 for 64-QAM 5/6 544 545 Set to 8 for 256-QAM 3/4 546 547 Set to 9 for 256-QAM 5/6 548 549 For MU: 550 551 If NSTS for user 1 is non-zero, then vht_sig_a[1][4] 552 indicates coding for user 1: set to 0 for BCC, 1 for LDPC. 553 554 If NSTS for user 1 is set to 0, then vht_sig_a[1][4] is 555 reserved and set to 1. 556 557 If NSTS for user 2 is non-zero, then vht_sig_a[1][5] 558 indicates coding for user 2: set to 0 for BCC, 1 for LDPC. 559 560 If NSTS for user 2 is set to 0, then vht_sig_a[1][5] is 561 reserved and set to 1. 562 563 If NSTS for user 3 is non-zero, then vht_sig_a[1][6] 564 indicates coding for user 3: set to 0 for BCC, 1 for LDPC. 565 566 If NSTS for user 3 is set to 0, then vht_sig_a[1][6] is 567 reserved and set to 1. 568 569 vht_sig_a[1][7] is reserved and set to 1 570 571 <legal 0-15> 572 */ 573 #define VHT_SIG_A_INFO_1_MCS_OFFSET 0x00000004 574 #define VHT_SIG_A_INFO_1_MCS_LSB 4 575 #define VHT_SIG_A_INFO_1_MCS_MASK 0x000000f0 576 577 /* Description VHT_SIG_A_INFO_1_BEAMFORMED 578 579 For SU: 580 581 Set to 1 if a Beamforming steering matrix is applied to 582 the waveform in an SU transmission as described in 583 IEEE802.11ac_D1.0 Section 19.3.11.11.2 (Spatial mapping), 584 set to 0 otherwise. 585 586 For MU: 587 588 Reserved and set to 1 589 590 <legal 0-1> 591 */ 592 #define VHT_SIG_A_INFO_1_BEAMFORMED_OFFSET 0x00000004 593 #define VHT_SIG_A_INFO_1_BEAMFORMED_LSB 8 594 #define VHT_SIG_A_INFO_1_BEAMFORMED_MASK 0x00000100 595 596 /* Description VHT_SIG_A_INFO_1_VHTA_RESERVED_1 597 598 Reserved and set to 1. <legal 1> 599 */ 600 #define VHT_SIG_A_INFO_1_VHTA_RESERVED_1_OFFSET 0x00000004 601 #define VHT_SIG_A_INFO_1_VHTA_RESERVED_1_LSB 9 602 #define VHT_SIG_A_INFO_1_VHTA_RESERVED_1_MASK 0x00000200 603 604 /* Description VHT_SIG_A_INFO_1_CRC 605 606 CRC calculated as in IEEE802.11ac_D1.0 Section 607 19.3.9.4.4 (CRC calculation for HTSIG) with C7 in 608 vht_sig_a[1][10], etc. <legal all> 609 */ 610 #define VHT_SIG_A_INFO_1_CRC_OFFSET 0x00000004 611 #define VHT_SIG_A_INFO_1_CRC_LSB 10 612 #define VHT_SIG_A_INFO_1_CRC_MASK 0x0003fc00 613 614 /* Description VHT_SIG_A_INFO_1_TAIL 615 616 Used to terminate the trellis of the convolutional 617 decoder. Set to 0. <legal 0> 618 */ 619 #define VHT_SIG_A_INFO_1_TAIL_OFFSET 0x00000004 620 #define VHT_SIG_A_INFO_1_TAIL_LSB 18 621 #define VHT_SIG_A_INFO_1_TAIL_MASK 0x00fc0000 622 623 /* Description VHT_SIG_A_INFO_1_RESERVED_1 624 625 This field is not part of HT-SIG: 626 627 Reserved: Should be set to 0 by the MAC and ignored by 628 the PHY <legal 0> 629 */ 630 #define VHT_SIG_A_INFO_1_RESERVED_1_OFFSET 0x00000004 631 #define VHT_SIG_A_INFO_1_RESERVED_1_LSB 24 632 #define VHT_SIG_A_INFO_1_RESERVED_1_MASK 0xff000000 633 634 635 #endif // _VHT_SIG_A_INFO_H_ 636