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