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