xref: /wlan-driver/fw-api/hw/qca6290/v2/receive_user_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2016-2017 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 //
20*5113495bSYour Name // DO NOT EDIT!  This file is automatically generated
21*5113495bSYour Name //               These definitions are tied to a particular hardware layout
22*5113495bSYour Name 
23*5113495bSYour Name 
24*5113495bSYour Name #ifndef _RECEIVE_USER_INFO_H_
25*5113495bSYour Name #define _RECEIVE_USER_INFO_H_
26*5113495bSYour Name #if !defined(__ASSEMBLER__)
27*5113495bSYour Name #endif
28*5113495bSYour Name 
29*5113495bSYour Name 
30*5113495bSYour Name // ################ START SUMMARY #################
31*5113495bSYour Name //
32*5113495bSYour Name //	Dword	Fields
33*5113495bSYour Name //	0	phy_ppdu_id[15:0], user_rssi[23:16], pkt_type[27:24], stbc[28], sgi[30:29], reserved_0[31]
34*5113495bSYour Name //	1	rate_mcs[3:0], reception_type[5:4], receive_bandwidth[7:6], mimo_ss_bitmap[15:8], user_ru_allocation[23:16], nss[26:24], reserved_1b[31:27]
35*5113495bSYour Name //
36*5113495bSYour Name // ################ END SUMMARY #################
37*5113495bSYour Name 
38*5113495bSYour Name #define NUM_OF_DWORDS_RECEIVE_USER_INFO 2
39*5113495bSYour Name 
40*5113495bSYour Name struct receive_user_info {
41*5113495bSYour Name              uint32_t phy_ppdu_id                     : 16, //[15:0]
42*5113495bSYour Name                       user_rssi                       :  8, //[23:16]
43*5113495bSYour Name                       pkt_type                        :  4, //[27:24]
44*5113495bSYour Name                       stbc                            :  1, //[28]
45*5113495bSYour Name                       sgi                             :  2, //[30:29]
46*5113495bSYour Name                       reserved_0                      :  1; //[31]
47*5113495bSYour Name              uint32_t rate_mcs                        :  4, //[3:0]
48*5113495bSYour Name                       reception_type                  :  2, //[5:4]
49*5113495bSYour Name                       receive_bandwidth               :  2, //[7:6]
50*5113495bSYour Name                       mimo_ss_bitmap                  :  8, //[15:8]
51*5113495bSYour Name                       user_ru_allocation              :  8, //[23:16]
52*5113495bSYour Name                       nss                             :  3, //[26:24]
53*5113495bSYour Name                       reserved_1b                     :  5; //[31:27]
54*5113495bSYour Name };
55*5113495bSYour Name 
56*5113495bSYour Name /*
57*5113495bSYour Name 
58*5113495bSYour Name phy_ppdu_id
59*5113495bSYour Name 
60*5113495bSYour Name 			A ppdu counter value that PHY increments for every PPDU
61*5113495bSYour Name 			received. The counter value wraps around
62*5113495bSYour Name 
63*5113495bSYour Name 			<legal all>
64*5113495bSYour Name 
65*5113495bSYour Name user_rssi
66*5113495bSYour Name 
67*5113495bSYour Name 			RSSI for this user
68*5113495bSYour Name 
69*5113495bSYour Name 			Frequency domain RSSI measurement for this user. Based
70*5113495bSYour Name 			on the channel estimate.
71*5113495bSYour Name 
72*5113495bSYour Name 
73*5113495bSYour Name 
74*5113495bSYour Name 			<legal all>
75*5113495bSYour Name 
76*5113495bSYour Name pkt_type
77*5113495bSYour Name 
78*5113495bSYour Name 			Packet type:
79*5113495bSYour Name 
80*5113495bSYour Name 
81*5113495bSYour Name 
82*5113495bSYour Name 			<enum 0 dot11a>802.11a PPDU type
83*5113495bSYour Name 
84*5113495bSYour Name 			<enum 1 dot11b>802.11b PPDU type
85*5113495bSYour Name 
86*5113495bSYour Name 			<enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
87*5113495bSYour Name 
88*5113495bSYour Name 			<enum 3 dot11ac>802.11ac PPDU type
89*5113495bSYour Name 
90*5113495bSYour Name 			<enum 4 dot11ax>802.11ax PPDU type
91*5113495bSYour Name 
92*5113495bSYour Name stbc
93*5113495bSYour Name 
94*5113495bSYour Name 			When set, use STBC transmission rates
95*5113495bSYour Name 
96*5113495bSYour Name sgi
97*5113495bSYour Name 
98*5113495bSYour Name 			Field only valid when pkt type is HT, VHT or HE.
99*5113495bSYour Name 
100*5113495bSYour Name 
101*5113495bSYour Name 
102*5113495bSYour Name 			<enum 0     gi_0_8_us > Legacy normal GI.  Can also be
103*5113495bSYour Name 			used for HE
104*5113495bSYour Name 
105*5113495bSYour Name 			<enum 1     gi_0_4_us > Legacy short GI.  Can also be
106*5113495bSYour Name 			used for HE
107*5113495bSYour Name 
108*5113495bSYour Name 			<enum 2     gi_1_6_us > HE related GI
109*5113495bSYour Name 
110*5113495bSYour Name 			<enum 3     gi_3_2_us > HE related GI
111*5113495bSYour Name 
112*5113495bSYour Name 			<legal 0 - 3>
113*5113495bSYour Name 
114*5113495bSYour Name reserved_0
115*5113495bSYour Name 
116*5113495bSYour Name 			<legal 0>
117*5113495bSYour Name 
118*5113495bSYour Name rate_mcs
119*5113495bSYour Name 
120*5113495bSYour Name 			For details, refer to  MCS_TYPE description
121*5113495bSYour Name 
122*5113495bSYour Name 			<legal all>
123*5113495bSYour Name 
124*5113495bSYour Name reception_type
125*5113495bSYour Name 
126*5113495bSYour Name 			Indicates what type of reception this is.
127*5113495bSYour Name 
128*5113495bSYour Name 			<enum 0     reception_type_SU >
129*5113495bSYour Name 
130*5113495bSYour Name 			<enum 1     reception_type_MU_MIMO >
131*5113495bSYour Name 
132*5113495bSYour Name 			<enum 2     reception_type_MU_OFDMA >
133*5113495bSYour Name 
134*5113495bSYour Name 			<enum 3     reception_type_MU_OFDMA_MIMO >
135*5113495bSYour Name 
136*5113495bSYour Name 			<legal all>
137*5113495bSYour Name 
138*5113495bSYour Name receive_bandwidth
139*5113495bSYour Name 
140*5113495bSYour Name 			Full receive Bandwidth
141*5113495bSYour Name 
142*5113495bSYour Name 
143*5113495bSYour Name 
144*5113495bSYour Name 			<enum 0     full_rx_bw_20_mhz>
145*5113495bSYour Name 
146*5113495bSYour Name 			<enum 1      full_rx_bw_40_mhz>
147*5113495bSYour Name 
148*5113495bSYour Name 			<enum 2      full_rx_bw_80_mhz>
149*5113495bSYour Name 
150*5113495bSYour Name 			<enum 3      full_rx_bw_160_mhz>
151*5113495bSYour Name 
152*5113495bSYour Name 
153*5113495bSYour Name 
154*5113495bSYour Name 			<legal 0-3>
155*5113495bSYour Name 
156*5113495bSYour Name mimo_ss_bitmap
157*5113495bSYour Name 
158*5113495bSYour Name 			Field only valid in case of MIMO type reception
159*5113495bSYour Name 
160*5113495bSYour Name 
161*5113495bSYour Name 
162*5113495bSYour Name 			Bitmap, with each bit indicating if the related spatial
163*5113495bSYour Name 			stream is used for this STA
164*5113495bSYour Name 
165*5113495bSYour Name 			LSB related to SS 0
166*5113495bSYour Name 
167*5113495bSYour Name 
168*5113495bSYour Name 
169*5113495bSYour Name 			0: spatial stream not used for this reception
170*5113495bSYour Name 
171*5113495bSYour Name 			1: spatial stream used for this reception
172*5113495bSYour Name 
173*5113495bSYour Name 
174*5113495bSYour Name 
175*5113495bSYour Name 			<legal all>
176*5113495bSYour Name 
177*5113495bSYour Name user_ru_allocation
178*5113495bSYour Name 
179*5113495bSYour Name 			Field only valid in case of OFDMA uplink type reception
180*5113495bSYour Name 
181*5113495bSYour Name 
182*5113495bSYour Name 
183*5113495bSYour Name 			Indicates the RU number for this user
184*5113495bSYour Name 
185*5113495bSYour Name 			<legal 0-73>
186*5113495bSYour Name 
187*5113495bSYour Name nss
188*5113495bSYour Name 
189*5113495bSYour Name 			Number of Spatial Streams occupied by the User
190*5113495bSYour Name 
191*5113495bSYour Name 			<enum 0 1_spatial_stream>Single spatial stream
192*5113495bSYour Name 
193*5113495bSYour Name 			<enum 1 2_spatial_streams>2 spatial streams
194*5113495bSYour Name 
195*5113495bSYour Name 			<enum 2 3_spatial_streams>3 spatial streams
196*5113495bSYour Name 
197*5113495bSYour Name 			<enum 3 4_spatial_streams>4 spatial streams
198*5113495bSYour Name 
199*5113495bSYour Name 			<enum 4 5_spatial_streams>5 spatial streams
200*5113495bSYour Name 
201*5113495bSYour Name 			<enum 5 6_spatial_streams>6 spatial streams
202*5113495bSYour Name 
203*5113495bSYour Name 			<enum 6 7_spatial_streams>7 spatial streams
204*5113495bSYour Name 
205*5113495bSYour Name 			<enum 7 8_spatial_streams>8 spatial streams
206*5113495bSYour Name 
207*5113495bSYour Name reserved_1b
208*5113495bSYour Name 
209*5113495bSYour Name 			<legal 0>
210*5113495bSYour Name */
211*5113495bSYour Name 
212*5113495bSYour Name 
213*5113495bSYour Name /* Description		RECEIVE_USER_INFO_0_PHY_PPDU_ID
214*5113495bSYour Name 
215*5113495bSYour Name 			A ppdu counter value that PHY increments for every PPDU
216*5113495bSYour Name 			received. The counter value wraps around
217*5113495bSYour Name 
218*5113495bSYour Name 			<legal all>
219*5113495bSYour Name */
220*5113495bSYour Name #define RECEIVE_USER_INFO_0_PHY_PPDU_ID_OFFSET                       0x00000000
221*5113495bSYour Name #define RECEIVE_USER_INFO_0_PHY_PPDU_ID_LSB                          0
222*5113495bSYour Name #define RECEIVE_USER_INFO_0_PHY_PPDU_ID_MASK                         0x0000ffff
223*5113495bSYour Name 
224*5113495bSYour Name /* Description		RECEIVE_USER_INFO_0_USER_RSSI
225*5113495bSYour Name 
226*5113495bSYour Name 			RSSI for this user
227*5113495bSYour Name 
228*5113495bSYour Name 			Frequency domain RSSI measurement for this user. Based
229*5113495bSYour Name 			on the channel estimate.
230*5113495bSYour Name 
231*5113495bSYour Name 
232*5113495bSYour Name 
233*5113495bSYour Name 			<legal all>
234*5113495bSYour Name */
235*5113495bSYour Name #define RECEIVE_USER_INFO_0_USER_RSSI_OFFSET                         0x00000000
236*5113495bSYour Name #define RECEIVE_USER_INFO_0_USER_RSSI_LSB                            16
237*5113495bSYour Name #define RECEIVE_USER_INFO_0_USER_RSSI_MASK                           0x00ff0000
238*5113495bSYour Name 
239*5113495bSYour Name /* Description		RECEIVE_USER_INFO_0_PKT_TYPE
240*5113495bSYour Name 
241*5113495bSYour Name 			Packet type:
242*5113495bSYour Name 
243*5113495bSYour Name 
244*5113495bSYour Name 
245*5113495bSYour Name 			<enum 0 dot11a>802.11a PPDU type
246*5113495bSYour Name 
247*5113495bSYour Name 			<enum 1 dot11b>802.11b PPDU type
248*5113495bSYour Name 
249*5113495bSYour Name 			<enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
250*5113495bSYour Name 
251*5113495bSYour Name 			<enum 3 dot11ac>802.11ac PPDU type
252*5113495bSYour Name 
253*5113495bSYour Name 			<enum 4 dot11ax>802.11ax PPDU type
254*5113495bSYour Name */
255*5113495bSYour Name #define RECEIVE_USER_INFO_0_PKT_TYPE_OFFSET                          0x00000000
256*5113495bSYour Name #define RECEIVE_USER_INFO_0_PKT_TYPE_LSB                             24
257*5113495bSYour Name #define RECEIVE_USER_INFO_0_PKT_TYPE_MASK                            0x0f000000
258*5113495bSYour Name 
259*5113495bSYour Name /* Description		RECEIVE_USER_INFO_0_STBC
260*5113495bSYour Name 
261*5113495bSYour Name 			When set, use STBC transmission rates
262*5113495bSYour Name */
263*5113495bSYour Name #define RECEIVE_USER_INFO_0_STBC_OFFSET                              0x00000000
264*5113495bSYour Name #define RECEIVE_USER_INFO_0_STBC_LSB                                 28
265*5113495bSYour Name #define RECEIVE_USER_INFO_0_STBC_MASK                                0x10000000
266*5113495bSYour Name 
267*5113495bSYour Name /* Description		RECEIVE_USER_INFO_0_SGI
268*5113495bSYour Name 
269*5113495bSYour Name 			Field only valid when pkt type is HT, VHT or HE.
270*5113495bSYour Name 
271*5113495bSYour Name 
272*5113495bSYour Name 
273*5113495bSYour Name 			<enum 0     gi_0_8_us > Legacy normal GI.  Can also be
274*5113495bSYour Name 			used for HE
275*5113495bSYour Name 
276*5113495bSYour Name 			<enum 1     gi_0_4_us > Legacy short GI.  Can also be
277*5113495bSYour Name 			used for HE
278*5113495bSYour Name 
279*5113495bSYour Name 			<enum 2     gi_1_6_us > HE related GI
280*5113495bSYour Name 
281*5113495bSYour Name 			<enum 3     gi_3_2_us > HE related GI
282*5113495bSYour Name 
283*5113495bSYour Name 			<legal 0 - 3>
284*5113495bSYour Name */
285*5113495bSYour Name #define RECEIVE_USER_INFO_0_SGI_OFFSET                               0x00000000
286*5113495bSYour Name #define RECEIVE_USER_INFO_0_SGI_LSB                                  29
287*5113495bSYour Name #define RECEIVE_USER_INFO_0_SGI_MASK                                 0x60000000
288*5113495bSYour Name 
289*5113495bSYour Name /* Description		RECEIVE_USER_INFO_0_RESERVED_0
290*5113495bSYour Name 
291*5113495bSYour Name 			<legal 0>
292*5113495bSYour Name */
293*5113495bSYour Name #define RECEIVE_USER_INFO_0_RESERVED_0_OFFSET                        0x00000000
294*5113495bSYour Name #define RECEIVE_USER_INFO_0_RESERVED_0_LSB                           31
295*5113495bSYour Name #define RECEIVE_USER_INFO_0_RESERVED_0_MASK                          0x80000000
296*5113495bSYour Name 
297*5113495bSYour Name /* Description		RECEIVE_USER_INFO_1_RATE_MCS
298*5113495bSYour Name 
299*5113495bSYour Name 			For details, refer to  MCS_TYPE description
300*5113495bSYour Name 
301*5113495bSYour Name 			<legal all>
302*5113495bSYour Name */
303*5113495bSYour Name #define RECEIVE_USER_INFO_1_RATE_MCS_OFFSET                          0x00000004
304*5113495bSYour Name #define RECEIVE_USER_INFO_1_RATE_MCS_LSB                             0
305*5113495bSYour Name #define RECEIVE_USER_INFO_1_RATE_MCS_MASK                            0x0000000f
306*5113495bSYour Name 
307*5113495bSYour Name /* Description		RECEIVE_USER_INFO_1_RECEPTION_TYPE
308*5113495bSYour Name 
309*5113495bSYour Name 			Indicates what type of reception this is.
310*5113495bSYour Name 
311*5113495bSYour Name 			<enum 0     reception_type_SU >
312*5113495bSYour Name 
313*5113495bSYour Name 			<enum 1     reception_type_MU_MIMO >
314*5113495bSYour Name 
315*5113495bSYour Name 			<enum 2     reception_type_MU_OFDMA >
316*5113495bSYour Name 
317*5113495bSYour Name 			<enum 3     reception_type_MU_OFDMA_MIMO >
318*5113495bSYour Name 
319*5113495bSYour Name 			<legal all>
320*5113495bSYour Name */
321*5113495bSYour Name #define RECEIVE_USER_INFO_1_RECEPTION_TYPE_OFFSET                    0x00000004
322*5113495bSYour Name #define RECEIVE_USER_INFO_1_RECEPTION_TYPE_LSB                       4
323*5113495bSYour Name #define RECEIVE_USER_INFO_1_RECEPTION_TYPE_MASK                      0x00000030
324*5113495bSYour Name 
325*5113495bSYour Name /* Description		RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH
326*5113495bSYour Name 
327*5113495bSYour Name 			Full receive Bandwidth
328*5113495bSYour Name 
329*5113495bSYour Name 
330*5113495bSYour Name 
331*5113495bSYour Name 			<enum 0     full_rx_bw_20_mhz>
332*5113495bSYour Name 
333*5113495bSYour Name 			<enum 1      full_rx_bw_40_mhz>
334*5113495bSYour Name 
335*5113495bSYour Name 			<enum 2      full_rx_bw_80_mhz>
336*5113495bSYour Name 
337*5113495bSYour Name 			<enum 3      full_rx_bw_160_mhz>
338*5113495bSYour Name 
339*5113495bSYour Name 
340*5113495bSYour Name 
341*5113495bSYour Name 			<legal 0-3>
342*5113495bSYour Name */
343*5113495bSYour Name #define RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH_OFFSET                 0x00000004
344*5113495bSYour Name #define RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH_LSB                    6
345*5113495bSYour Name #define RECEIVE_USER_INFO_1_RECEIVE_BANDWIDTH_MASK                   0x000000c0
346*5113495bSYour Name 
347*5113495bSYour Name /* Description		RECEIVE_USER_INFO_1_MIMO_SS_BITMAP
348*5113495bSYour Name 
349*5113495bSYour Name 			Field only valid in case of MIMO type reception
350*5113495bSYour Name 
351*5113495bSYour Name 
352*5113495bSYour Name 
353*5113495bSYour Name 			Bitmap, with each bit indicating if the related spatial
354*5113495bSYour Name 			stream is used for this STA
355*5113495bSYour Name 
356*5113495bSYour Name 			LSB related to SS 0
357*5113495bSYour Name 
358*5113495bSYour Name 
359*5113495bSYour Name 
360*5113495bSYour Name 			0: spatial stream not used for this reception
361*5113495bSYour Name 
362*5113495bSYour Name 			1: spatial stream used for this reception
363*5113495bSYour Name 
364*5113495bSYour Name 
365*5113495bSYour Name 
366*5113495bSYour Name 			<legal all>
367*5113495bSYour Name */
368*5113495bSYour Name #define RECEIVE_USER_INFO_1_MIMO_SS_BITMAP_OFFSET                    0x00000004
369*5113495bSYour Name #define RECEIVE_USER_INFO_1_MIMO_SS_BITMAP_LSB                       8
370*5113495bSYour Name #define RECEIVE_USER_INFO_1_MIMO_SS_BITMAP_MASK                      0x0000ff00
371*5113495bSYour Name 
372*5113495bSYour Name /* Description		RECEIVE_USER_INFO_1_USER_RU_ALLOCATION
373*5113495bSYour Name 
374*5113495bSYour Name 			Field only valid in case of OFDMA uplink type reception
375*5113495bSYour Name 
376*5113495bSYour Name 
377*5113495bSYour Name 
378*5113495bSYour Name 			Indicates the RU number for this user
379*5113495bSYour Name 
380*5113495bSYour Name 			<legal 0-73>
381*5113495bSYour Name */
382*5113495bSYour Name #define RECEIVE_USER_INFO_1_USER_RU_ALLOCATION_OFFSET                0x00000004
383*5113495bSYour Name #define RECEIVE_USER_INFO_1_USER_RU_ALLOCATION_LSB                   16
384*5113495bSYour Name #define RECEIVE_USER_INFO_1_USER_RU_ALLOCATION_MASK                  0x00ff0000
385*5113495bSYour Name 
386*5113495bSYour Name /* Description		RECEIVE_USER_INFO_1_NSS
387*5113495bSYour Name 
388*5113495bSYour Name 			Number of Spatial Streams occupied by the User
389*5113495bSYour Name 
390*5113495bSYour Name 			<enum 0 1_spatial_stream>Single spatial stream
391*5113495bSYour Name 
392*5113495bSYour Name 			<enum 1 2_spatial_streams>2 spatial streams
393*5113495bSYour Name 
394*5113495bSYour Name 			<enum 2 3_spatial_streams>3 spatial streams
395*5113495bSYour Name 
396*5113495bSYour Name 			<enum 3 4_spatial_streams>4 spatial streams
397*5113495bSYour Name 
398*5113495bSYour Name 			<enum 4 5_spatial_streams>5 spatial streams
399*5113495bSYour Name 
400*5113495bSYour Name 			<enum 5 6_spatial_streams>6 spatial streams
401*5113495bSYour Name 
402*5113495bSYour Name 			<enum 6 7_spatial_streams>7 spatial streams
403*5113495bSYour Name 
404*5113495bSYour Name 			<enum 7 8_spatial_streams>8 spatial streams
405*5113495bSYour Name */
406*5113495bSYour Name #define RECEIVE_USER_INFO_1_NSS_OFFSET                               0x00000004
407*5113495bSYour Name #define RECEIVE_USER_INFO_1_NSS_LSB                                  24
408*5113495bSYour Name #define RECEIVE_USER_INFO_1_NSS_MASK                                 0x07000000
409*5113495bSYour Name 
410*5113495bSYour Name /* Description		RECEIVE_USER_INFO_1_RESERVED_1B
411*5113495bSYour Name 
412*5113495bSYour Name 			<legal 0>
413*5113495bSYour Name */
414*5113495bSYour Name #define RECEIVE_USER_INFO_1_RESERVED_1B_OFFSET                       0x00000004
415*5113495bSYour Name #define RECEIVE_USER_INFO_1_RESERVED_1B_LSB                          27
416*5113495bSYour Name #define RECEIVE_USER_INFO_1_RESERVED_1B_MASK                         0xf8000000
417*5113495bSYour Name 
418*5113495bSYour Name 
419*5113495bSYour Name #endif // _RECEIVE_USER_INFO_H_
420