xref: /wlan-driver/fw-api/hw/qca5332/ht_sig_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name 
2*5113495bSYour Name /* Copyright (c) 2022, Qualcomm Innovation Center, Inc. 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 
18*5113495bSYour Name 
19*5113495bSYour Name 
20*5113495bSYour Name 
21*5113495bSYour Name 
22*5113495bSYour Name 
23*5113495bSYour Name 
24*5113495bSYour Name 
25*5113495bSYour Name 
26*5113495bSYour Name #ifndef _HT_SIG_INFO_H_
27*5113495bSYour Name #define _HT_SIG_INFO_H_
28*5113495bSYour Name #if !defined(__ASSEMBLER__)
29*5113495bSYour Name #endif
30*5113495bSYour Name 
31*5113495bSYour Name #define NUM_OF_DWORDS_HT_SIG_INFO 2
32*5113495bSYour Name 
33*5113495bSYour Name 
34*5113495bSYour Name struct ht_sig_info {
35*5113495bSYour Name #ifndef WIFI_BIT_ORDER_BIG_ENDIAN
36*5113495bSYour Name              uint32_t mcs                                                     :  7, // [6:0]
37*5113495bSYour Name                       cbw                                                     :  1, // [7:7]
38*5113495bSYour Name                       length                                                  : 16, // [23:8]
39*5113495bSYour Name                       reserved_0                                              :  8; // [31:24]
40*5113495bSYour Name              uint32_t smoothing                                               :  1, // [0:0]
41*5113495bSYour Name                       not_sounding                                            :  1, // [1:1]
42*5113495bSYour Name                       ht_reserved                                             :  1, // [2:2]
43*5113495bSYour Name                       aggregation                                             :  1, // [3:3]
44*5113495bSYour Name                       stbc                                                    :  2, // [5:4]
45*5113495bSYour Name                       fec_coding                                              :  1, // [6:6]
46*5113495bSYour Name                       short_gi                                                :  1, // [7: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                                              :  7, // [30:24]
51*5113495bSYour Name                       rx_integrity_check_passed                               :  1; // [31:31]
52*5113495bSYour Name #else
53*5113495bSYour Name              uint32_t reserved_0                                              :  8, // [31:24]
54*5113495bSYour Name                       length                                                  : 16, // [23:8]
55*5113495bSYour Name                       cbw                                                     :  1, // [7:7]
56*5113495bSYour Name                       mcs                                                     :  7; // [6:0]
57*5113495bSYour Name              uint32_t rx_integrity_check_passed                               :  1, // [31:31]
58*5113495bSYour Name                       reserved_1                                              :  7, // [30:24]
59*5113495bSYour Name                       signal_tail                                             :  6, // [23:18]
60*5113495bSYour Name                       crc                                                     :  8, // [17:10]
61*5113495bSYour Name                       num_ext_sp_str                                          :  2, // [9:8]
62*5113495bSYour Name                       short_gi                                                :  1, // [7:7]
63*5113495bSYour Name                       fec_coding                                              :  1, // [6:6]
64*5113495bSYour Name                       stbc                                                    :  2, // [5:4]
65*5113495bSYour Name                       aggregation                                             :  1, // [3:3]
66*5113495bSYour Name                       ht_reserved                                             :  1, // [2:2]
67*5113495bSYour Name                       not_sounding                                            :  1, // [1:1]
68*5113495bSYour Name                       smoothing                                               :  1; // [0:0]
69*5113495bSYour Name #endif
70*5113495bSYour Name };
71*5113495bSYour Name 
72*5113495bSYour Name 
73*5113495bSYour Name /* Description		MCS
74*5113495bSYour Name 
75*5113495bSYour Name 			Modulation Coding Scheme:
76*5113495bSYour Name 			0-7 are used for single stream
77*5113495bSYour Name 			8-15 are used for 2 streams
78*5113495bSYour Name 			16-23 are used for 3 streams
79*5113495bSYour Name 			24-31 are used for 4 streams
80*5113495bSYour Name 			32 is used for duplicate HT20 (unsupported)
81*5113495bSYour Name 			33-76 is used for unequal modulation (unsupported)
82*5113495bSYour Name 			77-127 is reserved.
83*5113495bSYour Name 			<legal 0-31>
84*5113495bSYour Name */
85*5113495bSYour Name 
86*5113495bSYour Name #define HT_SIG_INFO_MCS_OFFSET                                                      0x00000000
87*5113495bSYour Name #define HT_SIG_INFO_MCS_LSB                                                         0
88*5113495bSYour Name #define HT_SIG_INFO_MCS_MSB                                                         6
89*5113495bSYour Name #define HT_SIG_INFO_MCS_MASK                                                        0x0000007f
90*5113495bSYour Name 
91*5113495bSYour Name 
92*5113495bSYour Name /* Description		CBW
93*5113495bSYour Name 
94*5113495bSYour Name 			Packet bandwidth:
95*5113495bSYour Name 			<enum 0     ht_20_mhz>
96*5113495bSYour Name 			<enum 1     ht_40_mhz>
97*5113495bSYour Name 			<legal 0-1>
98*5113495bSYour Name */
99*5113495bSYour Name 
100*5113495bSYour Name #define HT_SIG_INFO_CBW_OFFSET                                                      0x00000000
101*5113495bSYour Name #define HT_SIG_INFO_CBW_LSB                                                         7
102*5113495bSYour Name #define HT_SIG_INFO_CBW_MSB                                                         7
103*5113495bSYour Name #define HT_SIG_INFO_CBW_MASK                                                        0x00000080
104*5113495bSYour Name 
105*5113495bSYour Name 
106*5113495bSYour Name /* Description		LENGTH
107*5113495bSYour Name 
108*5113495bSYour Name 			This is the MPDU or A-MPDU length in octets of the PPDU
109*5113495bSYour Name 			<legal all>
110*5113495bSYour Name */
111*5113495bSYour Name 
112*5113495bSYour Name #define HT_SIG_INFO_LENGTH_OFFSET                                                   0x00000000
113*5113495bSYour Name #define HT_SIG_INFO_LENGTH_LSB                                                      8
114*5113495bSYour Name #define HT_SIG_INFO_LENGTH_MSB                                                      23
115*5113495bSYour Name #define HT_SIG_INFO_LENGTH_MASK                                                     0x00ffff00
116*5113495bSYour Name 
117*5113495bSYour Name 
118*5113495bSYour Name /* Description		RESERVED_0
119*5113495bSYour Name 
120*5113495bSYour Name 			This field is not part of HT-SIG
121*5113495bSYour Name 			Reserved: Should be set to 0 by the MAC and ignored by the
122*5113495bSYour Name 			 PHY <legal 0>
123*5113495bSYour Name */
124*5113495bSYour Name 
125*5113495bSYour Name #define HT_SIG_INFO_RESERVED_0_OFFSET                                               0x00000000
126*5113495bSYour Name #define HT_SIG_INFO_RESERVED_0_LSB                                                  24
127*5113495bSYour Name #define HT_SIG_INFO_RESERVED_0_MSB                                                  31
128*5113495bSYour Name #define HT_SIG_INFO_RESERVED_0_MASK                                                 0xff000000
129*5113495bSYour Name 
130*5113495bSYour Name 
131*5113495bSYour Name /* Description		SMOOTHING
132*5113495bSYour Name 
133*5113495bSYour Name 			Field indicates if smoothing is needed
134*5113495bSYour Name 			E_num 0     do_smoothing Unsupported setting: indicates
135*5113495bSYour Name 			smoothing is often used for beamforming
136*5113495bSYour Name 			<enum 1     no_smoothing> Indicates no smoothing is used
137*5113495bSYour Name 
138*5113495bSYour Name 			<legal 1>
139*5113495bSYour Name */
140*5113495bSYour Name 
141*5113495bSYour Name #define HT_SIG_INFO_SMOOTHING_OFFSET                                                0x00000004
142*5113495bSYour Name #define HT_SIG_INFO_SMOOTHING_LSB                                                   0
143*5113495bSYour Name #define HT_SIG_INFO_SMOOTHING_MSB                                                   0
144*5113495bSYour Name #define HT_SIG_INFO_SMOOTHING_MASK                                                  0x00000001
145*5113495bSYour Name 
146*5113495bSYour Name 
147*5113495bSYour Name /* Description		NOT_SOUNDING
148*5113495bSYour Name 
149*5113495bSYour Name 			E_num 0     sounding Unsupported setting: indicates sounding
150*5113495bSYour Name 			 is used
151*5113495bSYour Name 			<enum 1     no_sounding>  Indicates no sounding is used
152*5113495bSYour Name 			<legal 1>
153*5113495bSYour Name */
154*5113495bSYour Name 
155*5113495bSYour Name #define HT_SIG_INFO_NOT_SOUNDING_OFFSET                                             0x00000004
156*5113495bSYour Name #define HT_SIG_INFO_NOT_SOUNDING_LSB                                                1
157*5113495bSYour Name #define HT_SIG_INFO_NOT_SOUNDING_MSB                                                1
158*5113495bSYour Name #define HT_SIG_INFO_NOT_SOUNDING_MASK                                               0x00000002
159*5113495bSYour Name 
160*5113495bSYour Name 
161*5113495bSYour Name /* Description		HT_RESERVED
162*5113495bSYour Name 
163*5113495bSYour Name 			Reserved: Should be set to 1 by the MAC and ignored by the
164*5113495bSYour Name 			 PHY
165*5113495bSYour Name 			<legal 1>
166*5113495bSYour Name */
167*5113495bSYour Name 
168*5113495bSYour Name #define HT_SIG_INFO_HT_RESERVED_OFFSET                                              0x00000004
169*5113495bSYour Name #define HT_SIG_INFO_HT_RESERVED_LSB                                                 2
170*5113495bSYour Name #define HT_SIG_INFO_HT_RESERVED_MSB                                                 2
171*5113495bSYour Name #define HT_SIG_INFO_HT_RESERVED_MASK                                                0x00000004
172*5113495bSYour Name 
173*5113495bSYour Name 
174*5113495bSYour Name /* Description		AGGREGATION
175*5113495bSYour Name 
176*5113495bSYour Name 			<enum 0     mpdu> Indicates MPDU format
177*5113495bSYour Name 			<enum 1     a_mpdu> Indicates A-MPDU format
178*5113495bSYour Name 			<legal 0-1>
179*5113495bSYour Name */
180*5113495bSYour Name 
181*5113495bSYour Name #define HT_SIG_INFO_AGGREGATION_OFFSET                                              0x00000004
182*5113495bSYour Name #define HT_SIG_INFO_AGGREGATION_LSB                                                 3
183*5113495bSYour Name #define HT_SIG_INFO_AGGREGATION_MSB                                                 3
184*5113495bSYour Name #define HT_SIG_INFO_AGGREGATION_MASK                                                0x00000008
185*5113495bSYour Name 
186*5113495bSYour Name 
187*5113495bSYour Name /* Description		STBC
188*5113495bSYour Name 
189*5113495bSYour Name 			<enum 0     no_stbc> Indicates no STBC
190*5113495bSYour Name 			<enum 1     1_str_stbc> Indicates 1 stream STBC
191*5113495bSYour Name 			E_num 2     2_str_stbc Indicates 2 stream STBC (Unsupported)
192*5113495bSYour Name 
193*5113495bSYour Name 			<legal 0-1>
194*5113495bSYour Name */
195*5113495bSYour Name 
196*5113495bSYour Name #define HT_SIG_INFO_STBC_OFFSET                                                     0x00000004
197*5113495bSYour Name #define HT_SIG_INFO_STBC_LSB                                                        4
198*5113495bSYour Name #define HT_SIG_INFO_STBC_MSB                                                        5
199*5113495bSYour Name #define HT_SIG_INFO_STBC_MASK                                                       0x00000030
200*5113495bSYour Name 
201*5113495bSYour Name 
202*5113495bSYour Name /* Description		FEC_CODING
203*5113495bSYour Name 
204*5113495bSYour Name 			<enum 0     ht_bcc>  Indicates BCC coding
205*5113495bSYour Name 			<enum 1     ht_ldpc>  Indicates LDPC coding
206*5113495bSYour Name 			<legal 0-1>
207*5113495bSYour Name */
208*5113495bSYour Name 
209*5113495bSYour Name #define HT_SIG_INFO_FEC_CODING_OFFSET                                               0x00000004
210*5113495bSYour Name #define HT_SIG_INFO_FEC_CODING_LSB                                                  6
211*5113495bSYour Name #define HT_SIG_INFO_FEC_CODING_MSB                                                  6
212*5113495bSYour Name #define HT_SIG_INFO_FEC_CODING_MASK                                                 0x00000040
213*5113495bSYour Name 
214*5113495bSYour Name 
215*5113495bSYour Name /* Description		SHORT_GI
216*5113495bSYour Name 
217*5113495bSYour Name 			<enum 0     ht_normal_gi>  Indicates normal guard interval
218*5113495bSYour Name 
219*5113495bSYour Name 			<enum 1     ht_short_gi>  Indicates short guard interval
220*5113495bSYour Name 
221*5113495bSYour Name 			<legal 0-1>
222*5113495bSYour Name */
223*5113495bSYour Name 
224*5113495bSYour Name #define HT_SIG_INFO_SHORT_GI_OFFSET                                                 0x00000004
225*5113495bSYour Name #define HT_SIG_INFO_SHORT_GI_LSB                                                    7
226*5113495bSYour Name #define HT_SIG_INFO_SHORT_GI_MSB                                                    7
227*5113495bSYour Name #define HT_SIG_INFO_SHORT_GI_MASK                                                   0x00000080
228*5113495bSYour Name 
229*5113495bSYour Name 
230*5113495bSYour Name /* Description		NUM_EXT_SP_STR
231*5113495bSYour Name 
232*5113495bSYour Name 			Number of extension spatial streams: (Used for TxBF)
233*5113495bSYour Name 			<enum 0     0_ext_sp_str>  No extension spatial streams
234*5113495bSYour Name 			E_num 1     1_ext_sp_str  Not supported: 1 extension spatial
235*5113495bSYour Name 			 streams
236*5113495bSYour Name 			E_num 2     2_ext_sp_str  Not supported:  2 extension spatial
237*5113495bSYour Name 			 streams
238*5113495bSYour Name 			<legal 0>
239*5113495bSYour Name */
240*5113495bSYour Name 
241*5113495bSYour Name #define HT_SIG_INFO_NUM_EXT_SP_STR_OFFSET                                           0x00000004
242*5113495bSYour Name #define HT_SIG_INFO_NUM_EXT_SP_STR_LSB                                              8
243*5113495bSYour Name #define HT_SIG_INFO_NUM_EXT_SP_STR_MSB                                              9
244*5113495bSYour Name #define HT_SIG_INFO_NUM_EXT_SP_STR_MASK                                             0x00000300
245*5113495bSYour Name 
246*5113495bSYour Name 
247*5113495bSYour Name /* Description		CRC
248*5113495bSYour Name 
249*5113495bSYour Name 			The CRC protects the HT-SIG (HT-SIG[0][23:0] and HT-SIG[1][9:0].
250*5113495bSYour Name 			The generator polynomial is G(D) = D8 + D2 + D + 1.  <legal
251*5113495bSYour Name 			 all>
252*5113495bSYour Name */
253*5113495bSYour Name 
254*5113495bSYour Name #define HT_SIG_INFO_CRC_OFFSET                                                      0x00000004
255*5113495bSYour Name #define HT_SIG_INFO_CRC_LSB                                                         10
256*5113495bSYour Name #define HT_SIG_INFO_CRC_MSB                                                         17
257*5113495bSYour Name #define HT_SIG_INFO_CRC_MASK                                                        0x0003fc00
258*5113495bSYour Name 
259*5113495bSYour Name 
260*5113495bSYour Name /* Description		SIGNAL_TAIL
261*5113495bSYour Name 
262*5113495bSYour Name 			The 6 bits of tail is always set to 0 is used to flush the
263*5113495bSYour Name 			 BCC encoder and decoder.  <legal 0>
264*5113495bSYour Name */
265*5113495bSYour Name 
266*5113495bSYour Name #define HT_SIG_INFO_SIGNAL_TAIL_OFFSET                                              0x00000004
267*5113495bSYour Name #define HT_SIG_INFO_SIGNAL_TAIL_LSB                                                 18
268*5113495bSYour Name #define HT_SIG_INFO_SIGNAL_TAIL_MSB                                                 23
269*5113495bSYour Name #define HT_SIG_INFO_SIGNAL_TAIL_MASK                                                0x00fc0000
270*5113495bSYour Name 
271*5113495bSYour Name 
272*5113495bSYour Name /* Description		RESERVED_1
273*5113495bSYour Name 
274*5113495bSYour Name 			This field is not part of HT-SIG:
275*5113495bSYour Name 			Reserved: Should be set to 0 by the MAC and ignored by the
276*5113495bSYour Name 			 PHY.  <legal 0>
277*5113495bSYour Name */
278*5113495bSYour Name 
279*5113495bSYour Name #define HT_SIG_INFO_RESERVED_1_OFFSET                                               0x00000004
280*5113495bSYour Name #define HT_SIG_INFO_RESERVED_1_LSB                                                  24
281*5113495bSYour Name #define HT_SIG_INFO_RESERVED_1_MSB                                                  30
282*5113495bSYour Name #define HT_SIG_INFO_RESERVED_1_MASK                                                 0x7f000000
283*5113495bSYour Name 
284*5113495bSYour Name 
285*5113495bSYour Name /* Description		RX_INTEGRITY_CHECK_PASSED
286*5113495bSYour Name 
287*5113495bSYour Name 			TX side: Set to 0
288*5113495bSYour Name 			RX side: Set to 1 if PHY determines the HT-SIG CRC check
289*5113495bSYour Name 			 has passed, else set to 0
290*5113495bSYour Name 
291*5113495bSYour Name 			<legal all>
292*5113495bSYour Name */
293*5113495bSYour Name 
294*5113495bSYour Name #define HT_SIG_INFO_RX_INTEGRITY_CHECK_PASSED_OFFSET                                0x00000004
295*5113495bSYour Name #define HT_SIG_INFO_RX_INTEGRITY_CHECK_PASSED_LSB                                   31
296*5113495bSYour Name #define HT_SIG_INFO_RX_INTEGRITY_CHECK_PASSED_MSB                                   31
297*5113495bSYour Name #define HT_SIG_INFO_RX_INTEGRITY_CHECK_PASSED_MASK                                  0x80000000
298*5113495bSYour Name 
299*5113495bSYour Name 
300*5113495bSYour Name 
301*5113495bSYour Name #endif   // HT_SIG_INFO
302