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