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