xref: /wlan-dirver/qca-wifi-host-cmn/dp/inc/cdp_txrx_stats_struct.h (revision fed4bfb04901bc53e8f21d8cfd8d4a151e546d11)
1 /*
2  * Copyright (c) 2016-2020 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 /**
20  * @file cdp_txrx_stats_struct.h
21  * @brief Define the host data path stats API functions
22  * called by the host control SW and the OS interface module
23  */
24 #ifndef _CDP_TXRX_STATS_STRUCT_H_
25 #define _CDP_TXRX_STATS_STRUCT_H_
26 
27 #include <qdf_types.h>
28 
29 #define TXRX_STATS_LEVEL_OFF   0
30 #define TXRX_STATS_LEVEL_BASIC 1
31 #define TXRX_STATS_LEVEL_FULL  2
32 
33 #define BSS_CHAN_INFO_READ                        1
34 #define BSS_CHAN_INFO_READ_AND_CLEAR              2
35 
36 #define TX_FRAME_TYPE_DATA 0
37 #define TX_FRAME_TYPE_MGMT 1
38 #define TX_FRAME_TYPE_BEACON 2
39 
40 #ifndef TXRX_STATS_LEVEL
41 #define TXRX_STATS_LEVEL TXRX_STATS_LEVEL_BASIC
42 #endif
43 
44 /* 1 additional MCS is for invalid values */
45 #define MAX_MCS (12 + 1)
46 #define MAX_MCS_11A 8
47 #define MAX_MCS_11B 7
48 #define MAX_MCS_11AC 12
49 /* 1 additional GI is for invalid values */
50 #define MAX_GI (4 + 1)
51 #define SS_COUNT 8
52 #define MAX_BW 7
53 #define MAX_RECEPTION_TYPES 4
54 
55 #define MAX_TRANSMIT_TYPES	9
56 
57 #define MAX_USER_POS		8
58 #define MAX_MU_GROUP_ID		64
59 #define MAX_RU_LOCATIONS	6
60 #define RU_26			1
61 #define RU_52			2
62 #define RU_106			4
63 #define RU_242			9
64 #define RU_484			18
65 #define RU_996			37
66 
67 /* WME stream classes */
68 #define WME_AC_BE    0    /* best effort */
69 #define WME_AC_BK    1    /* background */
70 #define WME_AC_VI    2    /* video */
71 #define WME_AC_VO    3    /* voice */
72 #define WME_AC_MAX   4    /* MAX AC Value */
73 
74 #define CDP_MAX_RX_RINGS 4  /* max rx rings */
75 #define CDP_MAX_TX_COMP_RINGS 3  /* max tx completion rings */
76 #define CDP_MAX_TX_TQM_STATUS 9  /* max tx tqm completion status */
77 #define CDP_MAX_TX_HTT_STATUS 7  /* max tx htt completion status */
78 
79 /* TID level VoW stats macros
80  * to add and get stats
81  */
82 #define PFLOW_TXRX_TIDQ_STATS_ADD(_peer, _tid, _var, _val) \
83 	(((_peer)->tidq_stats[_tid]).stats[_var]) += _val
84 #define PFLOW_TXRX_TIDQ_STATS_GET(_peer, _tid, _var, _val) \
85 	((_peer)->tidq_stats[_tid].stats[_var])
86 /*
87  * Video only stats
88  */
89 #define PFLOW_CTRL_PDEV_VIDEO_STATS_SET(_pdev, _var, _val) \
90 	(((_pdev)->vow.vistats[_var]).value) = _val
91 #define PFLOW_CTRL_PDEV_VIDEO_STATS_GET(_pdev, _var) \
92 	((_pdev)->vow.vistats[_var].value)
93 #define PFLOW_CTRL_PDEV_VIDEO_STATS_ADD(_pdev, _var, _val) \
94 	(((_pdev)->vow.vistats[_var]).value) += _val
95 /*
96  * video delay stats
97  */
98 #define PFLOW_CTRL_PDEV_DELAY_VIDEO_STATS_SET(_pdev, _var, _val) \
99 	(((_pdev)->vow.delaystats[_var]).value) = _val
100 #define PFLOW_CTRL_PDEV_DELAY_VIDEO_STATS_GET(_pdev, _var) \
101 	((_pdev)->vow.delaystats[_var].value)
102 #define PFLOW_CTRL_PDEV_DELAY_VIDEO_STATS_ADD(_pdev, _var, _val) \
103 	(((_pdev)->vow.delaystats[_var]).value) += _val
104 /*
105  * Number of TLVs sent by FW. Needs to reflect
106  * HTT_PPDU_STATS_MAX_TAG declared in FW
107  */
108 #define CDP_PPDU_STATS_MAX_TAG 14
109 #define CDP_MAX_DATA_TIDS 9
110 
111 #define CDP_WDI_NUM_EVENTS WDI_NUM_EVENTS
112 
113 #define CDP_FCTL_RETRY 0x0800
114 #define CDP_FC_IS_RETRY_SET(_fc) \
115 	((_fc) & qdf_cpu_to_le16(CDP_FCTL_RETRY))
116 
117 #define INVALID_RSSI 255
118 
119 #define CDP_RSSI_MULTIPLIER BIT(8)
120 #define CDP_RSSI_MUL(x, mul) ((x) * (mul))
121 #define CDP_RSSI_RND(x, mul) ((((x) % (mul)) >= ((mul) / 2)) ?\
122 	((x) + ((mul) - 1)) / (mul) : (x) / (mul))
123 
124 #define CDP_RSSI_OUT(x) (CDP_RSSI_RND((x), CDP_RSSI_MULTIPLIER))
125 #define CDP_RSSI_IN(x)  (CDP_RSSI_MUL((x), CDP_RSSI_MULTIPLIER))
126 #define CDP_RSSI_AVG(x, y) ((((x) << 2) + (y) - (x)) >> 2)
127 
128 #define CDP_RSSI_UPDATE_AVG(x, y) x = CDP_RSSI_AVG((x), CDP_RSSI_IN((y)))
129 
130 /*Max SU EVM count */
131 #define DP_RX_MAX_SU_EVM_COUNT 32
132 
133 #define WDI_EVENT_BASE 0x100
134 
135 #define CDP_TXRX_RATECODE_MCS_MASK 0xF
136 #define CDP_TXRX_RATECODE_NSS_MASK 0x3
137 #define CDP_TXRX_RATECODE_NSS_LSB 4
138 #define CDP_TXRX_RATECODE_PREM_MASK 0x3
139 #define CDP_TXRX_RATECODE_PREM_LSB 6
140 
141 /* Below BW_GAIN should be added to the SNR value of every ppdu based on the
142  * bandwidth. This table is obtained from HALPHY.
143  * BW         BW_Gain
144  * 20          0
145  * 40          3dBm
146  * 80          6dBm
147  * 160/80P80   9dBm
148  */
149 
150 #define PKT_BW_GAIN_20MHZ 0
151 #define PKT_BW_GAIN_40MHZ 3
152 #define PKT_BW_GAIN_80MHZ 6
153 #define PKT_BW_GAIN_160MHZ 9
154 
155 /*
156  * cdp_tx_transmit_type: Transmit type index
157  * SU: SU Transmit type index
158  * MU_MIMO: MU_MIMO Transmit type index
159  * MU_OFDMA: MU_OFDMA Transmit type index
160  * MU_MIMO_OFDMA: MU MIMO OFDMA Transmit type index
161  */
162 enum cdp_tx_transmit_type {
163 	SU = 0,
164 	MU_MIMO,
165 	MU_OFDMA,
166 	MU_MIMO_OFDMA,
167 };
168 
169 /*
170  * cdp_ru_index: Different RU index
171  *
172  * RU_26_INDEX : 26-tone Resource Unit index
173  * RU_52_INDEX : 52-tone Resource Unit index
174  * RU_106_INDEX: 106-tone Resource Unit index
175  * RU_242_INDEX: 242-tone Resource Unit index
176  * RU_484_INDEX: 484-tone Resource Unit index
177  * RU_996_INDEX: 996-tone Resource Unit index
178  */
179 enum cdp_ru_index {
180 	RU_26_INDEX = 0,
181 	RU_52_INDEX,
182 	RU_106_INDEX,
183 	RU_242_INDEX,
184 	RU_484_INDEX,
185 	RU_996_INDEX,
186 };
187 
188 #ifdef FEATURE_TSO_STATS
189 /* Number of TSO Packet Statistics captured */
190 #define CDP_MAX_TSO_PACKETS 5
191 /* Information for Number of Segments for a TSO Packet captured */
192 #define CDP_MAX_TSO_SEGMENTS 2
193 /* Information for Number of Fragments for a TSO Segment captured */
194 #define CDP_MAX_TSO_FRAGMENTS 6
195 #endif /* FEATURE_TSO_STATS */
196 
197 /* Different Packet Types */
198 enum cdp_packet_type {
199 	DOT11_A = 0,
200 	DOT11_B = 1,
201 	DOT11_N = 2,
202 	DOT11_AC = 3,
203 	DOT11_AX = 4,
204 	DOT11_MAX = 5,
205 };
206 
207 /*
208  * cdp_mu_packet_type: MU Rx type index
209  * RX_TYPE_MU_MIMO: MU MIMO Rx type index
210  * RX_TYPE_MU_OFDMA: MU OFDMA Rx type index
211  * MU_MIMO_OFDMA: MU Rx MAX type index
212  */
213 enum cdp_mu_packet_type {
214 	RX_TYPE_MU_MIMO = 0,
215 	RX_TYPE_MU_OFDMA = 1,
216 	RX_TYPE_MU_MAX = 2,
217 };
218 
219 enum WDI_EVENT {
220 	WDI_EVENT_TX_STATUS = WDI_EVENT_BASE,
221 	WDI_EVENT_OFFLOAD_ALL,
222 	WDI_EVENT_RX_DESC_REMOTE,
223 	WDI_EVENT_RX_PEER_INVALID,
224 	WDI_EVENT_DBG_PRINT, /* NEED to integrate pktlog changes*/
225 	WDI_EVENT_RX_CBF_REMOTE,
226 	WDI_EVENT_RATE_FIND,
227 	WDI_EVENT_RATE_UPDATE,
228 	WDI_EVENT_SW_EVENT,
229 	WDI_EVENT_RX_DESC,
230 	WDI_EVENT_LITE_T2H,
231 	WDI_EVENT_LITE_RX,
232 	WDI_EVENT_RX_PPDU_DESC,
233 	WDI_EVENT_TX_PPDU_DESC,
234 	WDI_EVENT_TX_MSDU_DESC,
235 	WDI_EVENT_TX_DATA,
236 	WDI_EVENT_RX_DATA,
237 	WDI_EVENT_TX_MGMT_CTRL,
238 	WDI_EVENT_HTT_STATS,
239 	WDI_EVENT_TX_BEACON,
240 	WDI_EVENT_PEER_STATS,
241 	WDI_EVENT_TX_SOJOURN_STAT,
242 	WDI_EVENT_UPDATE_DP_STATS,
243 	WDI_EVENT_RX_MGMT_CTRL,
244 	WDI_EVENT_PEER_CREATE,
245 	WDI_EVENT_PEER_DESTROY,
246 	WDI_EVENT_PEER_FLUSH_RATE_STATS,
247 	WDI_EVENT_FLUSH_RATE_STATS_REQ,
248 	WDI_EVENT_RX_MPDU,
249 	/* End of new event items */
250 	WDI_EVENT_LAST
251 };
252 
253 #define WDI_NUM_EVENTS WDI_EVENT_LAST - WDI_EVENT_BASE
254 
255 struct cdp_stats_extd {
256 };
257 
258 /* TID level Tx/Rx stats
259  *
260  */
261 enum cdp_txrx_tidq_stats {
262 	/* Tx Counters */
263 	TX_MSDU_TOTAL_LINUX_SUBSYSTEM,
264 	TX_MSDU_TOTAL_FROM_OSIF,
265 	TX_MSDU_TX_COMP_PKT_CNT,
266 	/* Rx Counters */
267 	RX_MSDU_TOTAL_FROM_FW,
268 	RX_MSDU_MCAST_FROM_FW,
269 	RX_TID_MISMATCH_FROM_FW,
270 	RX_MSDU_MISC_PKTS,
271 	RX_MSDU_IS_ARP,
272 	RX_MSDU_IS_EAP,
273 	RX_MSDU_IS_DHCP,
274 	RX_AGGREGATE_10,
275 	RX_AGGREGATE_20,
276 	RX_AGGREGATE_30,
277 	RX_AGGREGATE_40,
278 	RX_AGGREGATE_50,
279 	RX_AGGREGATE_60,
280 	RX_AGGREGATE_MORE,
281 	RX_AMSDU_1,
282 	RX_AMSDU_2,
283 	RX_AMSDU_3,
284 	RX_AMSDU_4,
285 	RX_AMSDU_MORE,
286 	RX_MSDU_CHAINED_FROM_FW,
287 	RX_MSDU_REORDER_FAILED_FROM_FW,
288 	RX_MSDU_REORDER_FLUSHED_FROM_FW,
289 	RX_MSDU_DISCARD_FROM_FW,
290 	RX_MSDU_DUPLICATE_FROM_FW,
291 	RX_MSDU_DELIVERED_TO_STACK,
292 	TIDQ_STATS_MAX,
293 };
294 
295 struct cdp_tidq_stats {
296 	uint32_t stats[TIDQ_STATS_MAX];
297 };
298 
299 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
300 /**
301  * struct cdp_rx_ppdu_cfr_info - struct for storing ppdu info extracted from HW
302  * TLVs, this will be used for CFR correlation
303  *
304  * @bb_captured_channel : Set by RXPCU when MACRX_FREEZE_CAPTURE_CHANNEL TLV is
305  * sent to PHY, SW checks it to correlate current PPDU TLVs with uploaded
306  * channel information.
307  *
308  * @bb_captured_timeout : Set by RxPCU to indicate channel capture condition is
309  * met, but MACRX_FREEZE_CAPTURE_CHANNEL is not sent to PHY due to AST delay,
310  * which means the rx_frame_falling edge to FREEZE TLV ready time exceeds
311  * the threshold time defined by RXPCU register FREEZE_TLV_DELAY_CNT_THRESH.
312  * Bb_captured_reason is still valid in this case.
313  *
314  * @bb_captured_reason : Copy capture_reason of MACRX_FREEZE_CAPTURE_CHANNEL
315  * TLV to here for FW usage. Valid when bb_captured_channel or
316  * bb_captured_timeout is set.
317  * <enum 0 freeze_reason_TM>
318  * <enum 1 freeze_reason_FTM>
319  * <enum 2 freeze_reason_ACK_resp_to_TM_FTM>
320  * <enum 3 freeze_reason_TA_RA_TYPE_FILTER>
321  * <enum 4 freeze_reason_NDPA_NDP>
322  * <enum 5 freeze_reason_ALL_PACKET>
323  * <legal 0-5>
324  *
325  * @rx_location_info_valid: Indicates whether CFR DMA address in the PPDU TLV
326  * is valid
327  * <enum 0 rx_location_info_is_not_valid>
328  * <enum 1 rx_location_info_is_valid>
329  * <legal all>
330  *
331  * @chan_capture_status : capture status reported by ucode
332  * a. CAPTURE_IDLE: FW has disabled "REPETITIVE_CHE_CAPTURE_CTRL"
333  * b. CAPTURE_BUSY: previous PPDU’s channel capture upload DMA ongoing. (Note
334  * that this upload is triggered after receiving freeze_channel_capture TLV
335  * after last PPDU is rx)
336  * c. CAPTURE_ACTIVE: channel capture is enabled and no previous channel
337  * capture ongoing
338  * d. CAPTURE_NO_BUFFER: next buffer in IPC ring not available
339  *
340  * @rtt_che_buffer_pointer_high8 : The high 8 bits of the 40 bits pointer to
341  * external RTT channel information buffer
342  *
343  * @rtt_che_buffer_pointer_low32 : The low 32 bits of the 40 bits pointer to
344  * external RTT channel information buffer
345  *
346  */
347 
348 struct cdp_rx_ppdu_cfr_info {
349 	bool bb_captured_channel;
350 	bool bb_captured_timeout;
351 	uint8_t bb_captured_reason;
352 	bool rx_location_info_valid;
353 	uint8_t chan_capture_status;
354 	uint8_t rtt_che_buffer_pointer_high8;
355 	uint32_t rtt_che_buffer_pointer_low32;
356 };
357 #endif
358 /*
359  * struct cdp_rx_su_evm_info: Rx evm info
360  * @number_of_symbols: number of symbols
361  * @nss_count: number of spatial streams
362  * @pilot_count: number of pilot count
363  */
364 struct cdp_rx_su_evm_info {
365 	uint16_t number_of_symbols;
366 	uint8_t  nss_count;
367 	uint8_t  pilot_count;
368 	uint32_t pilot_evm[DP_RX_MAX_SU_EVM_COUNT];
369 };
370 
371 /*
372  * cdp_delay_stats_mode: Different types of delay statistics
373  *
374  * @CDP_DELAY_STATS_SW_ENQ: Stack to hw enqueue delay
375  * @CDP_DELAY_STATS_TX_INTERFRAME: Interframe delay at radio entry point
376  * @CDP_DELAY_STATS_FW_HW_TRANSMIT: Hw enqueue to tx completion delay
377  * @CDP_DELAY_STATS_REAP_STACK: Delay in ring reap to indicating network stack
378  * @CDP_DELAY_STATS_RX_INTERFRAME: Rx inteframe delay
379  * @CDP_DELAY_STATS_MODE_MAX: Maximum delay mode
380  */
381 enum cdp_delay_stats_mode {
382 	CDP_DELAY_STATS_SW_ENQ,
383 	CDP_DELAY_STATS_TX_INTERFRAME,
384 	CDP_DELAY_STATS_FW_HW_TRANSMIT,
385 	CDP_DELAY_STATS_REAP_STACK,
386 	CDP_DELAY_STATS_RX_INTERFRAME,
387 	CDP_DELAY_STATS_MODE_MAX,
388 };
389 
390 /*
391  * cdp_delay_bucket_index
392  *	Index to be used for all delay stats
393  */
394 enum cdp_delay_bucket_index {
395 	CDP_DELAY_BUCKET_0,
396 	CDP_DELAY_BUCKET_1,
397 	CDP_DELAY_BUCKET_2,
398 	CDP_DELAY_BUCKET_3,
399 	CDP_DELAY_BUCKET_4,
400 	CDP_DELAY_BUCKET_5,
401 	CDP_DELAY_BUCKET_6,
402 	CDP_DELAY_BUCKET_7,
403 	CDP_DELAY_BUCKET_8,
404 	CDP_DELAY_BUCKET_9,
405 	CDP_DELAY_BUCKET_10,
406 	CDP_DELAY_BUCKET_11,
407 	CDP_DELAY_BUCKET_12,
408 	CDP_DELAY_BUCKET_MAX,
409 };
410 
411 /*
412  * struct cdp_tx_host_drop - packet drop due to following reasons.
413  */
414 enum cdp_tx_sw_drop {
415 	TX_DESC_ERR,
416 	TX_HAL_RING_ACCESS_ERR,
417 	TX_DMA_MAP_ERR,
418 	TX_HW_ENQUEUE,
419 	TX_SW_ENQUEUE,
420 	TX_MAX_DROP,
421 };
422 
423 /*
424  * struct cdp_rx_host_drop - packet drop due to following reasons.
425  */
426 enum cdp_rx_sw_drop {
427 	INTRABSS_DROP,
428 	MSDU_DONE_FAILURE,
429 	INVALID_PEER_VDEV,
430 	POLICY_CHECK_DROP,
431 	MEC_DROP,
432 	NAWDS_MCAST_DROP,
433 	MESH_FILTER_DROP,
434 	ENQUEUE_DROP,
435 	RX_MAX_DROP,
436 };
437 
438 /*
439  * struct cdp_delay_stats
440  * @delay_bucket: division of buckets as per latency
441  * @min_delay: minimum delay
442  * @max_delay: maximum delay
443  * @avg_delay: average delay
444  */
445 struct cdp_delay_stats {
446 	uint64_t delay_bucket[CDP_DELAY_BUCKET_MAX];
447 	uint32_t min_delay;
448 	uint32_t max_delay;
449 	uint32_t avg_delay;
450 };
451 
452 /*
453  * struct cdp_tid_tx_stats
454  * @swq_delay: delay between wifi driver entry point and enqueue to HW in tx
455  * @hwtx_delay: delay between wifi driver exit (enqueue to HW) and tx completion
456  * @intfrm_delay: interframe delay
457  * @success_cnt: total successful transmit count
458  * @comp_fail_cnt: firmware drop found in tx completion path
459  * @swdrop_cnt: software drop in tx path
460  * @tqm_status_cnt: TQM completion status count
461  * @htt_status_cnt: HTT completion status count
462  */
463 struct cdp_tid_tx_stats {
464 	struct cdp_delay_stats swq_delay;
465 	struct cdp_delay_stats hwtx_delay;
466 	struct cdp_delay_stats intfrm_delay;
467 	uint64_t success_cnt;
468 	uint64_t comp_fail_cnt;
469 	uint64_t swdrop_cnt[TX_MAX_DROP];
470 	uint64_t tqm_status_cnt[CDP_MAX_TX_TQM_STATUS];
471 	uint64_t htt_status_cnt[CDP_MAX_TX_HTT_STATUS];
472 };
473 
474 /*
475  * struct cdp_tid_tx_stats
476  * @to_stack_delay: Time taken between ring reap to indication to network stack
477  * @intfrm_delay: Interframe rx delay
478  * @delivered_cnt: Total packets indicated to stack
479  * @intrabss_cnt: Rx total intraBSS frames
480  * @msdu_cnt: number of msdu received from HW
481  * @mcast_msdu_cnt: Num Mcast Msdus received from HW in Rx
482  * @bcast_msdu_cnt: Num Bcast Msdus received from HW in Rx
483  * @fail_cnt: Rx deliver drop counters
484  */
485 struct cdp_tid_rx_stats {
486 	struct cdp_delay_stats to_stack_delay;
487 	struct cdp_delay_stats intfrm_delay;
488 	uint64_t delivered_to_stack;
489 	uint64_t intrabss_cnt;
490 	uint64_t msdu_cnt;
491 	uint64_t mcast_msdu_cnt;
492 	uint64_t bcast_msdu_cnt;
493 	uint64_t fail_cnt[RX_MAX_DROP];
494 };
495 
496 /*
497  * struct cdp_tid_stats
498  * @ingress_stack: Total packets received from linux stack
499  * @osif_drop: drops in osif layer
500  * @tid_tx_stats: transmit counters per tid
501  * @tid_rx_stats: receive counters per tid
502  */
503 struct cdp_tid_stats {
504 	uint64_t ingress_stack;
505 	uint64_t osif_drop;
506 	struct cdp_tid_tx_stats tid_tx_stats[CDP_MAX_TX_COMP_RINGS]
507 					    [CDP_MAX_DATA_TIDS];
508 	struct cdp_tid_rx_stats tid_rx_stats[CDP_MAX_RX_RINGS]
509 					    [CDP_MAX_DATA_TIDS];
510 };
511 
512 /* struct cdp_pkt_info - packet info
513  * @num: no of packets
514  * @bytes: total no of bytes
515  */
516 struct cdp_pkt_info {
517 	uint32_t num;
518 	uint64_t bytes;
519 };
520 
521 /* struct cdp_pkt_type - packet type
522  * @mcs_count: Counter array for each MCS index
523  */
524 struct cdp_pkt_type {
525 	uint32_t mcs_count[MAX_MCS];
526 };
527 
528 /*
529  * struct cdp_rx_mu - Rx MU Stats
530  * @ppdu_nss[SS_COUNT]: Packet Count in spatial streams
531  * @mpdu_cnt_fcs_ok: Rx success mpdu count
532  * @mpdu_cnt_fcs_err: Rx fail mpdu count
533  * @cdp_pkt_type: counter array for each MCS index
534  */
535 struct cdp_rx_mu {
536 	uint32_t ppdu_nss[SS_COUNT];
537 	uint32_t mpdu_cnt_fcs_ok;
538 	uint32_t mpdu_cnt_fcs_err;
539 	struct cdp_pkt_type ppdu;
540 };
541 
542 /* struct cdp_tx_pkt_info - tx packet info
543  * num_msdu - successful msdu
544  * num_mpdu - successful mpdu from compltn common
545  * mpdu_tried - mpdu tried
546  *
547  * tx packet info counter field for mpdu success/tried and msdu
548  */
549 struct cdp_tx_pkt_info {
550 	uint32_t num_msdu;
551 	uint32_t num_mpdu;
552 	uint32_t mpdu_tried;
553 };
554 
555 #ifdef FEATURE_TSO_STATS
556 /**
557  * struct cdp_tso_seg_histogram - Segment histogram for TCP Packets
558  * @segs_1: packets with single segments
559  * @segs_2_5: packets with 2-5 segments
560  * @segs_6_10: packets with 6-10 segments
561  * @segs_11_15: packets with 11-15 segments
562  * @segs_16_20: packets with 16-20 segments
563  * @segs_20_plus: packets with 20 plus segments
564  */
565 struct cdp_tso_seg_histogram {
566 	uint64_t segs_1;
567 	uint64_t segs_2_5;
568 	uint64_t segs_6_10;
569 	uint64_t segs_11_15;
570 	uint64_t segs_16_20;
571 	uint64_t segs_20_plus;
572 };
573 
574 /**
575  * struct cdp_tso_packet_info - Stats for TSO segments within a TSO packet
576  * @tso_seg: TSO Segment information
577  * @num_seg: Number of segments
578  * @tso_packet_len: Size of the tso packet
579  * @tso_seg_idx: segment number
580  */
581 struct cdp_tso_packet_info {
582 	struct qdf_tso_seg_t tso_seg[CDP_MAX_TSO_SEGMENTS];
583 	uint8_t num_seg;
584 	size_t tso_packet_len;
585 	uint32_t tso_seg_idx;
586 };
587 
588 /**
589  * struct cdp_tso_info - stats for tso packets
590  * @tso_packet_info: TSO packet information
591  */
592 struct cdp_tso_info {
593 	struct cdp_tso_packet_info tso_packet_info[CDP_MAX_TSO_PACKETS];
594 };
595 #endif /* FEATURE_TSO_STATS */
596 
597 /**
598  * struct cdp_tso_stats -  TSO stats information
599  * @num_tso_pkts: Total number of TSO Packets
600  * @tso_comp: Total tso packet completions
601  * @dropped_host: TSO packets dropped by host
602  * @tso_no_mem_dropped: TSO packets dropped by host due to descriptor
603 			unavailablity
604  * @dropped_target: TSO packets_dropped by target
605  * @tso_info: Per TSO packet counters
606  * @seg_histogram: TSO histogram stats
607  */
608 struct cdp_tso_stats {
609 	struct cdp_pkt_info num_tso_pkts;
610 	uint32_t tso_comp;
611 	struct cdp_pkt_info dropped_host;
612 	struct cdp_pkt_info tso_no_mem_dropped;
613 	uint32_t dropped_target;
614 #ifdef FEATURE_TSO_STATS
615 	struct cdp_tso_info tso_info;
616 	struct cdp_tso_seg_histogram seg_histogram;
617 #endif /* FEATURE_TSO_STATS */
618 };
619 
620 #define CDP_PEER_STATS_START 0
621 
622 enum cdp_peer_stats_type {
623 	cdp_peer_stats_min = CDP_PEER_STATS_START,
624 
625 	/* Tx types */
626 	cdp_peer_tx_ucast = cdp_peer_stats_min,
627 	cdp_peer_tx_mcast,
628 	cdp_peer_tx_rate,
629 	cdp_peer_tx_last_tx_rate,
630 	cdp_peer_tx_inactive_time,
631 	cdp_peer_tx_ratecode,
632 	cdp_peer_tx_flags,
633 	cdp_peer_tx_power,
634 
635 	/* Rx types */
636 	cdp_peer_rx_rate,
637 	cdp_peer_rx_last_rx_rate,
638 	cdp_peer_rx_ratecode,
639 	cdp_peer_rx_ucast,
640 	cdp_peer_rx_flags,
641 	cdp_peer_rx_avg_rssi,
642 	cdp_peer_stats_max,
643 };
644 
645 /*
646  * The max size of cdp_peer_stats_param_t is limited to 16 bytes.
647  * If the buffer size is exceeding this size limit,
648  * dp_txrx_get_peer_stats is to be used instead.
649  */
650 typedef union cdp_peer_stats_buf {
651 	/* Tx types */
652 	struct cdp_pkt_info tx_ucast;
653 	struct cdp_pkt_info tx_mcast;
654 	uint32_t tx_rate;
655 	uint32_t last_tx_rate;
656 	uint32_t tx_inactive_time;
657 	uint32_t tx_flags;
658 	uint32_t tx_power;
659 	uint16_t tx_ratecode;
660 
661 	/* Rx types */
662 	struct cdp_pkt_info rx_ucast;
663 	uint32_t rx_rate;
664 	uint32_t last_rx_rate;
665 	uint32_t rx_ratecode;
666 	uint32_t rx_flags;
667 	uint32_t rx_avg_rssi;
668 } cdp_peer_stats_param_t; /* Max union size 16 bytes */
669 
670 /**
671  * enum cdp_protocol_trace -  Protocols supported by per-peer protocol trace
672  * @CDP_TRACE_ICMP: ICMP packets
673  * @CDP_TRACE_EAP: EAPOL packets
674  * @CDP_TRACE_ARP: ARP packets
675  *
676  * Enumeration of all protocols supported by per-peer protocol trace feature
677  */
678 enum cdp_protocol_trace {
679 	CDP_TRACE_ICMP,
680 	CDP_TRACE_EAP,
681 	CDP_TRACE_ARP,
682 	CDP_TRACE_MAX
683 };
684 
685 /**
686  * struct protocol_trace_count - type of count on per-peer protocol trace
687  * @egress_cnt: how many packets go out of host driver
688  * @ingress_cnt: how many packets come into the host driver
689  *
690  * Type of count on per-peer protocol trace
691  */
692 struct protocol_trace_count {
693 	uint16_t egress_cnt;
694 	uint16_t ingress_cnt;
695 };
696 /* struct cdp_tx_stats - tx stats
697  * @cdp_pkt_info comp_pkt: Pkt Info for which completions were received
698  * @cdp_pkt_info ucast: Unicast Packet Count
699  * @cdp_pkt_info mcast: Multicast Packet Count
700  * @cdp_pkt_info bcast: Broadcast Packet Count
701  * @cdp_pkt_info nawds_mcast: NAWDS  Multicast Packet Count
702  * @cdp_pkt_info tx_success: Successful Tx Packets
703  * @nawds_mcast_drop: NAWDS  Multicast Drop Count
704  * @protocol_trace_cnt: per-peer protocol counter
705  * @tx_failed: Total Tx failure
706  * @ofdma: Total Packets as ofdma
707  * @stbc: Packets in STBC
708  * @ldpc: Packets in LDPC
709  * @retries: Packet retries
710  * @non_amsdu_cnt: Number of MSDUs with no MSDU level aggregation
711  * @amsdu_cnt: Number of MSDUs part of AMSDU
712  * @tx_rate: Tx Rate
713  * @last_tx_rate: Last tx rate for unicast packets
714  * @last_tx_rate_mcs: Tx rate mcs for unicast packets
715  * @mcast_last_tx_rate: Last tx rate for multicast packets
716  * @mcast_last_tx_rate_mcs: Last tx rate mcs for multicast
717  * @last_per: Tx Per
718  * @rnd_avg_tx_rate: Rounded average tx rate
719  * @avg_tx_rate: Average TX rate
720  * @last_ack_rssi: RSSI of last acked packet
721  * @tx_bytes_success_last: last Tx success bytes
722  * @tx_data_success_last: last Tx success data
723  * @tx_byte_rate: Bytes Trasmitted in last one sec
724  * @tx_data_rate: Data Transmitted in last one sec
725  * @sgi_count[MAX_GI]: SGI count
726  * @nss[SS_COUNT]: Packet count for different num_spatial_stream values
727  * @bw[MAX_BW]: Packet Count for different bandwidths
728  * @wme_ac_type[WME_AC_MAX]: Wireless Multimedia type Count
729  * @excess_retries_per_ac[WME_AC_MAX]: Wireless Multimedia type Count
730  * @dot11_tx_pkts: dot11 tx packets
731  * @fw_rem: Discarded by firmware
732  * @fw_rem_notx: firmware_discard_untransmitted
733  * @fw_rem_tx: firmware_discard_transmitted
734  * @age_out: aged out in mpdu/msdu queues
735  * @fw_reason1: discarded by firmware reason 1
736  * @fw_reason2: discarded by firmware reason 2
737  * @fw_reason3: discarded by firmware reason 3
738  * @mcs_count: MCS Count
739  * @an_tx_cnt: ald tx count
740  * @an_tx_rates_used: ald rx rate used
741  * @an_tx_bytes: ald tx bytes
742  * @ald_txcount: ald tx count
743  * @ald_lastper: ald last PER
744  * @ald_max4msframelen: ald max frame len
745  * @an_tx_ratecount: ald tx ratecount
746  * @ald_retries: ald retries
747  * @ald_ac_nobufs: #buffer overflows per node per AC
748  * @ald_ac_excretries: #pkts dropped after excessive retries per node per AC
749  * @rssi_chain: rssi chain
750  * @inactive_time: inactive time in secs
751  * @tx_flags: tx flags
752  * @tx_power: Tx power latest
753  * @is_tx_no_ack: no ack received
754  * @tx_ratecode: Tx rate code of last frame
755  * @is_tx_nodefkey: tx failed 'cuz no defkey
756  * @is_tx_noheadroom: tx failed 'cuz no space
757  * @is_crypto_enmicfail:
758  * @is_tx_nonode: tx failed for no node
759  * @is_tx_unknownmgt: tx of unknown mgt frame
760  * @is_tx_badcipher: tx failed 'cuz key type
761  * @ampdu_cnt: completion of aggregation
762  * @non_ampdu_cnt: tx completion not aggregated
763  * @failed_retry_count: packets failed due to retry above 802.11 retry limit
764  * @retry_count: packets successfully send after one or more retry
765  * @multiple_retry_count: packets successfully sent after more than one retry
766  * @transmit_type: pkt info for tx transmit type
767  * @mu_group_id: mumimo mu group id
768  * @ru_start: RU start index
769  * @ru_tones: RU tones size
770  * @ru_loc: pkt info for RU location 26/ 52/ 106/ 242/ 484 counter
771  * @num_ppdu_cookie_valid : Number of comp received with valid ppdu cookie
772  */
773 struct cdp_tx_stats {
774 	struct cdp_pkt_info comp_pkt;
775 	struct cdp_pkt_info ucast;
776 	struct cdp_pkt_info mcast;
777 	struct cdp_pkt_info bcast;
778 	struct cdp_pkt_info nawds_mcast;
779 #ifdef VDEV_PEER_PROTOCOL_COUNT
780 	struct protocol_trace_count protocol_trace_cnt[CDP_TRACE_MAX];
781 #endif
782 	struct cdp_pkt_info tx_success;
783 	uint32_t nawds_mcast_drop;
784 	uint32_t tx_failed;
785 	uint32_t ofdma;
786 	uint32_t stbc;
787 	uint32_t ldpc;
788 	uint32_t retries;
789 	uint32_t non_amsdu_cnt;
790 	uint32_t amsdu_cnt;
791 	uint32_t tx_rate;
792 	uint32_t last_tx_rate;
793 	uint32_t last_tx_rate_mcs;
794 	uint32_t mcast_last_tx_rate;
795 	uint32_t mcast_last_tx_rate_mcs;
796 	uint32_t last_per;
797 	uint64_t rnd_avg_tx_rate;
798 	uint64_t avg_tx_rate;
799 	uint32_t last_ack_rssi;
800 	uint32_t tx_bytes_success_last;
801 	uint32_t tx_data_success_last;
802 	uint32_t tx_byte_rate;
803 	uint32_t tx_data_rate;
804 	uint32_t tx_data_ucast_last;
805 	uint32_t tx_data_ucast_rate;
806 	struct cdp_pkt_type pkt_type[DOT11_MAX];
807 	uint32_t sgi_count[MAX_GI];
808 
809 	uint32_t nss[SS_COUNT];
810 
811 	uint32_t bw[MAX_BW];
812 
813 	uint32_t wme_ac_type[WME_AC_MAX];
814 
815 	uint32_t excess_retries_per_ac[WME_AC_MAX];
816 	struct cdp_pkt_info dot11_tx_pkts;
817 
818 	struct {
819 		struct cdp_pkt_info fw_rem;
820 		uint32_t fw_rem_notx;
821 		uint32_t fw_rem_tx;
822 		uint32_t age_out;
823 		uint32_t fw_reason1;
824 		uint32_t fw_reason2;
825 		uint32_t fw_reason3;
826 	} dropped;
827 
828 
829 	uint32_t fw_tx_cnt;
830 	uint32_t fw_tx_bytes;
831 	uint32_t fw_txcount;
832 	uint32_t fw_max4msframelen;
833 	uint32_t fw_ratecount;
834 
835 	uint32_t ac_nobufs[WME_AC_MAX];
836 	uint32_t rssi_chain[WME_AC_MAX];
837 	uint32_t inactive_time;
838 
839 	uint32_t tx_flags;
840 	uint32_t tx_power;
841 
842 	/* MSDUs which the target sent but couldn't get an ack for */
843 	struct cdp_pkt_info is_tx_no_ack;
844 	uint16_t tx_ratecode;
845 
846 	/*add for peer and upadted from ppdu*/
847 	uint32_t ampdu_cnt;
848 	uint32_t non_ampdu_cnt;
849 	uint32_t failed_retry_count;
850 	uint32_t retry_count;
851 	uint32_t multiple_retry_count;
852 	uint32_t last_tx_rate_used;
853 
854 	struct cdp_tx_pkt_info transmit_type[MAX_TRANSMIT_TYPES];
855 	uint32_t mu_group_id[MAX_MU_GROUP_ID];
856 	uint32_t ru_start;
857 	uint32_t ru_tones;
858 	struct cdp_tx_pkt_info ru_loc[MAX_RU_LOCATIONS];
859 
860 	uint32_t num_ppdu_cookie_valid;
861 };
862 
863 /* struct cdp_rx_stats - rx Level Stats
864  * @to_stack: Total packets sent up the stack
865  * @rcvd_reo[CDP_MAX_RX_RINGS]:  Packets received on the reo ring
866  * @unicast: Total unicast packets
867  * @multicast: Total multicast packets
868  * @bcast:  Broadcast Packet Count
869  * @raw: Raw Pakets received
870  * @nawds_mcast_drop: Total multicast packets
871  * @mec_drop: Total MEC packets dropped
872  * @pkts: Intra BSS packets received
873  * @fail: Intra BSS packets failed
874  * @mdns_no_fwd: Intra BSS MDNS packets not forwarded
875  * @protocol_trace_cnt: per-peer protocol counters
876  * @mic_err: Rx MIC errors CCMP
877  * @decrypt_err: Rx Decryption Errors CRC
878  * @fcserr: rx MIC check failed (CCMP)
879  * @wme_ac_type[WME_AC_MAX]: Wireless Multimedia type Count
880  * @reception_type[MAX_RECEPTION_TYPES]: Reception type os packets
881  * @mcs_count[MAX_MCS]: mcs count
882  * @sgi_count[MAX_GI]: sgi count
883  * @nss[SS_COUNT]: packet count in spatiel Streams
884  * @ppdu_nss[SS_COUNT]: PPDU packet count in spatial streams
885  * @mpdu_cnt_fcs_ok: SU Rx success mpdu count
886  * @mpdu_cnt_fcs_err: SU Rx fail mpdu count
887  * @su_ax_ppdu_cnt: SU Rx packet count
888  * @ppdu_cnt[MAX_RECEPTION_TYPES]: PPDU packet count in reception type
889  * @rx_mu[RX_TYPE_MU_MAX]: Rx MU stats
890  * @bw[MAX_BW]:  Packet Count in different bandwidths
891  * @non_ampdu_cnt: Number of MSDUs with no MPDU level aggregation
892  * @ampdu_cnt: Number of MSDUs part of AMSPU
893  * @non_amsdu_cnt: Number of MSDUs with no MSDU level aggregation
894  * @amsdu_cnt: Number of MSDUs part of AMSDU
895  * @bar_recv_cnt: Number of bar received
896  * @avg_rssi: Average rssi
897  * @rx_rate: Rx rate
898  * @last_rx_rate: Previous rx rate
899  * @rnd_avg_rx_rate: Rounded average rx rate
900  * @avg_rx_rate:  Average Rx rate
901  * @dot11_rx_pkts: dot11 rx packets
902  * @rx_bytes_last: last Rx success bytes
903  * @rx_data_last: last rx success data
904  * @rx_byte_rate: bytes received in last one sec
905  * @rx_data_rate: data received in last one sec
906  * @rx_retries: retries of packet in rx
907  * @rx_mpdus: mpdu in rx
908  * @rx_ppdus: ppdu in rx
909  * @is_rx_tooshort: tooshort
910  * @is_rx_decap: rx decap
911  * @rx_ccmpmic: rx MIC check failed (CCMP)
912  * @rx_tkipmic: rx MIC check failed (TKIP)
913  * @rx_tkipicv: rx ICV check failed (TKIP)
914  * @rx_wpimic: rx MIC check failed (WPI)
915  * @rx_wepfail: rx wep processing failed
916  * @rx_aggr: aggregation on rx
917  * @rx_discard: packets discard in rx
918  * @rx_ratecode: Rx rate code of last frame
919  * @rx_flags: rx flags
920  * @rx_rssi_measured_time: Time at which rssi is measured
921  * @rssi: RSSI of received signal
922  * @last_rssi: Previous rssi
923  * @multipass_rx_pkt_drop: Dropped multipass rx pkt
924  */
925 struct cdp_rx_stats {
926 	struct cdp_pkt_info to_stack;
927 	struct cdp_pkt_info rcvd_reo[CDP_MAX_RX_RINGS];
928 	struct cdp_pkt_info unicast;
929 	struct cdp_pkt_info multicast;
930 	struct cdp_pkt_info bcast;
931 	struct cdp_pkt_info raw;
932 	uint32_t nawds_mcast_drop;
933 	struct cdp_pkt_info mec_drop;
934 	struct {
935 		struct cdp_pkt_info pkts;
936 		struct cdp_pkt_info fail;
937 		uint32_t mdns_no_fwd;
938 	} intra_bss;
939 #ifdef VDEV_PEER_PROTOCOL_COUNT
940 	struct protocol_trace_count protocol_trace_cnt[CDP_TRACE_MAX];
941 #endif
942 
943 	struct {
944 		uint32_t mic_err;
945 		uint32_t decrypt_err;
946 		uint32_t fcserr;
947 	} err;
948 
949 	uint32_t wme_ac_type[WME_AC_MAX];
950 	uint32_t reception_type[MAX_RECEPTION_TYPES];
951 	struct cdp_pkt_type pkt_type[DOT11_MAX];
952 	uint32_t sgi_count[MAX_GI];
953 	uint32_t nss[SS_COUNT];
954 	uint32_t ppdu_nss[SS_COUNT];
955 	uint32_t mpdu_cnt_fcs_ok;
956 	uint32_t mpdu_cnt_fcs_err;
957 	struct cdp_pkt_type su_ax_ppdu_cnt;
958 	uint32_t ppdu_cnt[MAX_RECEPTION_TYPES];
959 	struct cdp_rx_mu rx_mu[RX_TYPE_MU_MAX];
960 	uint32_t bw[MAX_BW];
961 	uint32_t non_ampdu_cnt;
962 	uint32_t ampdu_cnt;
963 	uint32_t non_amsdu_cnt;
964 	uint32_t amsdu_cnt;
965 	uint32_t bar_recv_cnt;
966 	uint32_t avg_rssi;
967 	uint32_t rx_rate;
968 	uint32_t last_rx_rate;
969 	uint32_t rnd_avg_rx_rate;
970 	uint32_t avg_rx_rate;
971 	struct cdp_pkt_info  dot11_rx_pkts;
972 
973 	uint32_t rx_bytes_success_last;
974 	uint32_t rx_data_success_last;
975 	uint32_t rx_byte_rate;
976 	uint32_t rx_data_rate;
977 
978 	uint32_t rx_retries;
979 	uint32_t rx_mpdus;
980 	uint32_t rx_ppdus;
981 
982 	/*add for peer updated for ppdu*/
983 	uint32_t rx_aggr;
984 	uint32_t rx_discard;
985 	uint32_t rx_ratecode;
986 	uint32_t rx_flags;
987 	uint32_t rx_rssi_measured_time;
988 	uint8_t rssi;
989 	uint8_t last_rssi;
990 	uint32_t multipass_rx_pkt_drop;
991 };
992 
993 /* struct cdp_tx_ingress_stats - Tx ingress Stats
994  * @rcvd: Total packets received for transmission
995  * @processed: Tx packets processed
996  * @inspect_pkts: Total packets passed to inspect handler
997  * @nawds_mcast: NAWDS  Multicast Packet Count
998  * @bcast: Number of broadcast packets
999  * @raw_pkt: Total Raw packets
1000  * @dma_map_error: DMA map error
1001  * @num_seg: No of segments in TSO packets
1002  * @tso_pkt:total no of TSO packets
1003  * @non_tso_pkts: non - TSO packets
1004  * @dropped_host: TSO packets dropped by host
1005  * @dropped_target:TSO packets dropped by target
1006  * @sg_pkt: Total scatter gather packets
1007  * @non_sg_pkts: non SG packets
1008  * @dropped_host: SG packets dropped by host
1009  * @dropped_target: SG packets dropped by target
1010  * @dma_map_error: Dma map error
1011  * @mcast_pkt: total no of multicast conversion packets
1012  * @dropped_map_error: packets dropped due to map error
1013  * @dropped_self_mac: packets dropped due to self Mac address
1014  * @dropped_send_fail: Packets dropped due to send fail
1015  * @ucast: total unicast packets transmitted
1016  * @fail_seg_alloc: Segment allocation failure
1017  * @clone_fail: NBUF clone failure
1018  * @dropped_pkt: Total scatter gather packets
1019  * @desc_na: Desc Not Available
1020  * @ring_full: ring full
1021  * @enqueue_fail: hw enqueue fail
1022  * @dma_error: dma fail
1023  * @res_full: Resource Full: Congestion Control
1024  * @exception_fw: packets sent to fw
1025  * @completion_fw: packets completions received from fw
1026  * @cce_classified:Number of packets classified by CCE
1027  * @cce_classified_raw:Number of raw packets classified by CCE
1028  * @sniffer_rcvd: Number of packets received with ppdu cookie
1029  */
1030 struct cdp_tx_ingress_stats {
1031 	struct cdp_pkt_info rcvd;
1032 	struct cdp_pkt_info processed;
1033 	struct cdp_pkt_info reinject_pkts;
1034 	struct cdp_pkt_info inspect_pkts;
1035 	struct cdp_pkt_info nawds_mcast;
1036 	struct cdp_pkt_info bcast;
1037 
1038 	struct {
1039 		struct cdp_pkt_info raw_pkt;
1040 		uint32_t dma_map_error;
1041 		uint32_t invalid_raw_pkt_datatype;
1042 	} raw;
1043 
1044 	/* Scatter Gather packet info */
1045 	struct {
1046 		struct cdp_pkt_info sg_pkt;
1047 		struct cdp_pkt_info non_sg_pkts;
1048 		struct cdp_pkt_info  dropped_host;
1049 		uint32_t dropped_target;
1050 		uint32_t dma_map_error;
1051 	} sg;
1052 
1053 	/* Multicast Enhancement packets info */
1054 	struct {
1055 		struct cdp_pkt_info mcast_pkt;
1056 		uint32_t dropped_map_error;
1057 		uint32_t dropped_self_mac;
1058 		uint32_t dropped_send_fail;
1059 		uint32_t ucast;
1060 		uint32_t fail_seg_alloc;
1061 		uint32_t clone_fail;
1062 	} mcast_en;
1063 
1064 	/* Packets dropped on the Tx side */
1065 	struct {
1066 		struct cdp_pkt_info dropped_pkt;
1067 		struct cdp_pkt_info  desc_na;
1068 		uint32_t ring_full;
1069 		uint32_t enqueue_fail;
1070 		uint32_t dma_error;
1071 		uint32_t res_full;
1072 		/* headroom insufficient */
1073 		uint32_t headroom_insufficient;
1074 	} dropped;
1075 
1076 	/* Mesh packets info */
1077 	struct {
1078 		uint32_t exception_fw;
1079 		uint32_t completion_fw;
1080 	} mesh;
1081 
1082 	uint32_t cce_classified;
1083 	uint32_t cce_classified_raw;
1084 	struct cdp_pkt_info sniffer_rcvd;
1085 	struct cdp_tso_stats tso_stats;
1086 };
1087 
1088 /* struct cdp_vdev_stats - vdev stats structure
1089  * @tx_i: ingress tx stats
1090  * @tx: cdp tx stats
1091  * @rx: cdp rx stats
1092  * @tso_stats: tso stats
1093  */
1094 struct cdp_vdev_stats {
1095 	struct cdp_tx_ingress_stats tx_i;
1096 	struct cdp_tx_stats tx;
1097 	struct cdp_rx_stats rx;
1098 	struct cdp_tso_stats tso_stats;
1099 };
1100 
1101 /* struct cdp_peer_stats - peer stats structure
1102  * @tx: cdp tx stats
1103  * @rx: cdp rx stats
1104  */
1105 struct cdp_peer_stats {
1106 	/* CDP Tx Stats */
1107 	struct cdp_tx_stats tx;
1108 	/* CDP Rx Stats */
1109 	struct cdp_rx_stats rx;
1110 };
1111 
1112 /* struct cdp_interface_peer_stats - interface structure for txrx peer stats
1113  * @peer_mac: peer mac address
1114  * @vdev_id : vdev_id for the peer
1115  * @last_peer_tx_rate: peer tx rate for last transmission
1116  * @peer_tx_rate: tx rate for current transmission
1117  * @peer_rssi: current rssi value of peer
1118  * @tx_packet_count: tx packet count
1119  * @rx_packet_count: rx packet count
1120  * @tx_byte_count: tx byte count
1121  * @rx_byte_count: rx byte count
1122  * @per: per error rate
1123  * @ack_rssi: RSSI of the last ack received
1124  * @rssi_changed: denotes rssi is changed
1125  */
1126 struct cdp_interface_peer_stats {
1127 	uint8_t  peer_mac[QDF_MAC_ADDR_SIZE];
1128 	uint8_t  vdev_id;
1129 	uint8_t  rssi_changed;
1130 	uint32_t last_peer_tx_rate;
1131 	uint32_t peer_tx_rate;
1132 	uint32_t peer_rssi;
1133 	uint32_t tx_packet_count;
1134 	uint32_t rx_packet_count;
1135 	uint32_t tx_byte_count;
1136 	uint32_t rx_byte_count;
1137 	uint32_t per;
1138 	uint32_t ack_rssi;
1139 };
1140 
1141 /* Tx completions per interrupt */
1142 struct cdp_hist_tx_comp {
1143 	uint32_t pkts_1;
1144 	uint32_t pkts_2_20;
1145 	uint32_t pkts_21_40;
1146 	uint32_t pkts_41_60;
1147 	uint32_t pkts_61_80;
1148 	uint32_t pkts_81_100;
1149 	uint32_t pkts_101_200;
1150 	uint32_t pkts_201_plus;
1151 };
1152 
1153 /* Rx ring descriptors reaped per interrupt */
1154 struct cdp_hist_rx_ind {
1155 	uint32_t pkts_1;
1156 	uint32_t pkts_2_20;
1157 	uint32_t pkts_21_40;
1158 	uint32_t pkts_41_60;
1159 	uint32_t pkts_61_80;
1160 	uint32_t pkts_81_100;
1161 	uint32_t pkts_101_200;
1162 	uint32_t pkts_201_plus;
1163 };
1164 
1165 struct cdp_htt_tlv_hdr {
1166 	/* BIT [11 :  0]   :- tag
1167 	 * BIT [23 : 12]   :- length
1168 	 * BIT [31 : 24]   :- reserved
1169 	 */
1170 	uint32_t tag__length;
1171 };
1172 
1173 #define HTT_STATS_SUBTYPE_MAX     16
1174 
1175 struct cdp_htt_rx_pdev_fw_stats_tlv {
1176     struct cdp_htt_tlv_hdr tlv_hdr;
1177 
1178     /* BIT [ 7 :  0]   :- mac_id
1179      * BIT [31 :  8]   :- reserved
1180      */
1181     uint32_t mac_id__word;
1182     /* Num PPDU status processed from HW */
1183     uint32_t ppdu_recvd;
1184     /* Num MPDU across PPDUs with FCS ok */
1185     uint32_t mpdu_cnt_fcs_ok;
1186     /* Num MPDU across PPDUs with FCS err */
1187     uint32_t mpdu_cnt_fcs_err;
1188     /* Num MSDU across PPDUs */
1189     uint32_t tcp_msdu_cnt;
1190     /* Num MSDU across PPDUs */
1191     uint32_t tcp_ack_msdu_cnt;
1192     /* Num MSDU across PPDUs */
1193     uint32_t udp_msdu_cnt;
1194     /* Num MSDU across PPDUs */
1195     uint32_t other_msdu_cnt;
1196     /* Num MPDU on FW ring indicated */
1197     uint32_t fw_ring_mpdu_ind;
1198     /* Num MGMT MPDU given to protocol */
1199     uint32_t fw_ring_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
1200     /* Num ctrl MPDU given to protocol */
1201     uint32_t fw_ring_ctrl_subtype[HTT_STATS_SUBTYPE_MAX];
1202     /* Num mcast data packet received */
1203     uint32_t fw_ring_mcast_data_msdu;
1204     /* Num broadcast data packet received */
1205     uint32_t fw_ring_bcast_data_msdu;
1206     /* Num unicat data packet received */
1207     uint32_t fw_ring_ucast_data_msdu;
1208     /* Num null data packet received  */
1209     uint32_t fw_ring_null_data_msdu;
1210     /* Num MPDU on FW ring dropped */
1211     uint32_t fw_ring_mpdu_drop;
1212 
1213     /* Num buf indication to offload */
1214     uint32_t ofld_local_data_ind_cnt;
1215     /* Num buf recycle from offload */
1216     uint32_t ofld_local_data_buf_recycle_cnt;
1217     /* Num buf indication to data_rx */
1218     uint32_t drx_local_data_ind_cnt;
1219     /* Num buf recycle from data_rx */
1220     uint32_t drx_local_data_buf_recycle_cnt;
1221     /* Num buf indication to protocol */
1222     uint32_t local_nondata_ind_cnt;
1223     /* Num buf recycle from protocol */
1224     uint32_t local_nondata_buf_recycle_cnt;
1225 
1226     /* Num buf fed */
1227     uint32_t fw_status_buf_ring_refill_cnt;
1228     /* Num ring empty encountered */
1229     uint32_t fw_status_buf_ring_empty_cnt;
1230     /* Num buf fed  */
1231     uint32_t fw_pkt_buf_ring_refill_cnt;
1232     /* Num ring empty encountered */
1233     uint32_t fw_pkt_buf_ring_empty_cnt;
1234     /* Num buf fed  */
1235     uint32_t fw_link_buf_ring_refill_cnt;
1236     /* Num ring empty encountered  */
1237     uint32_t fw_link_buf_ring_empty_cnt;
1238 
1239     /* Num buf fed */
1240     uint32_t host_pkt_buf_ring_refill_cnt;
1241     /* Num ring empty encountered */
1242     uint32_t host_pkt_buf_ring_empty_cnt;
1243     /* Num buf fed */
1244     uint32_t mon_pkt_buf_ring_refill_cnt;
1245     /* Num ring empty encountered */
1246     uint32_t mon_pkt_buf_ring_empty_cnt;
1247     /* Num buf fed */
1248     uint32_t mon_status_buf_ring_refill_cnt;
1249     /* Num ring empty encountered */
1250     uint32_t mon_status_buf_ring_empty_cnt;
1251     /* Num buf fed */
1252     uint32_t mon_desc_buf_ring_refill_cnt;
1253     /* Num ring empty encountered */
1254     uint32_t mon_desc_buf_ring_empty_cnt;
1255     /* Num buf fed */
1256     uint32_t mon_dest_ring_update_cnt;
1257     /* Num ring full encountered */
1258     uint32_t mon_dest_ring_full_cnt;
1259 
1260     /* Num rx suspend is attempted */
1261     uint32_t rx_suspend_cnt;
1262     /* Num rx suspend failed */
1263     uint32_t rx_suspend_fail_cnt;
1264     /* Num rx resume attempted */
1265     uint32_t rx_resume_cnt;
1266     /* Num rx resume failed */
1267     uint32_t rx_resume_fail_cnt;
1268     /* Num rx ring switch */
1269     uint32_t rx_ring_switch_cnt;
1270     /* Num rx ring restore */
1271     uint32_t rx_ring_restore_cnt;
1272     /* Num rx flush issued */
1273     uint32_t rx_flush_cnt;
1274 };
1275 
1276 /* == TX PDEV STATS == */
1277 struct cdp_htt_tx_pdev_stats_cmn_tlv {
1278     struct cdp_htt_tlv_hdr tlv_hdr;
1279 
1280     /* BIT [ 7 :  0]   :- mac_id
1281      * BIT [31 :  8]   :- reserved
1282      */
1283     uint32_t mac_id__word;
1284     /* Num queued to HW */
1285     uint32_t hw_queued;
1286     /* Num PPDU reaped from HW */
1287     uint32_t hw_reaped;
1288     /* Num underruns */
1289     uint32_t underrun;
1290     /* Num HW Paused counter. */
1291     uint32_t hw_paused;
1292     /* Num HW flush counter. */
1293     uint32_t hw_flush;
1294     /* Num HW filtered counter. */
1295     uint32_t hw_filt;
1296     /* Num PPDUs cleaned up in TX abort */
1297     uint32_t tx_abort;
1298     /* Num MPDUs requed by SW */
1299     uint32_t mpdu_requed;
1300     /* excessive retries */
1301     uint32_t tx_xretry;
1302     /* Last used data hw rate code */
1303     uint32_t data_rc;
1304     /* frames dropped due to excessive sw retries */
1305     uint32_t mpdu_dropped_xretry;
1306     /* illegal rate phy errors  */
1307     uint32_t illgl_rate_phy_err;
1308     /* wal pdev continuous xretry */
1309     uint32_t cont_xretry;
1310     /* wal pdev continuous xretry */
1311     uint32_t tx_timeout;
1312     /* wal pdev resets  */
1313     uint32_t pdev_resets;
1314     /* PhY/BB underrun */
1315     uint32_t phy_underrun;
1316     /* MPDU is more than txop limit */
1317     uint32_t txop_ovf;
1318     /* Number of Sequences posted */
1319     uint32_t seq_posted;
1320     /* Number of Sequences failed queueing */
1321     uint32_t seq_failed_queueing;
1322     /* Number of Sequences completed */
1323     uint32_t seq_completed;
1324     /* Number of Sequences restarted */
1325     uint32_t seq_restarted;
1326     /* Number of MU Sequences posted */
1327     uint32_t mu_seq_posted;
1328     /* Number of time HW ring is paused between seq switch within ISR */
1329     uint32_t seq_switch_hw_paused;
1330     /* Number of times seq continuation in DSR */
1331     uint32_t next_seq_posted_dsr;
1332     /* Number of times seq continuation in ISR */
1333     uint32_t seq_posted_isr;
1334     /* Number of seq_ctrl cached. */
1335     uint32_t seq_ctrl_cached;
1336     /* Number of MPDUs successfully transmitted */
1337     uint32_t mpdu_count_tqm;
1338     /* Number of MSDUs successfully transmitted */
1339     uint32_t msdu_count_tqm;
1340     /* Number of MPDUs dropped */
1341     uint32_t mpdu_removed_tqm;
1342     /* Number of MSDUs dropped */
1343     uint32_t msdu_removed_tqm;
1344     /* Num MPDUs flushed by SW, HWPAUSED, SW TXABORT (Reset,channel change) */
1345     uint32_t mpdus_sw_flush;
1346     /* Num MPDUs filtered by HW, all filter condition (TTL expired) */
1347     uint32_t mpdus_hw_filter;
1348     /* Num MPDUs truncated by PDG (TXOP, TBTT, PPDU_duration based on rate, dyn_bw) */
1349     uint32_t mpdus_truncated;
1350     /* Num MPDUs that was tried but didn't receive ACK or BA */
1351     uint32_t mpdus_ack_failed;
1352     /* Num MPDUs that was dropped due to expiry (MSDU TTL). */
1353     uint32_t mpdus_expired;
1354     /* Num MPDUs that was retried within seq_ctrl (MGMT/LEGACY) */
1355     uint32_t mpdus_seq_hw_retry;
1356     /* Num of TQM acked cmds processed */
1357     uint32_t ack_tlv_proc;
1358     /* coex_abort_mpdu_cnt valid. */
1359     uint32_t coex_abort_mpdu_cnt_valid;
1360     /* coex_abort_mpdu_cnt from TX FES stats. */
1361     uint32_t coex_abort_mpdu_cnt;
1362     /* Number of total PPDUs(DATA, MGMT, excludes selfgen) tried over the air (OTA) */
1363     uint32_t num_total_ppdus_tried_ota;
1364     /* Number of data PPDUs tried over the air (OTA) */
1365     uint32_t num_data_ppdus_tried_ota;
1366     /* Num Local control/mgmt frames (MSDUs) queued */
1367     uint32_t local_ctrl_mgmt_enqued;
1368     /* local_ctrl_mgmt_freed:
1369      * Num Local control/mgmt frames (MSDUs) done
1370      * It includes all local ctrl/mgmt completions
1371      * (acked, no ack, flush, TTL, etc)
1372      */
1373     uint32_t local_ctrl_mgmt_freed;
1374     /* Num Local data frames (MSDUs) queued */
1375     uint32_t local_data_enqued;
1376     /* local_data_freed:
1377      * Num Local data frames (MSDUs) done
1378      * It includes all local data completions
1379      * (acked, no ack, flush, TTL, etc)
1380      */
1381     uint32_t local_data_freed;
1382 
1383 	/* Num MPDUs tried by SW */
1384 	uint32_t mpdu_tried;
1385 	/* Num of waiting seq posted in isr completion handler */
1386 	uint32_t isr_wait_seq_posted;
1387 	uint32_t tx_active_dur_us_low;
1388 	uint32_t tx_active_dur_us_high;
1389 };
1390 
1391 struct cdp_htt_tx_pdev_stats_urrn_tlv_v {
1392     struct cdp_htt_tlv_hdr tlv_hdr;
1393     uint32_t urrn_stats[1]; /* HTT_TX_PDEV_MAX_URRN_STATS */
1394 };
1395 
1396 /* NOTE: Variable length TLV, use length spec to infer array size */
1397 struct cdp_htt_tx_pdev_stats_flush_tlv_v {
1398     struct cdp_htt_tlv_hdr tlv_hdr;
1399     uint32_t flush_errs[1]; /* HTT_TX_PDEV_MAX_FLUSH_REASON_STATS */
1400 };
1401 
1402 /* NOTE: Variable length TLV, use length spec to infer array size */
1403 struct cdp_htt_tx_pdev_stats_sifs_tlv_v {
1404     struct cdp_htt_tlv_hdr tlv_hdr;
1405     uint32_t sifs_status[1]; /* HTT_TX_PDEV_MAX_SIFS_BURST_STATS */
1406 };
1407 
1408 /* NOTE: Variable length TLV, use length spec to infer array size */
1409 struct cdp_htt_tx_pdev_stats_phy_err_tlv_v {
1410     struct cdp_htt_tlv_hdr tlv_hdr;
1411     uint32_t  phy_errs[1]; /* HTT_TX_PDEV_MAX_PHY_ERR_STATS */
1412 };
1413 
1414 /* == RX PDEV/SOC STATS == */
1415 /* HTT_STATS_RX_SOC_FW_STATS_TAG */
1416 struct cdp_htt_rx_soc_fw_stats_tlv {
1417     struct cdp_htt_tlv_hdr tlv_hdr;
1418     /* Num Packets received on REO FW ring */
1419     uint32_t fw_reo_ring_data_msdu;
1420     /* Num bc/mc packets indicated from fw to host */
1421     uint32_t fw_to_host_data_msdu_bcmc;
1422     /* Num unicast packets indicated from fw to host */
1423     uint32_t fw_to_host_data_msdu_uc;
1424     /* Num remote buf recycle from offload  */
1425     uint32_t ofld_remote_data_buf_recycle_cnt;
1426     /* Num remote free buf given to offload */
1427     uint32_t ofld_remote_free_buf_indication_cnt;
1428 };
1429 
1430 struct cdp_htt_rx_soc_fw_refill_ring_num_refill_tlv_v {
1431     struct cdp_htt_tlv_hdr tlv_hdr;
1432     /* Num total buf refilled from refill ring */
1433     uint32_t refill_ring_num_refill[1]; /* HTT_RX_STATS_REFILL_MAX_RING */
1434 };
1435 
1436 struct cdp_htt_rx_pdev_fw_ring_mpdu_err_tlv_v {
1437     struct cdp_htt_tlv_hdr tlv_hdr;
1438     /* Num error MPDU for each RxDMA error type  */
1439     uint32_t fw_ring_mpdu_err[1]; /* HTT_RX_STATS_RXDMA_MAX_ERR */
1440 };
1441 
1442 struct cdp_htt_rx_pdev_fw_mpdu_drop_tlv_v {
1443     struct cdp_htt_tlv_hdr tlv_hdr;
1444     /* Num MPDU dropped  */
1445     uint32_t fw_mpdu_drop[1]; /* HTT_RX_STATS_FW_DROP_REASON_MAX */
1446 };
1447 
1448 #define HTT_STATS_PHY_ERR_MAX 43
1449 
1450 struct cdp_htt_rx_pdev_fw_stats_phy_err_tlv {
1451     struct cdp_htt_tlv_hdr tlv_hdr;
1452 
1453     /* BIT [ 7 :  0]   :- mac_id
1454      * BIT [31 :  8]   :- reserved
1455      */
1456     uint32_t mac_id__word;
1457     /* Num of phy err */
1458     uint32_t total_phy_err_cnt;
1459     /* Counts of different types of phy errs
1460      * The mapping of PHY error types to phy_err array elements is HW dependent.
1461      * The only currently-supported mapping is shown below:
1462      *
1463      * 0 phyrx_err_phy_off Reception aborted due to receiving a PHY_OFF TLV
1464      * 1 phyrx_err_synth_off
1465      * 2 phyrx_err_ofdma_timing
1466      * 3 phyrx_err_ofdma_signal_parity
1467      * 4 phyrx_err_ofdma_rate_illegal
1468      * 5 phyrx_err_ofdma_length_illegal
1469      * 6 phyrx_err_ofdma_restart
1470      * 7 phyrx_err_ofdma_service
1471      * 8 phyrx_err_ppdu_ofdma_power_drop
1472      * 9 phyrx_err_cck_blokker
1473      * 10 phyrx_err_cck_timing
1474      * 11 phyrx_err_cck_header_crc
1475      * 12 phyrx_err_cck_rate_illegal
1476      * 13 phyrx_err_cck_length_illegal
1477      * 14 phyrx_err_cck_restart
1478      * 15 phyrx_err_cck_service
1479      * 16 phyrx_err_cck_power_drop
1480      * 17 phyrx_err_ht_crc_err
1481      * 18 phyrx_err_ht_length_illegal
1482      * 19 phyrx_err_ht_rate_illegal
1483      * 20 phyrx_err_ht_zlf
1484      * 21 phyrx_err_false_radar_ext
1485      * 22 phyrx_err_green_field
1486      * 23 phyrx_err_bw_gt_dyn_bw
1487      * 24 phyrx_err_leg_ht_mismatch
1488      * 25 phyrx_err_vht_crc_error
1489      * 26 phyrx_err_vht_siga_unsupported
1490      * 27 phyrx_err_vht_lsig_len_invalid
1491      * 28 phyrx_err_vht_ndp_or_zlf
1492      * 29 phyrx_err_vht_nsym_lt_zero
1493      * 30 phyrx_err_vht_rx_extra_symbol_mismatch
1494      * 31 phyrx_err_vht_rx_skip_group_id0
1495      * 32 phyrx_err_vht_rx_skip_group_id1to62
1496      * 33 phyrx_err_vht_rx_skip_group_id63
1497      * 34 phyrx_err_ofdm_ldpc_decoder_disabled
1498      * 35 phyrx_err_defer_nap
1499      * 36 phyrx_err_fdomain_timeout
1500      * 37 phyrx_err_lsig_rel_check
1501      * 38 phyrx_err_bt_collision
1502      * 39 phyrx_err_unsupported_mu_feedback
1503      * 40 phyrx_err_ppdu_tx_interrupt_rx
1504      * 41 phyrx_err_unsupported_cbf
1505      * 42 phyrx_err_other
1506      */
1507     uint32_t phy_err[HTT_STATS_PHY_ERR_MAX];
1508 };
1509 
1510 struct cdp_htt_rx_soc_fw_refill_ring_empty_tlv_v {
1511     struct cdp_htt_tlv_hdr tlv_hdr;
1512     /* Num ring empty encountered */
1513     uint32_t refill_ring_empty_cnt[1]; /* HTT_RX_STATS_REFILL_MAX_RING */
1514 };
1515 
1516 struct cdp_htt_tx_pdev_stats {
1517     struct cdp_htt_tx_pdev_stats_cmn_tlv cmn_tlv;
1518     struct cdp_htt_tx_pdev_stats_urrn_tlv_v underrun_tlv;
1519     struct cdp_htt_tx_pdev_stats_sifs_tlv_v sifs_tlv;
1520     struct cdp_htt_tx_pdev_stats_flush_tlv_v flush_tlv;
1521     struct cdp_htt_tx_pdev_stats_phy_err_tlv_v phy_err_tlv;
1522 };
1523 
1524 struct cdp_htt_rx_soc_stats_t {
1525     struct cdp_htt_rx_soc_fw_stats_tlv fw_tlv;
1526     struct cdp_htt_rx_soc_fw_refill_ring_empty_tlv_v fw_refill_ring_empty_tlv;
1527     struct cdp_htt_rx_soc_fw_refill_ring_num_refill_tlv_v fw_refill_ring_num_refill_tlv;
1528 };
1529 
1530 struct cdp_htt_rx_pdev_stats {
1531     struct cdp_htt_rx_soc_stats_t soc_stats;
1532     struct cdp_htt_rx_pdev_fw_stats_tlv fw_stats_tlv;
1533     struct cdp_htt_rx_pdev_fw_ring_mpdu_err_tlv_v fw_ring_mpdu_err_tlv;
1534     struct cdp_htt_rx_pdev_fw_mpdu_drop_tlv_v fw_ring_mpdu_drop;
1535     struct cdp_htt_rx_pdev_fw_stats_phy_err_tlv fw_stats_phy_err_tlv;
1536 };
1537 
1538 #ifdef WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG
1539 /* Since protocol type enumeration value is passed as CCE metadata
1540  * to firmware, add a constant offset before passing it to firmware
1541  */
1542 #define RX_PROTOCOL_TAG_START_OFFSET  128
1543 /* This should align with packet type enumerations in ieee80211_ioctl.h
1544  * and wmi_unified_param.h files
1545  */
1546 #define RX_PROTOCOL_TAG_MAX   24
1547 /* Macro that should be used to dump the statistics counter for all
1548  * protocol types
1549  */
1550 #define RX_PROTOCOL_TAG_ALL 0xff
1551 #endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */
1552 
1553 #define OFDMA_NUM_RU_SIZE 7
1554 
1555 #define OFDMA_NUM_USERS	37
1556 /* struct cdp_pdev_stats - pdev stats
1557  * @msdu_not_done: packets dropped because msdu done bit not set
1558  * @mec:Multicast Echo check
1559  * @mesh_filter: Mesh Filtered packets
1560  * @mon_rx_drop: packets dropped on monitor vap
1561  * @wifi_parse: rxdma errors due to wifi parse error
1562  * @mon_radiotap_update_err: not enough space to update radiotap
1563  * @pkts: total packets replenished
1564  * @rxdma_err: rxdma errors for replenished
1565  * @nbuf_alloc_fail: nbuf alloc failed
1566  * @map_err: Mapping failure
1567  * @x86_fail: x86 failures
1568  * @low_thresh_intrs: low threshold interrupts
1569  * @rx_raw_pkts: Rx Raw Packets
1570  * @mesh_mem_alloc: Mesh Rx Stats Alloc fail
1571  * @tso_desc_cnt: TSO descriptors
1572  * @sg_desc_cnt: SG Descriptors
1573  * @vlan_tag_stp_cnt: Vlan tagged Stp packets in wifi parse error
1574  * @desc_alloc_fail: desc alloc failed errors
1575  * @ip_csum_err: ip checksum errors
1576  * @tcp_udp_csum_err: tcp/udp checksum errors
1577  * @buf_freelist: buffers added back in freelist
1578  * @tx_i: Tx Ingress stats
1579  * @tx:CDP Tx Stats
1580  * @rx: CDP Rx Stats
1581  * @tx_comp_histogram: Number of Tx completions per interrupt
1582  * @rx_ind_histogram:  Number of Rx ring descriptors reaped per interrupt
1583  * @ppdu_stats_counter: ppdu stats counter
1584  * @cdp_delayed_ba_not_recev: counter for delayed ba not received
1585  * @htt_tx_pdev_stats: htt pdev stats for tx
1586  * @htt_rx_pdev_stats: htt pdev stats for rx
1587  * @data_rx_ru_size: UL ofdma data ru size counter array
1588  * @nondata_rx_ru_size: UL ofdma non data ru size counter array
1589  * @data_rx_ppdu: data rx ppdu counter
1590  * @data_user: data user counter array
1591  */
1592 struct cdp_pdev_stats {
1593 	struct {
1594 		uint32_t msdu_not_done;
1595 		uint32_t mec;
1596 		uint32_t mesh_filter;
1597 		uint32_t wifi_parse;
1598 		/* Monitor mode related */
1599 		uint32_t mon_rx_drop;
1600 		uint32_t mon_radiotap_update_err;
1601 	} dropped;
1602 
1603 	struct {
1604 		struct cdp_pkt_info pkts;
1605 		uint32_t rxdma_err;
1606 		uint32_t nbuf_alloc_fail;
1607 		uint32_t map_err;
1608 		uint32_t x86_fail;
1609 		uint32_t low_thresh_intrs;
1610 	} replenish;
1611 
1612 	uint32_t rx_raw_pkts;
1613 	uint32_t mesh_mem_alloc;
1614 	uint32_t tso_desc_cnt;
1615 	uint32_t sg_desc_cnt;
1616 	uint32_t vlan_tag_stp_cnt;
1617 
1618 	/* Rx errors */
1619 	struct {
1620 		uint32_t desc_alloc_fail;
1621 		uint32_t ip_csum_err;
1622 		uint32_t tcp_udp_csum_err;
1623 		uint32_t rxdma_error;
1624 		uint32_t reo_error;
1625 	} err;
1626 
1627 	uint32_t buf_freelist;
1628 	struct cdp_tx_ingress_stats tx_i;
1629 	struct cdp_tx_stats tx;
1630 	struct cdp_rx_stats rx;
1631 	struct cdp_hist_tx_comp tx_comp_histogram;
1632 	struct cdp_hist_rx_ind rx_ind_histogram;
1633 	uint64_t ppdu_stats_counter[CDP_PPDU_STATS_MAX_TAG];
1634 	uint32_t cdp_delayed_ba_not_recev;
1635 
1636 	struct cdp_htt_tx_pdev_stats  htt_tx_pdev_stats;
1637 	struct cdp_htt_rx_pdev_stats  htt_rx_pdev_stats;
1638 
1639 	/* Received wdi messages from fw */
1640 	uint32_t wdi_event[CDP_WDI_NUM_EVENTS];
1641 	struct cdp_tid_stats tid_stats;
1642 
1643 	/* numbers of data/nondata per RU sizes */
1644 	struct {
1645 		uint32_t data_rx_ru_size[OFDMA_NUM_RU_SIZE];
1646 		uint32_t nondata_rx_ru_size[OFDMA_NUM_RU_SIZE];
1647 		uint32_t data_rx_ppdu;
1648 		uint32_t data_users[OFDMA_NUM_USERS];
1649 	} ul_ofdma;
1650 
1651 	struct cdp_tso_stats tso_stats;
1652 };
1653 
1654 #ifdef QCA_ENH_V3_STATS_SUPPORT
1655 /*
1656  * Enumeration of PDEV Configuration parameter
1657  */
1658 enum _ol_ath_param_t {
1659 	OL_ATH_PARAM_TXCHAINMASK               = 1,
1660 	OL_ATH_PARAM_RXCHAINMASK               = 2,
1661 	OL_ATH_PARAM_AMPDU                     = 6,
1662 	OL_ATH_PARAM_AMPDU_LIMIT               = 7,
1663 	OL_ATH_PARAM_AMPDU_SUBFRAMES           = 8,
1664 	OL_ATH_PARAM_TXPOWER_LIMIT2G           = 12,
1665 	OL_ATH_PARAM_TXPOWER_LIMIT5G           = 13,
1666 	OL_ATH_PARAM_LDPC                      = 32,
1667 	OL_ATH_PARAM_VOW_EXT_STATS             = 45,
1668 	OL_ATH_PARAM_DYN_TX_CHAINMASK          = 73,
1669 	OL_ATH_PARAM_BURST_ENABLE              = 77,
1670 	OL_ATH_PARAM_BURST_DUR                 = 78,
1671 	OL_ATH_PARAM_BCN_BURST                 = 80,
1672 	OL_ATH_PARAM_DCS                       = 82,
1673 #if UMAC_SUPPORT_PERIODIC_PERFSTATS
1674 	OL_ATH_PARAM_PRDPERFSTAT_THRPUT_ENAB   = 83,
1675 	OL_ATH_PARAM_PRDPERFSTAT_THRPUT_WIN    = 84,
1676 	OL_ATH_PARAM_PRDPERFSTAT_THRPUT        = 85,
1677 	OL_ATH_PARAM_PRDPERFSTAT_PER_ENAB      = 86,
1678 	OL_ATH_PARAM_PRDPERFSTAT_PER_WIN       = 87,
1679 	OL_ATH_PARAM_PRDPERFSTAT_PER           = 88,
1680 #endif
1681 	/* UMAC_SUPPORT_PERIODIC_PERFSTATS */
1682 	OL_ATH_PARAM_TOTAL_PER                 = 89,
1683 	/* set manual rate for rts frame */
1684 	OL_ATH_PARAM_RTS_CTS_RATE              = 92,
1685 	/* co channel interference threshold level */
1686 	OL_ATH_PARAM_DCS_COCH_THR              = 93,
1687 	/* transmit error threshold */
1688 	OL_ATH_PARAM_DCS_TXERR_THR             = 94,
1689 	/* phy error threshold */
1690 	OL_ATH_PARAM_DCS_PHYERR_THR            = 95,
1691 	/*
1692 	 * The IOCTL number is 114, it is made 114, inorder to make the IOCTL
1693 	 * number same as Direct-attach IOCTL.
1694 	 * Please, don't change number. This IOCTL gets the Interface code path
1695 	 * it should be either DIRECT-ATTACH or OFF-LOAD.
1696 	 */
1697 	OL_ATH_PARAM_GET_IF_ID                 = 114,
1698 	/* Enable Acs back Ground Channel selection Scan timer in AP mode*/
1699 	OL_ATH_PARAM_ACS_ENABLE_BK_SCANTIMEREN = 118,
1700 	 /* ACS scan timer value in Seconds */
1701 	OL_ATH_PARAM_ACS_SCANTIME              = 119,
1702 	 /* Negligence Delta RSSI between two channel */
1703 	OL_ATH_PARAM_ACS_RSSIVAR               = 120,
1704 	 /* Negligence Delta Channel load between two channel*/
1705 	OL_ATH_PARAM_ACS_CHLOADVAR             = 121,
1706 	  /* Enable Limited OBSS check */
1707 	OL_ATH_PARAM_ACS_LIMITEDOBSS           = 122,
1708 	/* Acs control flag for Scan timer */
1709 	OL_ATH_PARAM_ACS_CTRLFLAG              = 123,
1710 	 /* Acs Run time Debug level*/
1711 	OL_ATH_PARAM_ACS_DEBUGTRACE            = 124,
1712 	OL_ATH_PARAM_SET_FW_HANG_ID            = 137,
1713 	 /* Radio type 1:11ac 0:11abgn */
1714 	OL_ATH_PARAM_RADIO_TYPE                = 138,
1715 	OL_ATH_PARAM_IGMPMLD_OVERRIDE, /* IGMP/MLD packet override */
1716 	OL_ATH_PARAM_IGMPMLD_TID, /* IGMP/MLD packet TID no */
1717 	OL_ATH_PARAM_ARPDHCP_AC_OVERRIDE,
1718 	OL_ATH_PARAM_NON_AGG_SW_RETRY_TH,
1719 	OL_ATH_PARAM_AGG_SW_RETRY_TH,
1720 	/* Dont change this number it as per sync with DA
1721 	     Blocking certian channel from ic channel list */
1722 	OL_ATH_PARAM_DISABLE_DFS   = 144,
1723 	OL_ATH_PARAM_ENABLE_AMSDU  = 145,
1724 	OL_ATH_PARAM_ENABLE_AMPDU  = 146,
1725 	OL_ATH_PARAM_STA_KICKOUT_TH,
1726 	OL_ATH_PARAM_WLAN_PROF_ENABLE,
1727 	OL_ATH_PARAM_LTR_ENABLE,
1728 	OL_ATH_PARAM_LTR_AC_LATENCY_BE = 150,
1729 	OL_ATH_PARAM_LTR_AC_LATENCY_BK,
1730 	OL_ATH_PARAM_LTR_AC_LATENCY_VI,
1731 	OL_ATH_PARAM_LTR_AC_LATENCY_VO,
1732 	OL_ATH_PARAM_LTR_AC_LATENCY_TIMEOUT,
1733 	OL_ATH_PARAM_LTR_TX_ACTIVITY_TIMEOUT = 155,
1734 	OL_ATH_PARAM_LTR_SLEEP_OVERRIDE,
1735 	OL_ATH_PARAM_LTR_RX_OVERRIDE,
1736 	OL_ATH_PARAM_L1SS_ENABLE,
1737 	OL_ATH_PARAM_DSLEEP_ENABLE,
1738 	/* radar error threshold */
1739 	OL_ATH_PARAM_DCS_RADAR_ERR_THR = 160,
1740 	/* Tx channel utilization due to AP's tx and rx */
1741 	OL_ATH_PARAM_DCS_USERMAX_CU_THR,
1742 	/* interference detection threshold */
1743 	OL_ATH_PARAM_DCS_INTR_DETECT_THR,
1744 	/* sampling window, default 10secs */
1745 	OL_ATH_PARAM_DCS_SAMPLE_WINDOW,
1746 	/* debug logs enable/disable */
1747 	OL_ATH_PARAM_DCS_DEBUG,
1748 	OL_ATH_PARAM_ANI_ENABLE = 165,
1749 	OL_ATH_PARAM_ANI_POLL_PERIOD,
1750 	OL_ATH_PARAM_ANI_LISTEN_PERIOD,
1751 	OL_ATH_PARAM_ANI_OFDM_LEVEL,
1752 	OL_ATH_PARAM_ANI_CCK_LEVEL,
1753 	OL_ATH_PARAM_DSCP_TID_MAP = 170,
1754 	OL_ATH_PARAM_TXPOWER_SCALE,
1755 	/* Phy error penalty */
1756 	OL_ATH_PARAM_DCS_PHYERR_PENALTY,
1757 #if ATH_SUPPORT_DSCP_OVERRIDE
1758 	/* set/get TID for sending HMMC packets */
1759 	OL_ATH_PARAM_HMMC_DSCP_TID_MAP,
1760 	/* set/get DSCP mapping override */
1761 	OL_ATH_PARAM_DSCP_OVERRIDE,
1762 	/* set/get HMMC-DSCP mapping override */
1763 	OL_ATH_PARAM_HMMC_DSCP_OVERRIDE = 175,
1764 #endif
1765 #if ATH_RX_LOOPLIMIT_TIMER
1766 	OL_ATH_PARAM_LOOPLIMIT_NUM,
1767 #endif
1768 	OL_ATH_PARAM_ANTENNA_GAIN_2G,
1769 	OL_ATH_PARAM_ANTENNA_GAIN_5G,
1770 	OL_ATH_PARAM_RX_FILTER,
1771 #if ATH_SUPPORT_HYFI_ENHANCEMENTS
1772 	OL_ATH_PARAM_BUFF_THRESH = 180,
1773 	OL_ATH_PARAM_BLK_REPORT_FLOOD,
1774 	OL_ATH_PARAM_DROP_STA_QUERY,
1775 #endif
1776 	OL_ATH_PARAM_QBOOST,
1777 	OL_ATH_PARAM_SIFS_FRMTYPE,
1778 	OL_ATH_PARAM_SIFS_UAPSD = 185,
1779 	OL_ATH_PARAM_FW_RECOVERY_ID,
1780 	OL_ATH_PARAM_RESET_OL_STATS,
1781 	OL_ATH_PARAM_AGGR_BURST,
1782 	/* Number of deauth sent in consecutive rx_peer_invalid */
1783 	OL_ATH_PARAM_DEAUTH_COUNT,
1784 	OL_ATH_PARAM_BLOCK_INTERBSS = 190,
1785 	/* Firmware reset control for Bmiss / timeout / reset */
1786 	OL_ATH_PARAM_FW_DISABLE_RESET,
1787 	OL_ATH_PARAM_MSDU_TTL,
1788 	OL_ATH_PARAM_PPDU_DURATION,
1789 	OL_ATH_PARAM_SET_TXBF_SND_PERIOD,
1790 	OL_ATH_PARAM_ALLOW_PROMISC = 195,
1791 	OL_ATH_PARAM_BURST_MODE,
1792 	OL_ATH_PARAM_DYN_GROUPING,
1793 	OL_ATH_PARAM_DPD_ENABLE,
1794 	OL_ATH_PARAM_DBGLOG_RATELIM,
1795 	/* firmware should intimate us about ps state change for node  */
1796 	OL_ATH_PARAM_PS_STATE_CHANGE = 200,
1797 	OL_ATH_PARAM_MCAST_BCAST_ECHO,
1798 	/* OBSS RSSI threshold for 20/40 coexistence */
1799 	OL_ATH_PARAM_OBSS_RSSI_THRESHOLD,
1800 	/* Link/node RX RSSI threshold  for 20/40 coexistence */
1801 	OL_ATH_PARAM_OBSS_RX_RSSI_THRESHOLD,
1802 #if ATH_CHANNEL_BLOCKING
1803 	OL_ATH_PARAM_ACS_BLOCK_MODE = 205,
1804 #endif
1805 	OL_ATH_PARAM_ACS_TX_POWER_OPTION,
1806 	/*
1807 	 * Default Antenna Polarization MSB 8 bits (24:31) specifying
1808 	 * enable/disable ; LSB 24 bits (0:23) antenna mask value
1809 	 */
1810 	OL_ATH_PARAM_ANT_POLARIZATION,
1811 	/* rate limit mute type error prints */
1812 	OL_ATH_PARAM_PRINT_RATE_LIMIT,
1813 	OL_ATH_PARAM_PDEV_RESET,   /* Reset FW PDEV*/
1814 	/* Do not crash host when target assert happened*/
1815 	OL_ATH_PARAM_FW_DUMP_NO_HOST_CRASH = 210,
1816 	/* Consider OBSS non-erp to change to long slot*/
1817 	OL_ATH_PARAM_CONSIDER_OBSS_NON_ERP_LONG_SLOT = 211,
1818 	OL_ATH_PARAM_STATS_FC,
1819 	OL_ATH_PARAM_QFLUSHINTERVAL,
1820 	OL_ATH_PARAM_TOTAL_Q_SIZE,
1821 	OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE0,
1822 	OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE1,
1823 	OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE2,
1824 	OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE3,
1825 	OL_ATH_PARAM_MIN_THRESHOLD,
1826 	OL_ATH_PARAM_MAX_Q_LIMIT,
1827 	OL_ATH_PARAM_MIN_Q_LIMIT,
1828 	OL_ATH_PARAM_CONG_CTRL_TIMER_INTV,
1829 	OL_ATH_PARAM_STATS_TIMER_INTV,
1830 	OL_ATH_PARAM_ROTTING_TIMER_INTV,
1831 	OL_ATH_PARAM_LATENCY_PROFILE,
1832 	OL_ATH_PARAM_HOSTQ_DUMP,
1833 	OL_ATH_PARAM_TIDQ_MAP,
1834 	OL_ATH_PARAM_DBG_ARP_SRC_ADDR, /* ARP DEBUG source address*/
1835 	OL_ATH_PARAM_DBG_ARP_DST_ADDR, /* ARP DEBUG destination address*/
1836 	OL_ATH_PARAM_ARP_DBG_CONF,   /* ARP debug configuration */
1837 	OL_ATH_PARAM_DISABLE_STA_VAP_AMSDU, /* Disable AMSDU for station vap */
1838 #if ATH_SUPPORT_DFS && ATH_SUPPORT_STA_DFS
1839 	OL_ATH_PARAM_STADFS_ENABLE = 300,    /* STA DFS is enabled or not  */
1840 #endif
1841 #if QCA_AIRTIME_FAIRNESS
1842 	OL_ATH_PARAM_ATF_STRICT_SCHED = 301,
1843 	OL_ATH_PARAM_ATF_GROUP_POLICY = 302,
1844 #endif
1845 #if DBDC_REPEATER_SUPPORT
1846 	OL_ATH_PARAM_PRIMARY_RADIO,
1847 	OL_ATH_PARAM_DBDC_ENABLE,
1848 #endif
1849 	OL_ATH_PARAM_TXPOWER_DBSCALE,
1850 	OL_ATH_PARAM_CTL_POWER_SCALE,
1851 #if QCA_AIRTIME_FAIRNESS
1852 	OL_ATH_PARAM_ATF_OBSS_SCHED = 307,
1853 	OL_ATH_PARAM_ATF_OBSS_SCALE = 308,
1854 #endif
1855 	OL_ATH_PARAM_PHY_OFDM_ERR = 309,
1856 	OL_ATH_PARAM_PHY_CCK_ERR = 310,
1857 	OL_ATH_PARAM_FCS_ERR = 311,
1858 	OL_ATH_PARAM_CHAN_UTIL = 312,
1859 #if DBDC_REPEATER_SUPPORT
1860 	OL_ATH_PARAM_CLIENT_MCAST,
1861 #endif
1862 	OL_ATH_PARAM_EMIWAR_80P80 = 314,
1863 	OL_ATH_PARAM_BATCHMODE = 315,
1864 	OL_ATH_PARAM_PACK_AGGR_DELAY = 316,
1865 #if UMAC_SUPPORT_ACFG
1866 	OL_ATH_PARAM_DIAG_ENABLE = 317,
1867 #endif
1868 #if ATH_SUPPORT_VAP_QOS
1869 	OL_ATH_PARAM_VAP_QOS = 318,
1870 #endif
1871 	OL_ATH_PARAM_CHAN_STATS_TH = 319,
1872 	/* Passive scan is enabled or disabled  */
1873 	OL_ATH_PARAM_PASSIVE_SCAN_ENABLE = 320,
1874 	OL_ATH_MIN_RSSI_ENABLE = 321,
1875 	OL_ATH_MIN_RSSI = 322,
1876 	OL_ATH_PARAM_ACS_2G_ALLCHAN = 323,
1877 #if DBDC_REPEATER_SUPPORT
1878 	OL_ATH_PARAM_DELAY_STAVAP_UP = 324,
1879 #endif
1880 	/* It is used to set the channel switch options */
1881 	OL_ATH_PARAM_CHANSWITCH_OPTIONS = 327,
1882 	OL_ATH_BTCOEX_ENABLE        = 328,
1883 	OL_ATH_BTCOEX_WL_PRIORITY   = 329,
1884 	OL_ATH_PARAM_TID_OVERRIDE_QUEUE_MAPPING = 330,
1885 	OL_ATH_PARAM_CAL_VER_CHECK = 331,
1886 	OL_ATH_PARAM_NO_VLAN       = 332,
1887 	OL_ATH_PARAM_CCA_THRESHOLD = 333,
1888 	OL_ATH_PARAM_ATF_LOGGING = 334,
1889 	OL_ATH_PARAM_STRICT_DOTH = 335,
1890 	OL_ATH_PARAM_DISCONNECTION_TIMEOUT   = 336,
1891 	OL_ATH_PARAM_RECONFIGURATION_TIMEOUT = 337,
1892 	OL_ATH_PARAM_CHANNEL_SWITCH_COUNT = 338,
1893 	OL_ATH_PARAM_ALWAYS_PRIMARY = 339,
1894 	OL_ATH_PARAM_FAST_LANE = 340,
1895 	OL_ATH_GET_BTCOEX_DUTY_CYCLE = 341,
1896 	OL_ATH_PARAM_SECONDARY_OFFSET_IE = 342,
1897 	OL_ATH_PARAM_WIDE_BAND_SUB_ELEMENT = 343,
1898 	OL_ATH_PARAM_PREFERRED_UPLINK = 344,
1899 	OL_ATH_PARAM_PRECAC_ENABLE = 345,
1900 	OL_ATH_PARAM_PRECAC_TIMEOUT = 346,
1901 	OL_ATH_COEX_VER_CFG = 347,
1902 	OL_ATH_PARAM_DUMP_TARGET = 348,
1903 	OL_ATH_PARAM_PDEV_TO_REO_DEST = 349,
1904 	OL_ATH_PARAM_DUMP_CHAINMASK_TABLES = 350,
1905 	OL_ATH_PARAM_DUMP_OBJECTS = 351,
1906 	OL_ATH_PARAM_ACS_SRLOADVAR = 352,
1907 	OL_ATH_PARAM_MGMT_RSSI_THRESHOLD = 353,
1908 	OL_ATH_PARAM_EXT_NSS_CAPABLE = 354,
1909 	OL_ATH_PARAM_MGMT_PDEV_STATS_TIMER = 355,
1910 	OL_ATH_PARAM_TXACKTIMEOUT = 356,
1911 	OL_ATH_PARAM_ICM_ACTIVE = 357,
1912 	OL_ATH_PARAM_NOMINAL_NOISEFLOOR = 358,
1913 	OL_ATH_PARAM_CHAN_INFO = 359,
1914 	OL_ATH_PARAM_ACS_RANK = 360,
1915 	OL_ATH_PARAM_TXCHAINSOFT = 361,
1916 	OL_ATH_PARAM_WIDE_BAND_SCAN = 362,
1917 	OL_ATH_PARAM_CCK_TX_ENABLE = 363,
1918 	OL_ATH_PARAM_PAPI_ENABLE = 364,
1919 	OL_ATH_PARAM_ISOLATION = 365,
1920 	OL_ATH_PARAM_MAX_CLIENTS_PER_RADIO = 366,
1921 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
1922 	OL_ATH_PARAM_DFS_HOST_WAIT_TIMEOUT = 367,
1923 #endif
1924 	OL_ATH_PARAM_NF_THRESH = 368,
1925 #ifdef OL_ATH_SMART_LOGGING
1926 	OL_ATH_PARAM_SMARTLOG_ENABLE = 369,
1927 	OL_ATH_PARAM_SMARTLOG_FATAL_EVENT = 370,
1928 	OL_ATH_PARAM_SMARTLOG_SKB_SZ = 371,
1929 	OL_ATH_PARAM_SMARTLOG_P1PINGFAIL = 372,
1930 #endif /* OL_ATH_SMART_LOGGING */
1931 #ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT
1932 	OL_ATH_PARAM_PRECAC_INTER_CHANNEL = 373,
1933 	OL_ATH_PARAM_PRECAC_CHAN_STATE = 374,
1934 #endif
1935 	OL_ATH_PARAM_DBR_RING_STATUS = 375,
1936 #ifdef QCN_ESP_IE
1937 	OL_ATH_PARAM_ESP_PERIODICITY = 376,
1938 	OL_ATH_PARAM_ESP_AIRTIME = 377,
1939 	OL_ATH_PARAM_ESP_PPDU_DURATION = 378,
1940 	OL_ATH_PARAM_ESP_BA_WINDOW = 379,
1941 #endif /* QCN_ESP_IE */
1942 
1943 	OL_ATH_PARAM_CBS = 380,
1944 	OL_ATH_PARAM_DCS_SIM = 381,
1945 	OL_ATH_PARAM_CBS_DWELL_SPLIT_TIME = 382,
1946 	OL_ATH_PARAM_CBS_DWELL_REST_TIME = 383,
1947 	OL_ATH_PARAM_CBS_WAIT_TIME = 384,
1948 	OL_ATH_PARAM_CBS_REST_TIME = 385,
1949 	OL_ATH_PARAM_CBS_CSA = 386,
1950 	OL_ATH_PARAM_TWICE_ANTENNA_GAIN = 387,
1951 	OL_ATH_PARAM_ACTIVITY_FACTOR = 388,
1952 	OL_ATH_PARAM_CHAN_AP_RX_UTIL = 389,
1953 	OL_ATH_PARAM_CHAN_FREE  = 390,
1954 	OL_ATH_PARAM_CHAN_AP_TX_UTIL = 391,
1955 	OL_ATH_PARAM_CHAN_OBSS_RX_UTIL = 392,
1956 	OL_ATH_PARAM_CHAN_NON_WIFI = 393,
1957 #if PEER_FLOW_CONTROL
1958 	OL_ATH_PARAM_VIDEO_STATS_FC = 394,
1959 	OL_ATH_PARAM_VIDEO_DELAY_STATS_FC = 395,
1960 #endif
1961 	OL_ATH_PARAM_ENABLE_PEER_RETRY_STATS = 396,
1962 	OL_ATH_PARAM_HE_UL_TRIG_INT = 397,
1963 	OL_ATH_PARAM_DFS_NOL_SUBCHANNEL_MARKING = 398,
1964 	/*
1965 	 * Get the band that is tuned for low, high,
1966 	 * full band freq range or it's 2g
1967 	 */
1968 	OL_ATH_PARAM_BAND_INFO = 399,
1969 	OL_ATH_PARAM_BW_REDUCE = 400,
1970 	/* Enable/disable Spatial Reuse */
1971 	OL_ATH_PARAM_HE_SR = 401,
1972 	OL_ATH_PARAM_HE_UL_PPDU_DURATION = 402,
1973 	OL_ATH_PARAM_HE_UL_RU_ALLOCATION = 403,
1974 	OL_ATH_PARAM_PERIODIC_CFR_CAPTURE = 404,
1975 	OL_ATH_PARAM_FLUSH_PEER_RATE_STATS = 405,
1976 	OL_ATH_PARAM_DCS_RE_ENABLE_TIMER = 406,
1977 	/* Enable/disable Rx lite monitor mode */
1978 	OL_ATH_PARAM_RX_MON_LITE = 407,
1979 	/* wifi down indication used in MBSS feature */
1980 	OL_ATH_PARAM_WIFI_DOWN_IND = 408,
1981 	OL_ATH_PARAM_TX_CAPTURE = 409,
1982 	/* Enable fw dump collectin if wmi disconnects */
1983 	OL_ATH_PARAM_WMI_DIS_DUMP = 410,
1984 	OL_ATH_PARAM_ACS_CHAN_GRADE_ALGO = 411,
1985 	OL_ATH_PARAM_ACS_CHAN_EFFICIENCY_VAR = 412,
1986 	OL_ATH_PARAM_ACS_NEAR_RANGE_WEIGHTAGE = 413,
1987 	OL_ATH_PARAM_ACS_MID_RANGE_WEIGHTAGE = 414,
1988 	OL_ATH_PARAM_ACS_FAR_RANGE_WEIGHTAGE = 415,
1989 	/* Set SELF AP OBSS_PD_THRESHOLD value */
1990 	OL_ATH_PARAM_SET_CMD_OBSS_PD_THRESHOLD = 416,
1991 	/* Enable/Disable/Set MGMT_TTL in milliseconds. */
1992 	OL_ATH_PARAM_MGMT_TTL = 417,
1993 	/* Enable/Disable/Set PROBE_RESP_TTL in milliseconds */
1994 	OL_ATH_PARAM_PROBE_RESP_TTL = 418,
1995 	/* Set global MU PPDU duration for DL (usec units) */
1996 	OL_ATH_PARAM_MU_PPDU_DURATION = 419,
1997 	/* Set TBTT_CTRL_CFG */
1998 	OL_ATH_PARAM_TBTT_CTRL = 420,
1999 	/* Enable/disable AP OBSS_PD_THRESHOLD */
2000 	OL_ATH_PARAM_SET_CMD_OBSS_PD_THRESHOLD_ENABLE = 421,
2001 	/* Get baseline radio level channel width */
2002 	OL_ATH_PARAM_RCHWIDTH = 422,
2003 	/* Whether external ACS request is in progress */
2004 	OL_ATH_EXT_ACS_REQUEST_IN_PROGRESS = 423,
2005 	/* set/get hw mode */
2006 	OL_ATH_PARAM_HW_MODE  = 424,
2007 #if DBDC_REPEATER_SUPPORT
2008 	/* same ssid feature global disable */
2009 	OL_ATH_PARAM_SAME_SSID_DISABLE = 425,
2010 #endif
2011 	/* get MBSS enable flag */
2012 	OL_ATH_PARAM_MBSS_EN  = 426,
2013 	/* UNII-1 and UNII-2A channel coexistance */
2014 	OL_ATH_PARAM_CHAN_COEX = 427,
2015 	/* Out of Band Advertisement feature */
2016 	OL_ATH_PARAM_OOB_ENABLE = 428,
2017 	/* set/get opmode-notification timer for hw-mode switch */
2018 	OL_ATH_PARAM_HW_MODE_SWITCH_OMN_TIMER = 429,
2019 	/* enable opmode-notification when doing hw-mode switch */
2020 	OL_ATH_PARAM_HW_MODE_SWITCH_OMN_ENABLE = 430,
2021 	/* set primary interface for hw-mode switch */
2022 	OL_ATH_PARAM_HW_MODE_SWITCH_PRIMARY_IF = 431,
2023 	/* Number of vdevs configured per PSOC */
2024 	OL_ATH_PARAM_GET_PSOC_NUM_VDEVS = 432,
2025 	/* Number of peers configured per PSOC */
2026 	OL_ATH_PARAM_GET_PSOC_NUM_PEERS = 433,
2027 	/* Number of vdevs configured per PDEV */
2028 	OL_ATH_PARAM_GET_PDEV_NUM_VDEVS = 434,
2029 	/* Number of peers configured per PDEV */
2030 	OL_ATH_PARAM_GET_PDEV_NUM_PEERS = 435,
2031 	/* Number of monitor vdevs configured per PDEV */
2032 	OL_ATH_PARAM_GET_PDEV_NUM_MONITOR_VDEVS = 436,
2033 #ifdef CE_TASKLET_DEBUG_ENABLE
2034 	/* Enable/disable CE stats print */
2035 	OL_ATH_PARAM_ENABLE_CE_LATENCY_STATS = 437,
2036 #endif
2037 };
2038 #endif
2039 /* Bitmasks for stats that can block */
2040 #define EXT_TXRX_FW_STATS		0x0001
2041 #endif
2042