xref: /wlan-driver/fw-api/hw/qca5018/ht_sig_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2020, The Linux Foundation. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for any
5*5113495bSYour Name  * purpose with or without fee is hereby granted, provided that the above
6*5113495bSYour Name  * copyright notice and this permission notice appear in all copies.
7*5113495bSYour Name  *
8*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9*5113495bSYour Name  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10*5113495bSYour Name  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11*5113495bSYour Name  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12*5113495bSYour Name  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13*5113495bSYour Name  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14*5113495bSYour Name  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15*5113495bSYour Name  */
16*5113495bSYour Name 
17*5113495bSYour Name #ifndef _HT_SIG_INFO_H_
18*5113495bSYour Name #define _HT_SIG_INFO_H_
19*5113495bSYour Name #if !defined(__ASSEMBLER__)
20*5113495bSYour Name #endif
21*5113495bSYour Name 
22*5113495bSYour Name 
23*5113495bSYour Name // ################ START SUMMARY #################
24*5113495bSYour Name //
25*5113495bSYour Name //	Dword	Fields
26*5113495bSYour Name //	0	mcs[6:0], cbw[7], length[23:8], reserved_0[31:24]
27*5113495bSYour Name //	1	smoothing[0], not_sounding[1], ht_reserved[2], aggregation[3], stbc[5:4], fec_coding[6], short_gi[7], num_ext_sp_str[9:8], crc[17:10], signal_tail[23:18], reserved_1[31:24]
28*5113495bSYour Name //
29*5113495bSYour Name // ################ END SUMMARY #################
30*5113495bSYour Name 
31*5113495bSYour Name #define NUM_OF_DWORDS_HT_SIG_INFO 2
32*5113495bSYour Name 
33*5113495bSYour Name struct ht_sig_info {
34*5113495bSYour Name              uint32_t mcs                             :  7, //[6:0]
35*5113495bSYour Name                       cbw                             :  1, //[7]
36*5113495bSYour Name                       length                          : 16, //[23:8]
37*5113495bSYour Name                       reserved_0                      :  8; //[31:24]
38*5113495bSYour Name              uint32_t smoothing                       :  1, //[0]
39*5113495bSYour Name                       not_sounding                    :  1, //[1]
40*5113495bSYour Name                       ht_reserved                     :  1, //[2]
41*5113495bSYour Name                       aggregation                     :  1, //[3]
42*5113495bSYour Name                       stbc                            :  2, //[5:4]
43*5113495bSYour Name                       fec_coding                      :  1, //[6]
44*5113495bSYour Name                       short_gi                        :  1, //[7]
45*5113495bSYour Name                       num_ext_sp_str                  :  2, //[9:8]
46*5113495bSYour Name                       crc                             :  8, //[17:10]
47*5113495bSYour Name                       signal_tail                     :  6, //[23:18]
48*5113495bSYour Name                       reserved_1                      :  8; //[31:24]
49*5113495bSYour Name };
50*5113495bSYour Name 
51*5113495bSYour Name /*
52*5113495bSYour Name 
53*5113495bSYour Name mcs
54*5113495bSYour Name 
55*5113495bSYour Name 			Modulation Coding Scheme:
56*5113495bSYour Name 
57*5113495bSYour Name 			0-7 are used for single stream
58*5113495bSYour Name 
59*5113495bSYour Name 			8-15 are used for 2 streams
60*5113495bSYour Name 
61*5113495bSYour Name 			16-23 are used for 3 streams
62*5113495bSYour Name 
63*5113495bSYour Name 			24-31 are used for 4 streams
64*5113495bSYour Name 
65*5113495bSYour Name 			32 is used for duplicate HT20 (unsupported)
66*5113495bSYour Name 
67*5113495bSYour Name 			33-76 is used for unequal modulation (unsupported)
68*5113495bSYour Name 
69*5113495bSYour Name 			77-127 is reserved.
70*5113495bSYour Name 
71*5113495bSYour Name 			<legal 0-31>
72*5113495bSYour Name 
73*5113495bSYour Name cbw
74*5113495bSYour Name 
75*5113495bSYour Name 			Packet bandwidth:
76*5113495bSYour Name 
77*5113495bSYour Name 			<enum 0     ht_20_mhz>
78*5113495bSYour Name 
79*5113495bSYour Name 			<enum 1     ht_40_mhz>
80*5113495bSYour Name 
81*5113495bSYour Name 			<legal 0-1>
82*5113495bSYour Name 
83*5113495bSYour Name length
84*5113495bSYour Name 
85*5113495bSYour Name 			This is the MPDU or A-MPDU length in octets of the PPDU
86*5113495bSYour Name 
87*5113495bSYour Name 			<legal all>
88*5113495bSYour Name 
89*5113495bSYour Name reserved_0
90*5113495bSYour Name 
91*5113495bSYour Name 			This field is not part of HT-SIG
92*5113495bSYour Name 
93*5113495bSYour Name 			Reserved: Should be set to 0 by the MAC and ignored by
94*5113495bSYour Name 			the PHY <legal 0>
95*5113495bSYour Name 
96*5113495bSYour Name smoothing
97*5113495bSYour Name 
98*5113495bSYour Name 			Field indicates if smoothing is needed
99*5113495bSYour Name 
100*5113495bSYour Name 			E_num 0     do_smoothing Unsupported setting: indicates
101*5113495bSYour Name 			smoothing is often used for beamforming
102*5113495bSYour Name 
103*5113495bSYour Name 
104*5113495bSYour Name 			<legal 1>
105*5113495bSYour Name 
106*5113495bSYour Name not_sounding
107*5113495bSYour Name 
108*5113495bSYour Name 			E_num 0     sounding Unsupported setting: indicates
109*5113495bSYour Name 			sounding is used
110*5113495bSYour Name 
111*5113495bSYour Name 			<enum 1     no_sounding>  Indicates no sounding is used
112*5113495bSYour Name 
113*5113495bSYour Name 			<legal 1>
114*5113495bSYour Name 
115*5113495bSYour Name ht_reserved
116*5113495bSYour Name 
117*5113495bSYour Name 			Reserved: Should be set to 1 by the MAC and ignored by
118*5113495bSYour Name 			the PHY
119*5113495bSYour Name 
120*5113495bSYour Name 			<legal 1>
121*5113495bSYour Name 
122*5113495bSYour Name aggregation
123*5113495bSYour Name 
124*5113495bSYour Name 			<enum 0     mpdu> Indicates MPDU format
125*5113495bSYour Name 
126*5113495bSYour Name 			<enum 1     a_mpdu> Indicates A-MPDU format
127*5113495bSYour Name 
128*5113495bSYour Name 			<legal 0-1>
129*5113495bSYour Name 
130*5113495bSYour Name stbc
131*5113495bSYour Name 
132*5113495bSYour Name 			<enum 0     no_stbc> Indicates no STBC
133*5113495bSYour Name 
134*5113495bSYour Name 			<enum 1     1_str_stbc> Indicates 1 stream STBC
135*5113495bSYour Name 
136*5113495bSYour Name 			E_num 2     2_str_stbc Indicates 2 stream STBC
137*5113495bSYour Name 			(Unsupported)
138*5113495bSYour Name 
139*5113495bSYour Name 			<legal 0-1>
140*5113495bSYour Name 
141*5113495bSYour Name fec_coding
142*5113495bSYour Name 
143*5113495bSYour Name 			<enum 0     ht_bcc>  Indicates BCC coding
144*5113495bSYour Name 
145*5113495bSYour Name 			<enum 1     ht_ldpc>  Indicates LDPC coding
146*5113495bSYour Name 
147*5113495bSYour Name 			<legal 0-1>
148*5113495bSYour Name 
149*5113495bSYour Name short_gi
150*5113495bSYour Name 
151*5113495bSYour Name 			<enum 0     ht_normal_gi>  Indicates normal guard
152*5113495bSYour Name 			interval
153*5113495bSYour Name 
154*5113495bSYour Name 
155*5113495bSYour Name 			<legal 0-1>
156*5113495bSYour Name 
157*5113495bSYour Name num_ext_sp_str
158*5113495bSYour Name 
159*5113495bSYour Name 			Number of extension spatial streams: (Used for TxBF)
160*5113495bSYour Name 
161*5113495bSYour Name 			<enum 0     0_ext_sp_str>  No extension spatial streams
162*5113495bSYour Name 
163*5113495bSYour Name 			E_num 1     1_ext_sp_str  Not supported: 1 extension
164*5113495bSYour Name 			spatial streams
165*5113495bSYour Name 
166*5113495bSYour Name 			E_num 2     2_ext_sp_str  Not supported:  2 extension
167*5113495bSYour Name 			spatial streams
168*5113495bSYour Name 
169*5113495bSYour Name 			<legal 0>
170*5113495bSYour Name 
171*5113495bSYour Name crc
172*5113495bSYour Name 
173*5113495bSYour Name 			The CRC protects the HT-SIG (HT-SIG[0][23:0] and
174*5113495bSYour Name 			HT-SIG[1][9:0]. The generator polynomial is G(D) = D8 + D2 +
175*5113495bSYour Name 			D + 1.  <legal all>
176*5113495bSYour Name 
177*5113495bSYour Name signal_tail
178*5113495bSYour Name 
179*5113495bSYour Name 			The 6 bits of tail is always set to 0 is used to flush
180*5113495bSYour Name 			the BCC encoder and decoder.  <legal 0>
181*5113495bSYour Name 
182*5113495bSYour Name reserved_1
183*5113495bSYour Name 
184*5113495bSYour Name 			This field is not part of HT-SIG:
185*5113495bSYour Name 
186*5113495bSYour Name 			Reserved: Should be set to 0 by the MAC and ignored by
187*5113495bSYour Name 			the PHY.  <legal 0>
188*5113495bSYour Name */
189*5113495bSYour Name 
190*5113495bSYour Name 
191*5113495bSYour Name /* Description		HT_SIG_INFO_0_MCS
192*5113495bSYour Name 
193*5113495bSYour Name 			Modulation Coding Scheme:
194*5113495bSYour Name 
195*5113495bSYour Name 			0-7 are used for single stream
196*5113495bSYour Name 
197*5113495bSYour Name 			8-15 are used for 2 streams
198*5113495bSYour Name 
199*5113495bSYour Name 			16-23 are used for 3 streams
200*5113495bSYour Name 
201*5113495bSYour Name 			24-31 are used for 4 streams
202*5113495bSYour Name 
203*5113495bSYour Name 			32 is used for duplicate HT20 (unsupported)
204*5113495bSYour Name 
205*5113495bSYour Name 			33-76 is used for unequal modulation (unsupported)
206*5113495bSYour Name 
207*5113495bSYour Name 			77-127 is reserved.
208*5113495bSYour Name 
209*5113495bSYour Name 			<legal 0-31>
210*5113495bSYour Name */
211*5113495bSYour Name #define HT_SIG_INFO_0_MCS_OFFSET                                     0x00000000
212*5113495bSYour Name #define HT_SIG_INFO_0_MCS_LSB                                        0
213*5113495bSYour Name #define HT_SIG_INFO_0_MCS_MASK                                       0x0000007f
214*5113495bSYour Name 
215*5113495bSYour Name /* Description		HT_SIG_INFO_0_CBW
216*5113495bSYour Name 
217*5113495bSYour Name 			Packet bandwidth:
218*5113495bSYour Name 
219*5113495bSYour Name 			<enum 0     ht_20_mhz>
220*5113495bSYour Name 
221*5113495bSYour Name 			<enum 1     ht_40_mhz>
222*5113495bSYour Name 
223*5113495bSYour Name 			<legal 0-1>
224*5113495bSYour Name */
225*5113495bSYour Name #define HT_SIG_INFO_0_CBW_OFFSET                                     0x00000000
226*5113495bSYour Name #define HT_SIG_INFO_0_CBW_LSB                                        7
227*5113495bSYour Name #define HT_SIG_INFO_0_CBW_MASK                                       0x00000080
228*5113495bSYour Name 
229*5113495bSYour Name /* Description		HT_SIG_INFO_0_LENGTH
230*5113495bSYour Name 
231*5113495bSYour Name 			This is the MPDU or A-MPDU length in octets of the PPDU
232*5113495bSYour Name 
233*5113495bSYour Name 			<legal all>
234*5113495bSYour Name */
235*5113495bSYour Name #define HT_SIG_INFO_0_LENGTH_OFFSET                                  0x00000000
236*5113495bSYour Name #define HT_SIG_INFO_0_LENGTH_LSB                                     8
237*5113495bSYour Name #define HT_SIG_INFO_0_LENGTH_MASK                                    0x00ffff00
238*5113495bSYour Name 
239*5113495bSYour Name /* Description		HT_SIG_INFO_0_RESERVED_0
240*5113495bSYour Name 
241*5113495bSYour Name 			This field is not part of HT-SIG
242*5113495bSYour Name 
243*5113495bSYour Name 			Reserved: Should be set to 0 by the MAC and ignored by
244*5113495bSYour Name 			the PHY <legal 0>
245*5113495bSYour Name */
246*5113495bSYour Name #define HT_SIG_INFO_0_RESERVED_0_OFFSET                              0x00000000
247*5113495bSYour Name #define HT_SIG_INFO_0_RESERVED_0_LSB                                 24
248*5113495bSYour Name #define HT_SIG_INFO_0_RESERVED_0_MASK                                0xff000000
249*5113495bSYour Name 
250*5113495bSYour Name /* Description		HT_SIG_INFO_1_SMOOTHING
251*5113495bSYour Name 
252*5113495bSYour Name 			Field indicates if smoothing is needed
253*5113495bSYour Name 
254*5113495bSYour Name 			E_num 0     do_smoothing Unsupported setting: indicates
255*5113495bSYour Name 			smoothing is often used for beamforming
256*5113495bSYour Name 
257*5113495bSYour Name 
258*5113495bSYour Name 			<legal 1>
259*5113495bSYour Name */
260*5113495bSYour Name #define HT_SIG_INFO_1_SMOOTHING_OFFSET                               0x00000004
261*5113495bSYour Name #define HT_SIG_INFO_1_SMOOTHING_LSB                                  0
262*5113495bSYour Name #define HT_SIG_INFO_1_SMOOTHING_MASK                                 0x00000001
263*5113495bSYour Name 
264*5113495bSYour Name /* Description		HT_SIG_INFO_1_NOT_SOUNDING
265*5113495bSYour Name 
266*5113495bSYour Name 			E_num 0     sounding Unsupported setting: indicates
267*5113495bSYour Name 			sounding is used
268*5113495bSYour Name 
269*5113495bSYour Name 			<enum 1     no_sounding>  Indicates no sounding is used
270*5113495bSYour Name 
271*5113495bSYour Name 			<legal 1>
272*5113495bSYour Name */
273*5113495bSYour Name #define HT_SIG_INFO_1_NOT_SOUNDING_OFFSET                            0x00000004
274*5113495bSYour Name #define HT_SIG_INFO_1_NOT_SOUNDING_LSB                               1
275*5113495bSYour Name #define HT_SIG_INFO_1_NOT_SOUNDING_MASK                              0x00000002
276*5113495bSYour Name 
277*5113495bSYour Name /* Description		HT_SIG_INFO_1_HT_RESERVED
278*5113495bSYour Name 
279*5113495bSYour Name 			Reserved: Should be set to 1 by the MAC and ignored by
280*5113495bSYour Name 			the PHY
281*5113495bSYour Name 
282*5113495bSYour Name 			<legal 1>
283*5113495bSYour Name */
284*5113495bSYour Name #define HT_SIG_INFO_1_HT_RESERVED_OFFSET                             0x00000004
285*5113495bSYour Name #define HT_SIG_INFO_1_HT_RESERVED_LSB                                2
286*5113495bSYour Name #define HT_SIG_INFO_1_HT_RESERVED_MASK                               0x00000004
287*5113495bSYour Name 
288*5113495bSYour Name /* Description		HT_SIG_INFO_1_AGGREGATION
289*5113495bSYour Name 
290*5113495bSYour Name 			<enum 0     mpdu> Indicates MPDU format
291*5113495bSYour Name 
292*5113495bSYour Name 			<enum 1     a_mpdu> Indicates A-MPDU format
293*5113495bSYour Name 
294*5113495bSYour Name 			<legal 0-1>
295*5113495bSYour Name */
296*5113495bSYour Name #define HT_SIG_INFO_1_AGGREGATION_OFFSET                             0x00000004
297*5113495bSYour Name #define HT_SIG_INFO_1_AGGREGATION_LSB                                3
298*5113495bSYour Name #define HT_SIG_INFO_1_AGGREGATION_MASK                               0x00000008
299*5113495bSYour Name 
300*5113495bSYour Name /* Description		HT_SIG_INFO_1_STBC
301*5113495bSYour Name 
302*5113495bSYour Name 			<enum 0     no_stbc> Indicates no STBC
303*5113495bSYour Name 
304*5113495bSYour Name 			<enum 1     1_str_stbc> Indicates 1 stream STBC
305*5113495bSYour Name 
306*5113495bSYour Name 			E_num 2     2_str_stbc Indicates 2 stream STBC
307*5113495bSYour Name 			(Unsupported)
308*5113495bSYour Name 
309*5113495bSYour Name 			<legal 0-1>
310*5113495bSYour Name */
311*5113495bSYour Name #define HT_SIG_INFO_1_STBC_OFFSET                                    0x00000004
312*5113495bSYour Name #define HT_SIG_INFO_1_STBC_LSB                                       4
313*5113495bSYour Name #define HT_SIG_INFO_1_STBC_MASK                                      0x00000030
314*5113495bSYour Name 
315*5113495bSYour Name /* Description		HT_SIG_INFO_1_FEC_CODING
316*5113495bSYour Name 
317*5113495bSYour Name 			<enum 0     ht_bcc>  Indicates BCC coding
318*5113495bSYour Name 
319*5113495bSYour Name 			<enum 1     ht_ldpc>  Indicates LDPC coding
320*5113495bSYour Name 
321*5113495bSYour Name 			<legal 0-1>
322*5113495bSYour Name */
323*5113495bSYour Name #define HT_SIG_INFO_1_FEC_CODING_OFFSET                              0x00000004
324*5113495bSYour Name #define HT_SIG_INFO_1_FEC_CODING_LSB                                 6
325*5113495bSYour Name #define HT_SIG_INFO_1_FEC_CODING_MASK                                0x00000040
326*5113495bSYour Name 
327*5113495bSYour Name /* Description		HT_SIG_INFO_1_SHORT_GI
328*5113495bSYour Name 
329*5113495bSYour Name 			<enum 0     ht_normal_gi>  Indicates normal guard
330*5113495bSYour Name 			interval
331*5113495bSYour Name 
332*5113495bSYour Name 
333*5113495bSYour Name 			<legal 0-1>
334*5113495bSYour Name */
335*5113495bSYour Name #define HT_SIG_INFO_1_SHORT_GI_OFFSET                                0x00000004
336*5113495bSYour Name #define HT_SIG_INFO_1_SHORT_GI_LSB                                   7
337*5113495bSYour Name #define HT_SIG_INFO_1_SHORT_GI_MASK                                  0x00000080
338*5113495bSYour Name 
339*5113495bSYour Name /* Description		HT_SIG_INFO_1_NUM_EXT_SP_STR
340*5113495bSYour Name 
341*5113495bSYour Name 			Number of extension spatial streams: (Used for TxBF)
342*5113495bSYour Name 
343*5113495bSYour Name 			<enum 0     0_ext_sp_str>  No extension spatial streams
344*5113495bSYour Name 
345*5113495bSYour Name 			E_num 1     1_ext_sp_str  Not supported: 1 extension
346*5113495bSYour Name 			spatial streams
347*5113495bSYour Name 
348*5113495bSYour Name 			E_num 2     2_ext_sp_str  Not supported:  2 extension
349*5113495bSYour Name 			spatial streams
350*5113495bSYour Name 
351*5113495bSYour Name 			<legal 0>
352*5113495bSYour Name */
353*5113495bSYour Name #define HT_SIG_INFO_1_NUM_EXT_SP_STR_OFFSET                          0x00000004
354*5113495bSYour Name #define HT_SIG_INFO_1_NUM_EXT_SP_STR_LSB                             8
355*5113495bSYour Name #define HT_SIG_INFO_1_NUM_EXT_SP_STR_MASK                            0x00000300
356*5113495bSYour Name 
357*5113495bSYour Name /* Description		HT_SIG_INFO_1_CRC
358*5113495bSYour Name 
359*5113495bSYour Name 			The CRC protects the HT-SIG (HT-SIG[0][23:0] and
360*5113495bSYour Name 			HT-SIG[1][9:0]. The generator polynomial is G(D) = D8 + D2 +
361*5113495bSYour Name 			D + 1.  <legal all>
362*5113495bSYour Name */
363*5113495bSYour Name #define HT_SIG_INFO_1_CRC_OFFSET                                     0x00000004
364*5113495bSYour Name #define HT_SIG_INFO_1_CRC_LSB                                        10
365*5113495bSYour Name #define HT_SIG_INFO_1_CRC_MASK                                       0x0003fc00
366*5113495bSYour Name 
367*5113495bSYour Name /* Description		HT_SIG_INFO_1_SIGNAL_TAIL
368*5113495bSYour Name 
369*5113495bSYour Name 			The 6 bits of tail is always set to 0 is used to flush
370*5113495bSYour Name 			the BCC encoder and decoder.  <legal 0>
371*5113495bSYour Name */
372*5113495bSYour Name #define HT_SIG_INFO_1_SIGNAL_TAIL_OFFSET                             0x00000004
373*5113495bSYour Name #define HT_SIG_INFO_1_SIGNAL_TAIL_LSB                                18
374*5113495bSYour Name #define HT_SIG_INFO_1_SIGNAL_TAIL_MASK                               0x00fc0000
375*5113495bSYour Name 
376*5113495bSYour Name /* Description		HT_SIG_INFO_1_RESERVED_1
377*5113495bSYour Name 
378*5113495bSYour Name 			This field is not part of HT-SIG:
379*5113495bSYour Name 
380*5113495bSYour Name 			Reserved: Should be set to 0 by the MAC and ignored by
381*5113495bSYour Name 			the PHY.  <legal 0>
382*5113495bSYour Name */
383*5113495bSYour Name #define HT_SIG_INFO_1_RESERVED_1_OFFSET                              0x00000004
384*5113495bSYour Name #define HT_SIG_INFO_1_RESERVED_1_LSB                                 24
385*5113495bSYour Name #define HT_SIG_INFO_1_RESERVED_1_MASK                                0xff000000
386*5113495bSYour Name 
387*5113495bSYour Name 
388*5113495bSYour Name #endif // _HT_SIG_INFO_H_
389