xref: /wlan-dirver/qca-wifi-host-cmn/dp/inc/cdp_txrx_stats_struct.h (revision 27d564647e9b50e713c60b0d7e5ea2a9b0a3ae74)
1 /*
2  * Copyright (c) 2016-2018 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 #ifndef CONFIG_WIN
27 #include <wlan_defs.h>
28 #endif
29 
30 #define TXRX_STATS_LEVEL_OFF   0
31 #define TXRX_STATS_LEVEL_BASIC 1
32 #define TXRX_STATS_LEVEL_FULL  2
33 
34 #define BSS_CHAN_INFO_READ                        1
35 #define BSS_CHAN_INFO_READ_AND_CLEAR              2
36 
37 #define TX_FRAME_TYPE_DATA 0
38 #define TX_FRAME_TYPE_MGMT 1
39 #define TX_FRAME_TYPE_BEACON 2
40 
41 #ifndef TXRX_STATS_LEVEL
42 #define TXRX_STATS_LEVEL TXRX_STATS_LEVEL_BASIC
43 #endif
44 
45 /* 1 additional MCS is for invalid values */
46 #define MAX_MCS (12 + 1)
47 #define MAX_MCS_11A 8
48 #define MAX_MCS_11B 7
49 #define MAX_MCS_11AC 12
50 /* 1 additional GI is for invalid values */
51 #define MAX_GI (4 + 1)
52 #define SS_COUNT 8
53 #define MAX_BW 7
54 #define MAX_RECEPTION_TYPES 4
55 
56 /* WME stream classes */
57 #define WME_AC_BE    0    /* best effort */
58 #define WME_AC_BK    1    /* background */
59 #define WME_AC_VI    2    /* video */
60 #define WME_AC_VO    3    /* voice */
61 #define WME_AC_MAX   4    /* MAX AC Value */
62 
63 #define CDP_MAX_RX_RINGS 4
64 
65 /* TID level VoW stats macros
66  * to add and get stats
67  */
68 #define PFLOW_TXRX_TIDQ_STATS_ADD(_peer, _tid, _var, _val) \
69 	(((_peer)->tidq_stats[_tid]).stats[_var]) += _val
70 #define PFLOW_TXRX_TIDQ_STATS_GET(_peer, _tid, _var, _val) \
71 	((_peer)->tidq_stats[_tid].stats[_var])
72 /*
73  * Video only stats
74  */
75 #define PFLOW_CTRL_PDEV_VIDEO_STATS_SET(_pdev, _var, _val) \
76 	(((_pdev)->vow.vistats[_var]).value) = _val
77 #define PFLOW_CTRL_PDEV_VIDEO_STATS_GET(_pdev, _var) \
78 	((_pdev)->vow.vistats[_var].value)
79 #define PFLOW_CTRL_PDEV_VIDEO_STATS_ADD(_pdev, _var, _val) \
80 	(((_pdev)->vow.vistats[_var]).value) += _val
81 /*
82  * video delay stats
83  */
84 #define PFLOW_CTRL_PDEV_DELAY_VIDEO_STATS_SET(_pdev, _var, _val) \
85 	(((_pdev)->vow.delaystats[_var]).value) = _val
86 #define PFLOW_CTRL_PDEV_DELAY_VIDEO_STATS_GET(_pdev, _var) \
87 	((_pdev)->vow.delaystats[_var].value)
88 #define PFLOW_CTRL_PDEV_DELAY_VIDEO_STATS_ADD(_pdev, _var, _val) \
89 	(((_pdev)->vow.delaystats[_var]).value) += _val
90 /*
91  * Number of TLVs sent by FW. Needs to reflect
92  * HTT_PPDU_STATS_MAX_TAG declared in FW
93  */
94 #define CDP_PPDU_STATS_MAX_TAG 14
95 
96 /* Different Packet Types */
97 enum cdp_packet_type {
98 	DOT11_A = 0,
99 	DOT11_B = 1,
100 	DOT11_N = 2,
101 	DOT11_AC = 3,
102 	DOT11_AX = 4,
103 	DOT11_MAX = 5,
104 };
105 
106 /* TID level Tx/Rx stats
107  *
108  */
109 enum cdp_txrx_tidq_stats {
110 	/* Tx Counters */
111 	TX_MSDU_TOTAL_LINUX_SUBSYSTEM,
112 	TX_MSDU_TOTAL_FROM_OSIF,
113 	TX_MSDU_TX_COMP_PKT_CNT,
114 	/* Rx Counters */
115 	RX_MSDU_TOTAL_FROM_FW,
116 	RX_MSDU_MCAST_FROM_FW,
117 	RX_TID_MISMATCH_FROM_FW,
118 	RX_MSDU_MISC_PKTS,
119 	RX_MSDU_IS_ARP,
120 	RX_MSDU_IS_EAP,
121 	RX_MSDU_IS_DHCP,
122 	RX_AGGREGATE_10,
123 	RX_AGGREGATE_20,
124 	RX_AGGREGATE_30,
125 	RX_AGGREGATE_40,
126 	RX_AGGREGATE_50,
127 	RX_AGGREGATE_60,
128 	RX_AGGREGATE_MORE,
129 	RX_AMSDU_1,
130 	RX_AMSDU_2,
131 	RX_AMSDU_3,
132 	RX_AMSDU_4,
133 	RX_AMSDU_MORE,
134 	RX_MSDU_CHAINED_FROM_FW,
135 	RX_MSDU_REORDER_FAILED_FROM_FW,
136 	RX_MSDU_REORDER_FLUSHED_FROM_FW,
137 	RX_MSDU_DISCARD_FROM_FW,
138 	RX_MSDU_DUPLICATE_FROM_FW,
139 	RX_MSDU_DELIVERED_TO_STACK,
140 	TIDQ_STATS_MAX,
141 };
142 
143 struct cdp_tidq_stats {
144 	uint32_t stats[TIDQ_STATS_MAX];
145 };
146 
147 /* struct cdp_pkt_info - packet info
148  * @num: no of packets
149  * @bytes: total no of bytes
150  */
151 struct cdp_pkt_info {
152 	uint32_t num;
153 	uint64_t bytes;
154 };
155 
156 /* struct cdp_pkt_type - packet type
157  * @mcs_count: Counter array for each MCS index
158  */
159 struct cdp_pkt_type {
160 	uint32_t mcs_count[MAX_MCS];
161 };
162 
163 /* struct cdp_tx_stats - tx stats
164  * @cdp_pkt_info comp_pkt: Pkt Info for which completions were received
165  * @cdp_pkt_info ucast: Unicast Packet Count
166  * @cdp_pkt_info mcast: Multicast Packet Count
167  * @cdp_pkt_info bcast: Broadcast Packet Count
168  * @cdp_pkt_info nawds_mcast: NAWDS  Multicast Packet Count
169  * @nawds_mcast_drop: NAWDS  Multicast Drop Count
170  * @cdp_pkt_info tx_success: Successful Tx Packets
171  * @tx_failed: Total Tx failure
172  * @ofdma: Total Packets as ofdma
173  * @stbc: Packets in STBC
174  * @ldpc: Packets in LDPC
175  * @retries: Packet retries
176  * @non_amsdu_cnt: Number of MSDUs with no MSDU level aggregation
177  * @amsdu_cnt: Number of MSDUs part of AMSDU
178  * @tx_rate: Tx Rate
179  * @last_tx_rate: Last tx rate for unicast packets
180  * @last_tx_rate_mcs: Tx rate mcs for unicast packets
181  * @mcast_last_tx_rate: Last tx rate for multicast packets
182  * @mcast_last_tx_rate_mcs: Last tx rate mcs for multicast
183  * @last_per: Tx Per
184  * @rnd_avg_tx_rate: Rounded average tx rate
185  * @avg_tx_rate: Average TX rate
186  * @last_ack_rssi: RSSI of last acked packet
187  * @tx_bytes_success_last: last Tx success bytes
188  * @tx_data_success_last: last Tx success data
189  * @tx_byte_rate: Bytes Trasmitted in last one sec
190  * @tx_data_rate: Data Transmitted in last one sec
191  * @sgi_count[MAX_GI]: SGI count
192  * @nss[SS_COUNT]: Packet count for different num_spatial_stream values
193  * @bw[MAX_BW]: Packet Count for different bandwidths
194  * @wme_ac_type[WME_AC_MAX]: Wireless Multimedia type Count
195  * @excess_retries_per_ac[WME_AC_MAX]: Wireless Multimedia type Count
196  * @fw_rem: Discarded by firmware
197  * @fw_rem_notx: firmware_discard_untransmitted
198  * @fw_rem_tx: firmware_discard_transmitted
199  * @age_out: aged out in mpdu/msdu queues
200  * @fw_reason1: discarded by firmware reason 1
201  * @fw_reason2: discarded by firmware reason 2
202  * @fw_reason3: discarded by firmware reason 3
203  * @mcs_count: MCS Count
204  * @dot11_tx_pkts: dot11 tx packets
205  * @an_tx_cnt: ald tx count
206  * @an_tx_rates_used: ald rx rate used
207  * @an_tx_bytes: ald tx bytes
208  * @ald_txcount: ald tx count
209  * @ald_lastper: ald last PER
210  * @ald_max4msframelen: ald max frame len
211  * @an_tx_ratecount: ald tx ratecount
212  * @ald_retries: ald retries
213  * @ald_ac_nobufs: #buffer overflows per node per AC
214  * @ald_ac_excretries: #pkts dropped after excessive retries per node per AC
215  * @rssi_chain: rssi chain
216  * @inactive_time: inactive time in secs
217  * @tx_ratecode: Tx rate code of last frame
218  * @tx_flags: tx flags
219  * @tx_power: Tx power latest
220  * @is_tx_no_ack: no ack received
221  * @is_tx_nodefkey: tx failed 'cuz no defkey
222  * @is_tx_noheadroom: tx failed 'cuz no space
223  * @is_crypto_enmicfail:
224  * @is_tx_nonode: tx failed for no node
225  * @is_tx_unknownmgt: tx of unknown mgt frame
226  * @is_tx_badcipher: tx failed 'cuz key type
227  * @ampdu_cnt: completion of aggregation
228  * @non_ampdu_cnt: tx completion not aggregated
229  */
230 struct cdp_tx_stats {
231 	struct cdp_pkt_info comp_pkt;
232 	struct cdp_pkt_info ucast;
233 	struct cdp_pkt_info mcast;
234 	struct cdp_pkt_info bcast;
235 	struct cdp_pkt_info nawds_mcast;
236 	uint32_t nawds_mcast_drop;
237 	struct cdp_pkt_info tx_success;
238 	uint32_t tx_failed;
239 	uint32_t ofdma;
240 	uint32_t stbc;
241 	uint32_t ldpc;
242 	uint32_t retries;
243 	uint32_t non_amsdu_cnt;
244 	uint32_t amsdu_cnt;
245 	uint32_t tx_rate;
246 	uint32_t last_tx_rate;
247 	uint32_t last_tx_rate_mcs;
248 	uint32_t mcast_last_tx_rate;
249 	uint32_t mcast_last_tx_rate_mcs;
250 	uint32_t last_per;
251 	uint32_t rnd_avg_tx_rate;
252 	uint32_t avg_tx_rate;
253 	uint32_t last_ack_rssi;
254 	uint32_t tx_bytes_success_last;
255 	uint32_t tx_data_success_last;
256 	uint32_t tx_byte_rate;
257 	uint32_t tx_data_rate;
258 	struct cdp_pkt_type pkt_type[DOT11_MAX];
259 	uint32_t sgi_count[MAX_GI];
260 
261 	uint32_t nss[SS_COUNT];
262 
263 	uint32_t bw[MAX_BW];
264 
265 	uint32_t wme_ac_type[WME_AC_MAX];
266 
267 	uint32_t excess_retries_per_ac[WME_AC_MAX];
268 
269 	struct {
270 		uint32_t fw_rem;
271 		uint32_t fw_rem_notx;
272 		uint32_t fw_rem_tx;
273 		uint32_t age_out;
274 		uint32_t fw_reason1;
275 		uint32_t fw_reason2;
276 		uint32_t fw_reason3;
277 	} dropped;
278 
279 	struct cdp_pkt_info dot11_tx_pkts;
280 
281 	uint32_t fw_tx_cnt;
282 	uint32_t fw_tx_rates_used;
283 	uint32_t fw_tx_bytes;
284 	uint32_t fw_txcount;
285 	uint32_t fw_max4msframelen;
286 	uint32_t fw_ratecount;
287 
288 	uint32_t ac_nobufs[WME_AC_MAX];
289 	uint32_t rssi_chain[WME_AC_MAX];
290 	uint32_t inactive_time;
291 
292 	uint32_t tx_ratecode;
293 	uint32_t tx_flags;
294 	uint32_t tx_power;
295 
296 	/* MSDUs which the target sent but couldn't get an ack for */
297 	struct cdp_pkt_info is_tx_no_ack;
298 
299 	/*add for peer and upadted from ppdu*/
300 	uint32_t ampdu_cnt;
301 	uint32_t non_ampdu_cnt;
302 };
303 
304 /* struct cdp_rx_stats - rx Level Stats
305  * @to_stack: Total packets sent up the stack
306  * @rcvd_reo[CDP_MAX_RX_RINGS]:  Packets received on the reo ring
307  * @unicast: Total unicast packets
308  * @multicast: Total multicast packets
309  * @bcast:  Broadcast Packet Count
310  * @raw: Raw Pakets received
311  * @nawds_mcast_drop: Total multicast packets
312  * @mec_drop: Total MEC packets dropped
313  * @pkts: Intra BSS packets received
314  * @fail: Intra BSS packets failed
315  * @mic_err: Rx MIC errors CCMP
316  * @decrypt_err: Rx Decryption Errors CRC
317  * @fcserr: rx MIC check failed (CCMP)
318  * @wme_ac_type[WME_AC_MAX]: Wireless Multimedia type Count
319  * @reception_type[MAX_RECEPTION_TYPES]: Reception type os packets
320  * @mcs_count[MAX_MCS]: mcs count
321  * @sgi_count[MAX_GI]: sgi count
322  * @nss[SS_COUNT]: Packet count in spatiel Streams
323  * @bw[MAX_BW]:  Packet Count in different bandwidths
324  * @non_ampdu_cnt: Number of MSDUs with no MPDU level aggregation
325  * @ampdu_cnt: Number of MSDUs part of AMSPU
326  * @non_amsdu_cnt: Number of MSDUs with no MSDU level aggregation
327  * @amsdu_cnt: Number of MSDUs part of AMSDU
328  * @bar_recv_cnt: Number of bar received
329  * @rssi: RSSI of received signal
330  * @last_rssi: Previous rssi
331  * @rx_rate: Rx rate
332  * @last_rx_rate: Previous rx rate
333  * @rnd_avg_rx_rate: Rounded average rx rate
334  * @avg_rx_rate:  Average Rx rate
335  * @dot11_rx_pkts: dot11 rx packets
336  * @rx_bytes_last: last Rx success bytes
337  * @rx_data_last: last rx success data
338  * @rx_byte_rate: bytes received in last one sec
339  * @rx_data_rate: data received in last one sec
340  * @rx_retries: retries of packet in rx
341  * @rx_mpdus: mpdu in rx
342  * @rx_ppdus: ppdu in rx
343  * @is_rx_tooshort: tooshort
344  * @is_rx_decap: rx decap
345  * @rx_ccmpmic: rx MIC check failed (CCMP)
346  * @rx_tkipmic: rx MIC check failed (TKIP)
347  * @rx_tkipicv: rx ICV check failed (TKIP)
348  * @rx_wpimic: rx MIC check failed (WPI)
349  * @rx_wepfail: rx wep processing failed
350  * @rx_aggr: aggregation on rx
351  * @rx_discard: packets discard in rx
352  */
353 struct cdp_rx_stats {
354 	struct cdp_pkt_info to_stack;
355 	struct cdp_pkt_info rcvd_reo[CDP_MAX_RX_RINGS];
356 	struct cdp_pkt_info unicast;
357 	struct cdp_pkt_info multicast;
358 	struct cdp_pkt_info bcast;
359 	struct cdp_pkt_info raw;
360 	uint32_t nawds_mcast_drop;
361 	struct cdp_pkt_info mec_drop;
362 	struct {
363 		struct cdp_pkt_info pkts;
364 		struct cdp_pkt_info fail;
365 	} intra_bss;
366 
367 	struct {
368 		uint32_t mic_err;
369 		uint32_t decrypt_err;
370 		uint32_t fcserr;
371 	} err;
372 
373 	uint32_t wme_ac_type[WME_AC_MAX];
374 	uint32_t reception_type[MAX_RECEPTION_TYPES];
375 	struct cdp_pkt_type pkt_type[DOT11_MAX];
376 	uint32_t sgi_count[MAX_GI];
377 	uint32_t nss[SS_COUNT];
378 	uint32_t bw[MAX_BW];
379 	uint32_t non_ampdu_cnt;
380 	uint32_t ampdu_cnt;
381 	uint32_t non_amsdu_cnt;
382 	uint32_t amsdu_cnt;
383 	uint32_t bar_recv_cnt;
384 	uint32_t rssi;
385 	uint32_t last_rssi;
386 	uint32_t rx_rate;
387 	uint32_t last_rx_rate;
388 	uint32_t rnd_avg_rx_rate;
389 	uint32_t avg_rx_rate;
390 	struct cdp_pkt_info  dot11_rx_pkts;
391 
392 	uint32_t rx_bytes_success_last;
393 	uint32_t rx_data_success_last;
394 	uint32_t rx_byte_rate;
395 	uint32_t rx_data_rate;
396 
397 	uint32_t rx_retries;
398 	uint32_t rx_mpdus;
399 	uint32_t rx_ppdus;
400 
401 	/*add for peer updated for ppdu*/
402 	uint32_t rx_aggr;
403 	uint32_t rx_discard;
404 };
405 
406 /* struct cdp_tx_ingress_stats - Tx ingress Stats
407  * @rcvd: Total packets received for transmission
408  * @processed: Tx packets processed
409  * @inspect_pkts: Total packets passed to inspect handler
410  * @nawds_mcast: NAWDS  Multicast Packet Count
411  * @bcast: Number of broadcast packets
412  * @raw_pkt: Total Raw packets
413  * @dma_map_error: DMA map error
414  * @num_seg: No of segments in TSO packets
415  * @tso_pkt:total no of TSO packets
416  * @non_tso_pkts: non - TSO packets
417  * @tso_desc_cnt: TSO descriptors
418  * @dropped_host: TSO packets dropped by host
419  * @dropped_target:TSO packets dropped by target
420  * @sg_pkt: Total scatter gather packets
421  * @non_sg_pkts: non SG packets
422  * @sg_desc_cnt: SG Descriptors
423  * @dropped_host: SG packets dropped by host
424  * @dropped_target: SG packets dropped by target
425  * @dma_map_error: Dma map error
426  * @mcast_pkt: total no of multicast conversion packets
427  * @dropped_map_error: packets dropped due to map error
428  * @dropped_self_mac: packets dropped due to self Mac address
429  * @dropped_send_fail: Packets dropped due to send fail
430  * @ucast: total unicast packets transmitted
431  * @fail_seg_alloc: Segment allocation failure
432  * @clone_fail: NBUF clone failure
433  * @dropped_pkt: Total scatter gather packets
434  * @desc_na: Desc Not Available
435  * @ring_full: ring full
436  * @enqueue_fail: hw enqueue fail
437  * @dma_error: dma fail
438  * @res_full: Resource Full: Congestion Control
439  * @exception_fw: packets sent to fw
440  * @completion_fw: packets completions received from fw
441  * @cce_classified:Number of packets classified by CCE
442  * @cce_classified_raw:Number of raw packets classified by CCE
443  */
444 struct cdp_tx_ingress_stats {
445 	struct cdp_pkt_info rcvd;
446 	struct cdp_pkt_info processed;
447 	struct cdp_pkt_info reinject_pkts;
448 	struct cdp_pkt_info inspect_pkts;
449 	struct cdp_pkt_info nawds_mcast;
450 	struct cdp_pkt_info bcast;
451 
452 	struct {
453 		struct cdp_pkt_info raw_pkt;
454 		uint32_t dma_map_error;
455 	} raw;
456 
457 	/* TSO packets info */
458 	struct {
459 		uint32_t num_seg;
460 		struct cdp_pkt_info tso_pkt;
461 		struct cdp_pkt_info non_tso_pkts;
462 		uint32_t tso_desc_cnt;
463 		struct cdp_pkt_info  dropped_host;
464 		uint32_t dropped_target;
465 	} tso;
466 
467 	/* Scatter Gather packet info */
468 	struct {
469 		struct cdp_pkt_info sg_pkt;
470 		struct cdp_pkt_info non_sg_pkts;
471 		uint32_t sg_desc_cnt;
472 		struct cdp_pkt_info  dropped_host;
473 		uint32_t dropped_target;
474 		uint32_t dma_map_error;
475 	} sg;
476 
477 	/* Multicast Enhancement packets info */
478 	struct {
479 		struct cdp_pkt_info mcast_pkt;
480 		uint32_t dropped_map_error;
481 		uint32_t dropped_self_mac;
482 		uint32_t dropped_send_fail;
483 		uint32_t ucast;
484 		uint32_t fail_seg_alloc;
485 		uint32_t clone_fail;
486 	} mcast_en;
487 
488 	/* Packets dropped on the Tx side */
489 	struct {
490 		struct cdp_pkt_info dropped_pkt;
491 		struct cdp_pkt_info  desc_na;
492 		uint32_t ring_full;
493 		uint32_t enqueue_fail;
494 		uint32_t dma_error;
495 		uint32_t res_full;
496 		/* headroom insufficient */
497 		uint32_t headroom_insufficient;
498 	} dropped;
499 
500 	/* Mesh packets info */
501 	struct {
502 		uint32_t exception_fw;
503 		uint32_t completion_fw;
504 	} mesh;
505 
506 	uint32_t cce_classified;
507 	uint32_t cce_classified_raw;
508 };
509 
510 /* struct cdp_vdev_stats - vdev stats structure
511  * @tx_i: ingress tx stats
512  * @tx: cdp tx stats
513  * @rx: cdp rx stats
514  */
515 struct cdp_vdev_stats {
516 	struct cdp_tx_ingress_stats tx_i;
517 	struct cdp_tx_stats tx;
518 	struct cdp_rx_stats rx;
519 };
520 
521 /* struct cdp_peer_stats - peer stats structure
522  * @tx: cdp tx stats
523  * @rx: cdp rx stats
524  */
525 struct cdp_peer_stats {
526 	/* CDP Tx Stats */
527 	struct cdp_tx_stats tx;
528 	/* CDP Rx Stats */
529 	struct cdp_rx_stats rx;
530 };
531 
532 /* struct cdp_interface_peer_stats - interface structure for txrx peer stats
533  * @peer_hdl: control path peer handle
534  * @last_peer_tx_rate: peer tx rate for last transmission
535  * @peer_tx_rate: tx rate for current transmission
536  * @peer_rssi: current rssi value of peer
537  * @rssi_changed: denotes rssi is changed
538  * @tx_packet_count: tx packet count
539  * @rx_packet_count: rx packet count
540  * @tx_byte_count: tx byte count
541  * @rx_byte_count: rx byte count
542  * @per: per error rate
543  */
544 struct cdp_interface_peer_stats {
545 	void  *peer_hdl;
546 	uint32_t last_peer_tx_rate;
547 	uint32_t peer_tx_rate;
548 	uint32_t  peer_rssi;
549 	uint32_t tx_packet_count;
550 	uint32_t rx_packet_count;
551 	uint32_t tx_byte_count;
552 	uint32_t rx_byte_count;
553 	uint32_t per;
554 	uint8_t  rssi_changed;
555 };
556 
557 /* Tx completions per interrupt */
558 struct cdp_hist_tx_comp {
559 	uint32_t pkts_1;
560 	uint32_t pkts_2_20;
561 	uint32_t pkts_21_40;
562 	uint32_t pkts_41_60;
563 	uint32_t pkts_61_80;
564 	uint32_t pkts_81_100;
565 	uint32_t pkts_101_200;
566 	uint32_t pkts_201_plus;
567 };
568 
569 /* Rx ring descriptors reaped per interrupt */
570 struct cdp_hist_rx_ind {
571 	uint32_t pkts_1;
572 	uint32_t pkts_2_20;
573 	uint32_t pkts_21_40;
574 	uint32_t pkts_41_60;
575 	uint32_t pkts_61_80;
576 	uint32_t pkts_81_100;
577 	uint32_t pkts_101_200;
578 	uint32_t pkts_201_plus;
579 };
580 
581 struct cdp_htt_tlv_hdr {
582 	/* BIT [11 :  0]   :- tag
583 	 * BIT [23 : 12]   :- length
584 	 * BIT [31 : 24]   :- reserved
585 	 */
586 	uint32_t tag__length;
587 };
588 
589 #define HTT_STATS_SUBTYPE_MAX     16
590 
591 struct cdp_htt_rx_pdev_fw_stats_tlv {
592     struct cdp_htt_tlv_hdr tlv_hdr;
593 
594     /* BIT [ 7 :  0]   :- mac_id
595      * BIT [31 :  8]   :- reserved
596      */
597     uint32_t mac_id__word;
598     /* Num PPDU status processed from HW */
599     uint32_t ppdu_recvd;
600     /* Num MPDU across PPDUs with FCS ok */
601     uint32_t mpdu_cnt_fcs_ok;
602     /* Num MPDU across PPDUs with FCS err */
603     uint32_t mpdu_cnt_fcs_err;
604     /* Num MSDU across PPDUs */
605     uint32_t tcp_msdu_cnt;
606     /* Num MSDU across PPDUs */
607     uint32_t tcp_ack_msdu_cnt;
608     /* Num MSDU across PPDUs */
609     uint32_t udp_msdu_cnt;
610     /* Num MSDU across PPDUs */
611     uint32_t other_msdu_cnt;
612     /* Num MPDU on FW ring indicated */
613     uint32_t fw_ring_mpdu_ind;
614     /* Num MGMT MPDU given to protocol */
615     uint32_t fw_ring_mgmt_subtype[HTT_STATS_SUBTYPE_MAX];
616     /* Num ctrl MPDU given to protocol */
617     uint32_t fw_ring_ctrl_subtype[HTT_STATS_SUBTYPE_MAX];
618     /* Num mcast data packet received */
619     uint32_t fw_ring_mcast_data_msdu;
620     /* Num broadcast data packet received */
621     uint32_t fw_ring_bcast_data_msdu;
622     /* Num unicat data packet received */
623     uint32_t fw_ring_ucast_data_msdu;
624     /* Num null data packet received  */
625     uint32_t fw_ring_null_data_msdu;
626     /* Num MPDU on FW ring dropped */
627     uint32_t fw_ring_mpdu_drop;
628 
629     /* Num buf indication to offload */
630     uint32_t ofld_local_data_ind_cnt;
631     /* Num buf recycle from offload */
632     uint32_t ofld_local_data_buf_recycle_cnt;
633     /* Num buf indication to data_rx */
634     uint32_t drx_local_data_ind_cnt;
635     /* Num buf recycle from data_rx */
636     uint32_t drx_local_data_buf_recycle_cnt;
637     /* Num buf indication to protocol */
638     uint32_t local_nondata_ind_cnt;
639     /* Num buf recycle from protocol */
640     uint32_t local_nondata_buf_recycle_cnt;
641 
642     /* Num buf fed */
643     uint32_t fw_status_buf_ring_refill_cnt;
644     /* Num ring empty encountered */
645     uint32_t fw_status_buf_ring_empty_cnt;
646     /* Num buf fed  */
647     uint32_t fw_pkt_buf_ring_refill_cnt;
648     /* Num ring empty encountered */
649     uint32_t fw_pkt_buf_ring_empty_cnt;
650     /* Num buf fed  */
651     uint32_t fw_link_buf_ring_refill_cnt;
652     /* Num ring empty encountered  */
653     uint32_t fw_link_buf_ring_empty_cnt;
654 
655     /* Num buf fed */
656     uint32_t host_pkt_buf_ring_refill_cnt;
657     /* Num ring empty encountered */
658     uint32_t host_pkt_buf_ring_empty_cnt;
659     /* Num buf fed */
660     uint32_t mon_pkt_buf_ring_refill_cnt;
661     /* Num ring empty encountered */
662     uint32_t mon_pkt_buf_ring_empty_cnt;
663     /* Num buf fed */
664     uint32_t mon_status_buf_ring_refill_cnt;
665     /* Num ring empty encountered */
666     uint32_t mon_status_buf_ring_empty_cnt;
667     /* Num buf fed */
668     uint32_t mon_desc_buf_ring_refill_cnt;
669     /* Num ring empty encountered */
670     uint32_t mon_desc_buf_ring_empty_cnt;
671     /* Num buf fed */
672     uint32_t mon_dest_ring_update_cnt;
673     /* Num ring full encountered */
674     uint32_t mon_dest_ring_full_cnt;
675 
676     /* Num rx suspend is attempted */
677     uint32_t rx_suspend_cnt;
678     /* Num rx suspend failed */
679     uint32_t rx_suspend_fail_cnt;
680     /* Num rx resume attempted */
681     uint32_t rx_resume_cnt;
682     /* Num rx resume failed */
683     uint32_t rx_resume_fail_cnt;
684     /* Num rx ring switch */
685     uint32_t rx_ring_switch_cnt;
686     /* Num rx ring restore */
687     uint32_t rx_ring_restore_cnt;
688     /* Num rx flush issued */
689     uint32_t rx_flush_cnt;
690 };
691 
692 /* == TX PDEV STATS == */
693 struct cdp_htt_tx_pdev_stats_cmn_tlv {
694     struct cdp_htt_tlv_hdr tlv_hdr;
695 
696     /* BIT [ 7 :  0]   :- mac_id
697      * BIT [31 :  8]   :- reserved
698      */
699     uint32_t mac_id__word;
700     /* Num queued to HW */
701     uint32_t hw_queued;
702     /* Num PPDU reaped from HW */
703     uint32_t hw_reaped;
704     /* Num underruns */
705     uint32_t underrun;
706     /* Num HW Paused counter. */
707     uint32_t hw_paused;
708     /* Num HW flush counter. */
709     uint32_t hw_flush;
710     /* Num HW filtered counter. */
711     uint32_t hw_filt;
712     /* Num PPDUs cleaned up in TX abort */
713     uint32_t tx_abort;
714     /* Num MPDUs requed by SW */
715     uint32_t mpdu_requed;
716     /* excessive retries */
717     uint32_t tx_xretry;
718     /* Last used data hw rate code */
719     uint32_t data_rc;
720     /* frames dropped due to excessive sw retries */
721     uint32_t mpdu_dropped_xretry;
722     /* illegal rate phy errors  */
723     uint32_t illgl_rate_phy_err;
724     /* wal pdev continuous xretry */
725     uint32_t cont_xretry;
726     /* wal pdev continuous xretry */
727     uint32_t tx_timeout;
728     /* wal pdev resets  */
729     uint32_t pdev_resets;
730     /* PhY/BB underrun */
731     uint32_t phy_underrun;
732     /* MPDU is more than txop limit */
733     uint32_t txop_ovf;
734     /* Number of Sequences posted */
735     uint32_t seq_posted;
736     /* Number of Sequences failed queueing */
737     uint32_t seq_failed_queueing;
738     /* Number of Sequences completed */
739     uint32_t seq_completed;
740     /* Number of Sequences restarted */
741     uint32_t seq_restarted;
742     /* Number of MU Sequences posted */
743     uint32_t mu_seq_posted;
744     /* Number of time HW ring is paused between seq switch within ISR */
745     uint32_t seq_switch_hw_paused;
746     /* Number of times seq continuation in DSR */
747     uint32_t next_seq_posted_dsr;
748     /* Number of times seq continuation in ISR */
749     uint32_t seq_posted_isr;
750     /* Number of seq_ctrl cached. */
751     uint32_t seq_ctrl_cached;
752     /* Number of MPDUs successfully transmitted */
753     uint32_t mpdu_count_tqm;
754     /* Number of MSDUs successfully transmitted */
755     uint32_t msdu_count_tqm;
756     /* Number of MPDUs dropped */
757     uint32_t mpdu_removed_tqm;
758     /* Number of MSDUs dropped */
759     uint32_t msdu_removed_tqm;
760     /* Num MPDUs flushed by SW, HWPAUSED, SW TXABORT (Reset,channel change) */
761     uint32_t mpdus_sw_flush;
762     /* Num MPDUs filtered by HW, all filter condition (TTL expired) */
763     uint32_t mpdus_hw_filter;
764     /* Num MPDUs truncated by PDG (TXOP, TBTT, PPDU_duration based on rate, dyn_bw) */
765     uint32_t mpdus_truncated;
766     /* Num MPDUs that was tried but didn't receive ACK or BA */
767     uint32_t mpdus_ack_failed;
768     /* Num MPDUs that was dropped due to expiry (MSDU TTL). */
769     uint32_t mpdus_expired;
770     /* Num MPDUs that was retried within seq_ctrl (MGMT/LEGACY) */
771     uint32_t mpdus_seq_hw_retry;
772     /* Num of TQM acked cmds processed */
773     uint32_t ack_tlv_proc;
774     /* coex_abort_mpdu_cnt valid. */
775     uint32_t coex_abort_mpdu_cnt_valid;
776     /* coex_abort_mpdu_cnt from TX FES stats. */
777     uint32_t coex_abort_mpdu_cnt;
778     /* Number of total PPDUs(DATA, MGMT, excludes selfgen) tried over the air (OTA) */
779     uint32_t num_total_ppdus_tried_ota;
780     /* Number of data PPDUs tried over the air (OTA) */
781     uint32_t num_data_ppdus_tried_ota;
782     /* Num Local control/mgmt frames (MSDUs) queued */
783     uint32_t local_ctrl_mgmt_enqued;
784     /* local_ctrl_mgmt_freed:
785      * Num Local control/mgmt frames (MSDUs) done
786      * It includes all local ctrl/mgmt completions
787      * (acked, no ack, flush, TTL, etc)
788      */
789     uint32_t local_ctrl_mgmt_freed;
790     /* Num Local data frames (MSDUs) queued */
791     uint32_t local_data_enqued;
792     /* local_data_freed:
793      * Num Local data frames (MSDUs) done
794      * It includes all local data completions
795      * (acked, no ack, flush, TTL, etc)
796      */
797     uint32_t local_data_freed;
798 };
799 
800 struct cdp_htt_tx_pdev_stats_urrn_tlv_v {
801     struct cdp_htt_tlv_hdr tlv_hdr;
802     uint32_t urrn_stats[1]; /* HTT_TX_PDEV_MAX_URRN_STATS */
803 };
804 
805 /* NOTE: Variable length TLV, use length spec to infer array size */
806 struct cdp_htt_tx_pdev_stats_flush_tlv_v {
807     struct cdp_htt_tlv_hdr tlv_hdr;
808     uint32_t flush_errs[1]; /* HTT_TX_PDEV_MAX_FLUSH_REASON_STATS */
809 };
810 
811 /* NOTE: Variable length TLV, use length spec to infer array size */
812 struct cdp_htt_tx_pdev_stats_sifs_tlv_v {
813     struct cdp_htt_tlv_hdr tlv_hdr;
814     uint32_t sifs_status[1]; /* HTT_TX_PDEV_MAX_SIFS_BURST_STATS */
815 };
816 
817 /* NOTE: Variable length TLV, use length spec to infer array size */
818 struct cdp_htt_tx_pdev_stats_phy_err_tlv_v {
819     struct cdp_htt_tlv_hdr tlv_hdr;
820     uint32_t  phy_errs[1]; /* HTT_TX_PDEV_MAX_PHY_ERR_STATS */
821 };
822 
823 /* == RX PDEV/SOC STATS == */
824 /* HTT_STATS_RX_SOC_FW_STATS_TAG */
825 struct cdp_htt_rx_soc_fw_stats_tlv {
826     struct cdp_htt_tlv_hdr tlv_hdr;
827     /* Num Packets received on REO FW ring */
828     uint32_t fw_reo_ring_data_msdu;
829     /* Num bc/mc packets indicated from fw to host */
830     uint32_t fw_to_host_data_msdu_bcmc;
831     /* Num unicast packets indicated from fw to host */
832     uint32_t fw_to_host_data_msdu_uc;
833     /* Num remote buf recycle from offload  */
834     uint32_t ofld_remote_data_buf_recycle_cnt;
835     /* Num remote free buf given to offload */
836     uint32_t ofld_remote_free_buf_indication_cnt;
837 };
838 
839 struct cdp_htt_rx_soc_fw_refill_ring_num_refill_tlv_v {
840     struct cdp_htt_tlv_hdr tlv_hdr;
841     /* Num total buf refilled from refill ring */
842     uint32_t refill_ring_num_refill[1]; /* HTT_RX_STATS_REFILL_MAX_RING */
843 };
844 
845 struct cdp_htt_rx_pdev_fw_ring_mpdu_err_tlv_v {
846     struct cdp_htt_tlv_hdr tlv_hdr;
847     /* Num error MPDU for each RxDMA error type  */
848     uint32_t fw_ring_mpdu_err[1]; /* HTT_RX_STATS_RXDMA_MAX_ERR */
849 };
850 
851 struct cdp_htt_rx_pdev_fw_mpdu_drop_tlv_v {
852     struct cdp_htt_tlv_hdr tlv_hdr;
853     /* Num MPDU dropped  */
854     uint32_t fw_mpdu_drop[1]; /* HTT_RX_STATS_FW_DROP_REASON_MAX */
855 };
856 
857 #define HTT_STATS_PHY_ERR_MAX 43
858 
859 struct cdp_htt_rx_pdev_fw_stats_phy_err_tlv {
860     struct cdp_htt_tlv_hdr tlv_hdr;
861 
862     /* BIT [ 7 :  0]   :- mac_id
863      * BIT [31 :  8]   :- reserved
864      */
865     uint32_t mac_id__word;
866     /* Num of phy err */
867     uint32_t total_phy_err_cnt;
868     /* Counts of different types of phy errs
869      * The mapping of PHY error types to phy_err array elements is HW dependent.
870      * The only currently-supported mapping is shown below:
871      *
872      * 0 phyrx_err_phy_off Reception aborted due to receiving a PHY_OFF TLV
873      * 1 phyrx_err_synth_off
874      * 2 phyrx_err_ofdma_timing
875      * 3 phyrx_err_ofdma_signal_parity
876      * 4 phyrx_err_ofdma_rate_illegal
877      * 5 phyrx_err_ofdma_length_illegal
878      * 6 phyrx_err_ofdma_restart
879      * 7 phyrx_err_ofdma_service
880      * 8 phyrx_err_ppdu_ofdma_power_drop
881      * 9 phyrx_err_cck_blokker
882      * 10 phyrx_err_cck_timing
883      * 11 phyrx_err_cck_header_crc
884      * 12 phyrx_err_cck_rate_illegal
885      * 13 phyrx_err_cck_length_illegal
886      * 14 phyrx_err_cck_restart
887      * 15 phyrx_err_cck_service
888      * 16 phyrx_err_cck_power_drop
889      * 17 phyrx_err_ht_crc_err
890      * 18 phyrx_err_ht_length_illegal
891      * 19 phyrx_err_ht_rate_illegal
892      * 20 phyrx_err_ht_zlf
893      * 21 phyrx_err_false_radar_ext
894      * 22 phyrx_err_green_field
895      * 23 phyrx_err_bw_gt_dyn_bw
896      * 24 phyrx_err_leg_ht_mismatch
897      * 25 phyrx_err_vht_crc_error
898      * 26 phyrx_err_vht_siga_unsupported
899      * 27 phyrx_err_vht_lsig_len_invalid
900      * 28 phyrx_err_vht_ndp_or_zlf
901      * 29 phyrx_err_vht_nsym_lt_zero
902      * 30 phyrx_err_vht_rx_extra_symbol_mismatch
903      * 31 phyrx_err_vht_rx_skip_group_id0
904      * 32 phyrx_err_vht_rx_skip_group_id1to62
905      * 33 phyrx_err_vht_rx_skip_group_id63
906      * 34 phyrx_err_ofdm_ldpc_decoder_disabled
907      * 35 phyrx_err_defer_nap
908      * 36 phyrx_err_fdomain_timeout
909      * 37 phyrx_err_lsig_rel_check
910      * 38 phyrx_err_bt_collision
911      * 39 phyrx_err_unsupported_mu_feedback
912      * 40 phyrx_err_ppdu_tx_interrupt_rx
913      * 41 phyrx_err_unsupported_cbf
914      * 42 phyrx_err_other
915      */
916     uint32_t phy_err[HTT_STATS_PHY_ERR_MAX];
917 };
918 
919 struct cdp_htt_rx_soc_fw_refill_ring_empty_tlv_v {
920     struct cdp_htt_tlv_hdr tlv_hdr;
921     /* Num ring empty encountered */
922     uint32_t refill_ring_empty_cnt[1]; /* HTT_RX_STATS_REFILL_MAX_RING */
923 };
924 
925 struct cdp_htt_tx_pdev_stats {
926     struct cdp_htt_tx_pdev_stats_cmn_tlv cmn_tlv;
927     struct cdp_htt_tx_pdev_stats_urrn_tlv_v underrun_tlv;
928     struct cdp_htt_tx_pdev_stats_sifs_tlv_v sifs_tlv;
929     struct cdp_htt_tx_pdev_stats_flush_tlv_v flush_tlv;
930     struct cdp_htt_tx_pdev_stats_phy_err_tlv_v phy_err_tlv;
931 };
932 
933 struct cdp_htt_rx_soc_stats_t {
934     struct cdp_htt_rx_soc_fw_stats_tlv fw_tlv;
935     struct cdp_htt_rx_soc_fw_refill_ring_empty_tlv_v fw_refill_ring_empty_tlv;
936     struct cdp_htt_rx_soc_fw_refill_ring_num_refill_tlv_v fw_refill_ring_num_refill_tlv;
937 };
938 
939 struct cdp_htt_rx_pdev_stats {
940     struct cdp_htt_rx_soc_stats_t soc_stats;
941     struct cdp_htt_rx_pdev_fw_stats_tlv fw_stats_tlv;
942     struct cdp_htt_rx_pdev_fw_ring_mpdu_err_tlv_v fw_ring_mpdu_err_tlv;
943     struct cdp_htt_rx_pdev_fw_mpdu_drop_tlv_v fw_ring_mpdu_drop;
944     struct cdp_htt_rx_pdev_fw_stats_phy_err_tlv fw_stats_phy_err_tlv;
945 };
946 
947 /* struct cdp_pdev_stats - pdev stats
948  * @msdu_not_done: packets dropped because msdu done bit not set
949  * @mec:Multicast Echo check
950  * @mesh_filter: Mesh Filtered packets
951  * @mon_rx_drop: packets dropped on monitor vap
952  * @pkts: total packets replenished
953  * @rxdma_err: rxdma errors for replenished
954  * @nbuf_alloc_fail: nbuf alloc failed
955  * @map_err: Mapping failure
956  * @x86_fail: x86 failures
957  * @low_thresh_intrs: low threshold interrupts
958  * @rx_raw_pkts: Rx Raw Packets
959  * @mesh_mem_alloc: Mesh Rx Stats Alloc fail
960  * @desc_alloc_fail: desc alloc failed errors
961  * @ip_csum_err: ip checksum errors
962  * @tcp_udp_csum_err: tcp/udp checksum errors
963  * @buf_freelist: buffers added back in freelist
964  * @tx_i: Tx Ingress stats
965  * @tx:CDP Tx Stats
966  * @rx: CDP Rx Stats
967  * @tx_comp_histogram: Number of Tx completions per interrupt
968  * @rx_ind_histogram:  Number of Rx ring descriptors reaped per interrupt
969  * @ppdu_stats_counter: ppdu stats counter
970  * @htt_tx_pdev_stats: htt pdev stats for tx
971  * @htt_rx_pdev_stats: htt pdev stats for rx
972  */
973 struct cdp_pdev_stats {
974 	struct {
975 		uint32_t msdu_not_done;
976 		uint32_t mec;
977 		uint32_t mesh_filter;
978 		uint32_t mon_rx_drop;
979 	} dropped;
980 
981 	struct {
982 		struct cdp_pkt_info pkts;
983 		uint32_t rxdma_err;
984 		uint32_t nbuf_alloc_fail;
985 		uint32_t map_err;
986 		uint32_t x86_fail;
987 		uint32_t low_thresh_intrs;
988 	} replenish;
989 
990 	uint32_t rx_raw_pkts;
991 	uint32_t mesh_mem_alloc;
992 
993 	/* Rx errors */
994 	struct {
995 		uint32_t desc_alloc_fail;
996 		uint32_t ip_csum_err;
997 		uint32_t tcp_udp_csum_err;
998 	} err;
999 
1000 	uint32_t buf_freelist;
1001 	struct cdp_tx_ingress_stats tx_i;
1002 	struct cdp_tx_stats tx;
1003 	struct cdp_rx_stats rx;
1004 	struct cdp_hist_tx_comp tx_comp_histogram;
1005 	struct cdp_hist_rx_ind rx_ind_histogram;
1006 	uint64_t ppdu_stats_counter[CDP_PPDU_STATS_MAX_TAG];
1007 
1008 	struct cdp_htt_tx_pdev_stats  htt_tx_pdev_stats;
1009 	struct cdp_htt_rx_pdev_stats  htt_rx_pdev_stats;
1010 };
1011 
1012 #ifndef BIG_ENDIAN_HOST
1013 typedef struct {
1014 	uint64_t pkts;
1015 	uint64_t bytes;
1016 } ol_txrx_stats_elem;
1017 #else
1018 struct ol_txrx_elem_t {
1019 	uint64_t pkts;
1020 	uint64_t bytes;
1021 };
1022 typedef struct ol_txrx_elem_t ol_txrx_stats_elem;
1023 #endif
1024 
1025 #ifndef CONFIG_MCL
1026 /**
1027  * @brief data stats published by the host txrx layer
1028  */
1029 struct ol_txrx_stats {
1030 	struct {
1031 		/* MSDUs received from the stack */
1032 		ol_txrx_stats_elem from_stack;
1033 		/* MSDUs successfully sent across the WLAN */
1034 		ol_txrx_stats_elem delivered;
1035 		struct {
1036 			/* MSDUs that the host did not accept */
1037 			ol_txrx_stats_elem host_reject;
1038 			/* MSDUs which could not be downloaded to the target */
1039 			ol_txrx_stats_elem download_fail;
1040 			/*
1041 			 * MSDUs which the target discarded
1042 			 * (lack of mem or old age)
1043 			 */
1044 			ol_txrx_stats_elem target_discard;
1045 			/*
1046 			 * MSDUs which the target sent but couldn't get
1047 			 * an ack for
1048 			 */
1049 			ol_txrx_stats_elem no_ack;
1050 			/* MSDUs dropped in NSS-FW */
1051 			ol_txrx_stats_elem nss_ol_dropped;
1052 		} dropped;
1053 		u_int32_t desc_in_use;
1054 		u_int32_t desc_alloc_fails;
1055 		u_int32_t ce_ring_full;
1056 		u_int32_t dma_map_error;
1057 		/* MSDUs given to the txrx layer by the management stack */
1058 		ol_txrx_stats_elem mgmt;
1059 		struct {
1060 			/* TSO applied jumbo packets received from NW Stack */
1061 			ol_txrx_stats_elem tso_pkts;
1062 			/* Non - TSO packets */
1063 			ol_txrx_stats_elem non_tso_pkts;
1064 			/* TSO packets : Dropped during TCP segmentation*/
1065 			ol_txrx_stats_elem tso_dropped;
1066 			/* TSO Descriptors */
1067 			u_int32_t tso_desc_cnt;
1068 		} tso;
1069 
1070 		struct {
1071 			/* TSO applied jumbo packets received from NW Stack */
1072 			ol_txrx_stats_elem sg_pkts;
1073 			/* Non - TSO packets */
1074 			ol_txrx_stats_elem non_sg_pkts;
1075 			/* TSO packets : Dropped during TCP segmentation*/
1076 			ol_txrx_stats_elem sg_dropped;
1077 			/* TSO Descriptors */
1078 			u_int32_t sg_desc_cnt;
1079 		} sg;
1080 		struct {
1081 			/* packets enqueued for flow control */
1082 			u_int32_t fl_ctrl_enqueue;
1083 			/* packets discarded for flow control is full */
1084 			u_int32_t fl_ctrl_discard;
1085 			/* packets sent to CE without flow control */
1086 			u_int32_t fl_ctrl_avoid;
1087 		} fl_ctrl;
1088 	} tx;
1089 	struct {
1090 		/* MSDUs given to the OS shim */
1091 		ol_txrx_stats_elem delivered;
1092 		/* MSDUs forwarded from the rx path to the tx path */
1093 		ol_txrx_stats_elem forwarded;
1094 		/* MSDUs in which ipv4 chksum error detected by HW */
1095 		ol_txrx_stats_elem ipv4_cksum_err;
1096 		/* MSDUs in which tcp chksum error detected by HW */
1097 		ol_txrx_stats_elem tcp_ipv4_cksum_err;
1098 		/* MSDUs in which udp chksum error detected by HW */
1099 		ol_txrx_stats_elem udp_ipv4_cksum_err;
1100 		/* MSDUs in which tcp V6 chksum error detected by HW */
1101 		ol_txrx_stats_elem tcp_ipv6_cksum_err;
1102 		/* MSDUs in which UDP V6 chksum error detected by HW */
1103 		ol_txrx_stats_elem udp_ipv6_cksum_err;
1104 	} rx;
1105 	struct {
1106 		/* Number of mcast received for conversion */
1107 		u_int32_t num_me_rcvd;
1108 		/* Number of unicast sent as part of mcast conversion */
1109 		u_int32_t num_me_ucast;
1110 		/* Number of multicast frames dropped due to dma_map failure */
1111 		u_int32_t num_me_dropped_m;
1112 		/*
1113 		 * Number of multicast frames dropped due to allocation
1114 		 * failure
1115 		 */
1116 		u_int32_t num_me_dropped_a;
1117 		/* Number of multicast frames dropped due to internal failure */
1118 		u_int32_t num_me_dropped_i;
1119 		/* Number of me buf currently in use */
1120 		u_int32_t num_me_buf;
1121 		/* Number of me buf frames to self mac address  */
1122 		u_int32_t num_me_dropped_s;
1123 		/* Number of me buf in use in non pool based allocation*/
1124 		u_int32_t num_me_nonpool;
1125 		/* Number of me buf allocated using non pool based allocation*/
1126 		u_int32_t num_me_nonpool_count;
1127 	} mcast_enhance;
1128 };
1129 
1130 struct ol_ath_dbg_rx_rssi {
1131 	uint8_t     rx_rssi_pri20;
1132 	uint8_t     rx_rssi_sec20;
1133 	uint8_t     rx_rssi_sec40;
1134 	uint8_t     rx_rssi_sec80;
1135 };
1136 
1137 struct ol_ath_radiostats {
1138 	uint64_t    tx_beacon;
1139 	uint32_t    tx_buf_count;
1140 	int32_t     tx_mgmt;
1141 	int32_t     rx_mgmt;
1142 	uint32_t    rx_num_mgmt;
1143 	uint32_t    rx_num_ctl;
1144 	uint32_t    tx_rssi;
1145 	uint32_t    rx_rssi_comb;
1146 	struct      ol_ath_dbg_rx_rssi rx_rssi_chain0;
1147 	struct      ol_ath_dbg_rx_rssi rx_rssi_chain1;
1148 	struct      ol_ath_dbg_rx_rssi rx_rssi_chain2;
1149 	struct      ol_ath_dbg_rx_rssi rx_rssi_chain3;
1150 	uint32_t    rx_overrun;
1151 	uint32_t    rx_phyerr;
1152 	uint32_t    ackRcvBad;
1153 	uint32_t    rtsBad;
1154 	uint32_t    rtsGood;
1155 	uint32_t    fcsBad;
1156 	uint32_t    noBeacons;
1157 	uint32_t    mib_int_count;
1158 	uint32_t    rx_looplimit_start;
1159 	uint32_t    rx_looplimit_end;
1160 	uint8_t     ap_stats_tx_cal_enable;
1161 	uint8_t     self_bss_util;
1162 	uint8_t     obss_util;
1163 	uint8_t     ap_rx_util;
1164 	uint8_t     free_medium;
1165 	uint8_t     ap_tx_util;
1166 	uint8_t     obss_rx_util;
1167 	uint8_t     non_wifi_util;
1168 	uint32_t    tgt_asserts;
1169 	int16_t     chan_nf;
1170 	int16_t     chan_nf_sec80;
1171 	uint64_t    wmi_tx_mgmt;
1172 	uint64_t    wmi_tx_mgmt_completions;
1173 	uint32_t    wmi_tx_mgmt_completion_err;
1174 	uint32_t    peer_delete_req;
1175 	uint32_t    peer_delete_resp;
1176 	uint32_t    rx_mgmt_rssi_drop;
1177 	uint32_t    tx_frame_count;
1178 	uint32_t    rx_frame_count;
1179 	uint32_t    rx_clear_count;
1180 	uint32_t    cycle_count;
1181 	uint32_t    phy_err_count;
1182 	uint32_t    chan_tx_pwr;
1183 	uint32_t    be_nobuf;
1184 	uint32_t    tx_packets;
1185 	uint32_t    rx_packets;
1186 	uint32_t    tx_num_data;
1187 	uint32_t    rx_num_data;
1188 	uint32_t    tx_mcs[10];
1189 	uint32_t    rx_mcs[10];
1190 	uint64_t    rx_bytes;
1191 	uint64_t    tx_bytes;
1192 	uint32_t    tx_compaggr;
1193 	uint32_t    rx_aggr;
1194 	uint32_t    tx_bawadv;
1195 	uint32_t    tx_compunaggr;
1196 	uint32_t    rx_badcrypt;
1197 	uint32_t    rx_badmic;
1198 	uint32_t    rx_crcerr;
1199 	uint32_t    rx_last_msdu_unset_cnt;
1200 	uint32_t    rx_data_bytes;
1201 	uint32_t    tx_retries;
1202 };
1203 
1204 /*
1205  * Enumeration of PDEV Configuration parameter
1206  */
1207 enum _ol_ath_param_t {
1208 	OL_ATH_PARAM_TXCHAINMASK               = 1,
1209 	OL_ATH_PARAM_RXCHAINMASK               = 2,
1210 	OL_ATH_PARAM_AMPDU                     = 6,
1211 	OL_ATH_PARAM_AMPDU_LIMIT               = 7,
1212 	OL_ATH_PARAM_AMPDU_SUBFRAMES           = 8,
1213 	OL_ATH_PARAM_TXPOWER_LIMIT2G           = 12,
1214 	OL_ATH_PARAM_TXPOWER_LIMIT5G           = 13,
1215 	OL_ATH_PARAM_LDPC                      = 32,
1216 	OL_ATH_PARAM_VOW_EXT_STATS             = 45,
1217 	OL_ATH_PARAM_DYN_TX_CHAINMASK          = 73,
1218 	OL_ATH_PARAM_BURST_ENABLE              = 77,
1219 	OL_ATH_PARAM_BURST_DUR                 = 78,
1220 	OL_ATH_PARAM_BCN_BURST                 = 80,
1221 	OL_ATH_PARAM_DCS                       = 82,
1222 #if UMAC_SUPPORT_PERIODIC_PERFSTATS
1223 	OL_ATH_PARAM_PRDPERFSTAT_THRPUT_ENAB   = 83,
1224 	OL_ATH_PARAM_PRDPERFSTAT_THRPUT_WIN    = 84,
1225 	OL_ATH_PARAM_PRDPERFSTAT_THRPUT        = 85,
1226 	OL_ATH_PARAM_PRDPERFSTAT_PER_ENAB      = 86,
1227 	OL_ATH_PARAM_PRDPERFSTAT_PER_WIN       = 87,
1228 	OL_ATH_PARAM_PRDPERFSTAT_PER           = 88,
1229 #endif
1230 	/* UMAC_SUPPORT_PERIODIC_PERFSTATS */
1231 	OL_ATH_PARAM_TOTAL_PER                 = 89,
1232 	/* set manual rate for rts frame */
1233 	OL_ATH_PARAM_RTS_CTS_RATE              = 92,
1234 	/* co channel interference threshold level */
1235 	OL_ATH_PARAM_DCS_COCH_THR              = 93,
1236 	/* transmit error threshold */
1237 	OL_ATH_PARAM_DCS_TXERR_THR             = 94,
1238 	/* phy error threshold */
1239 	OL_ATH_PARAM_DCS_PHYERR_THR            = 95,
1240 	/*
1241 	 * The IOCTL number is 114, it is made 114, inorder to make the IOCTL
1242 	 * number same as Direct-attach IOCTL.
1243 	 * Please, don't change number. This IOCTL gets the Interface code path
1244 	 * it should be either DIRECT-ATTACH or OFF-LOAD.
1245 	 */
1246 	OL_ATH_PARAM_GET_IF_ID                 = 114,
1247 	/* Enable Acs back Ground Channel selection Scan timer in AP mode*/
1248 	OL_ATH_PARAM_ACS_ENABLE_BK_SCANTIMEREN = 118,
1249 	 /* ACS scan timer value in Seconds */
1250 	OL_ATH_PARAM_ACS_SCANTIME              = 119,
1251 	 /* Negligence Delta RSSI between two channel */
1252 	OL_ATH_PARAM_ACS_RSSIVAR               = 120,
1253 	 /* Negligence Delta Channel load between two channel*/
1254 	OL_ATH_PARAM_ACS_CHLOADVAR             = 121,
1255 	  /* Enable Limited OBSS check */
1256 	OL_ATH_PARAM_ACS_LIMITEDOBSS           = 122,
1257 	/* Acs control flag for Scan timer */
1258 	OL_ATH_PARAM_ACS_CTRLFLAG              = 123,
1259 	 /* Acs Run time Debug level*/
1260 	OL_ATH_PARAM_ACS_DEBUGTRACE            = 124,
1261 	OL_ATH_PARAM_SET_FW_HANG_ID            = 137,
1262 	 /* Radio type 1:11ac 0:11abgn */
1263 	OL_ATH_PARAM_RADIO_TYPE                = 138,
1264 	OL_ATH_PARAM_IGMPMLD_OVERRIDE, /* IGMP/MLD packet override */
1265 	OL_ATH_PARAM_IGMPMLD_TID, /* IGMP/MLD packet TID no */
1266 	OL_ATH_PARAM_ARPDHCP_AC_OVERRIDE,
1267 	OL_ATH_PARAM_NON_AGG_SW_RETRY_TH,
1268 	OL_ATH_PARAM_AGG_SW_RETRY_TH,
1269 	/* Dont change this number it as per sync with DA
1270 	     Blocking certian channel from ic channel list */
1271 	OL_ATH_PARAM_DISABLE_DFS   = 144,
1272 	OL_ATH_PARAM_ENABLE_AMSDU  = 145,
1273 	OL_ATH_PARAM_ENABLE_AMPDU  = 146,
1274 	OL_ATH_PARAM_STA_KICKOUT_TH,
1275 	OL_ATH_PARAM_WLAN_PROF_ENABLE,
1276 	OL_ATH_PARAM_LTR_ENABLE,
1277 	OL_ATH_PARAM_LTR_AC_LATENCY_BE = 150,
1278 	OL_ATH_PARAM_LTR_AC_LATENCY_BK,
1279 	OL_ATH_PARAM_LTR_AC_LATENCY_VI,
1280 	OL_ATH_PARAM_LTR_AC_LATENCY_VO,
1281 	OL_ATH_PARAM_LTR_AC_LATENCY_TIMEOUT,
1282 	OL_ATH_PARAM_LTR_TX_ACTIVITY_TIMEOUT = 155,
1283 	OL_ATH_PARAM_LTR_SLEEP_OVERRIDE,
1284 	OL_ATH_PARAM_LTR_RX_OVERRIDE,
1285 	OL_ATH_PARAM_L1SS_ENABLE,
1286 	OL_ATH_PARAM_DSLEEP_ENABLE,
1287 	/* radar error threshold */
1288 	OL_ATH_PARAM_DCS_RADAR_ERR_THR = 160,
1289 	/* Tx channel utilization due to AP's tx and rx */
1290 	OL_ATH_PARAM_DCS_USERMAX_CU_THR,
1291 	/* interference detection threshold */
1292 	OL_ATH_PARAM_DCS_INTR_DETECT_THR,
1293 	/* sampling window, default 10secs */
1294 	OL_ATH_PARAM_DCS_SAMPLE_WINDOW,
1295 	/* debug logs enable/disable */
1296 	OL_ATH_PARAM_DCS_DEBUG,
1297 	OL_ATH_PARAM_ANI_ENABLE = 165,
1298 	OL_ATH_PARAM_ANI_POLL_PERIOD,
1299 	OL_ATH_PARAM_ANI_LISTEN_PERIOD,
1300 	OL_ATH_PARAM_ANI_OFDM_LEVEL,
1301 	OL_ATH_PARAM_ANI_CCK_LEVEL,
1302 	OL_ATH_PARAM_DSCP_TID_MAP = 170,
1303 	OL_ATH_PARAM_TXPOWER_SCALE,
1304 	/* Phy error penalty */
1305 	OL_ATH_PARAM_DCS_PHYERR_PENALTY,
1306 #if ATH_SUPPORT_DSCP_OVERRIDE
1307 	/* set/get TID for sending HMMC packets */
1308 	OL_ATH_PARAM_HMMC_DSCP_TID_MAP,
1309 	/* set/get DSCP mapping override */
1310 	OL_ATH_PARAM_DSCP_OVERRIDE,
1311 	/* set/get HMMC-DSCP mapping override */
1312 	OL_ATH_PARAM_HMMC_DSCP_OVERRIDE = 175,
1313 #endif
1314 #if ATH_RX_LOOPLIMIT_TIMER
1315 	OL_ATH_PARAM_LOOPLIMIT_NUM,
1316 #endif
1317 	OL_ATH_PARAM_ANTENNA_GAIN_2G,
1318 	OL_ATH_PARAM_ANTENNA_GAIN_5G,
1319 	OL_ATH_PARAM_RX_FILTER,
1320 #if ATH_SUPPORT_HYFI_ENHANCEMENTS
1321 	OL_ATH_PARAM_BUFF_THRESH = 180,
1322 	OL_ATH_PARAM_BLK_REPORT_FLOOD,
1323 	OL_ATH_PARAM_DROP_STA_QUERY,
1324 #endif
1325 	OL_ATH_PARAM_QBOOST,
1326 	OL_ATH_PARAM_SIFS_FRMTYPE,
1327 	OL_ATH_PARAM_SIFS_UAPSD = 185,
1328 	OL_ATH_PARAM_FW_RECOVERY_ID,
1329 	OL_ATH_PARAM_RESET_OL_STATS,
1330 	OL_ATH_PARAM_AGGR_BURST,
1331 	/* Number of deauth sent in consecutive rx_peer_invalid */
1332 	OL_ATH_PARAM_DEAUTH_COUNT,
1333 	OL_ATH_PARAM_BLOCK_INTERBSS = 190,
1334 	/* Firmware reset control for Bmiss / timeout / reset */
1335 	OL_ATH_PARAM_FW_DISABLE_RESET,
1336 	OL_ATH_PARAM_MSDU_TTL,
1337 	OL_ATH_PARAM_PPDU_DURATION,
1338 	OL_ATH_PARAM_SET_TXBF_SND_PERIOD,
1339 	OL_ATH_PARAM_ALLOW_PROMISC = 195,
1340 	OL_ATH_PARAM_BURST_MODE,
1341 	OL_ATH_PARAM_DYN_GROUPING,
1342 	OL_ATH_PARAM_DPD_ENABLE,
1343 	OL_ATH_PARAM_DBGLOG_RATELIM,
1344 	/* firmware should intimate us about ps state change for node  */
1345 	OL_ATH_PARAM_PS_STATE_CHANGE = 200,
1346 	OL_ATH_PARAM_MCAST_BCAST_ECHO,
1347 	/* OBSS RSSI threshold for 20/40 coexistence */
1348 	OL_ATH_PARAM_OBSS_RSSI_THRESHOLD,
1349 	/* Link/node RX RSSI threshold  for 20/40 coexistence */
1350 	OL_ATH_PARAM_OBSS_RX_RSSI_THRESHOLD,
1351 #if ATH_CHANNEL_BLOCKING
1352 	OL_ATH_PARAM_ACS_BLOCK_MODE = 205,
1353 #endif
1354 	OL_ATH_PARAM_ACS_TX_POWER_OPTION,
1355 	/*
1356 	 * Default Antenna Polarization MSB 8 bits (24:31) specifying
1357 	 * enable/disable ; LSB 24 bits (0:23) antenna mask value
1358 	 */
1359 	OL_ATH_PARAM_ANT_POLARIZATION,
1360 	/* rate limit mute type error prints */
1361 	OL_ATH_PARAM_PRINT_RATE_LIMIT,
1362 	OL_ATH_PARAM_PDEV_RESET,   /* Reset FW PDEV*/
1363 	/* Do not crash host when target assert happened*/
1364 	OL_ATH_PARAM_FW_DUMP_NO_HOST_CRASH = 210,
1365 	/* Consider OBSS non-erp to change to long slot*/
1366 	OL_ATH_PARAM_CONSIDER_OBSS_NON_ERP_LONG_SLOT = 211,
1367 	OL_ATH_PARAM_STATS_FC,
1368 	OL_ATH_PARAM_QFLUSHINTERVAL,
1369 	OL_ATH_PARAM_TOTAL_Q_SIZE,
1370 	OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE0,
1371 	OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE1,
1372 	OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE2,
1373 	OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE3,
1374 	OL_ATH_PARAM_MIN_THRESHOLD,
1375 	OL_ATH_PARAM_MAX_Q_LIMIT,
1376 	OL_ATH_PARAM_MIN_Q_LIMIT,
1377 	OL_ATH_PARAM_CONG_CTRL_TIMER_INTV,
1378 	OL_ATH_PARAM_STATS_TIMER_INTV,
1379 	OL_ATH_PARAM_ROTTING_TIMER_INTV,
1380 	OL_ATH_PARAM_LATENCY_PROFILE,
1381 	OL_ATH_PARAM_HOSTQ_DUMP,
1382 	OL_ATH_PARAM_TIDQ_MAP,
1383 	OL_ATH_PARAM_DBG_ARP_SRC_ADDR, /* ARP DEBUG source address*/
1384 	OL_ATH_PARAM_DBG_ARP_DST_ADDR, /* ARP DEBUG destination address*/
1385 	OL_ATH_PARAM_ARP_DBG_CONF,   /* ARP debug configuration */
1386 	OL_ATH_PARAM_DISABLE_STA_VAP_AMSDU, /* Disable AMSDU for station vap */
1387 #if ATH_SUPPORT_DFS && ATH_SUPPORT_STA_DFS
1388 	OL_ATH_PARAM_STADFS_ENABLE = 300,    /* STA DFS is enabled or not  */
1389 #endif
1390 #if QCA_AIRTIME_FAIRNESS
1391 	OL_ATH_PARAM_ATF_STRICT_SCHED = 301,
1392 	OL_ATH_PARAM_ATF_GROUP_POLICY = 302,
1393 #endif
1394 #if DBDC_REPEATER_SUPPORT
1395 	OL_ATH_PARAM_PRIMARY_RADIO,
1396 	OL_ATH_PARAM_DBDC_ENABLE,
1397 #endif
1398 	OL_ATH_PARAM_TXPOWER_DBSCALE,
1399 	OL_ATH_PARAM_CTL_POWER_SCALE,
1400 #if QCA_AIRTIME_FAIRNESS
1401 	OL_ATH_PARAM_ATF_OBSS_SCHED = 307,
1402 	OL_ATH_PARAM_ATF_OBSS_SCALE = 308,
1403 #endif
1404 	OL_ATH_PARAM_PHY_OFDM_ERR = 309,
1405 	OL_ATH_PARAM_PHY_CCK_ERR = 310,
1406 	OL_ATH_PARAM_FCS_ERR = 311,
1407 	OL_ATH_PARAM_CHAN_UTIL = 312,
1408 #if DBDC_REPEATER_SUPPORT
1409 	OL_ATH_PARAM_CLIENT_MCAST,
1410 #endif
1411 	OL_ATH_PARAM_EMIWAR_80P80 = 314,
1412 	OL_ATH_PARAM_BATCHMODE = 315,
1413 	OL_ATH_PARAM_PACK_AGGR_DELAY = 316,
1414 #if UMAC_SUPPORT_ACFG
1415 	OL_ATH_PARAM_DIAG_ENABLE = 317,
1416 #endif
1417 #if ATH_SUPPORT_VAP_QOS
1418 	OL_ATH_PARAM_VAP_QOS = 318,
1419 #endif
1420 	OL_ATH_PARAM_CHAN_STATS_TH = 319,
1421 	/* Passive scan is enabled or disabled  */
1422 	OL_ATH_PARAM_PASSIVE_SCAN_ENABLE = 320,
1423 	OL_ATH_MIN_RSSI_ENABLE = 321,
1424 	OL_ATH_MIN_RSSI = 322,
1425 	OL_ATH_PARAM_ACS_2G_ALLCHAN = 323,
1426 #if DBDC_REPEATER_SUPPORT
1427 	OL_ATH_PARAM_DELAY_STAVAP_UP = 324,
1428 #endif
1429 	/* It is used to set the channel switch options */
1430 	OL_ATH_PARAM_CHANSWITCH_OPTIONS = 327,
1431 	OL_ATH_BTCOEX_ENABLE        = 328,
1432 	OL_ATH_BTCOEX_WL_PRIORITY   = 329,
1433 	OL_ATH_PARAM_TID_OVERRIDE_QUEUE_MAPPING = 330,
1434 	OL_ATH_PARAM_CAL_VER_CHECK = 331,
1435 	OL_ATH_PARAM_NO_VLAN       = 332,
1436 	OL_ATH_PARAM_CCA_THRESHOLD = 333,
1437 	OL_ATH_PARAM_ATF_LOGGING = 334,
1438 	OL_ATH_PARAM_STRICT_DOTH = 335,
1439 	OL_ATH_PARAM_DISCONNECTION_TIMEOUT   = 336,
1440 	OL_ATH_PARAM_RECONFIGURATION_TIMEOUT = 337,
1441 	OL_ATH_PARAM_CHANNEL_SWITCH_COUNT = 338,
1442 	OL_ATH_PARAM_ALWAYS_PRIMARY = 339,
1443 	OL_ATH_PARAM_FAST_LANE = 340,
1444 	OL_ATH_GET_BTCOEX_DUTY_CYCLE = 341,
1445 	OL_ATH_PARAM_SECONDARY_OFFSET_IE = 342,
1446 	OL_ATH_PARAM_WIDE_BAND_SUB_ELEMENT = 343,
1447 	OL_ATH_PARAM_PREFERRED_UPLINK = 344,
1448 	OL_ATH_PARAM_PRECAC_ENABLE = 345,
1449 	OL_ATH_PARAM_PRECAC_TIMEOUT = 346,
1450 	OL_ATH_COEX_VER_CFG = 347,
1451 	OL_ATH_PARAM_DUMP_TARGET = 348,
1452 	OL_ATH_PARAM_PDEV_TO_REO_DEST = 349,
1453 	OL_ATH_PARAM_DUMP_CHAINMASK_TABLES = 350,
1454 	OL_ATH_PARAM_DUMP_OBJECTS = 351,
1455 	OL_ATH_PARAM_ACS_SRLOADVAR = 352,
1456 	OL_ATH_PARAM_MGMT_RSSI_THRESHOLD = 353,
1457 	OL_ATH_PARAM_EXT_NSS_CAPABLE = 354,
1458 	OL_ATH_PARAM_MGMT_PDEV_STATS_TIMER = 355,
1459 	OL_ATH_PARAM_TXACKTIMEOUT = 356,
1460 	OL_ATH_PARAM_ICM_ACTIVE = 357,
1461 	OL_ATH_PARAM_NOMINAL_NOISEFLOOR = 358,
1462 	OL_ATH_PARAM_CHAN_INFO = 359,
1463 	OL_ATH_PARAM_ACS_RANK = 360,
1464 	OL_ATH_PARAM_TXCHAINSOFT = 361,
1465 	OL_ATH_PARAM_WIDE_BAND_SCAN = 362,
1466 	OL_ATH_PARAM_CCK_TX_ENABLE = 363,
1467 	OL_ATH_PARAM_PAPI_ENABLE = 364,
1468 	OL_ATH_PARAM_ISOLATION = 365,
1469 	OL_ATH_PARAM_MAX_CLIENTS_PER_RADIO = 366,
1470 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
1471 	OL_ATH_PARAM_DFS_HOST_WAIT_TIMEOUT = 367,
1472 #endif
1473 	OL_ATH_PARAM_NF_THRESH = 368,
1474 #ifdef OL_ATH_SMART_LOGGING
1475 	OL_ATH_PARAM_SMARTLOG_ENABLE = 369,
1476 	OL_ATH_PARAM_SMARTLOG_FATAL_EVENT = 370,
1477 	OL_ATH_PARAM_SMARTLOG_SKB_SZ = 371,
1478 	OL_ATH_PARAM_SMARTLOG_P1PINGFAIL = 372,
1479 #endif /* OL_ATH_SMART_LOGGING */
1480 #ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT
1481 	OL_ATH_PARAM_PRECAC_INTER_CHANNEL = 373,
1482 	OL_ATH_PARAM_PRECAC_CHAN_STATE = 374,
1483 #endif
1484 	OL_ATH_PARAM_DBR_RING_STATUS = 375,
1485 #ifdef QCN_ESP_IE
1486 	OL_ATH_PARAM_ESP_PERIODICITY = 376,
1487 	OL_ATH_PARAM_ESP_AIRTIME = 377,
1488 	OL_ATH_PARAM_ESP_PPDU_DURATION = 378,
1489 	OL_ATH_PARAM_ESP_BA_WINDOW = 379,
1490 #endif /* QCN_ESP_IE */
1491 
1492 	OL_ATH_PARAM_CBS = 380,
1493 	OL_ATH_PARAM_DCS_SIM = 381,
1494 	OL_ATH_PARAM_CBS_DWELL_SPLIT_TIME = 382,
1495 	OL_ATH_PARAM_CBS_DWELL_REST_TIME = 383,
1496 	OL_ATH_PARAM_CBS_WAIT_TIME = 384,
1497 	OL_ATH_PARAM_CBS_REST_TIME = 385,
1498 	OL_ATH_PARAM_CBS_CSA = 386,
1499 	OL_ATH_PARAM_TWICE_ANTENNA_GAIN = 387,
1500 	OL_ATH_PARAM_ACTIVITY_FACTOR = 388,
1501 	OL_ATH_PARAM_CHAN_AP_RX_UTIL = 389,
1502 	OL_ATH_PARAM_CHAN_FREE  = 390,
1503 	OL_ATH_PARAM_CHAN_AP_TX_UTIL = 391,
1504 	OL_ATH_PARAM_CHAN_OBSS_RX_UTIL = 392,
1505 	OL_ATH_PARAM_CHAN_NON_WIFI = 393,
1506 #if PEER_FLOW_CONTROL
1507 	OL_ATH_PARAM_VIDEO_STATS_FC = 394,
1508 	OL_ATH_PARAM_VIDEO_DELAY_STATS_FC = 395,
1509 #endif
1510 };
1511 
1512 /* Enumeration of PDEV Configuration parameter */
1513 enum _ol_hal_param_t {
1514 	OL_HAL_CONFIG_DMA_BEACON_RESPONSE_TIME         = 0
1515 };
1516 #endif
1517 
1518 /* Bitmasks for stats that can block */
1519 #define EXT_TXRX_FW_STATS		0x0001
1520 #endif
1521