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