1 /* 2 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. 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 _VHT_SIG_A_INFO_H_ 18 #define _VHT_SIG_A_INFO_H_ 19 #if !defined(__ASSEMBLER__) 20 #endif 21 22 #define NUM_OF_DWORDS_VHT_SIG_A_INFO 2 23 24 25 struct vht_sig_a_info { 26 #ifndef WIFI_BIT_ORDER_BIG_ENDIAN 27 uint32_t bandwidth : 2, // [1:0] 28 vhta_reserved_0 : 1, // [2:2] 29 stbc : 1, // [3:3] 30 group_id : 6, // [9:4] 31 n_sts : 12, // [21:10] 32 txop_ps_not_allowed : 1, // [22:22] 33 vhta_reserved_0b : 1, // [23:23] 34 reserved_0 : 8; // [31:24] 35 uint32_t gi_setting : 2, // [1:0] 36 su_mu_coding : 1, // [2:2] 37 ldpc_extra_symbol : 1, // [3:3] 38 mcs : 4, // [7:4] 39 beamformed : 1, // [8:8] 40 vhta_reserved_1 : 1, // [9:9] 41 crc : 8, // [17:10] 42 tail : 6, // [23:18] 43 reserved_1 : 7, // [30:24] 44 rx_integrity_check_passed : 1; // [31:31] 45 #else 46 uint32_t reserved_0 : 8, // [31:24] 47 vhta_reserved_0b : 1, // [23:23] 48 txop_ps_not_allowed : 1, // [22:22] 49 n_sts : 12, // [21:10] 50 group_id : 6, // [9:4] 51 stbc : 1, // [3:3] 52 vhta_reserved_0 : 1, // [2:2] 53 bandwidth : 2; // [1:0] 54 uint32_t rx_integrity_check_passed : 1, // [31:31] 55 reserved_1 : 7, // [30:24] 56 tail : 6, // [23:18] 57 crc : 8, // [17:10] 58 vhta_reserved_1 : 1, // [9:9] 59 beamformed : 1, // [8:8] 60 mcs : 4, // [7:4] 61 ldpc_extra_symbol : 1, // [3:3] 62 su_mu_coding : 1, // [2:2] 63 gi_setting : 2; // [1:0] 64 #endif 65 }; 66 67 68 /* Description BANDWIDTH 69 70 Packet bandwidth 71 72 <enum 0 20_MHZ_11AC> 73 <enum 1 40_MHZ_11AC> 74 <enum 2 80_MHZ_11AC> 75 <enum 3 160_MHZ_11AC> 76 77 <legal 0-3> 78 */ 79 80 #define VHT_SIG_A_INFO_BANDWIDTH_OFFSET 0x00000000 81 #define VHT_SIG_A_INFO_BANDWIDTH_LSB 0 82 #define VHT_SIG_A_INFO_BANDWIDTH_MSB 1 83 #define VHT_SIG_A_INFO_BANDWIDTH_MASK 0x00000003 84 85 86 /* Description VHTA_RESERVED_0 87 88 Reserved. Set to 1 by MAC, PHY should ignore 89 <legal 1> 90 */ 91 92 #define VHT_SIG_A_INFO_VHTA_RESERVED_0_OFFSET 0x00000000 93 #define VHT_SIG_A_INFO_VHTA_RESERVED_0_LSB 2 94 #define VHT_SIG_A_INFO_VHTA_RESERVED_0_MSB 2 95 #define VHT_SIG_A_INFO_VHTA_RESERVED_0_MASK 0x00000004 96 97 98 /* Description STBC 99 100 Space time block coding: 101 <enum 0 stbc_disabled> Indicates STBC is disabled 102 <enum 1 stbc_enabled> Indicates STBC is enabled on 103 all streams 104 <legal 0-1> 105 */ 106 107 #define VHT_SIG_A_INFO_STBC_OFFSET 0x00000000 108 #define VHT_SIG_A_INFO_STBC_LSB 3 109 #define VHT_SIG_A_INFO_STBC_MSB 3 110 #define VHT_SIG_A_INFO_STBC_MASK 0x00000008 111 112 113 /* Description GROUP_ID 114 115 In a SU VHT PPDU, if the PPDU carries MPDU(s) addressed 116 to an AP or to a mesh STA, the Group ID field is set to 117 0, otherwise it is set to 63. In an NDP PPDU the Group 118 ID is set according to IEEE 802.11ac_D1.0 Section 9.30.6 119 (Transmission of a VHT NDP). For a MU-MIMO PPDU the Group 120 ID is set as in 802.11ac_D1.0 Section 22.3.11.3 (Group 121 ID). <legal all> 122 */ 123 124 #define VHT_SIG_A_INFO_GROUP_ID_OFFSET 0x00000000 125 #define VHT_SIG_A_INFO_GROUP_ID_LSB 4 126 #define VHT_SIG_A_INFO_GROUP_ID_MSB 9 127 #define VHT_SIG_A_INFO_GROUP_ID_MASK 0x000003f0 128 129 130 /* Description N_STS 131 132 For MU: 133 3 bits/user with maximum of 4 users (user u uses 134 vht_sig_a[0][10+3u] - vht_sig_a[0][12+3u]), u = 0, 1, 2, 135 3) 136 Set to 0 for 0 space time streams 137 Set to 1 for 1 space time stream 138 Set to 2 for 2 space time streams 139 Set to 3 for 3 space time streams 140 Set to 4 for 4 space time streams (not supported in Wifi 141 3.0) 142 Values 5-7 are reserved 143 In this field, references to user "u" should be interpreted 144 as MU user "u". As described in the previous chapter in 145 this document (see chapter on User number), the MU user 146 value for a given client is defined for each MU group that 147 the client participates in. The MU user number is not related 148 to the internal user number that is used within the BFer. 149 150 151 152 For SU: 153 vht_sig_a[0][12:10] 154 Set to 0 for 1 space time stream 155 Set to 1 for 2 space time streams 156 Set to 2 for 3 space time streams 157 Set to 3 for 4 space time streams 158 Set to 4 for 5 space time streams 159 Set to 5 for 6 space time streams 160 Set to 6 for 7 space time streams 161 Set to 7 for 8 space time streams 162 163 vht_sig_a[0][21:13] 164 Partial AID: 165 Set to the value of the TXVECTOR parameter PARTIAL_AID. 166 Partial AID provides an abbreviated indication of the intended 167 recipient(s) of the frame (see IEEE802.11ac_D1.0 Section 168 9.17a (Partial AID in VHT PPDUs)). 169 <legal all> 170 */ 171 172 #define VHT_SIG_A_INFO_N_STS_OFFSET 0x00000000 173 #define VHT_SIG_A_INFO_N_STS_LSB 10 174 #define VHT_SIG_A_INFO_N_STS_MSB 21 175 #define VHT_SIG_A_INFO_N_STS_MASK 0x003ffc00 176 177 178 /* Description TXOP_PS_NOT_ALLOWED 179 180 E_num 0 txop_ps_allowed Not supported: If set to by 181 VHT AP if it allows non-AP VHT STAs in TXOP power save 182 mode to enter Doze state during a TXOP 183 <enum 1 no_txop_ps_allowed> Otherwise 184 <legal 1> 185 */ 186 187 #define VHT_SIG_A_INFO_TXOP_PS_NOT_ALLOWED_OFFSET 0x00000000 188 #define VHT_SIG_A_INFO_TXOP_PS_NOT_ALLOWED_LSB 22 189 #define VHT_SIG_A_INFO_TXOP_PS_NOT_ALLOWED_MSB 22 190 #define VHT_SIG_A_INFO_TXOP_PS_NOT_ALLOWED_MASK 0x00400000 191 192 193 /* Description VHTA_RESERVED_0B 194 195 Reserved: Should be set to 1 by the MAC and ignored by the 196 PHY <legal 1> 197 */ 198 199 #define VHT_SIG_A_INFO_VHTA_RESERVED_0B_OFFSET 0x00000000 200 #define VHT_SIG_A_INFO_VHTA_RESERVED_0B_LSB 23 201 #define VHT_SIG_A_INFO_VHTA_RESERVED_0B_MSB 23 202 #define VHT_SIG_A_INFO_VHTA_RESERVED_0B_MASK 0x00800000 203 204 205 /* Description RESERVED_0 206 207 This field is not part of HT-SIG: 208 Reserved: Should be set to 0 by the MAC and ignored by the 209 PHY <legal 0> 210 */ 211 212 #define VHT_SIG_A_INFO_RESERVED_0_OFFSET 0x00000000 213 #define VHT_SIG_A_INFO_RESERVED_0_LSB 24 214 #define VHT_SIG_A_INFO_RESERVED_0_MSB 31 215 #define VHT_SIG_A_INFO_RESERVED_0_MASK 0xff000000 216 217 218 /* Description GI_SETTING 219 220 <enum 0 normal_gi> Indicates short guard interval is 221 not used in the data field 222 <enum 1 short_gi> Indicates short guard interval is 223 used in the data field 224 <enum 3 short_gi_ambiguity> Indicates short guard interval 225 is used in the data field and NSYM mod 10 = 9 226 NSYM is defined in IEEE802.11ac_D1.0 Section 22.4.3 (TXTIME 227 and PSDU_LENGTH calculation). 228 <legal 0,1,3> 229 */ 230 231 #define VHT_SIG_A_INFO_GI_SETTING_OFFSET 0x00000004 232 #define VHT_SIG_A_INFO_GI_SETTING_LSB 0 233 #define VHT_SIG_A_INFO_GI_SETTING_MSB 1 234 #define VHT_SIG_A_INFO_GI_SETTING_MASK 0x00000003 235 236 237 /* Description SU_MU_CODING 238 239 For an SU PPDU, B2 is set to 0 for BCC, 1 for LDPC For an 240 MU PPDU, if the MU[0] NSTS field is nonzero(#6773), then 241 B2 indicates the coding used for user 0; set to 0 for BCC 242 and 1 for LDPC. If the MU[0] NSTS field is 0, then this 243 field is reserved and set to 1 244 */ 245 246 #define VHT_SIG_A_INFO_SU_MU_CODING_OFFSET 0x00000004 247 #define VHT_SIG_A_INFO_SU_MU_CODING_LSB 2 248 #define VHT_SIG_A_INFO_SU_MU_CODING_MSB 2 249 #define VHT_SIG_A_INFO_SU_MU_CODING_MASK 0x00000004 250 251 252 /* Description LDPC_EXTRA_SYMBOL 253 254 Set to 1 if the LDPC PPDU encoding process (if an SU PPDU), 255 or at least one LDPC user's PPDU encoding process (if an 256 MU PPDU), results in an extra OFDM symbol (or symbols) 257 as described in 22.3.10.5.4 (LDPC coding) and 22.3.10.5.5 258 (Encoding process for MU PPDUs). Set to 0 otherwise. 259 */ 260 261 #define VHT_SIG_A_INFO_LDPC_EXTRA_SYMBOL_OFFSET 0x00000004 262 #define VHT_SIG_A_INFO_LDPC_EXTRA_SYMBOL_LSB 3 263 #define VHT_SIG_A_INFO_LDPC_EXTRA_SYMBOL_MSB 3 264 #define VHT_SIG_A_INFO_LDPC_EXTRA_SYMBOL_MASK 0x00000008 265 266 267 /* Description MCS 268 269 For SU: 270 Set to 0 for BPSK 1/2 271 Set to 1 for QPSK 1/2 272 Set to 2 for QPSK 3/4 273 Set to 3 for 16-QAM 1/2 274 Set to 4 for 16-QAM 3/4 275 Set to 5 for 64-QAM 2/3 276 Set to 6 for 64-QAM 3/4 277 Set to 7 for 64-QAM 5/6 278 Set to 8 for 256-QAM 3/4 279 Set to 9 for 256-QAM 5/6 280 For MU: 281 If NSTS for user 1 is non-zero, then vht_sig_a[1][4] indicates 282 coding for user 1: set to 0 for BCC, 1 for LDPC. 283 If NSTS for user 1 is set to 0, then vht_sig_a[1][4] is 284 reserved and set to 1. 285 If NSTS for user 2 is non-zero, then vht_sig_a[1][5] indicates 286 coding for user 2: set to 0 for BCC, 1 for LDPC. 287 If NSTS for user 2 is set to 0, then vht_sig_a[1][5] is 288 reserved and set to 1. 289 If NSTS for user 3 is non-zero, then vht_sig_a[1][6] indicates 290 coding for user 3: set to 0 for BCC, 1 for LDPC. 291 If NSTS for user 3 is set to 0, then vht_sig_a[1][6] is 292 reserved and set to 1. 293 vht_sig_a[1][7] is reserved and set to 1 294 <legal 0-15> 295 */ 296 297 #define VHT_SIG_A_INFO_MCS_OFFSET 0x00000004 298 #define VHT_SIG_A_INFO_MCS_LSB 4 299 #define VHT_SIG_A_INFO_MCS_MSB 7 300 #define VHT_SIG_A_INFO_MCS_MASK 0x000000f0 301 302 303 /* Description BEAMFORMED 304 305 For SU: 306 Set to 1 if a Beamforming steering matrix is applied to 307 the waveform in an SU transmission as described in IEEE802.11ac_D1.0 308 Section 19.3.11.11.2 (Spatial mapping), set to 0 otherwise. 309 310 For MU: 311 Reserved and set to 1 312 <legal 0-1> 313 */ 314 315 #define VHT_SIG_A_INFO_BEAMFORMED_OFFSET 0x00000004 316 #define VHT_SIG_A_INFO_BEAMFORMED_LSB 8 317 #define VHT_SIG_A_INFO_BEAMFORMED_MSB 8 318 #define VHT_SIG_A_INFO_BEAMFORMED_MASK 0x00000100 319 320 321 /* Description VHTA_RESERVED_1 322 323 Reserved and set to 1. <legal 1> 324 */ 325 326 #define VHT_SIG_A_INFO_VHTA_RESERVED_1_OFFSET 0x00000004 327 #define VHT_SIG_A_INFO_VHTA_RESERVED_1_LSB 9 328 #define VHT_SIG_A_INFO_VHTA_RESERVED_1_MSB 9 329 #define VHT_SIG_A_INFO_VHTA_RESERVED_1_MASK 0x00000200 330 331 332 /* Description CRC 333 334 CRC calculated as in IEEE802.11ac_D1.0 Section 19.3.9.4.4 335 (CRC calculation for HTSIG) with C7 in vht_sig_a[1][10], 336 etc. <legal all> 337 */ 338 339 #define VHT_SIG_A_INFO_CRC_OFFSET 0x00000004 340 #define VHT_SIG_A_INFO_CRC_LSB 10 341 #define VHT_SIG_A_INFO_CRC_MSB 17 342 #define VHT_SIG_A_INFO_CRC_MASK 0x0003fc00 343 344 345 /* Description TAIL 346 347 Used to terminate the trellis of the convolutional decoder. 348 Set to 0. <legal 0> 349 */ 350 351 #define VHT_SIG_A_INFO_TAIL_OFFSET 0x00000004 352 #define VHT_SIG_A_INFO_TAIL_LSB 18 353 #define VHT_SIG_A_INFO_TAIL_MSB 23 354 #define VHT_SIG_A_INFO_TAIL_MASK 0x00fc0000 355 356 357 /* Description RESERVED_1 358 359 This field is not part of HT-SIG: 360 Reserved: Should be set to 0 by the MAC and ignored by the 361 PHY <legal 0> 362 */ 363 364 #define VHT_SIG_A_INFO_RESERVED_1_OFFSET 0x00000004 365 #define VHT_SIG_A_INFO_RESERVED_1_LSB 24 366 #define VHT_SIG_A_INFO_RESERVED_1_MSB 30 367 #define VHT_SIG_A_INFO_RESERVED_1_MASK 0x7f000000 368 369 370 /* Description RX_INTEGRITY_CHECK_PASSED 371 372 TX side: Set to 0 373 RX side: Set to 1 if PHY determines the VHT-SIG-A CRC check 374 has passed, else set to 0 375 376 <legal all> 377 */ 378 379 #define VHT_SIG_A_INFO_RX_INTEGRITY_CHECK_PASSED_OFFSET 0x00000004 380 #define VHT_SIG_A_INFO_RX_INTEGRITY_CHECK_PASSED_LSB 31 381 #define VHT_SIG_A_INFO_RX_INTEGRITY_CHECK_PASSED_MSB 31 382 #define VHT_SIG_A_INFO_RX_INTEGRITY_CHECK_PASSED_MASK 0x80000000 383 384 385 386 #endif // VHT_SIG_A_INFO 387