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 #ifndef _PHYRX_VHT_SIG_A_H_ 20 #define _PHYRX_VHT_SIG_A_H_ 21 #if !defined(__ASSEMBLER__) 22 #endif 23 24 #include "vht_sig_a_info.h" 25 26 // ################ START SUMMARY ################# 27 // 28 // Dword Fields 29 // 0-1 struct vht_sig_a_info phyrx_vht_sig_a_info_details; 30 // 31 // ################ END SUMMARY ################# 32 33 #define NUM_OF_DWORDS_PHYRX_VHT_SIG_A 2 34 35 struct phyrx_vht_sig_a { 36 struct vht_sig_a_info phyrx_vht_sig_a_info_details; 37 }; 38 39 /* 40 41 struct vht_sig_a_info phyrx_vht_sig_a_info_details 42 43 See detailed description of the STRUCT 44 */ 45 46 47 /* EXTERNAL REFERENCE : struct vht_sig_a_info phyrx_vht_sig_a_info_details */ 48 49 50 /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_BANDWIDTH 51 52 Packet bandwidth 53 54 55 56 <enum 0 20_MHZ_11AC> 57 58 <enum 1 40_MHZ_11AC> 59 60 <enum 2 80_MHZ_11AC> 61 62 <enum 3 160_MHZ_11AC> 63 64 65 66 <legal 0-3> 67 */ 68 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_BANDWIDTH_OFFSET 0x00000000 69 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_BANDWIDTH_LSB 0 70 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_BANDWIDTH_MASK 0x00000003 71 72 /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0 73 74 Reserved. Set to 1 by MAC, PHY should ignore 75 76 <legal 1> 77 */ 78 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0_OFFSET 0x00000000 79 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0_LSB 2 80 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0_MASK 0x00000004 81 82 /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_STBC 83 84 Space time block coding: 85 86 <enum 0 stbc_disabled> Indicates STBC is disabled 87 88 <enum 1 stbc_enabled> Indicates STBC is enabled on 89 all streams 90 91 <legal 0-1> 92 */ 93 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_STBC_OFFSET 0x00000000 94 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_STBC_LSB 3 95 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_STBC_MASK 0x00000008 96 97 /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_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 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_GROUP_ID_OFFSET 0x00000000 108 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_GROUP_ID_LSB 4 109 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_GROUP_ID_MASK 0x000003f0 110 111 /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_N_STS 112 113 For MU: 114 115 3 bits/user with maximum of 4 users (user u uses 116 117 vht_sig_a[0][10+3u] - vht_sig_a[0][12+3u]), u = 0, 1, 2, 118 3) 119 120 Set to 0 for 0 space time streams 121 122 Set to 1 for 1 space time stream 123 124 Set to 2 for 2 space time streams 125 126 Set to 3 for 3 space time streams 127 128 Set to 4 for 4 space time streams (not supported in Wifi 129 3.0) 130 131 Values 5-7 are reserved 132 133 In this field, references to user u should be 134 interpreted as MU user u. As described in the previous 135 chapter in this document (see chapter on User number), the 136 MU user value for a given client is defined for each MU 137 group that the client participates in. The MU user number is 138 not related to the internal user number that is used within 139 the BFer. 140 141 142 143 144 145 For SU: 146 147 vht_sig_a[0][12:10] 148 149 Set to 0 for 1 space time stream 150 151 Set to 1 for 2 space time streams 152 153 Set to 2 for 3 space time streams 154 155 Set to 3 for 4 space time streams 156 157 Set to 4 for 5 space time streams 158 159 Set to 5 for 6 space time streams 160 161 Set to 6 for 7 space time streams 162 163 Set to 7 for 8 space time streams 164 165 166 167 vht_sig_a[0][21:13] 168 169 Partial AID: 170 171 Set to the value of the TXVECTOR parameter PARTIAL_AID. 172 Partial AID provides an abbreviated indication of the 173 intended recipient(s) of the frame (see IEEE802.11ac_D1.0 174 Section 9.17a (Partial AID in VHT PPDUs)). 175 176 <legal all> 177 */ 178 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_N_STS_OFFSET 0x00000000 179 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_N_STS_LSB 10 180 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_N_STS_MASK 0x003ffc00 181 182 /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_TXOP_PS_NOT_ALLOWED 183 184 E_num 0 txop_ps_allowed Not supported: If set to by 185 VHT AP if it allows non-AP VHT STAs in TXOP power save mode 186 to enter Doze state during a TXOP 187 188 <enum 1 no_txop_ps_allowed> Otherwise 189 190 <legal 1> 191 */ 192 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_TXOP_PS_NOT_ALLOWED_OFFSET 0x00000000 193 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_TXOP_PS_NOT_ALLOWED_LSB 22 194 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_TXOP_PS_NOT_ALLOWED_MASK 0x00400000 195 196 /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0B 197 198 Reserved: Should be set to 1 by the MAC and ignored by 199 the PHY <legal 1> 200 */ 201 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0B_OFFSET 0x00000000 202 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0B_LSB 23 203 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_0B_MASK 0x00800000 204 205 /* Description PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_0 206 207 This field is not part of HT-SIG: 208 209 Reserved: Should be set to 0 by the MAC and ignored by 210 the PHY <legal 0> 211 */ 212 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_0_OFFSET 0x00000000 213 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_0_LSB 24 214 #define PHYRX_VHT_SIG_A_0_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_0_MASK 0xff000000 215 216 /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_GI_SETTING 217 218 <enum 0 normal_gi> Indicates short guard interval 219 is not used in the data field 220 221 <enum 1 short_gi> Indicates short guard interval is 222 used in the data field 223 224 <enum 3 short_gi_ambiguity> Indicates short guard 225 interval is used in the data field and NSYM mod 10 = 9 226 227 NSYM is defined in IEEE802.11ac_D1.0 Section 22.4.3 228 (TXTIME and PSDU_LENGTH calculation). 229 230 <legal 0,1,3> 231 */ 232 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_GI_SETTING_OFFSET 0x00000004 233 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_GI_SETTING_LSB 0 234 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_GI_SETTING_MASK 0x00000003 235 236 /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_SU_MU_CODING 237 238 For an SU PPDU, B2 is set to 0 for BCC, 1 for LDPC For 239 an MU PPDU, if the MU[0] NSTS field is nonzero(#6773), then 240 B2 indicates the coding used for user 0; set to 0 for BCC 241 and 1 for LDPC. If the MU[0] NSTS field is 0, then this 242 field is reserved and set to 1 243 */ 244 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_SU_MU_CODING_OFFSET 0x00000004 245 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_SU_MU_CODING_LSB 2 246 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_SU_MU_CODING_MASK 0x00000004 247 248 /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_LDPC_EXTRA_SYMBOL 249 250 Set to 1 if the LDPC PPDU encoding process (if an SU 251 PPDU), or at least one LDPC user's PPDU encoding process (if 252 an MU PPDU), results in an extra OFDM symbol (or symbols) as 253 described in 22.3.10.5.4 (LDPC coding) and 22.3.10.5.5 254 (Encoding process for MU PPDUs). Set to 0 otherwise. 255 */ 256 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_LDPC_EXTRA_SYMBOL_OFFSET 0x00000004 257 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_LDPC_EXTRA_SYMBOL_LSB 3 258 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_LDPC_EXTRA_SYMBOL_MASK 0x00000008 259 260 /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_MCS 261 262 For SU: 263 264 Set to 0 for BPSK 1/2 265 266 Set to 1 for QPSK 1/2 267 268 Set to 2 for QPSK 3/4 269 270 Set to 3 for 16-QAM 1/2 271 272 Set to 4 for 16-QAM 3/4 273 274 Set to 5 for 64-QAM 2/3 275 276 Set to 6 for 64-QAM 3/4 277 278 Set to 7 for 64-QAM 5/6 279 280 Set to 8 for 256-QAM 3/4 281 282 Set to 9 for 256-QAM 5/6 283 284 For MU: 285 286 If NSTS for user 1 is non-zero, then vht_sig_a[1][4] 287 indicates coding for user 1: set to 0 for BCC, 1 for LDPC. 288 289 If NSTS for user 1 is set to 0, then vht_sig_a[1][4] is 290 reserved and set to 1. 291 292 If NSTS for user 2 is non-zero, then vht_sig_a[1][5] 293 indicates coding for user 2: set to 0 for BCC, 1 for LDPC. 294 295 If NSTS for user 2 is set to 0, then vht_sig_a[1][5] is 296 reserved and set to 1. 297 298 If NSTS for user 3 is non-zero, then vht_sig_a[1][6] 299 indicates coding for user 3: set to 0 for BCC, 1 for LDPC. 300 301 If NSTS for user 3 is set to 0, then vht_sig_a[1][6] is 302 reserved and set to 1. 303 304 vht_sig_a[1][7] is reserved and set to 1 305 306 <legal 0-15> 307 */ 308 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_MCS_OFFSET 0x00000004 309 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_MCS_LSB 4 310 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_MCS_MASK 0x000000f0 311 312 /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_BEAMFORMED 313 314 For SU: 315 316 Set to 1 if a Beamforming steering matrix is applied to 317 the waveform in an SU transmission as described in 318 IEEE802.11ac_D1.0 Section 19.3.11.11.2 (Spatial mapping), 319 set to 0 otherwise. 320 321 For MU: 322 323 Reserved and set to 1 324 325 <legal 0-1> 326 */ 327 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_BEAMFORMED_OFFSET 0x00000004 328 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_BEAMFORMED_LSB 8 329 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_BEAMFORMED_MASK 0x00000100 330 331 /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_1 332 333 Reserved and set to 1. <legal 1> 334 */ 335 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_1_OFFSET 0x00000004 336 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_1_LSB 9 337 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_VHTA_RESERVED_1_MASK 0x00000200 338 339 /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_CRC 340 341 CRC calculated as in IEEE802.11ac_D1.0 Section 342 19.3.9.4.4 (CRC calculation for HTSIG) with C7 in 343 vht_sig_a[1][10], etc. <legal all> 344 */ 345 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_CRC_OFFSET 0x00000004 346 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_CRC_LSB 10 347 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_CRC_MASK 0x0003fc00 348 349 /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_TAIL 350 351 Used to terminate the trellis of the convolutional 352 decoder. Set to 0. <legal 0> 353 */ 354 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_TAIL_OFFSET 0x00000004 355 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_TAIL_LSB 18 356 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_TAIL_MASK 0x00fc0000 357 358 /* Description PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_1 359 360 This field is not part of HT-SIG: 361 362 Reserved: Should be set to 0 by the MAC and ignored by 363 the PHY <legal 0> 364 */ 365 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_1_OFFSET 0x00000004 366 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_1_LSB 24 367 #define PHYRX_VHT_SIG_A_1_PHYRX_VHT_SIG_A_INFO_DETAILS_RESERVED_1_MASK 0xff000000 368 369 370 #endif // _PHYRX_VHT_SIG_A_H_ 371