xref: /wlan-driver/fw-api/hw/qca6290/v1/tx_rate_stats_info.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 // $ATH_LICENSE_HW_HDR_C$
20 //
21 // DO NOT EDIT!  This file is automatically generated
22 //               These definitions are tied to a particular hardware layout
23 
24 
25 #ifndef _TX_RATE_STATS_INFO_H_
26 #define _TX_RATE_STATS_INFO_H_
27 #if !defined(__ASSEMBLER__)
28 #endif
29 
30 
31 // ################ START SUMMARY #################
32 //
33 //	Dword	Fields
34 //	0	tx_rate_stats_info_valid[0], transmit_bw[2:1], transmit_pkt_type[6:3], transmit_stbc[7], transmit_ldpc[8], transmit_sgi[10:9], transmit_mcs[14:11], ofdma_transmission[15], tones_in_ru[27:16], reserved_0a[31:28]
35 //	1	tsf_directly_after_ppdu_transmission[31:0]
36 //
37 // ################ END SUMMARY #################
38 
39 #define NUM_OF_DWORDS_TX_RATE_STATS_INFO 2
40 
41 struct tx_rate_stats_info {
42              uint32_t tx_rate_stats_info_valid        :  1, //[0]
43                       transmit_bw                     :  2, //[2:1]
44                       transmit_pkt_type               :  4, //[6:3]
45                       transmit_stbc                   :  1, //[7]
46                       transmit_ldpc                   :  1, //[8]
47                       transmit_sgi                    :  2, //[10:9]
48                       transmit_mcs                    :  4, //[14:11]
49                       ofdma_transmission              :  1, //[15]
50                       tones_in_ru                     : 12, //[27:16]
51                       reserved_0a                     :  4; //[31:28]
52              uint32_t tsf_directly_after_ppdu_transmission: 32; //[31:0]
53 };
54 
55 /*
56 
57 tx_rate_stats_info_valid
58 
59 			When set all other fields in this STRUCT contain valid
60 			info.
61 
62 
63 
64 
65 			<legal all>
66 
67 transmit_bw
68 
69 			Field only valid when Tx_rate_stats_info_valid is set
70 
71 
72 
73 			Indicates the BW of the upcoming transmission that shall
74 			likely start in about 3 -4 us on the medium
75 
76 
77 
78 			<enum 0 transmit_bw_20_MHz>
79 
80 			<enum 1 transmit_bw_40_MHz>
81 
82 			<enum 2 transmit_bw_80_MHz>
83 
84 			<enum 3 transmit_bw_160_MHz>
85 
86 
87 
88 			<legal all>
89 
90 transmit_pkt_type
91 
92 			Field only valid when Tx_rate_stats_info_valid is set
93 
94 
95 
96 			Field filled in by PDG.
97 
98 			Not valid when in SW transmit mode
99 
100 
101 
102 			The packet type
103 
104 			<enum 0 dot11a>802.11a PPDU type
105 
106 			<enum 1 dot11b>802.11b PPDU type
107 
108 			<enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
109 
110 			<enum 3 dot11ac>802.11ac PPDU type
111 
112 			<enum 4 dot11ax>802.11ax PPDU type
113 
114 transmit_stbc
115 
116 			Field only valid when Tx_rate_stats_info_valid is set
117 
118 
119 
120 			Field filled in by PDG.
121 
122 			Not valid when in SW transmit mode
123 
124 
125 
126 			When set, STBC transmission rate was used.
127 
128 transmit_ldpc
129 
130 			Field only valid when Tx_rate_stats_info_valid is set
131 
132 
133 
134 			Field filled in by PDG.
135 
136 			Not valid when in SW transmit mode
137 
138 
139 
140 			When set, use LDPC transmission rates
141 
142 transmit_sgi
143 
144 			Field only valid when Tx_rate_stats_info_valid is set
145 
146 
147 
148 			Field filled in by PDG.
149 
150 			Not valid when in SW transmit mode
151 
152 
153 
154 			<enum 0     0_8_us_sgi > Legacy normal GI. Can also be
155 			used for HE
156 
157 			<enum 1     0_4_us_sgi > Legacy short GI. Can also be
158 			used for HE
159 
160 			<enum 2     1_6_us_sgi > HE related GI
161 
162 			<enum 3     3_2_us_sgi > HE related GI
163 
164 			<legal 0 - 3>
165 
166 transmit_mcs
167 
168 			Field only valid when Tx_rate_stats_info_valid is set
169 
170 
171 
172 			Field filled in by PDG.
173 
174 			Not valid when in SW transmit mode
175 
176 
177 
178 			For details, refer to  MCS_TYPE description
179 
180 			<legal all>
181 
182 ofdma_transmission
183 
184 			Field only valid when Tx_rate_stats_info_valid is set
185 
186 
187 
188 			Field filled in by PDG.
189 
190 
191 
192 			Set when the transmission was an OFDMA transmission (DL
193 			or UL).
194 
195 			<legal all>
196 
197 tones_in_ru
198 
199 			Field only valid when Tx_rate_stats_info_valid is set
200 
201 
202 
203 			Field filled in by PDG.
204 
205 			Not valid when in SW transmit mode
206 
207 
208 
209 			The number of tones in the RU used.
210 
211 			<legal all>
212 
213 reserved_0a
214 
215 			<legal 0>
216 
217 tsf_directly_after_ppdu_transmission
218 
219 			Field only valid when Tx_rate_stats_info_valid is set
220 
221 
222 
223 			Lower 32 bits of the TSF, snapshot of this value when
224 			transmission of the PPDU containing the frame finished.
225 
226 			<legal all>
227 */
228 
229 
230 /* Description		TX_RATE_STATS_INFO_0_TX_RATE_STATS_INFO_VALID
231 
232 			When set all other fields in this STRUCT contain valid
233 			info.
234 
235 
236 
237 
238 			<legal all>
239 */
240 #define TX_RATE_STATS_INFO_0_TX_RATE_STATS_INFO_VALID_OFFSET         0x00000000
241 #define TX_RATE_STATS_INFO_0_TX_RATE_STATS_INFO_VALID_LSB            0
242 #define TX_RATE_STATS_INFO_0_TX_RATE_STATS_INFO_VALID_MASK           0x00000001
243 
244 /* Description		TX_RATE_STATS_INFO_0_TRANSMIT_BW
245 
246 			Field only valid when Tx_rate_stats_info_valid is set
247 
248 
249 
250 			Indicates the BW of the upcoming transmission that shall
251 			likely start in about 3 -4 us on the medium
252 
253 
254 
255 			<enum 0 transmit_bw_20_MHz>
256 
257 			<enum 1 transmit_bw_40_MHz>
258 
259 			<enum 2 transmit_bw_80_MHz>
260 
261 			<enum 3 transmit_bw_160_MHz>
262 
263 
264 
265 			<legal all>
266 */
267 #define TX_RATE_STATS_INFO_0_TRANSMIT_BW_OFFSET                      0x00000000
268 #define TX_RATE_STATS_INFO_0_TRANSMIT_BW_LSB                         1
269 #define TX_RATE_STATS_INFO_0_TRANSMIT_BW_MASK                        0x00000006
270 
271 /* Description		TX_RATE_STATS_INFO_0_TRANSMIT_PKT_TYPE
272 
273 			Field only valid when Tx_rate_stats_info_valid is set
274 
275 
276 
277 			Field filled in by PDG.
278 
279 			Not valid when in SW transmit mode
280 
281 
282 
283 			The packet type
284 
285 			<enum 0 dot11a>802.11a PPDU type
286 
287 			<enum 1 dot11b>802.11b PPDU type
288 
289 			<enum 2 dot11n_mm>802.11n Mixed Mode PPDU type
290 
291 			<enum 3 dot11ac>802.11ac PPDU type
292 
293 			<enum 4 dot11ax>802.11ax PPDU type
294 */
295 #define TX_RATE_STATS_INFO_0_TRANSMIT_PKT_TYPE_OFFSET                0x00000000
296 #define TX_RATE_STATS_INFO_0_TRANSMIT_PKT_TYPE_LSB                   3
297 #define TX_RATE_STATS_INFO_0_TRANSMIT_PKT_TYPE_MASK                  0x00000078
298 
299 /* Description		TX_RATE_STATS_INFO_0_TRANSMIT_STBC
300 
301 			Field only valid when Tx_rate_stats_info_valid is set
302 
303 
304 
305 			Field filled in by PDG.
306 
307 			Not valid when in SW transmit mode
308 
309 
310 
311 			When set, STBC transmission rate was used.
312 */
313 #define TX_RATE_STATS_INFO_0_TRANSMIT_STBC_OFFSET                    0x00000000
314 #define TX_RATE_STATS_INFO_0_TRANSMIT_STBC_LSB                       7
315 #define TX_RATE_STATS_INFO_0_TRANSMIT_STBC_MASK                      0x00000080
316 
317 /* Description		TX_RATE_STATS_INFO_0_TRANSMIT_LDPC
318 
319 			Field only valid when Tx_rate_stats_info_valid is set
320 
321 
322 
323 			Field filled in by PDG.
324 
325 			Not valid when in SW transmit mode
326 
327 
328 
329 			When set, use LDPC transmission rates
330 */
331 #define TX_RATE_STATS_INFO_0_TRANSMIT_LDPC_OFFSET                    0x00000000
332 #define TX_RATE_STATS_INFO_0_TRANSMIT_LDPC_LSB                       8
333 #define TX_RATE_STATS_INFO_0_TRANSMIT_LDPC_MASK                      0x00000100
334 
335 /* Description		TX_RATE_STATS_INFO_0_TRANSMIT_SGI
336 
337 			Field only valid when Tx_rate_stats_info_valid is set
338 
339 
340 
341 			Field filled in by PDG.
342 
343 			Not valid when in SW transmit mode
344 
345 
346 
347 			<enum 0     0_8_us_sgi > Legacy normal GI. Can also be
348 			used for HE
349 
350 			<enum 1     0_4_us_sgi > Legacy short GI. Can also be
351 			used for HE
352 
353 			<enum 2     1_6_us_sgi > HE related GI
354 
355 			<enum 3     3_2_us_sgi > HE related GI
356 
357 			<legal 0 - 3>
358 */
359 #define TX_RATE_STATS_INFO_0_TRANSMIT_SGI_OFFSET                     0x00000000
360 #define TX_RATE_STATS_INFO_0_TRANSMIT_SGI_LSB                        9
361 #define TX_RATE_STATS_INFO_0_TRANSMIT_SGI_MASK                       0x00000600
362 
363 /* Description		TX_RATE_STATS_INFO_0_TRANSMIT_MCS
364 
365 			Field only valid when Tx_rate_stats_info_valid is set
366 
367 
368 
369 			Field filled in by PDG.
370 
371 			Not valid when in SW transmit mode
372 
373 
374 
375 			For details, refer to  MCS_TYPE description
376 
377 			<legal all>
378 */
379 #define TX_RATE_STATS_INFO_0_TRANSMIT_MCS_OFFSET                     0x00000000
380 #define TX_RATE_STATS_INFO_0_TRANSMIT_MCS_LSB                        11
381 #define TX_RATE_STATS_INFO_0_TRANSMIT_MCS_MASK                       0x00007800
382 
383 /* Description		TX_RATE_STATS_INFO_0_OFDMA_TRANSMISSION
384 
385 			Field only valid when Tx_rate_stats_info_valid is set
386 
387 
388 
389 			Field filled in by PDG.
390 
391 
392 
393 			Set when the transmission was an OFDMA transmission (DL
394 			or UL).
395 
396 			<legal all>
397 */
398 #define TX_RATE_STATS_INFO_0_OFDMA_TRANSMISSION_OFFSET               0x00000000
399 #define TX_RATE_STATS_INFO_0_OFDMA_TRANSMISSION_LSB                  15
400 #define TX_RATE_STATS_INFO_0_OFDMA_TRANSMISSION_MASK                 0x00008000
401 
402 /* Description		TX_RATE_STATS_INFO_0_TONES_IN_RU
403 
404 			Field only valid when Tx_rate_stats_info_valid is set
405 
406 
407 
408 			Field filled in by PDG.
409 
410 			Not valid when in SW transmit mode
411 
412 
413 
414 			The number of tones in the RU used.
415 
416 			<legal all>
417 */
418 #define TX_RATE_STATS_INFO_0_TONES_IN_RU_OFFSET                      0x00000000
419 #define TX_RATE_STATS_INFO_0_TONES_IN_RU_LSB                         16
420 #define TX_RATE_STATS_INFO_0_TONES_IN_RU_MASK                        0x0fff0000
421 
422 /* Description		TX_RATE_STATS_INFO_0_RESERVED_0A
423 
424 			<legal 0>
425 */
426 #define TX_RATE_STATS_INFO_0_RESERVED_0A_OFFSET                      0x00000000
427 #define TX_RATE_STATS_INFO_0_RESERVED_0A_LSB                         28
428 #define TX_RATE_STATS_INFO_0_RESERVED_0A_MASK                        0xf0000000
429 
430 /* Description		TX_RATE_STATS_INFO_1_TSF_DIRECTLY_AFTER_PPDU_TRANSMISSION
431 
432 			Field only valid when Tx_rate_stats_info_valid is set
433 
434 
435 
436 			Lower 32 bits of the TSF, snapshot of this value when
437 			transmission of the PPDU containing the frame finished.
438 
439 			<legal all>
440 */
441 #define TX_RATE_STATS_INFO_1_TSF_DIRECTLY_AFTER_PPDU_TRANSMISSION_OFFSET 0x00000004
442 #define TX_RATE_STATS_INFO_1_TSF_DIRECTLY_AFTER_PPDU_TRANSMISSION_LSB 0
443 #define TX_RATE_STATS_INFO_1_TSF_DIRECTLY_AFTER_PPDU_TRANSMISSION_MASK 0xffffffff
444 
445 
446 #endif // _TX_RATE_STATS_INFO_H_
447