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