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