xref: /wlan-dirver/qca-wifi-host-cmn/dp/inc/cdp_txrx_cmn_struct.h (revision 70a19e16789e308182f63b15c75decec7bf0b342)
1 /*
2  * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20  /**
21   * DOC: cdp_txrx_cmn_struct.h
22   * Define the host data path converged API functions
23   * called by the host control SW and the OS interface module
24   */
25 #ifndef _CDP_TXRX_CMN_STRUCT_H_
26 #define _CDP_TXRX_CMN_STRUCT_H_
27 
28 /*
29  * For WIN legacy header compilation
30  * Temporary add dummy definitions
31  * should be removed properly WIN legacy code handle
32  */
33 
34 #include "htc_api.h"
35 #include "qdf_types.h"
36 #include "qdf_nbuf.h"
37 #include "qdf_atomic.h"
38 #ifdef DP_MOB_DEFS
39 #include <cdp_txrx_mob_def.h>
40 #endif
41 #include <cdp_txrx_handle.h>
42 #include <cdp_txrx_stats_struct.h>
43 #ifdef WLAN_RX_PKT_CAPTURE_ENH
44 #include "cdp_txrx_extd_struct.h"
45 #endif
46 
47 #ifdef WLAN_MAX_CLIENTS_ALLOWED
48 #define OL_TXRX_NUM_LOCAL_PEER_IDS (WLAN_MAX_CLIENTS_ALLOWED + 1 + 1 + 1)
49 #endif
50 
51 #ifndef OL_TXRX_NUM_LOCAL_PEER_IDS
52 /*
53  * Each AP will occupy one ID, so it will occupy two IDs for AP-AP mode.
54  * Clients will be assigned max 32 IDs.
55  * STA(associated)/P2P DEV(self-PEER) will get one ID.
56  */
57 #define OL_TXRX_NUM_LOCAL_PEER_IDS (32 + 1 + 1 + 1)
58 #endif
59 
60 #define CDP_BA_256_BIT_MAP_SIZE_DWORDS 8
61 #define CDP_BA_64_BIT_MAP_SIZE_DWORDS 2
62 #define CDP_RSSI_CHAIN_LEN 8
63 
64 #define OL_TXRX_INVALID_PDEV_ID 0xff
65 #define OL_TXRX_INVALID_LOCAL_PEER_ID 0xffff
66 #define CDP_INVALID_VDEV_ID 0xff
67 
68 /* Max vdev_stats_id(48) is as per the max vdevs supported by HW */
69 #define CDP_MAX_VDEV_STATS_ID     0x30
70 /* Invalid vdev_stats_id */
71 #define CDP_INVALID_VDEV_STATS_ID 0xFF
72 
73 /* Options for Dump Statistics */
74 #define CDP_HDD_STATS               0
75 #define CDP_TXRX_PATH_STATS         1
76 #define CDP_TXRX_HIST_STATS         2
77 #define CDP_TXRX_TSO_STATS          3
78 #define CDP_HDD_NETIF_OPER_HISTORY  4
79 #define CDP_DUMP_TX_FLOW_POOL_INFO  5
80 #define CDP_TXRX_DESC_STATS         6
81 #define CDP_HIF_STATS               7
82 #define CDP_LRO_STATS               8
83 #define CDP_NAPI_STATS              9
84 #define CDP_WLAN_RX_BUF_DEBUG_STATS 10
85 #define CDP_RX_RING_STATS          11
86 #define CDP_DP_NAPI_STATS          12
87 #define CDP_DP_RX_THREAD_STATS     13
88 #define CDP_SCHEDULER_STATS        21
89 #define CDP_TX_QUEUE_STATS         22
90 #define CDP_BUNDLE_STATS           23
91 #define CDP_CREDIT_STATS           24
92 #define CDP_DISCONNECT_STATS       25
93 #define CDP_DP_RX_FISA_STATS	   26
94 #define CDP_DP_SWLM_STATS	   27
95 #define CDP_DP_TX_HW_LATENCY_STATS 28
96 
97 #define WME_AC_TO_TID(_ac) (       \
98 		((_ac) == WME_AC_VO) ? 6 : \
99 		((_ac) == WME_AC_VI) ? 5 : \
100 		((_ac) == WME_AC_BK) ? 1 : \
101 		0)
102 
103 #define TID_TO_WME_AC(_tid) (      \
104 		(((_tid) == 0) || ((_tid) == 3)) ? WME_AC_BE : \
105 		(((_tid) == 1) || ((_tid) == 2)) ? WME_AC_BK : \
106 		(((_tid) == 4) || ((_tid) == 5)) ? WME_AC_VI : \
107 		WME_AC_VO)
108 
109 #define CDP_MU_MAX_USERS 37
110 #define CDP_MU_MAX_USER_INDEX (CDP_MU_MAX_USERS - 1)
111 #define CDP_INVALID_PEER 0xffff
112 #define CDP_INVALID_TID	 31
113 #define CDP_INVALID_TX_ENCAP_TYPE	 6
114 #define CDP_INVALID_SEC_TYPE		12
115 
116 #define CDP_DATA_TID_MAX 8
117 #define CDP_DATA_NON_QOS_TID 16
118 
119 #define CDP_NUM_SA_BW 4
120 #define CDP_PERCENT_MACRO 100
121 #define CDP_NUM_KB_IN_MB 1000
122 /*
123  * advance rx monitor filter
124  */
125 #define MON_FILTER_PASS			0x0001
126 #define MON_FILTER_OTHER		0x0002
127 #define MON_FILTER_ALL			0x0003
128 
129 #define FILTER_MGMT_ALL			0xFFFF
130 #define FILTER_MGMT_ASSOC_REQ		0x0001
131 #define FILTER_MGMT_ASSOC_RES		0x0002
132 #define FILTER_MGMT_REASSOC_REQ		0x0004
133 #define FILTER_MGMT_REASSOC_RES		0x0008
134 #define FILTER_MGMT_PROBE_REQ		0x0010
135 #define FILTER_MGMT_PROBE_RES		0x0020
136 #define FILTER_MGMT_TIM_ADVT		0x0040
137 #define FILTER_MGMT_RESERVED_7		0x0080
138 #define FILTER_MGMT_BEACON		0x0100
139 #define FILTER_MGMT_ATIM		0x0200
140 #define FILTER_MGMT_DISASSOC		0x0400
141 #define FILTER_MGMT_AUTH		0x0800
142 #define FILTER_MGMT_DEAUTH		0x1000
143 #define FILTER_MGMT_ACTION		0x2000
144 #define FILTER_MGMT_ACT_NO_ACK		0x4000
145 #define FILTER_MGMT_RESERVED_15		0x8000
146 
147 #define FILTER_CTRL_ALL			0xFFFF
148 #define FILTER_CTRL_RESERVED_1		0x0001
149 #define FILTER_CTRL_RESERVED_2		0x0002
150 #define FILTER_CTRL_TRIGGER		0x0004
151 #define FILTER_CTRL_RESERVED_4		0x0008
152 #define FILTER_CTRL_BF_REP_POLL		0x0010
153 #define FILTER_CTRL_VHT_NDP		0x0020
154 #define FILTER_CTRL_FRAME_EXT		0x0040
155 #define FILTER_CTRL_CTRLWRAP		0x0080
156 #define FILTER_CTRL_BA_REQ		0x0100
157 #define FILTER_CTRL_BA			0x0200
158 #define FILTER_CTRL_PSPOLL		0x0400
159 #define FILTER_CTRL_RTS			0x0800
160 #define FILTER_CTRL_CTS			0x1000
161 #define FILTER_CTRL_ACK			0x2000
162 #define FILTER_CTRL_CFEND		0x4000
163 #define FILTER_CTRL_CFEND_CFACK		0x8000
164 
165 #define FILTER_DATA_ALL			0xFFFF
166 #define FILTER_DATA_MCAST		0x4000
167 #define FILTER_DATA_UCAST		0x8000
168 #define FILTER_DATA_DATA		0x0001
169 #define FILTER_DATA_NULL		0x0008
170 
171 /*
172  * Multiply rate by 2 to avoid float point
173  * and get rate in units of 500kbps
174  */
175 #define CDP_11B_RATE_0MCS (11 * 2)
176 #define CDP_11B_RATE_1MCS (5.5 * 2)
177 #define CDP_11B_RATE_2MCS (2 * 2)
178 #define CDP_11B_RATE_3MCS (1 * 2)
179 #define CDP_11B_RATE_4MCS (11 * 2)
180 #define CDP_11B_RATE_5MCS (5.5 * 2)
181 #define CDP_11B_RATE_6MCS (2 * 2)
182 
183 #define CDP_11A_RATE_0MCS (48 * 2)
184 #define CDP_11A_RATE_1MCS (24 * 2)
185 #define CDP_11A_RATE_2MCS (12 * 2)
186 #define CDP_11A_RATE_3MCS (6 * 2)
187 #define CDP_11A_RATE_4MCS (54 * 2)
188 #define CDP_11A_RATE_5MCS (36 * 2)
189 #define CDP_11A_RATE_6MCS (18 * 2)
190 #define CDP_11A_RATE_7MCS (9 * 2)
191 
192 #define CDP_LEGACY_MCS0  0
193 #define CDP_LEGACY_MCS1  1
194 #define CDP_LEGACY_MCS2  2
195 #define CDP_LEGACY_MCS3  3
196 #define CDP_LEGACY_MCS4  4
197 #define CDP_LEGACY_MCS5  5
198 #define CDP_LEGACY_MCS6  6
199 #define CDP_LEGACY_MCS7  7
200 
201 QDF_DECLARE_EWMA(tx_lag, 1024, 8)
202 struct cdp_stats_cookie;
203 
204 /**
205  * enum cdp_cfg_param_type - DP configuration parameters
206  * @CDP_CFG_MAX_PEER_ID: Maximum peer id
207  * @CDP_CFG_CCE_DISABLE: CCE disable
208  * @CDP_CFG_NUM_PARAMS: Total number of params
209  */
210 enum cdp_cfg_param_type {
211 	CDP_CFG_MAX_PEER_ID,
212 	CDP_CFG_CCE_DISABLE,
213 	CDP_CFG_NUM_PARAMS
214 };
215 
216 /**
217  * enum CDP_PPDU_STATS_PPDU_TYPE - PPDU TYPE from FW
218  * @CDP_PPDU_STATS_PPDU_TYPE_SU: single user type
219  * @CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO: multi user mu-mimo
220  * @CDP_PPDU_STATS_PPDU_TYPE_MU_OFDMA: multi user ofdma
221  * @CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO_OFDMA: multi user mu-mimo ofdma
222  * @CDP_PPDU_STATS_PPDU_TYPE_UL_TRIG: ul trigger ppdu
223  * @CDP_PPDU_STATS_PPDU_TYPE_BURST_BCN: burst beacon
224  * @CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_RESP: bsr respond
225  * @CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_TRIG: bsr trigger
226  * @CDP_PPDU_STATS_PPDU_TYPE_UL_RESP: ul response
227  * @CDP_PPDU_STATS_PPDU_TYPE_UNKNOWN: unknown
228  */
229 enum CDP_PPDU_STATS_PPDU_TYPE {
230 	CDP_PPDU_STATS_PPDU_TYPE_SU = 0,
231 	CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO = 1,
232 	CDP_PPDU_STATS_PPDU_TYPE_MU_OFDMA = 2,
233 	CDP_PPDU_STATS_PPDU_TYPE_MU_MIMO_OFDMA = 4,
234 	CDP_PPDU_STATS_PPDU_TYPE_UL_TRIG = 5,
235 	CDP_PPDU_STATS_PPDU_TYPE_BURST_BCN = 6,
236 	CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_RESP = 7,
237 	CDP_PPDU_STATS_PPDU_TYPE_UL_BSR_TRIG = 8,
238 	CDP_PPDU_STATS_PPDU_TYPE_UL_RESP = 9,
239 	CDP_PPDU_STATS_PPDU_TYPE_UNKNOWN = 0x1F,
240 };
241 
242 /**
243  * enum htt_cmn_dbg_stats_type -
244  * bit positions for each stats type within a stats type bitmask
245  * The bitmask contains 24 bits.
246  * @HTT_DBG_CMN_STATS_WAL_PDEV_TXRX:
247  * @HTT_DBG_CMN_STATS_RX_REORDER:
248  * @HTT_DBG_CMN_STATS_RX_RATE_INFO:
249  * @HTT_DBG_CMN_STATS_TX_PPDU_LOG:
250  * @HTT_DBG_CMN_STATS_TX_RATE_INFO:
251  * @HTT_DBG_CMN_STATS_TIDQ:
252  * @HTT_DBG_CMN_STATS_TXBF_INFO:
253  * @HTT_DBG_CMN_STATS_SND_INFO:
254  * @HTT_DBG_CMN_STATS_ERROR_INFO:
255  * @HTT_DBG_CMN_STATS_TX_SELFGEN_INFO:
256  * @HTT_DBG_CMN_STATS_TX_MU_INFO:
257  * @HTT_DBG_CMN_STATS_SIFS_RESP_INFO:
258  * @HTT_DBG_CMN_STATS_RESET_INFO:
259  * @HTT_DBG_CMN_STATS_MAC_WDOG_INFO:
260  * @HTT_DBG_CMN_STATS_TX_DESC_INFO:
261  * @HTT_DBG_CMN_STATS_TX_FETCH_MGR_INFO:
262  * @HTT_DBG_CMN_STATS_TX_PFSCHED_INFO:
263  * @HTT_DBG_CMN_STATS_TX_PATH_STATS_INFO:
264  * @HTT_DBG_CMN_NUM_STATS:
265  * @HTT_DBG_CMN_NUM_STATS_INVALID:
266  */
267 enum htt_cmn_dbg_stats_type {
268 	HTT_DBG_CMN_STATS_WAL_PDEV_TXRX      = 0,  /* bit 0 -> 0x1 */
269 	HTT_DBG_CMN_STATS_RX_REORDER         = 1,  /* bit 1 -> 0x2 */
270 	HTT_DBG_CMN_STATS_RX_RATE_INFO       = 2,  /* bit 2 -> 0x4 */
271 	HTT_DBG_CMN_STATS_TX_PPDU_LOG        = 3,  /* bit 3 -> 0x8 */
272 	HTT_DBG_CMN_STATS_TX_RATE_INFO       = 4,  /* bit 4 -> 0x10 */
273 	HTT_DBG_CMN_STATS_TIDQ               = 5,  /* bit 5 -> 0x20 */
274 	HTT_DBG_CMN_STATS_TXBF_INFO          = 6,  /* bit 6 -> 0x40 */
275 	HTT_DBG_CMN_STATS_SND_INFO           = 7,  /* bit 7 -> 0x80 */
276 	HTT_DBG_CMN_STATS_ERROR_INFO         = 8,  /* bit 8  -> 0x100 */
277 	HTT_DBG_CMN_STATS_TX_SELFGEN_INFO    = 9,  /* bit 9  -> 0x200 */
278 	HTT_DBG_CMN_STATS_TX_MU_INFO         = 10, /* bit 10 -> 0x400 */
279 	HTT_DBG_CMN_STATS_SIFS_RESP_INFO     = 11, /* bit 11 -> 0x800 */
280 	HTT_DBG_CMN_STATS_RESET_INFO         = 12, /* bit 12 -> 0x1000 */
281 	HTT_DBG_CMN_STATS_MAC_WDOG_INFO      = 13, /* bit 13 -> 0x2000 */
282 	HTT_DBG_CMN_STATS_TX_DESC_INFO       = 14, /* bit 14 -> 0x4000 */
283 	HTT_DBG_CMN_STATS_TX_FETCH_MGR_INFO  = 15, /* bit 15 -> 0x8000 */
284 	HTT_DBG_CMN_STATS_TX_PFSCHED_INFO    = 16, /* bit 16 -> 0x10000 */
285 	HTT_DBG_CMN_STATS_TX_PATH_STATS_INFO = 17, /* bit 17 -> 0x20000 */
286 	/* bits 18-23 currently reserved */
287 
288 	/* keep this last */
289 	HTT_DBG_CMN_NUM_STATS,
290 	HTT_DBG_CMN_NUM_STATS_INVALID        = 31, /* bit 31 -> 0x80000000 */
291 };
292 
293 /**
294  * enum cdp_host_txrx_stats - Different types of host stats
295  * @TXRX_HOST_STATS_INVALID: Invalid option
296  * @TXRX_CLEAR_STATS: clear all host stats
297  * @TXRX_RX_RATE_STATS: Rx rate info
298  * @TXRX_TX_RATE_STATS: Tx rate info
299  * @TXRX_TX_HOST_STATS: Print Tx stats
300  * @TXRX_RX_HOST_STATS: Print host Rx stats
301  * @TXRX_AST_STATS:
302  * @TXRX_SRNG_PTR_STATS: Print SRNG pointer stats
303  * @TXRX_RX_MON_STATS: Print monitor mode stats
304  * @TXRX_REO_QUEUE_STATS: Print Per peer REO Queue Stats
305  * @TXRX_SOC_CFG_PARAMS: Print soc cfg params info
306  * @TXRX_PDEV_CFG_PARAMS: Print pdev cfg params info
307  * @TXRX_NAPI_STATS: Print NAPI scheduling statistics
308  * @TXRX_SOC_INTERRUPT_STATS: Print soc interrupt stats
309  * @TXRX_SOC_FSE_STATS:
310  * @TXRX_HAL_REG_WRITE_STATS: Hal Reg Write stats
311  * @TXRX_SOC_REO_HW_DESC_DUMP: HW REO queue desc dump
312  * @TXRX_SOC_WBM_IDLE_HPTP_DUMP: WBM idle link desc SRNG HP/TP dump
313  * @TXRX_SRNG_USAGE_WM_STATS: SRNG usage watermark stats
314  * @TXRX_HOST_STATS_MAX:
315  */
316 enum cdp_host_txrx_stats {
317 	TXRX_HOST_STATS_INVALID  = -1,
318 	TXRX_CLEAR_STATS     = 0,
319 	TXRX_RX_RATE_STATS   = 1,
320 	TXRX_TX_RATE_STATS   = 2,
321 	TXRX_TX_HOST_STATS   = 3,
322 	TXRX_RX_HOST_STATS   = 4,
323 	TXRX_AST_STATS       = 5,
324 	TXRX_SRNG_PTR_STATS  = 6,
325 	TXRX_RX_MON_STATS    = 7,
326 	TXRX_REO_QUEUE_STATS = 8,
327 	TXRX_SOC_CFG_PARAMS   = 9,
328 	TXRX_PDEV_CFG_PARAMS  = 10,
329 	TXRX_NAPI_STATS       = 11,
330 	TXRX_SOC_INTERRUPT_STATS = 12,
331 	TXRX_SOC_FSE_STATS = 13,
332 	TXRX_HAL_REG_WRITE_STATS = 14,
333 	TXRX_SOC_REO_HW_DESC_DUMP = 15,
334 	TXRX_SOC_WBM_IDLE_HPTP_DUMP = 16,
335 	TXRX_SRNG_USAGE_WM_STATS = 17,
336 	TXRX_HOST_STATS_MAX,
337 };
338 
339 /**
340  * enum cdp_ppdu_ftype - PPDU Frame Type
341  * @CDP_PPDU_FTYPE_DATA: SU or MU Data Frame
342  * @CDP_PPDU_FTYPE_CTRL: Control/Management Frames
343  * @CDP_PPDU_FTYPE_BAR: SU or MU BAR frames
344  * @CDP_PPDU_FTYPE_MAX: Max value
345  */
346 enum cdp_ppdu_ftype {
347 	CDP_PPDU_FTYPE_CTRL,
348 	CDP_PPDU_FTYPE_DATA,
349 	CDP_PPDU_FTYPE_BAR,
350 	CDP_PPDU_FTYPE_MAX
351 };
352 
353 
354 /**
355  * enum htt_cmn_pkt_type - General specification of the tx frame contents
356  * @htt_cmn_pkt_type_raw: raw
357  * @htt_cmn_pkt_type_native_wifi: native wifi
358  * @htt_cmn_pkt_type_ethernet: ethernet
359  * @htt_cmn_pkt_type_mgmt: management
360  * @htt_cmn_pkt_type_eth2: ethernet2
361  * @htt_cmn_pkt_num_types: number of packet types
362  *
363  * for efficiency, the HTT packet type values correspond
364  * to the bit positions of the WAL packet type values, so the
365  * translation is a simple shift operation.
366  */
367 enum htt_cmn_pkt_type {
368 	htt_cmn_pkt_type_raw = 0,
369 	htt_cmn_pkt_type_native_wifi = 1,
370 	htt_cmn_pkt_type_ethernet = 2,
371 	htt_cmn_pkt_type_mgmt = 3,
372 	htt_cmn_pkt_type_eth2 = 4,
373 
374 	/* keep this last */
375 	htt_cmn_pkt_num_types
376 };
377 
378 /**
379  * enum htt_cmn_rx_status - description of HTT received packets status
380  * @htt_cmn_rx_status_unknown:
381  * @htt_cmn_rx_status_ok:
382  * @htt_cmn_rx_status_err_fcs:
383  * @htt_cmn_rx_status_err_dup:
384  * @htt_cmn_rx_status_err_replay:
385  * @htt_cmn_rx_status_inv_peer:
386  * @htt_cmn_rx_status_ctrl_mgmt_null:
387  * @htt_cmn_rx_status_tkip_mic_err:
388  * @htt_cmn_rx_status_decrypt_err:
389  * @htt_cmn_rx_status_mpdu_length_err:
390  * @htt_cmn_rx_status_err_misc:
391  *
392  * It is similar to htt_rx_status enum
393  * but is added as a cdp enum can be freely used in OL_IF layer
394  */
395 enum htt_cmn_rx_status {
396 	htt_cmn_rx_status_unknown = 0x0,
397 	htt_cmn_rx_status_ok,
398 	htt_cmn_rx_status_err_fcs,
399 	htt_cmn_rx_status_err_dup,
400 	htt_cmn_rx_status_err_replay,
401 	htt_cmn_rx_status_inv_peer,
402 	htt_cmn_rx_status_ctrl_mgmt_null = 0x08,
403 	htt_cmn_rx_status_tkip_mic_err = 0x09,
404 	htt_cmn_rx_status_decrypt_err = 0x0A,
405 	htt_cmn_rx_status_mpdu_length_err = 0x0B,
406 	htt_cmn_rx_status_err_misc = 0xFF
407 };
408 
409 
410 enum cdp_host_reo_dest_ring {
411     cdp_host_reo_dest_ring_unknown = 0,
412     cdp_host_reo_dest_ring_1 = 1,
413     cdp_host_reo_dest_ring_2 = 2,
414     cdp_host_reo_dest_ring_3 = 3,
415     cdp_host_reo_dest_ring_4 = 4,
416 };
417 
418 enum htt_cmn_t2h_en_stats_type {
419     /* keep this always first */
420     HTT_CMN_T2H_EN_STATS_TYPE_START     = 0,
421 
422     /** ppdu_common_stats is the payload */
423     HTT_CMN_T2H_EN_STATS_TYPE_COMMON    = 1,
424     /** ppdu_sant_stats is the payload */
425     HTT_CMN_T2H_EN_STATS_TYPE_SANT      = 2,
426     /** ppdu_common_stats_v2 is the payload */
427     HTT_CMN_T2H_EN_STATS_TYPE_COMMON_V2 = 3,
428 
429     /* Keep this last */
430     HTT_CMN_T2H_EN_STATS_TYPE_END       = 0x1f,
431 };
432 
433 enum htt_cmn_t2h_en_stats_status {
434     /* Keep this first always */
435     HTT_CMN_T2H_EN_STATS_STATUS_PARTIAL     = 0,
436     HTT_CMN_T2H_EN_STATS_STATUS_PRESENT     = 1,
437     HTT_CMN_T2H_EN_STATS_STATUS_ERROR       = 2,
438     HTT_CMN_T2H_EN_STATS_STATUS_INVALID     = 3,
439 
440 
441     /* keep this always last */
442     HTT_CMN_T2H_EN_STATS_STATUS_SERIES_DONE         = 7,
443 };
444 
445 /**
446  * enum cdp_peer_type - Peer type
447  * @CDP_INVALID_PEER_TYPE: invalid peer type
448  * @CDP_LINK_PEER_TYPE: legacy peer or link peer for MLO connection
449  * @CDP_MLD_PEER_TYPE: MLD peer for MLO connection
450  * @CDP_WILD_PEER_TYPE: used to set peer type for same mld/link mac addr
451  */
452 enum cdp_peer_type {
453 	CDP_INVALID_PEER_TYPE,
454 	CDP_LINK_PEER_TYPE,
455 	CDP_MLD_PEER_TYPE,
456 	CDP_WILD_PEER_TYPE,
457 };
458 
459 /**
460  * struct cdp_peer_setup_info - MLO connection info for cdp_peer_setup()
461  * @mld_peer_mac: mld peer mac address pointer
462  * @is_first_link: set true for first MLO link peer
463  * @is_primary_link: set true for MLO primary link peer
464  * @primary_umac_id: primary umac_id
465  * @num_links: number of links in MLO
466  */
467 struct cdp_peer_setup_info {
468 	uint8_t *mld_peer_mac;
469 	uint8_t is_first_link:1,
470 		is_primary_link:1;
471 	uint8_t primary_umac_id;
472 	uint8_t num_links;
473 };
474 
475 /**
476  * struct cdp_peer_info - peer info for dp hash find
477  * @vdev_id: Vdev ID
478  * @mac_addr: peer mac address to search
479  * @mac_addr_is_aligned: true only if mac_addr type is
480  *			"union dp_align_mac_addr", otherwise set false always.
481  * @peer_type: link or MLD peer type
482  */
483 struct cdp_peer_info {
484 	uint8_t vdev_id;
485 	uint8_t *mac_addr;
486 	bool mac_addr_is_aligned;
487 	enum cdp_peer_type peer_type;
488 };
489 
490 /**
491  * enum ol_txrx_peer_state - Peer state information
492  * @OL_TXRX_PEER_STATE_INVALID: Invalid
493  * @OL_TXRX_PEER_STATE_DISC: disconnected (initial state)
494  * @OL_TXRX_PEER_STATE_CONN: authentication in progress
495  * @OL_TXRX_PEER_STATE_AUTH: authentication successful
496  */
497 enum ol_txrx_peer_state {
498 	OL_TXRX_PEER_STATE_INVALID,
499 	OL_TXRX_PEER_STATE_DISC,
500 	OL_TXRX_PEER_STATE_CONN,
501 	OL_TXRX_PEER_STATE_AUTH,
502 };
503 
504 /**
505  * enum cdp_txrx_ast_entry_type - AST entry type information
506  * @CDP_TXRX_AST_TYPE_NONE: static ast entry for connected peer
507  * @CDP_TXRX_AST_TYPE_STATIC: static ast entry for connected peer
508  * @CDP_TXRX_AST_TYPE_SELF: static ast entry for self peer (STA mode)
509  * @CDP_TXRX_AST_TYPE_WDS: WDS peer ast entry type
510  * @CDP_TXRX_AST_TYPE_WDS_HM: HM WDS entry
511  * @CDP_TXRX_AST_TYPE_STA_BSS: BSS entry(STA mode)
512  * @CDP_TXRX_AST_TYPE_DA:	AST entry based on Destination address
513  * @CDP_TXRX_AST_TYPE_WDS_HM_SEC: HM WDS entry for secondary radio
514  * @CDP_TXRX_AST_TYPE_MLD: AST entry type for MLD peer
515  * @CDP_TXRX_AST_TYPE_MAX:
516  */
517 enum cdp_txrx_ast_entry_type {
518 	CDP_TXRX_AST_TYPE_NONE,
519 	CDP_TXRX_AST_TYPE_STATIC,
520 	CDP_TXRX_AST_TYPE_SELF,
521 	CDP_TXRX_AST_TYPE_WDS,
522 	CDP_TXRX_AST_TYPE_WDS_HM,
523 	CDP_TXRX_AST_TYPE_STA_BSS,
524 	CDP_TXRX_AST_TYPE_DA,
525 	CDP_TXRX_AST_TYPE_WDS_HM_SEC,
526 	CDP_TXRX_AST_TYPE_MLD,
527 	CDP_TXRX_AST_TYPE_MAX
528 };
529 
530 /**
531  * enum cdp_ast_free_status - status passed to callback function before
532  *                            freeing ast
533  * @CDP_TXRX_AST_DELETED: AST is deleted from FW and delete response received
534  * @CDP_TXRX_AST_DELETE_IN_PROGRESS: AST delete command sent to FW and host
535  *                                    is waiting for FW response
536  */
537 enum cdp_ast_free_status {
538 	CDP_TXRX_AST_DELETED,
539 	CDP_TXRX_AST_DELETE_IN_PROGRESS,
540 };
541 
542 /**
543  * typedef txrx_ast_free_cb() - callback registered for ast free
544  * @ctrl_soc: control path soc context
545  * @cdp_soc: DP soc context
546  * @cookie: cookie
547  * @cdp_ast_free_status: ast free status
548  */
549 typedef void (*txrx_ast_free_cb)(struct cdp_ctrl_objmgr_psoc *ctrl_soc,
550 				 struct cdp_soc *cdp_soc,
551 				 void *cookie,
552 				 enum cdp_ast_free_status);
553 
554 /**
555  *  struct cdp_ast_entry_info - AST entry information
556  *  @peer_mac_addr: mac address of peer on which AST entry is added
557  *  @type: ast entry type
558  *  @vdev_id: vdev_id
559  *  @pdev_id: pdev_id
560  *  @peer_id: peer_id
561  *
562  *  This structure holds the ast entry information
563  *
564  */
565 struct cdp_ast_entry_info {
566 	uint8_t peer_mac_addr[QDF_MAC_ADDR_SIZE];
567 	enum cdp_txrx_ast_entry_type type;
568 	uint8_t vdev_id;
569 	uint8_t pdev_id;
570 	uint16_t peer_id;
571 };
572 
573 #define MIC_SEQ_CTR_SIZE 6
574 
575 enum cdp_rx_frame_type {
576 	cdp_rx_frame_type_802_11,
577 	cdp_rx_frame_type_802_3,
578 };
579 
580 /**
581  *  struct cdp_rx_mic_err_info - rx mic error information
582  *  @frame_type: frame type - 0 - 802.11 frame
583  *                          - 1 - 802.3 frame
584  *  @data: 802.11 frame
585  *  @ta_mac_addr: transmitter mac address
586  *  @da_mac_addr: destination mac address
587  *  @tsc: sequence number
588  *  @key_id: Key ID
589  *  @multicast: flag for multicast
590  *  @vdev_id: vdev ID
591  *
592  *  This structure holds rx mic error information
593  *
594  */
595 struct cdp_rx_mic_err_info {
596 	uint8_t frame_type;
597 	uint8_t *data;
598 	struct qdf_mac_addr ta_mac_addr;
599 	struct qdf_mac_addr da_mac_addr;
600 	uint8_t tsc[MIC_SEQ_CTR_SIZE];
601 	uint8_t key_id;
602 	bool multicast;
603 	uint16_t vdev_id;
604 };
605 
606 #ifdef WLAN_SUPPORT_MSCS
607 /**
608  * struct cdp_mscs_params - MSCS parameters obtained
609  * from handshake
610  * @user_pri_bitmap: User priority bitmap
611  * @user_pri_limit: User priority limit
612  * @classifier_type: TCLAS Classifier type
613  * @classifier_mask: TCLAS Classifier mask
614  */
615 struct cdp_mscs_params {
616 	uint8_t user_pri_bitmap;
617 	uint8_t user_pri_limit;
618 	uint8_t classifier_type;
619 	uint8_t classifier_mask;
620 };
621 #endif
622 
623 /**
624  * enum cdp_sec_type - security type information
625  * @cdp_sec_type_none:
626  * @cdp_sec_type_wep128:
627  * @cdp_sec_type_wep104:
628  * @cdp_sec_type_wep40:
629  * @cdp_sec_type_tkip:
630  * @cdp_sec_type_tkip_nomic:
631  * @cdp_sec_type_aes_ccmp:
632  * @cdp_sec_type_wapi:
633  * @cdp_sec_type_aes_ccmp_256:
634  * @cdp_sec_type_aes_gcmp:
635  * @cdp_sec_type_aes_gcmp_256:
636  * @cdp_num_sec_types:
637  */
638 enum cdp_sec_type {
639     cdp_sec_type_none,
640     cdp_sec_type_wep128,
641     cdp_sec_type_wep104,
642     cdp_sec_type_wep40,
643     cdp_sec_type_tkip,
644     cdp_sec_type_tkip_nomic,
645     cdp_sec_type_aes_ccmp,
646     cdp_sec_type_wapi,
647     cdp_sec_type_aes_ccmp_256,
648     cdp_sec_type_aes_gcmp,
649     cdp_sec_type_aes_gcmp_256,
650 
651     /* keep this last! */
652     cdp_num_sec_types
653 };
654 
655 /**
656  * struct cdp_tx_exception_metadata - Exception path parameters
657  * @peer_id: Peer id of the peer
658  * @tid: Transmit Identifier
659  * @tx_encap_type: Transmit encap type (i.e. Raw, Native Wi-Fi, Ethernet)
660  * @sec_type: sec_type to be passed to HAL
661  * @is_tx_sniffer: Indicates if the packet has to be sniffed
662  * @is_intrabss_fwd:
663  * @ppdu_cookie: 16-bit ppdu cookie that has to be replayed back in completions
664  * @is_wds_extended:
665  *
666  * This structure holds the parameters needed in the exception path of tx
667  *
668  */
669 struct cdp_tx_exception_metadata {
670 	uint16_t peer_id;
671 	uint8_t tid;
672 	uint16_t tx_encap_type;
673 	enum cdp_sec_type sec_type;
674 	uint8_t is_tx_sniffer :1,
675 		is_intrabss_fwd :1;
676 	uint16_t ppdu_cookie;
677 #ifdef QCA_SUPPORT_WDS_EXTENDED
678 	uint8_t is_wds_extended;
679 #endif
680 };
681 
682 /**
683  * enum wlan_op_mode - Virtual device operation mode
684  * @wlan_op_mode_unknown: Unknown mode
685  * @wlan_op_mode_ap: AP mode
686  * @wlan_op_mode_ibss: IBSS mode
687  * @wlan_op_mode_sta: STA (client) mode
688  * @wlan_op_mode_monitor: Monitor mode
689  * @wlan_op_mode_ocb: OCB mode
690  * @wlan_op_mode_ndi: NDI mode
691  */
692 enum wlan_op_mode {
693 	wlan_op_mode_unknown,
694 	wlan_op_mode_ap,
695 	wlan_op_mode_ibss,
696 	wlan_op_mode_sta,
697 	wlan_op_mode_monitor,
698 	wlan_op_mode_ocb,
699 	wlan_op_mode_ndi,
700 };
701 
702 /**
703  * enum wlan_op_subtype - Virtual device subtype
704  * @wlan_op_subtype_none: Subtype not applicable
705  * @wlan_op_subtype_p2p_device: P2P device
706  * @wlan_op_subtype_p2p_cli: P2P Client
707  * @wlan_op_subtype_p2p_go: P2P GO
708  *
709  * This enum lists the subtypes of a particular virtual
710  * device.
711  */
712 enum wlan_op_subtype {
713 	wlan_op_subtype_none,
714 	wlan_op_subtype_p2p_device,
715 	wlan_op_subtype_p2p_cli,
716 	wlan_op_subtype_p2p_go,
717 };
718 
719 /**
720  * struct cdp_vdev_info - Vdev information
721  * @vdev_mac_addr: mac address of the vdev
722  * @vdev_id: ID of the vdev
723  * @vdev_stats_id: Stats ID of the vdev
724  * @op_mode: Operation mode of the vdev
725  * @subtype: subtype of the vdev
726  * @mld_mac_addr: MLD mac addr of the current vdev.
727  */
728 struct cdp_vdev_info {
729 	uint8_t *vdev_mac_addr;
730 	uint8_t vdev_id;
731 	uint8_t vdev_stats_id;
732 	enum wlan_op_mode op_mode;
733 	enum wlan_op_subtype subtype;
734 #ifdef WLAN_FEATURE_11BE_MLO
735 	uint8_t *mld_mac_addr;
736 #endif
737 };
738 
739 typedef struct cdp_soc_t *ol_txrx_soc_handle;
740 
741 /**
742  * typedef ol_txrx_vdev_delete_cb ()- callback registered during vdev detach
743  * @context:
744  */
745 typedef void (*ol_txrx_vdev_delete_cb)(void *context);
746 
747 /**
748  * typedef ol_txrx_peer_unmap_sync_cb() - callback registered during peer
749  *                                        detach sync
750  * @vdev_id:
751  * @peer_id_cnt:
752  * @peer_id_list:
753  */
754 typedef QDF_STATUS(*ol_txrx_peer_unmap_sync_cb)(uint8_t vdev_id,
755 						 uint32_t peer_id_cnt,
756 						 uint16_t *peer_id_list);
757 
758 /**
759  * enum txrx_direction - Packet Direction
760  * @rx_direction: rx path packet
761  * @tx_direction: tx path packet
762  */
763 enum txrx_direction {
764 	rx_direction = 1,
765 	tx_direction = 0,
766 };
767 
768 /**
769  * enum cdp_capabilities- DP capabilities
770  * @CDP_CFG_DP_TSO: TSO capability
771  * @CDP_CFG_DP_LRO: LRO capability
772  * @CDP_CFG_DP_SG: Scatter Gather capability
773  * @CDP_CFG_DP_GRO: GRO capability
774  * @CDP_CFG_DP_OL_TX_CSUM: Hardware based TX checksum capability
775  * @CDP_CFG_DP_OL_RX_CSUM: Hardware based RX checksum capability
776  * @CDP_CFG_DP_RAWMODE: RAW mode capability
777  * @CDP_CFG_DP_PEER_FLOW_CTRL: Peer flow-control capability
778  * @CDP_CFG_DP_MARK_NOTIFY_FRAME_SUPPORT: mark notify frames capability
779  */
780 enum cdp_capabilities {
781 	CDP_CFG_DP_TSO,
782 	CDP_CFG_DP_LRO,
783 	CDP_CFG_DP_SG,
784 	CDP_CFG_DP_GRO,
785 	CDP_CFG_DP_OL_TX_CSUM,
786 	CDP_CFG_DP_OL_RX_CSUM,
787 	CDP_CFG_DP_RAWMODE,
788 	CDP_CFG_DP_PEER_FLOW_CTRL,
789 	CDP_CFG_DP_MARK_NOTIFY_FRAME_SUPPORT,
790 };
791 
792 /**
793  * struct ol_txrx_nbuf_classify - Packet classification object
794  * @peer_id: unique peer identifier from fw
795  * @tid: traffic identifier(could be overridden)
796  * @pkt_tid: traffic identifier(cannot be overridden)
797  * @pkt_tos: ip header tos value
798  * @pkt_dscp: ip header dscp value
799  * @tos: index value in map
800  * @dscp: DSCP_TID map index
801  * @is_mcast: multicast pkt check
802  * @is_eap: eapol pkt check
803  * @is_arp: arp pkt check
804  * @is_tcp: tcp pkt check
805  * @is_dhcp: dhcp pkt check
806  * @is_igmp: igmp pkt check
807  * @is_ipv4: ip version 4 pkt check
808  * @is_ipv6: ip version 6 pkt check
809  */
810 struct ol_txrx_nbuf_classify {
811 	uint16_t peer_id;
812 	uint8_t tid;
813 	uint8_t pkt_tid;
814 	uint8_t pkt_tos;
815 	uint8_t pkt_dscp;
816 	uint8_t tos;
817 	uint8_t dscp;
818 	uint8_t is_mcast;
819 	uint8_t is_eap;
820 	uint8_t is_arp;
821 	uint8_t is_tcp;
822 	uint8_t is_dhcp;
823 	uint8_t is_igmp;
824 	uint8_t is_ipv4;
825 	uint8_t is_ipv6;
826 };
827 
828 /*
829  * typedef ol_osif_vdev_handle - opaque handle for OS shim virtual
830  *                               device object
831  */
832 struct ol_osif_vdev_t;
833 typedef struct ol_osif_vdev_t *ol_osif_vdev_handle;
834 
835 #ifdef QCA_SUPPORT_WDS_EXTENDED
836 struct ol_osif_peer_t;
837 typedef struct ol_osif_peer_t *ol_osif_peer_handle;
838 #endif
839 
840 /**
841  * enum connectivity_stats_pkt_status - data pkt type
842  * @PKT_TYPE_REQ: Request packet
843  * @PKT_TYPE_RSP: Response packet
844  * @PKT_TYPE_TX_DROPPED: TX packet dropped
845  * @PKT_TYPE_RX_DROPPED: RX packet dropped
846  * @PKT_TYPE_RX_DELIVERED: RX packet delivered
847  * @PKT_TYPE_RX_REFUSED: RX packet refused
848  * @PKT_TYPE_TX_HOST_FW_SENT: TX packet FW sent
849  * @PKT_TYPE_TX_ACK_CNT:TC packet acked
850  * @PKT_TYPE_NONE: Invalid packet
851  */
852 enum connectivity_stats_pkt_status {
853 	PKT_TYPE_REQ,
854 	PKT_TYPE_RSP,
855 	PKT_TYPE_TX_DROPPED,
856 	PKT_TYPE_RX_DROPPED,
857 	PKT_TYPE_RX_DELIVERED,
858 	PKT_TYPE_RX_REFUSED,
859 	PKT_TYPE_TX_HOST_FW_SENT,
860 	PKT_TYPE_TX_ACK_CNT,
861 	PKT_TYPE_NONE,
862 };
863 
864 /**
865  * typedef ol_txrx_mgmt_tx_cb() - tx management delivery notification
866  * callback function
867  * @ctxt:
868  * @tx_mgmt_frm:
869  * @had_error:
870  */
871 typedef void
872 (*ol_txrx_mgmt_tx_cb)(void *ctxt, qdf_nbuf_t tx_mgmt_frm, int had_error);
873 
874 /**
875  * typedef ol_txrx_data_tx_cb() - Function registered with the data path
876  * that is called when tx frames marked as "no free" are
877  * done being transmitted
878  * @ctxt:
879  * @tx_frm:
880  * @had_error:
881  */
882 typedef void
883 (*ol_txrx_data_tx_cb)(void *ctxt, qdf_nbuf_t tx_frm, int had_error);
884 
885 /**
886  * typedef ol_txrx_tx_fp() - top-level transmit function
887  * @soc: dp soc handle
888  * @vdev_id: handle to the virtual device object
889  * @msdu_list: list of network buffers
890  */
891 typedef qdf_nbuf_t (*ol_txrx_tx_fp)(struct cdp_soc_t *soc, uint8_t vdev_id,
892 				    qdf_nbuf_t msdu_list);
893 
894 /**
895  * typedef ol_txrx_tx_fast_fp() - top-level fast transmit function
896  * @soc: dp soc handle
897  * @vdev_id: handle to the virtual device object
898  * @msdu_list: list of network buffers
899  */
900 typedef qdf_nbuf_t (*ol_txrx_tx_fast_fp)(struct cdp_soc_t *soc, uint8_t vdev_id,
901 					 qdf_nbuf_t msdu_list);
902 
903 /**
904  * typedef ol_txrx_tx_exc_fp() - top-level transmit function on exception path
905  * @soc: dp soc handle
906  * @vdev_id: handle to the virtual device object
907  * @msdu_list: list of network buffers
908  * @tx_exc_metadata: structure that holds parameters to exception path
909  */
910 typedef qdf_nbuf_t (*ol_txrx_tx_exc_fp)(struct cdp_soc_t *soc, uint8_t vdev_id,
911 					qdf_nbuf_t msdu_list,
912 					struct cdp_tx_exception_metadata
913 						*tx_exc_metadata);
914 
915 /**
916  * typedef ol_txrx_completion_fp() - top-level transmit function
917  *                                   for tx completion
918  * @skb: skb data
919  * @osif_dev: the virtual device's OS shim object
920  * @flag: flag
921  */
922 typedef void (*ol_txrx_completion_fp)(qdf_nbuf_t skb,
923 				      void *osif_dev, uint16_t flag);
924 
925 /**
926  * typedef ol_txrx_classify_critical_pkt_fp() - classification cb for critical
927  *                                              frames
928  * @osif_dev: the virtual device's OS shim object
929  * @skb: skb data
930  */
931 typedef void (*ol_txrx_classify_critical_pkt_fp)(void *osif_dev,
932 						 qdf_nbuf_t skb);
933 /**
934  * typedef ol_txrx_tx_flow_control_fp() - tx flow control notification
935  *                                        function from txrx to OS shim
936  * @osif_dev: the virtual device's OS shim object
937  * @tx_resume: tx os q should be resumed or not
938  */
939 typedef void (*ol_txrx_tx_flow_control_fp)(void *osif_dev,
940 					    bool tx_resume);
941 
942 /**
943  * typedef ol_txrx_tx_flow_control_is_pause_fp() - is tx paused by flow control
944  *                                                 function from txrx to OS shim
945  * @osif_dev: the virtual device's OS shim object
946  *
947  * Return: true if tx is paused by flow control
948  */
949 typedef bool (*ol_txrx_tx_flow_control_is_pause_fp)(void *osif_dev);
950 
951 /**
952  * typedef ol_txrx_rx_fp() - receive function to hand batches of data
953  *                           frames from txrx to OS shim
954  * @osif_dev: handle to the OSIF virtual device object
955  * @msdu_list: list of network buffers
956  */
957 typedef QDF_STATUS(*ol_txrx_rx_fp)(void *osif_dev, qdf_nbuf_t msdu_list);
958 
959 typedef QDF_STATUS(*ol_txrx_fisa_rx_fp)(void *soc,
960 					void *dp_vdev,
961 					qdf_nbuf_t msdu_list);
962 
963 typedef QDF_STATUS(*ol_txrx_fisa_flush_fp)(void *soc, int ring_num);
964 
965 /**
966  * typedef ol_txrx_rx_flush_fp() - receive function to hand batches of
967  *                                 data frames from txrx to OS shim
968  * @osif_dev: handle to the OSIF virtual device object
969  * @vdev_id: vdev_if of the packets to be flushed
970  */
971 typedef QDF_STATUS(*ol_txrx_rx_flush_fp)(void *osif_dev, uint8_t vdev_id);
972 
973 /**
974  * typedef ol_txrx_rx_gro_flush_ind_fp() - function to send GRO flush
975  *                                         indication to stack for a given
976  *                                         RX Context Id.
977  * @osif_dev: handle to the OSIF virtual device object
978  * @rx_ctx_id: Rx context Id for which gro flush should happen
979  */
980 typedef QDF_STATUS(*ol_txrx_rx_gro_flush_ind_fp)(void *osif_dev,
981 						 int rx_ctx_id);
982 
983 /**
984  * typedef ol_txrx_stats_rx_fp() - receive function to hand batches of
985  *                                 data frames from txrx to OS shim
986  * @skb: skb data
987  * @osif_dev: the virtual device's OS shim object
988  * @action: data packet type
989  * @pkt_type: packet data type
990  */
991 typedef void (*ol_txrx_stats_rx_fp)(struct sk_buff *skb,
992 		void *osif_dev, enum connectivity_stats_pkt_status action,
993 		uint8_t *pkt_type);
994 
995 /**
996  * typedef ol_txrx_get_key_fp() - function to gey key based on keyix
997  *                                and peer mac address
998  * @osif_dev: the virtual device's OS shim object
999  * @key_buf: pointer to store key
1000  * @mac_addr: pointer to mac address
1001  * @keyix: key id
1002  */
1003 typedef QDF_STATUS(*ol_txrx_get_key_fp)(void *osif_dev, uint8_t *key_buf,
1004 					uint8_t *mac_addr, uint8_t keyix);
1005 
1006 /**
1007  * typedef ol_txrx_rsim_rx_decap_fp() - raw mode simulation function
1008  *                                      to decap the packets in
1009  *                                      receive path.
1010  * @osif_dev: the virtual device's OS shim object
1011  * @list_head: pointer to head of receive packet queue to decap
1012  * @list_tail: pointer to tail of receive packet queue to decap
1013  * @peer_mac: mac address of peer handler
1014  */
1015 typedef QDF_STATUS(*ol_txrx_rsim_rx_decap_fp)(void *osif_dev,
1016 					      qdf_nbuf_t *list_head,
1017 					      qdf_nbuf_t *list_tail);
1018 
1019 /**
1020  * typedef ol_txrx_tx_free_ext_fp() - external tx free function to
1021  *                                    read per packet stats and free
1022  *                                    tx buffer externally
1023  * @netbuf: tx network buffer
1024  */
1025 typedef void (*ol_txrx_tx_free_ext_fp)(qdf_nbuf_t netbuf);
1026 
1027 /**
1028  * typedef ol_txrx_rx_check_wai_fp() - OSIF WAPI receive function
1029  * @vdev:
1030  * @mpdu_head:
1031  * @mpdu_tail:
1032  */
1033 typedef bool (*ol_txrx_rx_check_wai_fp)(ol_osif_vdev_handle vdev,
1034 					qdf_nbuf_t mpdu_head,
1035 					qdf_nbuf_t mpdu_tail);
1036 /**
1037  * typedef ol_txrx_rx_mon_fp() - OSIF monitor mode receive function for single
1038  *                               MPDU (802.11 format)
1039  * @vdev:
1040  * @mpdu:
1041  * @rx_status:
1042  */
1043 typedef void (*ol_txrx_rx_mon_fp)(ol_osif_vdev_handle vdev,
1044 				  qdf_nbuf_t mpdu,
1045 				  void *rx_status);
1046 
1047 /**
1048  * typedef ol_txrx_proxy_arp_fp() - proxy arp function pointer
1049  * @vdev:
1050  * @netbuf:
1051  */
1052 typedef int (*ol_txrx_proxy_arp_fp)(ol_osif_vdev_handle vdev,
1053 				    qdf_nbuf_t netbuf);
1054 
1055 /**
1056  * typedef ol_txrx_mcast_me_fp() - function pointer for multicast enhancement
1057  * @vdev:
1058  * @netbuf:
1059  */
1060 typedef int (*ol_txrx_mcast_me_fp)(ol_osif_vdev_handle vdev,
1061 				   qdf_nbuf_t netbuf);
1062 
1063 /**
1064  * typedef ol_txrx_stats_callback() - statistics notify callback
1065  * @ctxt:
1066  * @type:
1067  * @buf:
1068  * @bytes:
1069  */
1070 typedef void (*ol_txrx_stats_callback)(void *ctxt,
1071 				       enum htt_cmn_dbg_stats_type type,
1072 				       uint8_t *buf, int bytes);
1073 
1074 /**
1075  * typedef ol_txrx_pktdump_cb() - callback for packet dump feature
1076  * @soc:
1077  * @pdev_id:
1078  * @vdev_id:
1079  * @netbuf:
1080  * @status:
1081  * @type:
1082  */
1083 typedef void (*ol_txrx_pktdump_cb)(ol_txrx_soc_handle soc,
1084 				   uint8_t pdev_id,
1085 				   uint8_t vdev_id,
1086 				   qdf_nbuf_t netbuf,
1087 				   enum qdf_dp_tx_rx_status status,
1088 				   enum qdf_pkt_type type);
1089 
1090 /**
1091  * typedef ol_txrx_get_tsf_time() - callback to get tsf time
1092  * @osif_dev:
1093  * @input_time:
1094  * @tsf_time:
1095  */
1096 typedef QDF_STATUS(*ol_txrx_get_tsf_time)(void *osif_dev, uint64_t input_time,
1097 					  uint64_t *tsf_time);
1098 
1099 /**
1100  * struct ol_txrx_ops - (pointers to) the functions used for tx and rx
1101  * data xfer
1102  *
1103  * There are two portions of these txrx operations.
1104  * The rx portion is filled in by OSIF SW before calling
1105  * ol_txrx_osif_vdev_register; inside the ol_txrx_osif_vdev_register
1106  * the txrx SW stores a copy of these rx function pointers, to use
1107  * as it delivers rx data frames to the OSIF SW.
1108  * The tx portion is filled in by the txrx SW inside
1109  * ol_txrx_osif_vdev_register; when the function call returns,
1110  * the OSIF SW stores a copy of these tx functions to use as it
1111  * delivers tx data frames to the txrx SW.
1112  *
1113  * @tx: tx function pointers - specified by txrx, stored by OS shim
1114  * @tx.std:  the tx function pointer for standard data
1115  * frames This function pointer is set by the txrx SW
1116  * perform host-side transmit operations based on
1117  * whether a HL or LL host/target interface is in use.
1118  * @tx.flow_control_cb: the transmit flow control
1119  * function that is registered by the
1120  * OSIF which is called from txrx to
1121  * indicate whether the transmit OS
1122  * queues should be paused/resumed
1123  * @rx: rx function pointers - specified by OS shim, stored by txrx
1124  * @rx.rx: the OS shim rx function to deliver rx data
1125  * frames to. This can have different values for
1126  * different virtual devices, e.g. so one virtual
1127  * device's OS shim directly hands rx frames to the OS,
1128  * but another virtual device's OS shim filters out P2P
1129  * messages before sending the rx frames to the OS. The
1130  * netbufs delivered to the osif_rx function are in the
1131  * format specified by the OS to use for tx and rx
1132  * frames (either 802.3 or native WiFi). In case RX Threads are enabled, pkts
1133  * are given to the thread, instead of the stack via this pointer.
1134  * @rx.rx_eapol: This rx function pointer used to receive only eapol frames
1135  * @rx.stack: function to give packets to the stack. Differs from @rx.rx.
1136  * In case RX Threads are enabled, this pointer holds the callback to give
1137  * packets to the stack.
1138  * @rx.rx_gro_flush: GRO flush indication to stack for a given RX CTX ID
1139  * @rx.wai_check: the tx function pointer for WAPI frames
1140  * @rx.mon: the OS shim rx monitor function to deliver
1141  * monitor data to Though in practice, it is probable
1142  * that the same function will be used for delivering
1143  * rx monitor data for all virtual devices, in theory
1144  * each different virtual device can have a different
1145  * OS shim function for accepting rx monitor data. The
1146  * netbufs delivered to the osif_rx_mon function are in
1147  * 802.11 format.  Each netbuf holds a 802.11 MPDU, not
1148  * an 802.11 MSDU. Depending on compile-time
1149  * configuration, each netbuf may also have a
1150  * monitor-mode encapsulation header such as a radiotap
1151  * header added before the MPDU contents.
1152  * @rx.std: the OS shim rx function to deliver rx data
1153  * @proxy_arp: proxy arp function pointer - specified by
1154  * OS shim, stored by txrx
1155  * @me_convert:
1156  * @get_key: function pointer to get key of the peer with
1157  * specific key index
1158  * @get_tsf_time: function pointer to get TSF
1159  */
1160 struct ol_txrx_ops {
1161 	struct {
1162 		ol_txrx_tx_fp         tx;
1163 		ol_txrx_tx_fast_fp    tx_fast;
1164 		ol_txrx_tx_exc_fp     tx_exception;
1165 		ol_txrx_tx_free_ext_fp tx_free_ext;
1166 		ol_txrx_completion_fp tx_comp;
1167 		ol_txrx_classify_critical_pkt_fp tx_classify_critical_pkt_cb;
1168 	} tx;
1169 
1170 	struct {
1171 		ol_txrx_rx_fp           rx;
1172 #ifdef QCA_SUPPORT_EAPOL_OVER_CONTROL_PORT
1173 		ol_txrx_rx_fp     rx_eapol;
1174 #endif
1175 		ol_txrx_rx_fp           rx_stack;
1176 		ol_txrx_rx_flush_fp     rx_flush;
1177 		ol_txrx_rx_gro_flush_ind_fp           rx_gro_flush;
1178 		ol_txrx_rx_check_wai_fp wai_check;
1179 		ol_txrx_rx_mon_fp       mon;
1180 		ol_txrx_stats_rx_fp           stats_rx;
1181 		ol_txrx_rsim_rx_decap_fp rsim_rx_decap;
1182 		ol_txrx_fisa_rx_fp	osif_fisa_rx;
1183 		ol_txrx_fisa_flush_fp   osif_fisa_flush;
1184 	} rx;
1185 	/* proxy arp function pointer - specified by OS shim, stored by txrx */
1186 	ol_txrx_proxy_arp_fp      proxy_arp;
1187 	ol_txrx_mcast_me_fp          me_convert;
1188 
1189 	ol_txrx_get_key_fp  get_key;
1190 	ol_txrx_get_tsf_time get_tsf_time;
1191 };
1192 
1193 /**
1194  * struct ol_txrx_hardtart_ctxt - handlers for dp tx path
1195  * @tx: normal tx function
1196  * @tx_fast: fast tx function
1197  * @tx_exception: exception tx function
1198  */
1199 struct ol_txrx_hardtart_ctxt {
1200 	ol_txrx_tx_fp         tx;
1201 	ol_txrx_tx_fast_fp    tx_fast;
1202 	ol_txrx_tx_exc_fp     tx_exception;
1203 };
1204 
1205 /**
1206  * struct ol_txrx_stats_req - specifications of the requested
1207  *                            statistics
1208  * @stats_type_upload_mask: which stats to upload
1209  * @stats_type_reset_mask: which stats to reset
1210  * @print: control to print uploaded stats. stats will be printed if
1211  *         either print element is set
1212  * @print.verbose: verbose stats printout
1213  * @print.concise: concise stats printout (takes precedence)
1214  * @callback: callback context
1215  * @callback.fp: function pointer to call. stats notify callback will
1216  *               be invoked if fp is non-NULL
1217  * @callback.ctxt: opaque context to pass to callback function
1218  * @copy: copy context
1219  * @copy.buf: stats will be copied into the specified buffer if buf is
1220  *            non-NULL
1221  * @byte_limit: don't copy more than this
1222  * @wait: wait context
1223  * @wait.blocking: If true, the caller will take the specified
1224  *                 semaphore to wait for the stats to be uploaded, and
1225  *                 the driver will release the semaphore when the
1226  *                 stats are done being uploaded.
1227  * @wait.sem_ptr: Semaphore to use for blocking
1228  */
1229 struct ol_txrx_stats_req {
1230 	uint32_t stats_type_upload_mask;
1231 	uint32_t stats_type_reset_mask;
1232 
1233 	struct {
1234 		int verbose;
1235 		int concise;
1236 	} print;
1237 
1238 	struct {
1239 		ol_txrx_stats_callback fp;
1240 		void *ctxt;
1241 	} callback;
1242 
1243 	struct {
1244 		uint8_t *buf;
1245 		int byte_limit;
1246 	} copy;
1247 
1248 	struct {
1249 		int blocking;
1250 		qdf_semaphore_t *sem_ptr;
1251 	} wait;
1252 };
1253 
1254 
1255 /* DP soc struct definition */
1256 struct cdp_soc_t {
1257 	struct cdp_ops *ops;
1258 	struct ol_if_ops *ol_ops;
1259 };
1260 
1261 /**
1262  * enum cdp_peer_param_type - different types of parameters
1263  *			      to set values in peer
1264  * @CDP_CONFIG_NAWDS: Enable nawds mode
1265  * @CDP_CONFIG_NAC: Enable nac
1266  * @CDP_CONFIG_ISOLATION: Enable isolation
1267  * @CDP_CONFIG_IN_TWT: In TWT session or not
1268  */
1269 enum cdp_peer_param_type {
1270 	CDP_CONFIG_NAWDS,
1271 	CDP_CONFIG_NAC,
1272 	CDP_CONFIG_ISOLATION,
1273 	CDP_CONFIG_IN_TWT,
1274 };
1275 
1276 /**
1277  * enum cdp_pdev_param_type - different types of parameters
1278  *			      to set values in pdev
1279  * @CDP_CONFIG_DEBUG_SNIFFER: Enable debug sniffer feature
1280  * @CDP_CONFIG_BPR_ENABLE: Enable bcast probe feature
1281  * @CDP_CONFIG_PRIMARY_RADIO: Configure radio as primary
1282  * @CDP_CONFIG_ENABLE_PERPKT_TXSTATS: Enable per packet statistics
1283  * @CDP_CONFIG_IGMPMLD_OVERRIDE: Override IGMP/MLD
1284  * @CDP_CONFIG_IGMPMLD_TID: Configurable TID value when igmmld_override is set
1285  * @CDP_CONFIG_ARP_DBG_CONF: Enable ARP debug
1286  * @CDP_CONFIG_CAPTURE_LATENCY: Capture time latency
1287  * @CDP_INGRESS_STATS: Accumulate ingress statistics
1288  * @CDP_OSIF_DROP: Accumulate drops in OSIF layer
1289  * @CDP_CONFIG_ENH_RX_CAPTURE: Enable enhanced RX capture
1290  * @CDP_CONFIG_ENH_TX_CAPTURE: Enable enhanced TX capture
1291  * @CDP_CONFIG_HMMC_TID_OVERRIDE: Enable hmmc tid override
1292  * @CDP_CONFIG_HMMC_TID_VALUE: set hmmc tid value
1293  * @CDP_CONFIG_TX_CAPTURE: set tx capture
1294  * @CDP_CHAN_NOISE_FLOOR: set channel noise floor
1295  * @CDP_CONFIG_VOW: set/get vow config
1296  * @CDP_TIDQ_OVERRIDE: set/get tid queue override
1297  * @CDP_TIDMAP_PRTY: set/get tid map prty
1298  * @CDP_TX_PENDING: get tx pending
1299  * @CDP_FILTER_NEIGH_PEERS: filter neighbour peers
1300  * @CDP_FILTER_UCAST_DATA: filter unicast data
1301  * @CDP_FILTER_MCAST_DATA: filter multicast data
1302  * @CDP_FILTER_NO_DATA: filter no data
1303  * @CDP_MONITOR_CHANNEL: monitor channel
1304  * @CDP_MONITOR_FREQUENCY: monitor frequency
1305  * @CDP_CONFIG_BSS_COLOR: configure bss color
1306  * @CDP_SET_ATF_STATS_ENABLE: set ATF stats flag
1307  * @CDP_CONFIG_SPECIAL_VAP: Configure Special vap
1308  * @CDP_RESET_SCAN_SPCL_VAP_STATS_ENABLE: Enable scan spcl vap stats reset
1309  * @CDP_CONFIG_ENHANCED_STATS_ENABLE:
1310  * @CDP_ISOLATION: set isolation flag
1311  * @CDP_CONFIG_UNDECODED_METADATA_CAPTURE_ENABLE: Undecoded metadata capture
1312  */
1313 enum cdp_pdev_param_type {
1314 	CDP_CONFIG_DEBUG_SNIFFER,
1315 	CDP_CONFIG_BPR_ENABLE,
1316 	CDP_CONFIG_PRIMARY_RADIO,
1317 	CDP_CONFIG_ENABLE_PERPKT_TXSTATS,
1318 	CDP_CONFIG_IGMPMLD_OVERRIDE,
1319 	CDP_CONFIG_IGMPMLD_TID,
1320 	CDP_CONFIG_ARP_DBG_CONF,
1321 	CDP_CONFIG_CAPTURE_LATENCY,
1322 	CDP_INGRESS_STATS,
1323 	CDP_OSIF_DROP,
1324 	CDP_CONFIG_ENH_RX_CAPTURE,
1325 	CDP_CONFIG_ENH_TX_CAPTURE,
1326 	CDP_CONFIG_HMMC_TID_OVERRIDE,
1327 	CDP_CONFIG_HMMC_TID_VALUE,
1328 	CDP_CONFIG_TX_CAPTURE,
1329 	CDP_CHAN_NOISE_FLOOR,
1330 	CDP_CONFIG_VOW,
1331 	CDP_TIDQ_OVERRIDE,
1332 	CDP_TIDMAP_PRTY,
1333 	CDP_TX_PENDING,
1334 	CDP_FILTER_NEIGH_PEERS,
1335 	CDP_FILTER_UCAST_DATA,
1336 	CDP_FILTER_MCAST_DATA,
1337 	CDP_FILTER_NO_DATA,
1338 	CDP_MONITOR_CHANNEL,
1339 	CDP_MONITOR_FREQUENCY,
1340 	CDP_CONFIG_BSS_COLOR,
1341 	CDP_SET_ATF_STATS_ENABLE,
1342 	CDP_CONFIG_SPECIAL_VAP,
1343 	CDP_RESET_SCAN_SPCL_VAP_STATS_ENABLE,
1344 	CDP_CONFIG_ENHANCED_STATS_ENABLE,
1345 	CDP_ISOLATION,
1346 	CDP_CONFIG_UNDECODED_METADATA_CAPTURE_ENABLE,
1347 };
1348 
1349 /**
1350  * typedef cdp_config_param_type - union of different types of parameters
1351  *			to set values into dp handles.
1352  *
1353  * @cdp_peer_param_nawds: Enable nawds mode
1354  * @cdp_peer_param_isolation: Enable isolation
1355  * @cdp_peer_param_in_twt: in TWT session or not
1356  * @cdp_peer_param_nac: Enable nac
1357  *
1358  * @cdp_vdev_param_nawds: set nawds enable/disable
1359  * @cdp_vdev_param_mcast_en: enable/disable multicast enhancement
1360  * @cdp_vdev_param_wds: wds sta
1361  * @cdp_vdev_param_mec: MEC enable flags
1362  * @cdp_vdev_param_proxysta: proxy sta
1363  * @cdp_vdev_param_tdls_flags: tdls link flags
1364  * @cdp_vdev_param_ap_brdg_en: set ap_bridging enable/disable
1365  * @cdp_vdev_param_cipher_en: set cipher type based on security
1366  * @cdp_vdev_param_qwrap_isolation: qwrap isolation mode
1367  * @cdp_vdev_param_tx_encap: tx encap type
1368  * @cdp_vdev_param_rx_decap: rx decap type
1369  * @cdp_vdev_param_mesh_rx_filter: set mesh rx filter
1370  * @cdp_vdev_param_tidmap_prty: set tid vdev prty
1371  * @cdp_vdev_param_tidmap_tbl_id: set tidmap table id
1372  * @cdp_vdev_param_mesh_mode: set mesh mode
1373  * @cdp_vdev_param_safe_mode: set safe mode
1374  * @cdp_vdev_param_drop_unenc: set drop unencrypted flag
1375  * @cdp_vdev_param_hlos_tid_override: set hlos tid override
1376  * @cdp_vdev_param_peer_authorize: set peer authorize
1377  * @cdp_vdev_param_peer_tid_latency_enable: set peer tid latency enable flag
1378  * @cdp_vdev_param_mesh_tid: config tatency tid on vdev
1379  * @cdp_vdev_param_dscp_tid_map_id: set dscp to tid map id
1380  * @cdp_vdev_param_mcast_vdev: set mcast vdev params
1381  * @cdp_vdev_param_wrap: qwrap ap vap
1382  *
1383  * @cdp_pdev_param_dbg_snf: Enable debug sniffer feature
1384  * @cdp_pdev_param_bpr_enable: Enable bcast probe feature
1385  * @cdp_pdev_param_primary_radio: Configure radio as primary
1386  * @cdp_pdev_param_en_perpkt_txstats: Enable per packet statistics
1387  * @cdp_pdev_param_igmpmld_override: Override IGMP/MLD
1388  * @cdp_pdev_param_igmpmld_tid: TID value when igmmld_override is set
1389  * @cdp_pdev_param_arp_dbg_conf: Enable ARP debug
1390  * @cdp_pdev_param_cptr_latcy: Capture time latency
1391  * @cdp_pdev_param_ingrs_stats: Accumulate ingress statistics
1392  * @cdp_pdev_param_osif_drop: Accumulate drops in OSIF layer
1393  * @cdp_pdev_param_en_rx_cap: Enable enhanced RX capture
1394  * @cdp_pdev_param_en_tx_cap: Enable enhanced TX capture
1395  * @cdp_pdev_param_hmmc_tid_ovrd: Enable hmmc tid override
1396  * @cdp_pdev_param_hmmc_tid: set hmmc tid value
1397  * @cdp_pdev_param_tx_capture: set tx capture
1398  * @cdp_pdev_param_chn_noise_flr: set channel noise floor
1399  * @cdp_pdev_param_cfg_vow: set/get vow config
1400  * @cdp_pdev_param_tidq_override: set/get tid queue override
1401  * @cdp_pdev_param_mon_freq: set monitor frequency
1402  * @cdp_pdev_param_bss_color: configure bss color
1403  * @cdp_pdev_param_tidmap_prty: set/get tid map prty
1404  * @cdp_pdev_param_tx_pending: get tx pending
1405  * @cdp_pdev_param_fltr_neigh_peers: filter neighbour peers
1406  * @cdp_pdev_param_fltr_ucast: filter unicast data
1407  * @cdp_pdev_param_fltr_mcast: filter multicast data
1408  * @cdp_pdev_param_fltr_none: filter no data
1409  * @cdp_pdev_param_monitor_chan: monitor channel
1410  * @cdp_pdev_param_atf_stats_enable: ATF stats enable
1411  * @cdp_pdev_param_config_special_vap: Configure Special vap
1412  * @cdp_pdev_param_isolation : set isolation mode
1413  *
1414  * @cdp_psoc_param_en_rate_stats: set rate stats enable/disable
1415  * @cdp_psoc_param_en_nss_cfg: set nss cfg
1416  * @cdp_psoc_param_ppeds_enabled: PPE-DS feature enable
1417  * @cdp_ipa_enabled : set ipa mode
1418  * @cdp_psoc_param_vdev_stats_hw_offload: Configure HW vdev stats offload
1419  * @cdp_pdev_param_undecoded_metadata_enable: Undecoded metadata capture enable
1420  * @cdp_sawf_enabled: SAWF enable/disable
1421  * @cdp_sawf_stats: SAWF stats config
1422  * @cdp_vdev_param_traffic_end_ind: Traffic end indication enable/disable
1423  * @cdp_skel_enable : Enable/Disable skeleton code for Umac reset debug
1424  * @cdp_drop_tx_mcast: Enable/Disable tx mcast drop
1425  * @cdp_vdev_tx_to_fw: Set to_fw bit for all tx packets for the vdev
1426  */
1427 typedef union cdp_config_param_t {
1428 	/* peer params */
1429 	bool cdp_peer_param_nawds;
1430 	bool cdp_peer_param_isolation;
1431 	uint8_t cdp_peer_param_nac;
1432 	bool cdp_peer_param_in_twt;
1433 
1434 	/* vdev params */
1435 	bool cdp_vdev_param_wds;
1436 	bool cdp_vdev_param_mec;
1437 	bool cdp_vdev_param_nawds;
1438 	bool cdp_vdev_param_proxysta;
1439 	bool cdp_vdev_param_tdls_flags;
1440 	bool cdp_vdev_param_ap_brdg_en;
1441 	bool cdp_vdev_param_qwrap_isolation;
1442 	bool cdp_vdev_param_update_multipass;
1443 	uint8_t cdp_vdev_param_da_war;
1444 	uint8_t cdp_vdev_param_mcast_en;
1445 	uint8_t cdp_vdev_param_igmp_mcast_en;
1446 	uint8_t cdp_vdev_param_tidmap_prty;
1447 	uint8_t cdp_vdev_param_tidmap_tbl_id;
1448 	uint32_t cdp_vdev_param_aging_tmr;
1449 	uint32_t cdp_vdev_param_cipher_en;
1450 	uint32_t cdp_vdev_param_tx_encap;
1451 	uint32_t cdp_vdev_param_rx_decap;
1452 	uint32_t cdp_vdev_param_mesh_rx_filter;
1453 	uint32_t cdp_vdev_param_mesh_mode;
1454 	uint32_t cdp_vdev_param_safe_mode;
1455 	uint32_t cdp_vdev_param_drop_unenc;
1456 	uint8_t cdp_vdev_param_hlos_tid_override;
1457 	bool cdp_vdev_param_wds_ext;
1458 	uint8_t cdp_vdev_param_peer_authorize;
1459 	uint8_t cdp_vdev_param_peer_tid_latency_enable;
1460 	uint8_t cdp_vdev_param_mesh_tid;
1461 	uint8_t cdp_vdev_param_dscp_tid_map_id;
1462 	bool cdp_vdev_param_mcast_vdev;
1463 	bool cdp_vdev_param_wrap;
1464 
1465 	/* pdev params */
1466 	bool cdp_pdev_param_cptr_latcy;
1467 	bool cdp_pdev_param_hmmc_tid_ovrd;
1468 	bool cdp_pdev_param_fltr_neigh_peers;
1469 	bool cdp_pdev_param_cfg_vow;
1470 	bool cdp_pdev_param_fltr_mcast;
1471 	bool cdp_pdev_param_fltr_none;
1472 	bool cdp_pdev_param_fltr_ucast;
1473 	uint8_t cdp_pdev_param_primary_radio;
1474 	uint8_t cdp_pdev_param_en_rx_cap;
1475 	uint8_t cdp_pdev_param_en_tx_cap;
1476 	uint8_t cdp_pdev_param_tx_capture;
1477 	uint8_t cdp_pdev_param_hmmc_tid;
1478 	uint8_t cdp_pdev_param_tidmap_prty;
1479 	uint8_t cdp_pdev_param_igmpmld_override;
1480 	uint8_t cdp_pdev_param_igmpmld_tid;
1481 	uint8_t cdp_pdev_param_arp_dbg_conf;
1482 	uint8_t cdp_pdev_param_tidq_override;
1483 	uint8_t cdp_pdev_param_bss_color;
1484 	uint16_t cdp_pdev_param_chn_noise_flr;
1485 	qdf_freq_t cdp_pdev_param_mon_freq;
1486 	int cdp_pdev_param_dbg_snf;
1487 	int cdp_pdev_param_bpr_enable;
1488 	int cdp_pdev_param_monitor_chan;
1489 	uint32_t cdp_pdev_param_ingrs_stats;
1490 	uint32_t cdp_pdev_param_osif_drop;
1491 	uint32_t cdp_pdev_param_en_perpkt_txstats;
1492 	uint32_t cdp_pdev_param_tx_pending;
1493 	bool cdp_pdev_param_atf_stats_enable;
1494 	bool cdp_pdev_param_config_special_vap;
1495 	bool cdp_pdev_param_reset_scan_spcl_vap_stats_enable;
1496 	bool cdp_pdev_param_enhanced_stats_enable;
1497 	bool cdp_pdev_param_isolation;
1498 
1499 	/* psoc params */
1500 	bool cdp_psoc_param_en_rate_stats;
1501 	int cdp_psoc_param_en_nss_cfg;
1502 	int cdp_psoc_param_preferred_hw_mode;
1503 	bool cdp_psoc_param_pext_stats;
1504 	bool cdp_psoc_param_ppeds_enabled;
1505 
1506 	bool cdp_skip_bar_update;
1507 	bool cdp_ipa_enabled;
1508 	bool cdp_psoc_param_vdev_stats_hw_offload;
1509 	bool cdp_pdev_param_undecoded_metadata_enable;
1510 	bool cdp_sawf_enabled;
1511 	uint8_t cdp_sawf_stats;
1512 	bool cdp_drop_3addr_mcast;
1513 	bool cdp_vdev_param_traffic_end_ind;
1514 	bool cdp_umac_rst_skel;
1515 	bool cdp_drop_tx_mcast;
1516 	bool cdp_vdev_tx_to_fw;
1517 } cdp_config_param_type;
1518 
1519 /**
1520  * enum cdp_rx_enh_capture_mode - Rx enhanced capture modes
1521  * @CDP_RX_ENH_CAPTURE_DISABLED: Disable Rx enhance capture
1522  * @CDP_RX_ENH_CAPTURE_MPDU: Enable capture of 128 bytes of each MPDU
1523  * @CDP_RX_ENH_CAPTURE_MPDU_MSDU: Enable capture of 128 bytes of each MSDU
1524  */
1525 enum cdp_rx_enh_capture_mode {
1526 	CDP_RX_ENH_CAPTURE_DISABLED = 0,
1527 	CDP_RX_ENH_CAPTURE_MPDU,
1528 	CDP_RX_ENH_CAPTURE_MPDU_MSDU,
1529 };
1530 
1531 /**
1532  * enum cdp_rx_enh_capture_peer - Rx enhanced capture peer filtering
1533  * @CDP_RX_ENH_CAPTURE_PEER_DISABLED: Disable Rx ENH capture peer filtering
1534  * @CDP_RX_ENH_CAPTURE_PEER_ENABLED: Enable Rx ENH capture peer filtering
1535  */
1536 enum cdp_rx_enh_capture_peer {
1537 	CDP_RX_ENH_CAPTURE_PEER_DISABLED = 0,
1538 	CDP_RX_ENH_CAPTURE_PEER_ENABLED,
1539 };
1540 
1541 /**
1542  * enum cdp_tx_enh_capture_mode - Tx enhanced capture modes
1543  * @CDP_TX_ENH_CAPTURE_DISABLED: Disable Tx enhance capture for all peers
1544  * @CDP_TX_ENH_CAPTURE_ENABLE_ALL_PEERS: Enable tx capture for all peers
1545  * @CDP_TX_ENH_CAPTURE_ENDIS_PER_PEER: Enable/disable per peer as necessary
1546  * @CDP_TX_ENH_CAPTURE_MAX: Max value
1547  */
1548 enum cdp_tx_enh_capture_mode {
1549 	CDP_TX_ENH_CAPTURE_DISABLED = 0,
1550 	CDP_TX_ENH_CAPTURE_ENABLE_ALL_PEERS,
1551 	CDP_TX_ENH_CAPTURE_ENDIS_PER_PEER,
1552 	CDP_TX_ENH_CAPTURE_MAX,
1553 };
1554 
1555 /**
1556  * enum cdp_pdev_bpr_param - different types of parameters
1557  *			     to set value in pdev
1558  * @CDP_BPR_DISABLE: Set bpr to disable state
1559  * @CDP_BPR_ENABLE: set bpr to enable state
1560  *
1561  * Enum indicating bpr state to enable/disable.
1562  */
1563 enum cdp_pdev_bpr_param {
1564 	CDP_BPR_DISABLE,
1565 	CDP_BPR_ENABLE,
1566 };
1567 
1568 /**
1569  * enum cdp_vdev_param_type - different types of parameters
1570  *			      to set values in vdev
1571  * @CDP_ENABLE_NAWDS: set nawds enable/disable
1572  * @CDP_ENABLE_MCAST_EN: enable/disable multicast enhancement
1573  * @CDP_ENABLE_WDS: wds sta
1574  * @CDP_ENABLE_MEC: MEC enable flags
1575  * @CDP_ENABLE_DA_WAR:
1576  * @CDP_ENABLE_PROXYSTA: proxy sta
1577  * @CDP_UPDATE_TDLS_FLAGS: tdls link flags
1578  * @CDP_CFG_WDS_AGING_TIMER: modify/stop wds aging timer
1579  * @CDP_ENABLE_AP_BRIDGE: set ap_bridging enable/disable
1580  * @CDP_ENABLE_CIPHER: set cipher type based on security
1581  * @CDP_ENABLE_QWRAP_ISOLATION: qwrap isolation mode
1582  * @CDP_UPDATE_MULTIPASS: enable/disable multipass
1583  * @CDP_TX_ENCAP_TYPE: tx encap type
1584  * @CDP_RX_DECAP_TYPE: rx decap type
1585  * @CDP_MESH_RX_FILTER: set mesh rx filter
1586  * @CDP_TID_VDEV_PRTY: set tid vdev prty
1587  * @CDP_TIDMAP_TBL_ID: set tidmap table id
1588  * @CDP_MESH_MODE: set mesh mode
1589  * @CDP_SAFEMODE: set safe mode
1590  * @CDP_DROP_UNENC: set drop unencrypted flag
1591  * @CDP_ENABLE_IGMP_MCAST_EN: enable/disable igmp multicast enhancement
1592  * @CDP_ENABLE_HLOS_TID_OVERRIDE: set hlos tid override flag
1593  * @CDP_CFG_WDS_EXT: enable/disable wds ext feature
1594  * @CDP_DROP_TX_MCAST: enable/disable tx mcast drop
1595  * @CDP_ENABLE_PEER_AUTHORIZE: enable peer authorize flag
1596  * @CDP_ENABLE_PEER_TID_LATENCY: set peer tid latency enable flag
1597  * @CDP_SET_VAP_MESH_TID: Set latency tid in vap
1598  * @CDP_SKIP_BAR_UPDATE_AP: enable/disable bar
1599  * @CDP_UPDATE_DSCP_TO_TID_MAP: Set DSCP to TID map id
1600  * @CDP_SET_MCAST_VDEV: Set primary mcast vdev
1601  * @CDP_RESET_MLO_MCAST_VDEV: Reset mlo mcast vdev settings
1602  * @CDP_SET_MCAST_VDEV_HW_UPDATE: Not in use
1603  * @CDP_DROP_3ADDR_MCAST: enable/disable drop 3addr multicast flag
1604  * @CDP_ENABLE_WRAP: qwrap ap
1605  * @CDP_ENABLE_TRAFFIC_END_INDICATION: enable/disable traffic end indication
1606  * @CDP_VDEV_TX_TO_FW: Set to_fw bit for tx packets for the vdev
1607  */
1608 enum cdp_vdev_param_type {
1609 	CDP_ENABLE_NAWDS,
1610 	CDP_ENABLE_MCAST_EN,
1611 	CDP_ENABLE_WDS,
1612 	CDP_ENABLE_MEC,
1613 	CDP_ENABLE_DA_WAR,
1614 	CDP_ENABLE_PROXYSTA,
1615 	CDP_UPDATE_TDLS_FLAGS,
1616 	CDP_CFG_WDS_AGING_TIMER,
1617 	CDP_ENABLE_AP_BRIDGE,
1618 	CDP_ENABLE_CIPHER,
1619 	CDP_ENABLE_QWRAP_ISOLATION,
1620 	CDP_UPDATE_MULTIPASS,
1621 	CDP_TX_ENCAP_TYPE,
1622 	CDP_RX_DECAP_TYPE,
1623 	CDP_MESH_RX_FILTER,
1624 	CDP_TID_VDEV_PRTY,
1625 	CDP_TIDMAP_TBL_ID,
1626 #ifdef MESH_MODE_SUPPORT
1627 	CDP_MESH_MODE,
1628 #endif
1629 	CDP_SAFEMODE,
1630 	CDP_DROP_UNENC,
1631 	CDP_ENABLE_IGMP_MCAST_EN,
1632 	CDP_ENABLE_HLOS_TID_OVERRIDE,
1633 #ifdef QCA_SUPPORT_WDS_EXTENDED
1634 	CDP_CFG_WDS_EXT,
1635 	CDP_DROP_TX_MCAST,
1636 #endif /* QCA_SUPPORT_WDS_EXTENDED */
1637 	CDP_ENABLE_PEER_AUTHORIZE,
1638 #ifdef WLAN_SUPPORT_MESH_LATENCY
1639 	CDP_ENABLE_PEER_TID_LATENCY,
1640 	CDP_SET_VAP_MESH_TID,
1641 #endif
1642 #ifdef WLAN_VENDOR_SPECIFIC_BAR_UPDATE
1643 	CDP_SKIP_BAR_UPDATE_AP,
1644 #endif
1645 	CDP_UPDATE_DSCP_TO_TID_MAP,
1646 	CDP_SET_MCAST_VDEV,
1647 	CDP_RESET_MLO_MCAST_VDEV,
1648 	CDP_SET_MCAST_VDEV_HW_UPDATE,
1649 	CDP_DROP_3ADDR_MCAST,
1650 	CDP_ENABLE_WRAP,
1651 #ifdef DP_TRAFFIC_END_INDICATION
1652 	CDP_ENABLE_TRAFFIC_END_INDICATION,
1653 #endif
1654 #ifdef FEATURE_DIRECT_LINK
1655 	CDP_VDEV_TX_TO_FW,
1656 #endif
1657 };
1658 
1659 /**
1660  * enum cdp_psoc_param_type - different types of parameters
1661  *			      to set values in psoc
1662  * @CDP_ENABLE_RATE_STATS: set rate stats enable/disable
1663  * @CDP_SET_NSS_CFG: set nss cfg
1664  * @CDP_SET_PREFERRED_HW_MODE: set preferred hw mode
1665  * @CDP_CFG_PEER_EXT_STATS: Peer extended stats mode.
1666  * @CDP_IPA_ENABLE : set IPA enable mode.
1667  * @CDP_CFG_VDEV_STATS_HW_OFFLOAD: HW Vdev stats config
1668  * @CDP_SAWF_ENABLE:
1669  * @CDP_UMAC_RST_SKEL_ENABLE: Enable Umac reset skeleton code for debug
1670  * @CDP_PPEDS_ENABLE: PPEDS is enabled or not
1671  * @CDP_SAWF_STATS: set SAWF stats config
1672  */
1673 enum cdp_psoc_param_type {
1674 	CDP_ENABLE_RATE_STATS,
1675 	CDP_SET_NSS_CFG,
1676 	CDP_SET_PREFERRED_HW_MODE,
1677 	CDP_CFG_PEER_EXT_STATS,
1678 	CDP_IPA_ENABLE,
1679 	CDP_CFG_VDEV_STATS_HW_OFFLOAD,
1680 	CDP_SAWF_ENABLE,
1681 	CDP_UMAC_RST_SKEL_ENABLE,
1682 	CDP_PPEDS_ENABLE,
1683 	CDP_SAWF_STATS,
1684 };
1685 
1686 #define TXRX_FW_STATS_TXSTATS                     1
1687 #define TXRX_FW_STATS_RXSTATS                     2
1688 #define TXRX_FW_STATS_RX_RATE_INFO                3
1689 #define TXRX_FW_STATS_PHYSTATS                    4
1690 #define TXRX_FW_STATS_PHYSTATS_CONCISE            5
1691 #define TXRX_FW_STATS_TX_RATE_INFO                6
1692 #define TXRX_FW_STATS_TID_STATE                   7
1693 #define TXRX_FW_STATS_HOST_STATS                  8
1694 #define TXRX_FW_STATS_CLEAR_HOST_STATS            9
1695 #define TXRX_FW_STATS_CE_STATS                   10
1696 #define TXRX_FW_STATS_VOW_UMAC_COUNTER           11
1697 #define TXRX_FW_STATS_ME_STATS                   12
1698 #define TXRX_FW_STATS_TXBF_INFO                  13
1699 #define TXRX_FW_STATS_SND_INFO                   14
1700 #define TXRX_FW_STATS_ERROR_INFO                 15
1701 #define TXRX_FW_STATS_TX_SELFGEN_INFO            16
1702 #define TXRX_FW_STATS_TX_MU_INFO                 17
1703 #define TXRX_FW_SIFS_RESP_INFO                   18
1704 #define TXRX_FW_RESET_STATS                      19
1705 #define TXRX_FW_MAC_WDOG_STATS                   20
1706 #define TXRX_FW_MAC_DESC_STATS                   21
1707 #define TXRX_FW_MAC_FETCH_MGR_STATS              22
1708 #define TXRX_FW_MAC_PREFETCH_MGR_STATS           23
1709 #define TXRX_FW_STATS_DURATION_INFO              24
1710 #define TXRX_FW_STATS_DURATION_INFO_RESET        25
1711 #define TXRX_FW_HALPHY_STATS                     26
1712 #define TXRX_FW_COEX_STATS                       27
1713 
1714 #define PER_RADIO_FW_STATS_REQUEST 0
1715 #define PER_VDEV_FW_STATS_REQUEST 1
1716 /**
1717  * enum data_stall_log_event_indicator - Module triggering data stall
1718  * @DATA_STALL_LOG_INDICATOR_UNUSED: Unused
1719  * @DATA_STALL_LOG_INDICATOR_HOST_DRIVER: Host driver indicates data stall
1720  * @DATA_STALL_LOG_INDICATOR_FIRMWARE: FW indicates data stall
1721  * @DATA_STALL_LOG_INDICATOR_FRAMEWORK: Framework indicates data stall
1722  *
1723  * Enum indicating the module that indicates data stall event
1724  */
1725 enum data_stall_log_event_indicator {
1726 	DATA_STALL_LOG_INDICATOR_UNUSED,
1727 	DATA_STALL_LOG_INDICATOR_HOST_DRIVER,
1728 	DATA_STALL_LOG_INDICATOR_FIRMWARE,
1729 	DATA_STALL_LOG_INDICATOR_FRAMEWORK,
1730 };
1731 
1732 /**
1733  * enum data_stall_log_event_type - data stall event type
1734  * @DATA_STALL_LOG_NONE:
1735  * @DATA_STALL_LOG_FW_VDEV_PAUSE:
1736  * @DATA_STALL_LOG_HWSCHED_CMD_FILTER:
1737  * @DATA_STALL_LOG_HWSCHED_CMD_FLUSH:
1738  * @DATA_STALL_LOG_FW_RX_REFILL_FAILED:
1739  * @DATA_STALL_LOG_FW_RX_FCS_LEN_ERROR:
1740  * @DATA_STALL_LOG_FW_WDOG_ERRORS:
1741  * @DATA_STALL_LOG_BB_WDOG_ERROR:
1742  * @DATA_STALL_LOG_POST_TIM_NO_TXRX_ERROR:
1743  * @DATA_STALL_LOG_HOST_STA_TX_TIMEOUT:
1744  * @DATA_STALL_LOG_HOST_SOFTAP_TX_TIMEOUT:
1745  * @DATA_STALL_LOG_NUD_FAILURE:
1746  *
1747  * Enum indicating data stall event type
1748  */
1749 enum data_stall_log_event_type {
1750 	DATA_STALL_LOG_NONE,
1751 	DATA_STALL_LOG_FW_VDEV_PAUSE,
1752 	DATA_STALL_LOG_HWSCHED_CMD_FILTER,
1753 	DATA_STALL_LOG_HWSCHED_CMD_FLUSH,
1754 	DATA_STALL_LOG_FW_RX_REFILL_FAILED,
1755 	DATA_STALL_LOG_FW_RX_FCS_LEN_ERROR,
1756 	DATA_STALL_LOG_FW_WDOG_ERRORS,
1757 	DATA_STALL_LOG_BB_WDOG_ERROR,
1758 	DATA_STALL_LOG_POST_TIM_NO_TXRX_ERROR,
1759 	/* Stall events triggered by host/framework start from 0x100 onwards. */
1760 	DATA_STALL_LOG_HOST_STA_TX_TIMEOUT = 0x100,
1761 	DATA_STALL_LOG_HOST_SOFTAP_TX_TIMEOUT,
1762 	DATA_STALL_LOG_NUD_FAILURE,
1763 };
1764 
1765 /**
1766  * enum data_stall_log_recovery_type - data stall recovery type
1767  * @DATA_STALL_LOG_RECOVERY_NONE:
1768  * @DATA_STALL_LOG_RECOVERY_CONNECT_DISCONNECT:
1769  * @DATA_STALL_LOG_RECOVERY_TRIGGER_PDR:
1770  *
1771  * Enum indicating data stall recovery type
1772  */
1773 enum data_stall_log_recovery_type {
1774 	DATA_STALL_LOG_RECOVERY_NONE = 0,
1775 	DATA_STALL_LOG_RECOVERY_CONNECT_DISCONNECT,
1776 	DATA_STALL_LOG_RECOVERY_TRIGGER_PDR,
1777 };
1778 
1779 /**
1780  * struct data_stall_event_info - data stall info
1781  * @indicator: Module triggering data stall
1782  * @data_stall_type: data stall event type
1783  * @vdev_id_bitmap: vdev_id_bitmap
1784  * @pdev_id: pdev id
1785  * @recovery_type: data stall recovery type
1786  */
1787 struct data_stall_event_info {
1788 	uint32_t indicator;
1789 	uint32_t data_stall_type;
1790 	uint32_t vdev_id_bitmap;
1791 	uint32_t pdev_id;
1792 	uint32_t recovery_type;
1793 };
1794 
1795 typedef void (*data_stall_detect_cb)(struct data_stall_event_info *);
1796 
1797 /**
1798  * enum cdp_stats - options for host and firmware statistics
1799  * @CDP_TXRX_STATS_0:
1800  * @CDP_TXRX_STATS_1: HTT Pdev tx stats
1801  * @CDP_TXRX_STATS_2: HTT Pdev rx stats
1802  * @CDP_TXRX_STATS_3: HTT Pdev Tx HW Queue stats
1803  * @CDP_TXRX_STATS_4: HTT Pdev Tx HW Sched stats
1804  * @CDP_TXRX_STATS_5: HTT Pdev error stats
1805  * @CDP_TXRX_STATS_6: HTT TQM stats
1806  * @CDP_TXRX_STATS_7: HTT TQM CMDQ stats
1807  * @CDP_TXRX_STATS_8: HTT Tx_de_cmn thread stats
1808  * @CDP_TXRX_STATS_9: HTT Pdev Tx rate stats
1809  * @CDP_TXRX_STATS_10: HTT Pdev Rx rate stats
1810  * @CDP_TXRX_STATS_11: HTT Peer stats
1811  * @CDP_TXRX_STATS_12: HTT Tx Self Gen Info
1812  * @CDP_TXRX_STATS_13: HTT Tx MU HWQ stats
1813  * @CDP_TXRX_STATS_14: HTT Ring interface info stats
1814  * @CDP_TXRX_STATS_15: HTT SRNG info stats
1815  * @CDP_TXRX_STATS_16: HTT SFM info stats
1816  * @CDP_TXRX_STATS_17: HTT Pdev tx mu mimo sched info
1817  * @CDP_TXRX_STATS_18: HTT Peer list details
1818  * @CDP_TXRX_STATS_19: Reserved
1819  * @CDP_TXRX_STATS_20: Reset Host stats
1820  * @CDP_TXRX_STATS_21: Host Rx rate stats
1821  * @CDP_TXRX_STATS_22: Host Tx rate stats
1822  * @CDP_TXRX_STATS_23: Host Tx stats
1823  * @CDP_TXRX_STATS_24: Host Rx stats
1824  * @CDP_TXRX_STATS_25: Host Ast stats
1825  * @CDP_TXRX_STATS_26: Host Head/Tail Pointer stats
1826  * @CDP_TXRX_STATS_27: Host Monitor mode stats
1827  * @CDP_TXRX_STATS_28: Host Peer entry stats
1828  * @CDP_TXRX_STATS_29: Host Soc config params info
1829  * @CDP_TXRX_STATS_30: Host Pdev config params info
1830  * @CDP_TXRX_STATS_31: Host DP Interrupt Stats
1831  * @CDP_TXRX_STATS_HTT_MAX:
1832  * @CDP_TXRX_MAX_STATS:
1833  */
1834 enum cdp_stats {
1835 	CDP_TXRX_STATS_0  = 0,
1836 	CDP_TXRX_STATS_1,
1837 	CDP_TXRX_STATS_2,
1838 	CDP_TXRX_STATS_3,
1839 	CDP_TXRX_STATS_4,
1840 	CDP_TXRX_STATS_5,
1841 	CDP_TXRX_STATS_6,
1842 	CDP_TXRX_STATS_7,
1843 	CDP_TXRX_STATS_8,
1844 	CDP_TXRX_STATS_9,
1845 	CDP_TXRX_STATS_10,
1846 	CDP_TXRX_STATS_11,
1847 	CDP_TXRX_STATS_12,
1848 	CDP_TXRX_STATS_13,
1849 	CDP_TXRX_STATS_14,
1850 	CDP_TXRX_STATS_15,
1851 	CDP_TXRX_STATS_16,
1852 	CDP_TXRX_STATS_17,
1853 	CDP_TXRX_STATS_18,
1854 	CDP_TXRX_STATS_19,
1855 	CDP_TXRX_STATS_20,
1856 	CDP_TXRX_STATS_21,
1857 	CDP_TXRX_STATS_22,
1858 	CDP_TXRX_STATS_23,
1859 	CDP_TXRX_STATS_24,
1860 	CDP_TXRX_STATS_25,
1861 	CDP_TXRX_STATS_26,
1862 	CDP_TXRX_STATS_27,
1863 	CDP_TXRX_STATS_28,
1864 	CDP_TXRX_STATS_29,
1865 	CDP_TXRX_STATS_30,
1866 	CDP_TXRX_STATS_31,
1867 	CDP_TXRX_STATS_HTT_MAX = 256,
1868 	CDP_TXRX_MAX_STATS = 265,
1869 };
1870 
1871 /**
1872  * enum cdp_stat_update_type - Different Stat update types sent to
1873  *                             OL_IF
1874  * @UPDATE_PEER_STATS: update peer stats
1875  * @UPDATE_VDEV_STATS: update vdev stats
1876  * @UPDATE_PDEV_STATS: Update pdev stats
1877  */
1878 enum cdp_stat_update_type {
1879 	UPDATE_PEER_STATS = 0,
1880 	UPDATE_VDEV_STATS = 1,
1881 	UPDATE_PDEV_STATS = 2,
1882 };
1883 
1884 /**
1885  * struct cdp_tx_sojourn_stats - Tx sojourn stats
1886  * @ppdu_seq_id: ppdu_seq_id from tx completion
1887  * @avg_sojourn_msdu: average sojourn msdu time
1888  * @sum_sojourn_msdu: sum sojourn msdu time
1889  * @num_msdus: number of msdus per ppdu
1890  * @cookie: cookie to be used by upper layer
1891  */
1892 struct cdp_tx_sojourn_stats {
1893 	uint32_t ppdu_seq_id;
1894 	qdf_ewma_tx_lag avg_sojourn_msdu[CDP_DATA_TID_MAX];
1895 	uint32_t sum_sojourn_msdu[CDP_DATA_TID_MAX];
1896 	uint32_t num_msdus[CDP_DATA_TID_MAX];
1897 	struct cdp_stats_cookie *cookie;
1898 };
1899 
1900 /**
1901  * struct cdp_delayed_tx_completion_ppdu_user - Delayed Tx PPDU completion
1902  *                                              per-user information
1903  * @frame_ctrl: frame control field in 802.11 header
1904  * @qos_ctrl: QoS control field in 802.11 header
1905  * @mpdu_tried_ucast: number of unicast mpdus tried
1906  * @mpdu_tried_mcast: number of multicastmpdus tried
1907  * @ltf_size: ltf_size
1908  * @stbc: stbc
1909  * @he_re: he_re (range extension)
1910  * @txbf: txbf
1911  * @bw: Transmission bandwidth
1912  *       <enum 2 transmit_bw_20_MHz>
1913  *       <enum 3 transmit_bw_40_MHz>
1914  *       <enum 4 transmit_bw_80_MHz>
1915  *       <enum 5 transmit_bw_160_MHz>
1916  * @nss: NSS 1,2, ...8
1917  * @mcs: MCS index
1918  * @preamble: preamble
1919  * @gi: guard interval 800/400/1600/3200 ns
1920  * @dcm: dcm
1921  * @ldpc: ldpc
1922  * @delayed_ba:
1923  * @ru_start: RU start index
1924  * @ru_tones: RU tones length
1925  * @is_mcast: MCAST or UCAST
1926  * @user_pos: user position
1927  * @mu_group_id: mu group id
1928  * @ppdu_start_timestamp: 64 bits ppdu start timestamp
1929  * @ppdu_end_timestamp: 64 bits ppdu end timestamp
1930  */
1931 struct cdp_delayed_tx_completion_ppdu_user {
1932 	uint32_t frame_ctrl:16,
1933 		 qos_ctrl:16;
1934 	uint32_t mpdu_tried_ucast:16,
1935 		mpdu_tried_mcast:16;
1936 	uint32_t ltf_size:2,
1937 		 stbc:1,
1938 		 he_re:1,
1939 		 txbf:4,
1940 		 bw:4,
1941 		 nss:4,
1942 		 mcs:4,
1943 		 preamble:4,
1944 		 gi:4,
1945 		 dcm:1,
1946 		 ldpc:1,
1947 		 delayed_ba:1;
1948 	uint16_t ru_start;
1949 	uint16_t ru_tones;
1950 	bool is_mcast;
1951 	uint32_t user_pos;
1952 	uint32_t mu_group_id;
1953 	uint64_t ppdu_start_timestamp;
1954 	uint64_t ppdu_end_timestamp;
1955 };
1956 
1957 /**
1958  * struct cdp_tx_completion_ppdu_user - Tx PPDU completion per-user information
1959  * @completion_status: completion status - OK/Filter/Abort/Timeout
1960  * @tid: TID number
1961  * @peer_id: Peer ID
1962  * @mac_addr:
1963  * @ba_size: Block-Ack size
1964  * @frame_ctrl: frame control field in 802.11 header
1965  * @qos_ctrl: QoS control field in 802.11 header
1966  * @mpdu_tried_ucast: number of unicast mpdus tried
1967  * @mpdu_tried_mcast: number of multicast mpdus tried
1968  * @mpdu_success: number of mpdus successfully transmitted
1969  * @mpdu_failed:
1970  * @long_retries: long retries
1971  * @short_retries: short retries
1972  * @tx_ratecode:
1973  * @is_ampdu: mpdu aggregate or non-aggregate?
1974  * @ppdu_type:
1975  * @pream_punct:
1976  * @is_seq_num_valid:
1977  * @success_bytes: bytes successfully transmitted
1978  * @retry_bytes: bytes retried
1979  * @failed_bytes:
1980  * @success_msdus: MSDUs successfully transmitted
1981  * @retry_msdus: MSDUs retried
1982  * @retry_mpdus: MPDUs retried
1983  * @failed_msdus: MSDUs failed transmission
1984  * @duration: user duration in ppdu
1985  * @ltf_size: ltf_size
1986  * @stbc: stbc
1987  * @he_re: he_re (range extension)
1988  * @txbf: txbf
1989  * @bw: Transmission bandwidth
1990  *       <enum 2 transmit_bw_20_MHz>
1991  *       <enum 3 transmit_bw_40_MHz>
1992  *       <enum 4 transmit_bw_80_MHz>
1993  *       <enum 5 transmit_bw_160_MHz>
1994  * @nss: NSS 1,2, ...8
1995  * @mcs: MCS index
1996  * @preamble: preamble
1997  * @gi: guard interval 800/400/1600/3200 ns
1998  * @dcm: dcm
1999  * @ldpc: ldpc
2000  * @delayed_ba: delayed ba bit
2001  * @ack_ba_tlv: ack ba recv tlv bit
2002  * @ba_seq_no: Block Ack sequence number
2003  * @ba_bitmap: Block Ack bitmap
2004  * @start_seq: Sequence number of first MPDU
2005  * @enq_bitmap: Enqueue MPDU bitmap
2006  * @failed_bitmap:
2007  * @num_mpdu:
2008  * @num_msdu:
2009  * @tx_duration:
2010  * @ru_start: RU start index
2011  * @ru_tones: RU tones length
2012  * @is_mcast: MCAST or UCAST
2013  * @tx_rate: Transmission Rate
2014  * @tx_ratekbps:
2015  * @ack_rssi: ack rssi for separate chains
2016  * @ack_rssi_valid:
2017  * @usr_ack_rssi:
2018  * @user_pos: user position
2019  * @mu_group_id: mu group id
2020  * @rix: rate index
2021  * @is_ppdu_cookie_valid : Indicates that ppdu_cookie is valid
2022  * @ppdu_cookie: 16-bit ppdu_cookie
2023  * @sa_is_training: smart antenna training packets indication
2024  * @rssi_chain: rssi chain per bandwidth
2025  * @sa_tx_antenna: antenna in which packet is transmitted
2026  * @sa_max_rates: smart antenna tx feedback info max rates
2027  * @sa_goodput: smart antenna tx feedback info goodput
2028  * @current_rate_per: Moving average per
2029  * @last_enq_seq: last equeue sequence number
2030  * @is_bss_peer: is bss peer check
2031  * @mpdu_q: queue of mpdu in a ppdu
2032  * @mpdus: MPDU list based on enqueue sequence bitmap
2033  * @pending_retries: pending MPDUs (retries)
2034  * @tlv_bitmap: per user tlv bitmap
2035  * @skip: tx capture skip flag
2036  * @mon_procd: to indicate user processed in ppdu of the sched cmd
2037  * @debug_copied: flag to indicate bar frame copied
2038  * @peer_last_delayed_ba: flag to indicate peer last delayed ba
2039  * @phy_tx_time_us: Phy TX duration for the User
2040  * @mpdu_bytes: accumulated bytes per mpdu for mem limit feature
2041  * @punc_mode: puncutured mode to indicate punctured bw
2042  * @punc_pattern_bitmap: bitmap indicating punctured pattern
2043  * @mprot_type: medium protection type
2044  * @rts_success: rts success
2045  * @rts_failure: rts failure
2046  */
2047 struct cdp_tx_completion_ppdu_user {
2048 	uint32_t completion_status:8,
2049 		 tid:8,
2050 		 peer_id:16;
2051 	uint8_t mac_addr[6];
2052 	uint16_t ba_size;
2053 	uint32_t frame_ctrl:16,
2054 		 qos_ctrl:16;
2055 	uint32_t mpdu_tried_ucast:16,
2056 		mpdu_tried_mcast:16;
2057 	uint16_t mpdu_success:16;
2058 	uint16_t mpdu_failed:16;
2059 	uint32_t long_retries:4,
2060 		 short_retries:4,
2061 		 tx_ratecode:16,
2062 		 is_ampdu:1,
2063 		 ppdu_type:5,
2064 		 pream_punct:1,
2065 		 is_seq_num_valid:1;
2066 	uint32_t success_bytes;
2067 	uint32_t retry_bytes;
2068 	uint32_t failed_bytes;
2069 	uint32_t success_msdus:16,
2070 		 retry_msdus:16;
2071 	uint32_t retry_mpdus;
2072 	uint32_t failed_msdus:16,
2073 		 duration:16;
2074 	uint32_t ltf_size:2,
2075 		 stbc:1,
2076 		 he_re:1,
2077 		 txbf:4,
2078 		 bw:4,
2079 		 nss:4,
2080 		 mcs:4,
2081 		 preamble:4,
2082 		 gi:4,
2083 		 dcm:1,
2084 		 ldpc:1,
2085 		 delayed_ba:1,
2086 		 ack_ba_tlv:1;
2087 	uint32_t ba_seq_no;
2088 	uint32_t ba_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS];
2089 	uint32_t start_seq;
2090 	uint32_t enq_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS];
2091 	uint32_t failed_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS];
2092 	uint32_t num_mpdu:9,
2093 		 num_msdu:16;
2094 	uint32_t tx_duration;
2095 	uint16_t ru_start;
2096 	uint16_t ru_tones;
2097 	bool is_mcast;
2098 	uint32_t tx_rate;
2099 	uint32_t tx_ratekbps;
2100 	uint32_t ack_rssi[CDP_RSSI_CHAIN_LEN];
2101 	bool ack_rssi_valid;
2102 	uint32_t usr_ack_rssi;
2103 	uint32_t user_pos;
2104 	uint32_t mu_group_id;
2105 	uint32_t rix;
2106 	uint8_t is_ppdu_cookie_valid;
2107 	uint16_t ppdu_cookie;
2108 	uint8_t sa_is_training;
2109 	uint32_t rssi_chain[CDP_RSSI_CHAIN_LEN];
2110 	uint32_t sa_tx_antenna;
2111 	/*Max rates for BW: 20MHZ, 40MHZ and 80MHZ and 160MHZ
2112 	 * |---------------------------------------|
2113 	 * | 16 bits | 16 bits | 16 bits | 16 bits |
2114 	 * |   BW-1  |   BW-2  |   BW-3  |   BW-4  |
2115 	 * |      /\  \                            |
2116 	 * |     /  \  \                           |
2117 	 * |    /    \  \                          |
2118 	 * |   /      \  \                         |
2119 	 * |  /        \  \                        |
2120 	 * | /          \  \                       |
2121 	 * |/            \  \                      |
2122 	 * |[11|8]     [5|8] \                     |
2123 	 * | BW1      PADDED  \                    |
2124 	 * |---------------------------------------|
2125 	 */
2126 	uint16_t sa_max_rates[CDP_NUM_SA_BW];
2127 	uint32_t sa_goodput;
2128 	/* below field is used to calculate goodput in non-training period
2129 	 * Note: As host is exposing goodput and hence current_rate_per is
2130 	 * of no use. It is just for Host computation.
2131 	 */
2132 	uint32_t current_rate_per;
2133 	uint32_t last_enq_seq;
2134 
2135 	uint8_t is_bss_peer;
2136 
2137 	qdf_nbuf_queue_t mpdu_q;
2138 	qdf_nbuf_t *mpdus;
2139 	uint32_t pending_retries;
2140 	uint32_t tlv_bitmap;
2141 	bool skip;
2142 	bool mon_procd;
2143 	bool debug_copied;
2144 	bool peer_last_delayed_ba;
2145 
2146 	uint16_t phy_tx_time_us;
2147 	uint32_t mpdu_bytes;
2148 	uint8_t punc_mode;
2149 	uint16_t punc_pattern_bitmap;
2150 	uint8_t mprot_type:3,
2151 		rts_success:1,
2152 		rts_failure:1;
2153 };
2154 
2155 /**
2156  * struct cdp_tx_indication_mpdu_info - Tx MPDU completion information
2157  * @ppdu_id: PPDU id
2158  * @tx_duration: user duration in ppdu
2159  * @frame_type: frame type MGMT/CTRL/DATA/BAR
2160  * @frame_ctrl: frame control field in 802.11 header
2161  * @qos_ctrl: QoS control field in 802.11 header
2162  * @tid: TID number
2163  * @num_msdu: number of msdu in MPDU
2164  * @seq_no: Sequence number of first MPDU
2165  * @ltf_size: ltf_size
2166  * @he_re: he_re (range extension)
2167  * @txbf: txbf
2168  * @bw: Transmission bandwidth
2169  *       <enum 2 transmit_bw_20_MHz>
2170  *       <enum 3 transmit_bw_40_MHz>
2171  *       <enum 4 transmit_bw_80_MHz>
2172  *       <enum 5 transmit_bw_160_MHz>
2173  * @nss: NSS 1,2, ...8
2174  * @mcs: MCS index
2175  * @preamble: preamble
2176  * @gi: guard interval 800/400/1600/3200 ns
2177  * @channel: frequency
2178  * @channel_num: channel number
2179  * @ack_rssi: ack rssi
2180  * @ldpc: ldpc
2181  * @tx_rate: Transmission Rate
2182  * @mac_address: peer mac address
2183  * @bss_mac_address: bss mac address
2184  * @ppdu_start_timestamp: TSF at PPDU start
2185  * @ppdu_end_timestamp: TSF at PPDU end
2186  * @ba_start_seq: Block Ack sequence number
2187  * @ba_bitmap: Block Ack bitmap
2188  * @ppdu_cookie: 16-bit ppdu_cookie
2189  * @long_retries: long retries
2190  * @short_retries: short retries
2191  * @completion_status: completion status - OK/Filter/Abort/Timeout
2192  * @resp_type: response type
2193  * @mprot_type: medium protection type
2194  * @rts_success: rts success
2195  * @rts_failure: rts failure
2196  * @usr_idx: user index
2197  */
2198 struct cdp_tx_indication_mpdu_info {
2199 	uint32_t ppdu_id;
2200 	uint32_t tx_duration;
2201 	uint16_t frame_type;
2202 	uint16_t frame_ctrl;
2203 	uint16_t qos_ctrl;
2204 	uint8_t tid;
2205 	uint32_t num_msdu;
2206 	uint32_t seq_no;
2207 	uint32_t ltf_size:2,
2208 		 he_re:1,
2209 		 txbf:4,
2210 		 bw:4,
2211 		 nss:4,
2212 		 mcs:4,
2213 		 preamble:4,
2214 		 gi:4;
2215 	uint32_t channel;
2216 	uint8_t channel_num;
2217 	uint32_t ack_rssi;
2218 	uint32_t ldpc;
2219 	uint32_t tx_rate;
2220 	uint8_t mac_address[QDF_MAC_ADDR_SIZE];
2221 	uint8_t bss_mac_address[QDF_MAC_ADDR_SIZE];
2222 	uint64_t ppdu_start_timestamp;
2223 	uint64_t ppdu_end_timestamp;
2224 	uint32_t ba_start_seq;
2225 	uint32_t ba_bitmap[CDP_BA_256_BIT_MAP_SIZE_DWORDS];
2226 	uint16_t ppdu_cookie;
2227 	uint16_t long_retries:4,
2228 		 short_retries:4,
2229 		 completion_status:8;
2230 	uint16_t resp_type:4,
2231 		 mprot_type:3,
2232 		 rts_success:1,
2233 		 rts_failure:1;
2234 	uint8_t usr_idx;
2235 };
2236 
2237 /**
2238  * struct cdp_tx_indication_info - Tx capture information
2239  * @radiotap_done: Flag to say radiotap already done or not
2240  *			0 - radiotap not updated
2241  *			1 - radiotap header updated
2242  * @mpdu_info: Tx MPDU completion information
2243  * @mpdu_nbuf: reconstructed mpdu packet
2244  * @ppdu_desc: tx completion ppdu
2245  * @osif_vdev: OS IF vdev handle
2246  */
2247 struct cdp_tx_indication_info {
2248 	bool radiotap_done;
2249 	struct cdp_tx_indication_mpdu_info mpdu_info;
2250 	qdf_nbuf_t mpdu_nbuf;
2251 	struct cdp_tx_completion_ppdu *ppdu_desc;
2252 #ifdef QCA_SUPPORT_LITE_MONITOR
2253 	ol_osif_vdev_handle osif_vdev;
2254 #endif
2255 };
2256 
2257 /**
2258  * struct cdp_tx_mgmt_comp_info - Tx mgmt comp info
2259  * @ppdu_id: ppdu_id
2260  * @is_sgen_pkt: payload received from wmi or htt path
2261  * @retries_count: retries count
2262  * @tx_tsf: 64 bit timestamp
2263  */
2264 struct cdp_tx_mgmt_comp_info {
2265 	uint32_t ppdu_id;
2266 	bool is_sgen_pkt;
2267 	uint16_t retries_count;
2268 	uint64_t tx_tsf;
2269 };
2270 
2271 /**
2272  * struct cdp_tx_completion_ppdu - Tx PPDU completion information
2273  * @completion_status: completion status - OK/Filter/Abort/Timeout
2274  * @ppdu_id: PPDU Id
2275  * @ppdu_seq_id: ppdu sequence id for sojourn stats
2276  * @vdev_id: VAP Id
2277  * @bar_num_users: BA response user count, based on completion common TLV
2278  * @num_users: Number of users
2279  * @max_users: Number of users from USR_INFO TLV
2280  * @last_usr_index:
2281  * @drop_reason: drop reason from flush status
2282  * @is_flush: is_flush is set based on flush tlv
2283  * @flow_type: tx flow type from flush status
2284  * @queue_type: queue type from flush status
2285  * @num_mpdu: Number of MPDUs in PPDU
2286  * @num_msdu: Number of MSDUs in PPDU
2287  * @frame_type: frame SU or MU
2288  * @htt_frame_type: frame type from htt
2289  * @frame_ctrl: frame control of 80211 header
2290  * @channel: Channel informartion
2291  * @resp_type: response type
2292  * @mprot_type: medium protection type
2293  * @rts_success: rts success
2294  * @rts_failure: rts failure
2295  * @phy_mode: phy mode
2296  * @ack_rssi: RSSI value of last ack packet (units=dB above noise floor)
2297  * @tx_duration: PPDU airtime
2298  * @ppdu_start_timestamp: TSF at PPDU start
2299  * @ppdu_end_timestamp: TSF at PPDU end
2300  * @ack_timestamp: TSF at the reception of ACK
2301  * @delayed_ba: Delayed ba flag
2302  * @beam_change: beam change bit in ppdu for he-information
2303  * @bss_color: 6 bit value for full bss color
2304  * @doppler: value for doppler (will be 0 most of the times)
2305  * @spatial_reuse: value for spatial reuse used in radiotap HE header
2306  * @usr_nss_sum: Sum of user nss
2307  * @usr_ru_tones_sum: Sum of user ru_tones
2308  * @bar_ppdu_id: BAR ppdu_id
2309  * @bar_tx_duration: BAR tx duration
2310  * @bar_ppdu_start_timestamp: BAR start timestamp
2311  * @bar_ppdu_end_timestamp: BAR end timestamp
2312  * @tlv_bitmap: tlv_bitmap for the PPDU
2313  * @sched_cmdid: schedule command id
2314  * @phy_ppdu_tx_time_us: Phy per PPDU TX duration
2315  * @ppdu_bytes: accumulated bytes per ppdu for mem limit feature
2316  * @user: per-User stats (array of per-user structures)
2317  */
2318 struct cdp_tx_completion_ppdu {
2319 	uint32_t ppdu_id;
2320 	uint32_t ppdu_seq_id;
2321 	uint16_t vdev_id;
2322 	uint16_t bar_num_users;
2323 	uint32_t num_users;
2324 	uint8_t  max_users;
2325 	uint8_t last_usr_index;
2326 	uint32_t drop_reason;
2327 	uint32_t is_flush:1,
2328 		 flow_type:8,
2329 		 queue_type:8;
2330 	uint32_t num_mpdu:9,
2331 		 num_msdu:16;
2332 	uint16_t frame_type;
2333 	uint16_t htt_frame_type;
2334 	uint16_t frame_ctrl;
2335 	uint16_t channel;
2336 	uint16_t resp_type:4,
2337 		 mprot_type:3,
2338 		 rts_success:1,
2339 		 rts_failure:1;
2340 	uint16_t phy_mode;
2341 	uint32_t ack_rssi;
2342 	uint32_t tx_duration;
2343 	uint64_t ppdu_start_timestamp;
2344 	uint64_t ppdu_end_timestamp;
2345 	uint64_t ack_timestamp;
2346 	bool delayed_ba;
2347 	uint8_t beam_change;
2348 	uint8_t bss_color;
2349 	uint8_t doppler;
2350 	uint8_t spatial_reuse;
2351 	uint8_t usr_nss_sum;
2352 	uint32_t usr_ru_tones_sum;
2353 	uint32_t bar_ppdu_id;
2354 	uint32_t bar_tx_duration;
2355 	uint64_t bar_ppdu_start_timestamp;
2356 	uint64_t bar_ppdu_end_timestamp;
2357 	uint32_t tlv_bitmap;
2358 	uint16_t sched_cmdid;
2359 	uint16_t phy_ppdu_tx_time_us;
2360 	uint32_t ppdu_bytes;
2361 	struct cdp_tx_completion_ppdu_user user[];
2362 };
2363 
2364 /**
2365  * struct cdp_dev_stats - Network device stats structure
2366  * @tx_packets: Tx total packets transmitted
2367  * @tx_errors : Tx error due to FW tx failure, Ring failure DMA etc
2368  * @tx_dropped: Tx dropped is same as tx errors as above
2369  * @rx_packets: Rx total packets transmitted
2370  * @rx_errors : Rx errors
2371  * @rx_dropped: Rx dropped stats
2372  * @tx_bytes  : Tx total bytes transmitted
2373  * @rx_bytes  : Rx total bytes transmitted
2374  */
2375 struct cdp_dev_stats {
2376 	uint32_t tx_packets;
2377 	uint32_t tx_errors;
2378 	uint32_t tx_dropped;
2379 	uint32_t rx_packets;
2380 	uint32_t rx_errors;
2381 	uint32_t rx_dropped;
2382 	uint64_t tx_bytes;
2383 	uint64_t rx_bytes;
2384 };
2385 
2386 /**
2387  * struct cdp_rate_stats - Tx/Rx Rate statistics
2388  * @rate_stats_info_valid: set if the stats are valid
2389  * @bw: Indicates the BW of the upcoming transmission -
2390  *       <enum 2 transmit_bw_20_MHz>
2391  *       <enum 3 transmit_bw_40_MHz>
2392  *       <enum 4 transmit_bw_80_MHz>
2393  *       <enum 5 transmit_bw_160_MHz>
2394  * @pkt_type: Transmit Packet Type
2395  * @stbc: When set, STBC transmission rate was used
2396  * @ldpc: When set, use LDPC transmission rates
2397  * @sgi: <enum 0     0_8_us_sgi > Legacy normal GI
2398  *       <enum 1     0_4_us_sgi > Legacy short GI
2399  *       <enum 2     1_6_us_sgi > HE related GI
2400  *       <enum 3     3_2_us_sgi > HE
2401  * @mcs: Transmit MCS Rate
2402  * @ofdma: Set when the transmission was an OFDMA transmission
2403  * @tones_in_ru: The number of tones in the RU used.
2404  * @resvd0: reserved bits
2405  * @tsf: Lower 32 bits of the TSF (timestamp when ppdu transmission finished)
2406  * @peer_id: Peer ID of the flow or MPDU queue
2407  * @tid: TID of the flow or MPDU queue
2408  */
2409 struct cdp_rate_stats {
2410 	uint32_t rate_stats_info_valid:1,
2411 		 bw:2,
2412 		 pkt_type:4,
2413 		 stbc:1,
2414 		 ldpc:1,
2415 		 sgi:2,
2416 		 mcs:4,
2417 		 ofdma:1,
2418 		 tones_in_ru:12,
2419 		 resvd0:4;
2420 	uint32_t tsf;
2421 	uint16_t peer_id;
2422 	uint8_t tid;
2423 };
2424 
2425 /**
2426  * struct cdp_tx_completion_msdu - Tx MSDU completion descriptor
2427  * @ppdu_id: PPDU to which this MSDU belongs
2428  * @transmit_cnt: Number of times this frame has been transmitted
2429  * @ack_frame_rssi: RSSI of the received ACK or BA frame
2430  * @resvd0: reserved bit
2431  * @first_msdu: Indicates this MSDU is the first MSDU in AMSDU
2432  * @last_msdu: Indicates this MSDU is the last MSDU in AMSDU
2433  * @msdu_part_of_amsdu : Indicates this MSDU was part of an A-MSDU in MPDU
2434  * @extd: Extended structure containing rate statistics
2435  * @resvd1: reserved bits
2436  */
2437 struct cdp_tx_completion_msdu {
2438 	uint32_t ppdu_id;
2439 	uint8_t transmit_cnt;
2440 	uint32_t ack_frame_rssi:8,
2441 		 resvd0:1,
2442 		 first_msdu:1,
2443 		 last_msdu:1,
2444 		 msdu_part_of_amsdu:1,
2445 		 resvd1:20;
2446 	struct cdp_rate_stats extd;
2447 };
2448 
2449 /**
2450  * struct cdp_rx_stats_ppdu_user -- per user RX stats
2451  * @peer_id: Peer ID
2452  * @vdev_id: VAP ID
2453  * @is_ampdu: mpdu aggregate or non-aggregate?
2454  * @mu_ul_info_valid: MU UL info valid
2455  * @ofdma_ru_start_index: RU index number(0-73)
2456  * @ofdma_ru_width: size of RU in units of 1(26tone)RU
2457  * @nss: NSS 1,2, ...8
2458  * @mcs: MCS index
2459  * @user_index: user ID in multi-user case
2460  * @is_bss_peer: is bss peer check
2461  * @ast_index: ast index in multi-user case
2462  * @tid: TID number
2463  * @num_msdu: Number of MSDUs in PPDU
2464  * @tcp_msdu_count: Number of TCP MSDUs in PPDU
2465  * @udp_msdu_count: Number of UDP MSDUs in PPDU
2466  * @other_msdu_count: Number of MSDUs other than UDP and TCP MSDUs in PPDU
2467  * @frame_control: frame control field
2468  * @frame_control_info_valid: frame_control valid
2469  * @qos_control: qos control field
2470  * @qos_control_info_valid: qos_control valid
2471  * @data_sequence_control_info_valid: data_sequence_control_info valid
2472  * @first_data_seq_ctrl: Sequence control field of first data frame
2473  * @preamble_type: preamble
2474  * @ht_flags: HT flags
2475  * @vht_flags: VHT flags
2476  * @he_flags: HE flags
2477  * @mac_addr: Peer MAC Address
2478  * @mpdu_cnt_fcs_ok: Number of MPDUs in PPDU with fcs ok
2479  * @mpdu_cnt_fcs_err: Number of MPDUs in PPDU with fcs err
2480  * @mpdu_fcs_ok_bitmap: MPDU with fcs ok bitmap
2481  * @mpdu_ok_byte_count:
2482  * @mpdu_err_byte_count:
2483  * @retries: number of retries
2484  * @rx_ratekbps: rx rate in kbps
2485  * @rix: rate index
2486  * @mpdu_retries: retries of mpdu in rx
2487  * @rx_time_us: Rx duration
2488  */
2489 struct cdp_rx_stats_ppdu_user {
2490 	uint16_t peer_id;
2491 	uint8_t vdev_id;
2492 	bool is_ampdu;
2493 	uint32_t mu_ul_info_valid:1,
2494 		 ofdma_ru_start_index:7,
2495 		 ofdma_ru_width:7,
2496 		 nss:4,
2497 		 mcs:4;
2498 	/* user id */
2499 	uint8_t  user_index;
2500 	uint8_t is_bss_peer;
2501 	uint32_t ast_index;
2502 	uint32_t tid;
2503 	uint32_t num_msdu;
2504 	uint16_t  tcp_msdu_count;
2505 	uint16_t  udp_msdu_count;
2506 	uint16_t  other_msdu_count;
2507 	uint16_t frame_control;
2508 	uint8_t  frame_control_info_valid;
2509 	uint16_t qos_control;
2510 	uint8_t  qos_control_info_valid;
2511 	uint8_t data_sequence_control_info_valid;
2512 	uint16_t first_data_seq_ctrl;
2513 	uint32_t preamble_type;
2514 	uint16_t ht_flags;
2515 	uint16_t vht_flags;
2516 	uint16_t he_flags;
2517 	uint8_t  mac_addr[QDF_MAC_ADDR_SIZE];
2518 	uint32_t mpdu_cnt_fcs_ok;
2519 	uint32_t mpdu_cnt_fcs_err;
2520 	uint32_t mpdu_fcs_ok_bitmap[QDF_MON_STATUS_MPDU_FCS_BMAP_NWORDS];
2521 	uint32_t mpdu_ok_byte_count;
2522 	uint32_t mpdu_err_byte_count;
2523 	uint32_t retries;
2524 	uint32_t rx_ratekbps;
2525 	uint32_t rix;
2526 	uint32_t mpdu_retries;
2527 	uint16_t rx_time_us;
2528 };
2529 
2530 /**
2531  * struct cdp_rx_indication_ppdu - Rx PPDU indication structure
2532  * @ppdu_id: PPDU Id
2533  * @is_ampdu: mpdu aggregate or non-aggregate?
2534  * @num_mpdu: Number of MPDUs in PPDU
2535  * @reserved: Reserved bits for future use
2536  * @num_msdu: Number of MSDUs in PPDU
2537  * @num_bytes: Number of bytes
2538  * @udp_msdu_count: Number of UDP MSDUs in PPDU
2539  * @tcp_msdu_count: Number of TCP MSDUs in PPDU
2540  * @other_msdu_count: Number of MSDUs other than UDP and TCP MSDUs in PPDU
2541  * @duration: PPDU duration
2542  * @tid: TID number
2543  * @peer_id: Peer ID
2544  * @vdev_id: VAP ID
2545  * @mac_addr: Peer MAC Address
2546  * @first_data_seq_ctrl: Sequence control field of first data frame
2547  * @u: union of rate information representations
2548  * @rate_info: consolidated rate fields
2549  * @ltf_size: ltf_size
2550  * @stbc: When set, STBC rate was used
2551  * @he_re: he_re (range extension)
2552  * @bw: Bandwidth
2553  *       <enum 0 bw_20_MHz>
2554  *       <enum 1 bw_40_MHz>
2555  *       <enum 2 bw_80_MHz>
2556  *       <enum 3 bw_160_MHz>
2557  * @nss: NSS 1,2, ...8
2558  * @mcs: MCS index
2559  * @preamble: preamble
2560  * @gi: <enum 0     0_8_us_sgi > Legacy normal GI
2561  *       <enum 1     0_4_us_sgi > Legacy short GI
2562  *       <enum 2     1_6_us_sgi > HE related GI
2563  *       <enum 3     3_2_us_sgi > HE
2564  * @dcm: dcm
2565  * @ldpc: ldpc
2566  * @ppdu_type: SU/MU_MIMO/MU_OFDMA/MU_MIMO_OFDMA/UL_TRIG/BURST_BCN/UL_BSR_RESP/
2567  * UL_BSR_TRIG/UNKNOWN
2568  * @rix: rate index
2569  * @lsig_a: L-SIG in 802.11 PHY header
2570  * @rssi: RSSI value (units = dB above noise floor)
2571  * @timestamp: TSF at the reception of PPDU
2572  * @length: PPDU length
2573  * @channel: Channel information
2574  * @beamformed:
2575  * @rx_ratekbps:
2576  * @ppdu_rx_rate:
2577  * @retries:
2578  * @rx_byte_count:
2579  * @rx_ratecode:
2580  * @fcs_error_mpdus:
2581  * @frame_ctrl: frame control field
2582  * @rssi_chain: rssi chain per nss per bw
2583  * @evm_info:
2584  * @rx_antenna:
2585  * @num_users:
2586  * @nf: noise floor
2587  * @per_chain_rssi: rssi per antenna
2588  * @is_mcast_bcast:
2589  * @cfr_info:
2590  * @punc_bw: punctured bw
2591  * @phyrx_abort: rx aborted undecoded frame indication
2592  * @phyrx_abort_reason: abort reason defined in phyrx_abort_request_info
2593  * @l_sig_length: L SIG A length
2594  * @l_sig_a_parity: L SIG A parity
2595  * @l_sig_a_pkt_type: L SIG A info pkt type
2596  * @l_sig_a_implicit_sounding: L SIG A info captured implicit sounding
2597  * @vht_crc: Indicate vht crc
2598  * @group_id:
2599  * @ht_length: num of bytes in PSDU
2600  * @ht_smoothing: Indicate ht_smoothing
2601  * @ht_not_sounding: Indicate ht not sounding
2602  * @ht_aggregation: Indicate ht aggregation
2603  * @ht_stbc: Indicate ht stbc
2604  * @ht_crc: Indicate ht crc
2605  * @vht_no_txop_ps: Indicate TXOP power save mode
2606  * @bss_color_id: Indicate BSS color ID
2607  * @beam_change: Indicates whether spatial mapping is changed
2608  * @dl_ul_flag: Differentiates between DL and UL transmission
2609  * @transmit_mcs: Indicates the data MCS
2610  * @ldpc_extra_sym: LDPC extra symbol
2611  * @special_reuse: Spatial reuse
2612  * @ltf_sym: Indictaes HE NSTS
2613  * @txbf: Indicates whether beamforming is applied
2614  * @pe_disambiguity: packet extension disambiguity
2615  * @pre_fec_pad: packet extension a factor
2616  * @dopplar: Doppler support
2617  * @txop_duration: Indicates the remaining time in the current TXOP
2618  * @sig_b_mcs: MCS of HE-SIG-B
2619  * @sig_b_dcm: DCM of HE-SIG-B
2620  * @sig_b_sym: Number of symbols of HE-SIG-B
2621  * @sig_b_comp: Compression mode of HE-SIG-B
2622  * @he_crc: CRC for HE-SIG contents
2623  * @usr_nss_sum: Sum of user nss
2624  * @usr_ru_tones_sum: Sum of user ru_tones
2625  * @user: per user stats in MU-user case
2626  */
2627 struct cdp_rx_indication_ppdu {
2628 	uint32_t ppdu_id;
2629 	uint16_t is_ampdu:1,
2630 		 num_mpdu:9,
2631 		 reserved:6;
2632 	uint32_t num_msdu;
2633 	uint32_t num_bytes;
2634 	uint16_t udp_msdu_count;
2635 	uint16_t tcp_msdu_count;
2636 	uint16_t other_msdu_count;
2637 	uint16_t duration;
2638 	uint32_t tid:8,
2639 		 peer_id:16;
2640 	uint8_t vdev_id;
2641 	uint8_t mac_addr[6];
2642 	uint16_t first_data_seq_ctrl;
2643 	union {
2644 		uint32_t rate_info;
2645 		struct {
2646 			uint32_t ltf_size:2,
2647 				 stbc:1,
2648 				 he_re:1,
2649 				 bw:4,
2650 				 nss:4,
2651 				 mcs:4,
2652 				 preamble:4,
2653 				 gi:4,
2654 				 dcm:1,
2655 				 ldpc:1,
2656 				 ppdu_type:5;
2657 		};
2658 	} u;
2659 	uint32_t rix;
2660 	uint32_t lsig_a;
2661 	uint32_t rssi;
2662 	uint64_t timestamp;
2663 	uint32_t length;
2664 	uint8_t channel;
2665 	uint8_t beamformed;
2666 
2667 	uint32_t rx_ratekbps;
2668 	uint32_t ppdu_rx_rate;
2669 
2670 	uint32_t retries;
2671 	uint32_t rx_byte_count;
2672 	uint16_t rx_ratecode;
2673 	uint8_t fcs_error_mpdus;
2674 	uint16_t frame_ctrl;
2675 	int8_t rssi_chain[SS_COUNT][MAX_BW];
2676 	struct cdp_rx_su_evm_info evm_info;
2677 	uint32_t rx_antenna;
2678 	uint8_t num_users;
2679 	uint32_t nf;
2680 	uint8_t  per_chain_rssi[MAX_CHAIN];
2681 	uint8_t is_mcast_bcast;
2682 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
2683 	struct cdp_rx_ppdu_cfr_info cfr_info;
2684 #endif
2685 	uint8_t punc_bw;
2686 #ifdef QCA_UNDECODED_METADATA_SUPPORT
2687 	bool phyrx_abort;
2688 	uint8_t phyrx_abort_reason;
2689 	uint32_t l_sig_length:12,
2690 		 l_sig_a_parity:1,
2691 		 l_sig_a_pkt_type:4,
2692 		 l_sig_a_implicit_sounding:1,
2693 		 vht_crc:8,
2694 		 group_id:6;
2695 	uint32_t ht_length:16,
2696 		 ht_smoothing:1,
2697 		 ht_not_sounding:1,
2698 		 ht_aggregation:1,
2699 		 ht_stbc:2,
2700 		 ht_crc:8,
2701 		 vht_no_txop_ps:1;
2702 	uint32_t bss_color_id:6,
2703 		 beam_change:1,
2704 		 dl_ul_flag:1,
2705 		 transmit_mcs:4,
2706 		 ldpc_extra_sym:1,
2707 		 special_reuse:4,
2708 		 ltf_sym:3,
2709 		 txbf:1,
2710 		 pe_disambiguity:1,
2711 		 pre_fec_pad:4,
2712 		 dopplar:1;
2713 	uint32_t txop_duration:7,
2714 		 sig_b_mcs:3,
2715 		 sig_b_dcm:1,
2716 		 sig_b_sym:4,
2717 		 sig_b_comp:1,
2718 		 he_crc:4;
2719 #endif
2720 	uint8_t usr_nss_sum;
2721 	uint32_t usr_ru_tones_sum;
2722 	struct cdp_rx_stats_ppdu_user user[];
2723 };
2724 
2725 /**
2726  * struct cdp_rx_indication_msdu - Rx MSDU info
2727  * @ppdu_id: PPDU to which the MSDU belongs
2728  * @msdu_len: Length of MSDU in bytes
2729  * @ack_frame_rssi: RSSI of the received ACK or BA frame
2730  * @resvd0: reserved bit
2731  * @first_msdu: Indicates this MSDU is the first MSDU in AMSDU
2732  * @last_msdu: Indicates this MSDU is the last MSDU in AMSDU
2733  * @msdu_part_of_amsdu: Indicates this MSDU was part of an A-MSDU in MPDU
2734  * @msdu_part_of_ampdu:
2735  * @resvd1: reserved bit
2736  * @extd: Extended structure containing rate statistics
2737  */
2738 struct cdp_rx_indication_msdu {
2739 	uint32_t ppdu_id;
2740 	uint16_t msdu_len;
2741 	uint32_t ack_frame_rssi:8,
2742 		 resvd0:1,
2743 		 first_msdu:1,
2744 		 last_msdu:1,
2745 		 msdu_part_of_amsdu:1,
2746 		 msdu_part_of_ampdu:1,
2747 		 resvd1:19;
2748 	struct cdp_rate_stats extd;
2749 };
2750 
2751 /**
2752  * struct cdp_config_params - Propagate configuration parameters to datapath
2753  * @tso_enable: Enable/Disable TSO
2754  * @lro_enable: Enable/Disable LRO
2755  * @gro_enable: Enable/Disable GRO
2756  * @flow_steering_enable: Enable/Disable Rx Hash based flow steering
2757  * @p2p_tcp_udp_checksumoffload: Enable/Disable TCP/UDP Checksum Offload for P2P
2758  * @nan_tcp_udp_checksumoffload: Enable/Disable TCP/UDP Checksum Offload for NAN
2759  * @tcp_udp_checksumoffload: Enable/Disable TCP/UDP Checksum Offload
2760  * @legacy_mode_checksumoffload_disable: Disable TCP/UDP Checksum Offload for
2761  *					 legacy modes.
2762  * @napi_enable: Enable/Disable Napi
2763  * @ipa_enable: Flag indicating if IPA is enabled or not
2764  * @tx_flow_stop_queue_threshold: Value to Pause tx queues
2765  * @tx_flow_start_queue_offset: Available Tx descriptors to unpause
2766  *				tx queue
2767  * @tx_comp_loop_pkt_limit: Max # of packets to be processed in 1 tx comp loop
2768  * @rx_reap_loop_pkt_limit: Max # of packets to be processed in 1 rx reap loop
2769  * @rx_hp_oos_update_limit: Max # of HP OOS (out of sync) updates
2770  */
2771 struct cdp_config_params {
2772 	unsigned int tso_enable:1;
2773 	unsigned int lro_enable:1;
2774 	unsigned int gro_enable:1;
2775 	unsigned int flow_steering_enable:1;
2776 	unsigned int p2p_tcp_udp_checksumoffload:1;
2777 	unsigned int nan_tcp_udp_checksumoffload:1;
2778 	unsigned int tcp_udp_checksumoffload:1;
2779 	unsigned int legacy_mode_checksumoffload_disable:1;
2780 	unsigned int napi_enable:1;
2781 	unsigned int ipa_enable:1;
2782 	/* Set when QCA_LL_TX_FLOW_CONTROL_V2 is enabled */
2783 	uint8_t tx_flow_stop_queue_threshold;
2784 	uint8_t tx_flow_start_queue_offset;
2785 	uint32_t tx_comp_loop_pkt_limit;
2786 	uint32_t rx_reap_loop_pkt_limit;
2787 	uint32_t rx_hp_oos_update_limit;
2788 
2789 };
2790 
2791 /**
2792  * struct cdp_txrx_stats_req - stats request wrapper
2793  *	used to pass request information to cdp layer
2794  * @stats: type of stats requested
2795  * @param0: opaque argument 0 to be passed to htt
2796  * @param1: opaque argument 1 to be passed to htt
2797  * @param2: opaque argument 2 to be passed to htt
2798  * @param3: opaque argument 3 to be passed to htt
2799  * @cookie_val: cookie
2800  * @mac_id: mac id
2801  * @peer_addr: peer address
2802  */
2803 struct cdp_txrx_stats_req {
2804 	enum cdp_stats	stats;
2805 	uint32_t	param0;
2806 	uint32_t	param1;
2807 	uint32_t	param2;
2808 	uint32_t	param3;
2809 	uint32_t	cookie_val;
2810 	uint8_t		mac_id;
2811 	char		*peer_addr;
2812 };
2813 
2814 /**
2815  * struct cdp_monitor_filter - monitor filter info
2816  * @mode: set filter mode
2817  * @fp_mgmt: set Filter Pass MGMT Configuration
2818  * @fp_ctrl: set Filter Pass CTRL Configuration
2819  * @fp_data: set Filter Pass DATA Configuration
2820  * @mo_mgmt: set Monitor Other MGMT Configuration
2821  * @mo_ctrl: set Monitor Other CTRL Configuration
2822  * @mo_data: set Monitor other DATA Configuration
2823  *
2824  */
2825 struct cdp_monitor_filter {
2826 	uint16_t mode;
2827 	uint16_t fp_mgmt;
2828 	uint16_t fp_ctrl;
2829 	uint16_t fp_data;
2830 	uint16_t mo_mgmt;
2831 	uint16_t mo_ctrl;
2832 	uint16_t mo_data;
2833 };
2834 
2835 /**
2836  * enum cdp_dp_cfg - CDP ENUMs to get to DP configation
2837  * @cfg_dp_enable_data_stall: context passed to be used by consumer
2838  * @cfg_dp_enable_p2p_ip_tcp_udp_checksum_offload: get P2P checksum config
2839  * @cfg_dp_enable_nan_ip_tcp_udp_checksum_offload: get NAN TX checksum config
2840  * @cfg_dp_enable_ip_tcp_udp_checksum_offload: get TX checksum config for others
2841  * @cfg_dp_disable_legacy_mode_csum_offload: Disable checksum offload for
2842  *                                           legacy modes
2843  * @cfg_dp_tso_enable: get TSO enable config
2844  * @cfg_dp_lro_enable: get LRO enable config
2845  * @cfg_dp_gro_enable: get GRO enable config
2846  * @cfg_dp_tc_based_dyn_gro_enable: get TC based dynamic gro enable config
2847  * @cfg_dp_tc_ingress_prio: priority value to be checked for tc filters
2848  * @cfg_dp_sg_enable:
2849  * @cfg_dp_tx_flow_start_queue_offset: get DP TX flow start queue offset
2850  * @cfg_dp_tx_flow_stop_queue_threshold: get DP TX flow stop queue threshold
2851  * @cfg_dp_ipa_uc_tx_buf_size: get IPA TX buf size config
2852  * @cfg_dp_ipa_uc_tx_partition_base: get IPA UC TX partition base config
2853  * @cfg_dp_ipa_uc_rx_ind_ring_count: get IPA rx indication ring count config
2854  * @cfg_dp_enable_flow_steering: get flow steerint enable config
2855  * @cfg_dp_reorder_offload_supported: get reorder offload support config
2856  * @cfg_dp_ce_classify_enable: get CE classify enable config
2857  * @cfg_dp_disable_intra_bss_fwd: get intra bss fwd config
2858  * @cfg_dp_pktlog_buffer_size: get packet log buffer size config
2859  * @cfg_dp_wow_check_rx_pending: get wow rx pending frame check config
2860  */
2861 enum cdp_dp_cfg {
2862 	cfg_dp_enable_data_stall,
2863 	cfg_dp_enable_p2p_ip_tcp_udp_checksum_offload,
2864 	cfg_dp_enable_nan_ip_tcp_udp_checksum_offload,
2865 	cfg_dp_enable_ip_tcp_udp_checksum_offload,
2866 	cfg_dp_disable_legacy_mode_csum_offload,
2867 	cfg_dp_tso_enable,
2868 	cfg_dp_lro_enable,
2869 	cfg_dp_gro_enable,
2870 	cfg_dp_tc_based_dyn_gro_enable,
2871 	cfg_dp_tc_ingress_prio,
2872 	cfg_dp_sg_enable,
2873 	cfg_dp_tx_flow_start_queue_offset,
2874 	cfg_dp_tx_flow_stop_queue_threshold,
2875 	cfg_dp_ipa_uc_tx_buf_size,
2876 	cfg_dp_ipa_uc_tx_partition_base,
2877 	cfg_dp_ipa_uc_rx_ind_ring_count,
2878 	cfg_dp_enable_flow_steering,
2879 	cfg_dp_reorder_offload_supported,
2880 	cfg_dp_ce_classify_enable,
2881 	cfg_dp_disable_intra_bss_fwd,
2882 	cfg_dp_pktlog_buffer_size,
2883 	cfg_dp_wow_check_rx_pending,
2884 };
2885 
2886 /**
2887  * struct cdp_peer_cookie - cookie used when creating peer
2888  * @ctx: context passed to be used by consumer
2889  * @mac_addr: MAC address of peer
2890  * @peer_id: peer id
2891  * @pdev_id: pdev_id
2892  * @cookie: cookie to be used by consumer
2893  */
2894 struct cdp_peer_cookie {
2895 	struct cdp_stats_cookie *ctx;
2896 	uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
2897 	uint8_t peer_id;
2898 	uint8_t pdev_id;
2899 	uint8_t cookie;
2900 };
2901 
2902 #ifdef WLAN_SUPPORT_RX_FISA
2903 struct cdp_flow_stats {
2904 	uint32_t aggr_count;
2905 	uint32_t curr_aggr_count;
2906 	uint32_t flush_count;
2907 	uint32_t bytes_aggregated;
2908 };
2909 #else
2910 /**
2911  * struct cdp_flow_stats - Per-Flow (5-tuple) statistics
2912  * @msdu_count: number of rx msdus matching this flow
2913  * @mon_msdu_count: number of msdus matching this flow in mon path
2914  *
2915  * HW also includes msdu_byte_count and timestamp, which
2916  * are not currently tracked in SW.
2917  */
2918 struct cdp_flow_stats {
2919 	uint32_t msdu_count;
2920 	uint32_t mon_msdu_count;
2921 };
2922 #endif
2923 
2924 /**
2925  * enum cdp_flow_fst_operation - RX FST operations allowed
2926  * @CDP_FLOW_FST_ENTRY_ADD: Add entry
2927  * @CDP_FLOW_FST_ENTRY_DEL: Delete entry
2928  * @CDP_FLOW_FST_RX_BYPASS_ENABLE: RX bypass enable
2929  * @CDP_FLOW_FST_RX_BYPASS_DISABLE: RX bypass disable
2930  */
2931 enum cdp_flow_fst_operation {
2932 	CDP_FLOW_FST_ENTRY_ADD,
2933 	CDP_FLOW_FST_ENTRY_DEL,
2934 	CDP_FLOW_FST_RX_BYPASS_ENABLE,
2935 	CDP_FLOW_FST_RX_BYPASS_DISABLE
2936 };
2937 
2938 /**
2939  * enum cdp_flow_protocol_type - RX FST supported protocol types,
2940  *                               mapped to HW spec
2941  * @CDP_FLOW_PROTOCOL_TYPE_TCP: TCP
2942  * @CDP_FLOW_PROTOCOL_TYPE_UDP: UDP
2943  */
2944 enum cdp_flow_protocol_type {
2945 	CDP_FLOW_PROTOCOL_TYPE_TCP = 6,
2946 	CDP_FLOW_PROTOCOL_TYPE_UDP = 17,
2947 };
2948 
2949 /**
2950  * struct cdp_rx_flow_tuple_info - RX flow tuple info used for addition/deletion
2951  * @tuple_populated:
2952  * @is_exception: Flows which are added to flow table but not aggregated.
2953  * @bypass_fisa: Flow which are not added to flow table.
2954  * @dest_ip_127_96: destination IP address bit fields 96-127
2955  * @dest_ip_95_64: destination IP address bit fields 64-95
2956  * @dest_ip_63_32: destination IP address bit fields 32-63
2957  * @dest_ip_31_0: destination IP address bit fields 0-31
2958  * @src_ip_127_96: source IP address bit fields 96-127
2959  * @src_ip_95_64: source IP address bit fields 64-95
2960  * @src_ip_63_32: source IP address bit fields 32-63
2961  * @src_ip_31_0: source IP address bit fields 0-31
2962  * @dest_port: destination port of flow
2963  * @src_port: source port of flow
2964  * @l4_protocol: protocol type in flow (TCP/UDP)
2965  */
2966 struct cdp_rx_flow_tuple_info {
2967 #ifdef WLAN_SUPPORT_RX_FISA
2968 	uint8_t tuple_populated;
2969 	uint8_t is_exception;
2970 	bool bypass_fisa;
2971 #endif
2972 	uint32_t dest_ip_127_96;
2973 	uint32_t dest_ip_95_64;
2974 	uint32_t dest_ip_63_32;
2975 	uint32_t dest_ip_31_0;
2976 	uint32_t src_ip_127_96;
2977 	uint32_t src_ip_95_64;
2978 	uint32_t src_ip_63_32;
2979 	uint32_t src_ip_31_0;
2980 	uint16_t dest_port;
2981 	uint16_t src_port;
2982 	uint16_t l4_protocol;
2983 };
2984 
2985 /**
2986  * struct cdp_rx_flow_info - RX flow info used for addition/deletion
2987  * @is_addr_ipv4: indicates whether given IP address is IPv4/IPv6
2988  * @op_code: add/delete/enable/disable operation requested
2989  * @flow_tuple_info: structure containing tuple info
2990  * @fse_metadata: metadata to be set in RX flow
2991  * @use_ppe_ds: use DS mode
2992  * @priority_vld: is priority valid
2993  * @service_code: service code for DS
2994  */
2995 struct cdp_rx_flow_info {
2996 	bool is_addr_ipv4;
2997 	enum cdp_flow_fst_operation op_code;
2998 	struct cdp_rx_flow_tuple_info flow_tuple_info;
2999 	uint16_t fse_metadata;
3000 	uint8_t use_ppe_ds;
3001 	uint8_t priority_vld;
3002 	uint16_t service_code;
3003 };
3004 
3005 #ifdef QCA_SUPPORT_SCAN_SPCL_VAP_STATS
3006 /**
3007  * struct cdp_scan_spcl_vap_stats - Special vap statistics info
3008  * @rx_ok_pkts: rx fcs ok pkts count
3009  * @rx_ok_bytes: rx fcs ok bytes count
3010  * @rx_err_pkts: rx fcs err pkts count
3011  * @rx_err_bytes: rx fcs err bytes count
3012  * @rx_mgmt_pkts: rx mgmt pkts count
3013  * @rx_ctrl_pkts: rx ctrl pkts count
3014  * @rx_data_pkts: rx data pkts count
3015  */
3016 struct cdp_scan_spcl_vap_stats {
3017 	uint64_t rx_ok_pkts;
3018 	uint64_t rx_ok_bytes;
3019 	uint64_t rx_err_pkts;
3020 	uint64_t rx_err_bytes;
3021 	uint64_t rx_mgmt_pkts;
3022 	uint64_t rx_ctrl_pkts;
3023 	uint64_t rx_data_pkts;
3024 };
3025 #endif
3026 
3027 /**
3028  * struct cdp_soc_attach_params
3029  *
3030  * @hif_handle: Opaque HIF handle
3031  * @htc_handle: Opaque HTC handle
3032  * @qdf_osdev: QDF device
3033  * @ol_ops: Offload Operations
3034  * @device_id: Device ID
3035  * @ml_context: DP ML object context
3036  * @mlo_chip_id: MLO chip id, for legacy SOCs chip_id need to 0
3037  * @mlo_enabled: MLO enable bit
3038  */
3039 struct cdp_soc_attach_params {
3040 	struct hif_opaque_softc *hif_handle;
3041 	HTC_HANDLE htc_handle;
3042 	qdf_device_t qdf_osdev;
3043 	struct ol_if_ops *ol_ops;
3044 	uint16_t device_id;
3045 	struct cdp_mlo_ctxt *ml_context;
3046 	uint8_t mlo_chip_id;
3047 	uint8_t mlo_enabled;
3048 };
3049 
3050 /**
3051  * struct cdp_pdev_attach_params - params for pdev attach
3052  *
3053  * @htc_handle: HTC handle for host-target interface
3054  * @qdf_osdev: QDF OS device
3055  * @pdev_id: PDEV ID
3056  * @mlo_link_id: ML link id
3057  */
3058 struct cdp_pdev_attach_params {
3059 	HTC_HANDLE htc_handle;
3060 	qdf_device_t qdf_osdev;
3061 	uint8_t pdev_id;
3062 	uint32_t mlo_link_id;
3063 };
3064 #endif
3065