xref: /wlan-driver/qca-wifi-host-cmn/dp/inc/cdp_txrx_ops.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2024 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_ops.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_OPS_H_
26 #define _CDP_TXRX_CMN_OPS_H_
27 
28 #include <cdp_txrx_cmn_struct.h>
29 #include <cdp_txrx_stats_struct.h>
30 #include "cdp_txrx_handle.h"
31 #include <cdp_txrx_mon_struct.h>
32 #include "wlan_objmgr_psoc_obj.h"
33 #include <wmi_unified_api.h>
34 #include <wdi_event_api.h>
35 
36 #ifdef IPA_OFFLOAD
37 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) || \
38 	defined(CONFIG_IPA_WDI_UNIFIED_API)
39 #include <qdf_ipa_wdi3.h>
40 #else
41 #include <qdf_ipa.h>
42 #endif
43 #endif
44 #ifdef WLAN_SUPPORT_DPDK
45 #include <cfgmgr_api_if.h>
46 #include <dpdk_wlan_msg_types.h>
47 #endif
48 
49 /*
50  * bitmap values to indicate special handling of peer_delete
51  */
52 #define CDP_PEER_DELETE_NO_SPECIAL             0
53 #define CDP_PEER_DO_NOT_START_UNMAP_TIMER      1
54 
55 struct hif_opaque_softc;
56 /*
57  * cdp_ctrl_mlo_mgr - opaque handle for mlo manager context
58  */
59 struct cdp_ctrl_mlo_mgr;
60 
61 
62 /* same as ieee80211_nac_param */
63 enum cdp_nac_param_cmd {
64 	/* IEEE80211_NAC_PARAM_ADD */
65 	CDP_NAC_PARAM_ADD = 1,
66 	/* IEEE80211_NAC_PARAM_DEL */
67 	CDP_NAC_PARAM_DEL,
68 	/* IEEE80211_NAC_PARAM_LIST */
69 	CDP_NAC_PARAM_LIST,
70 };
71 
72 /**
73  * enum cdp_tx_filter_action - TX peer filtering action
74  * @CDP_TX_FILTER_ACTION_ADD: add peer mac address
75  * @CDP_TX_FILTER_ACTION_DEL: delete peer mac address
76  * @CDP_TX_FILTER_ACTION_ENABLE_FILTERING: Enable Tx peer filtering
77  * @CDP_TX_FILTER_ACTION_CLEAR_FILTERING: Clear Tx peer filtering
78  */
79 enum cdp_tx_filter_action {
80 	CDP_TX_FILTER_ACTION_ADD = 1,
81 	CDP_TX_FILTER_ACTION_DEL,
82 	CDP_TX_FILTER_ACTION_ENABLE_FILTERING,
83 	CDP_TX_FILTER_ACTION_CLEAR_FILTERING,
84 };
85 
86 #define CDP_DELBA_INTERVAL_MS 3000
87 /**
88  * enum cdp_delba_rcode - CDP reason code for sending DELBA
89  * @CDP_DELBA_REASON_NONE: None
90  * @CDP_DELBA_2K_JUMP: Sending DELBA from 2k_jump_handle
91  */
92 enum cdp_delba_rcode {
93 	CDP_DELBA_REASON_NONE = 0,
94 	CDP_DELBA_2K_JUMP,
95 };
96 
97 /**
98  * enum vdev_peer_protocol_enter_exit - whether ingress or egress
99  * @CDP_VDEV_PEER_PROTOCOL_IS_INGRESS: ingress
100  * @CDP_VDEV_PEER_PROTOCOL_IS_EGRESS: egress
101  *
102  * whether ingress or egress
103  */
104 enum vdev_peer_protocol_enter_exit {
105 	CDP_VDEV_PEER_PROTOCOL_IS_INGRESS,
106 	CDP_VDEV_PEER_PROTOCOL_IS_EGRESS
107 };
108 
109 /**
110  * enum vdev_peer_protocol_tx_rx - whether tx or rx
111  * @CDP_VDEV_PEER_PROTOCOL_IS_TX: tx
112  * @CDP_VDEV_PEER_PROTOCOL_IS_RX: rx
113  *
114  * whether tx or rx
115  */
116 enum vdev_peer_protocol_tx_rx {
117 	CDP_VDEV_PEER_PROTOCOL_IS_TX,
118 	CDP_VDEV_PEER_PROTOCOL_IS_RX
119 };
120 
121 /**
122  * enum vdev_ll_conn_actions - Actions to informvdev about
123  *			       low latency connection.
124  * @CDP_VDEV_LL_CONN_ADD: Add Low latency connection
125  * @CDP_VDEV_LL_CONN_DEL: Delete Low latency connection
126  */
127 enum vdev_ll_conn_actions {
128 	CDP_VDEV_LL_CONN_ADD,
129 	CDP_VDEV_LL_CONN_DEL
130 };
131 
132 /**
133  * enum cdp_peer_txq_flush_policy: Values for peer TX TID queues flush policy
134  * @CDP_PEER_TXQ_FLUSH_POLICY_NONE: No flush policy configured
135  * @CDP_PEER_TXQ_FLUSH_POLICY_IMMEDIATE: Flush peer TX TID queue(s) immediately
136  * @CDP_PEER_TXQ_FLUSH_POLICY_TWT_SP_END: Flush peer TX TID queue(s) at SP end
137  * @CDP_PEER_TXQ_FLUSH_POLICY_INVALID: Invalid policy
138  *
139  * This is used to map the 'flush_policy' in WMI_PEER_FLUSH_POLICY_CMDID
140  */
141 enum cdp_peer_txq_flush_policy {
142 	CDP_PEER_TXQ_FLUSH_POLICY_NONE = 0,
143 	CDP_PEER_TXQ_FLUSH_POLICY_IMMEDIATE = 1,
144 	CDP_PEER_TXQ_FLUSH_POLICY_TWT_SP_END = 2,
145 
146 	/* keep last */
147 	CDP_PEER_TXQ_FLUSH_POLICY_INVALID,
148 };
149 
150 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
151 /**
152  * struct cdp_mlo_ops - MLO ops for multichip
153  * @mlo_soc_setup: setup DP mlo for SOC
154  * @mlo_soc_teardown: teardown DP mlo for SOC
155  * @mlo_setup_complete: indication to DP that all SOCs mlo is setup
156  * @mlo_update_delta_tsf2: update delta tsf2 for link
157  * @mlo_update_delta_tqm: update delta tqm for SOC
158  * @mlo_update_mlo_ts_offset: update MLO timestamp offset for SOC
159  * @mlo_ctxt_attach: Attach DP MLO context
160  * @mlo_ctxt_detach: Detach DP MLO context
161  * @mlo_get_mld_vdev_stats: Get MLD vdev stats
162  */
163 struct cdp_mlo_ops {
164 	void (*mlo_soc_setup)(struct cdp_soc_t *cdp_soc,
165 			      struct cdp_mlo_ctxt *mlo_ctxt);
166 	void (*mlo_soc_teardown)(struct cdp_soc_t *cdp_soc,
167 				 struct cdp_mlo_ctxt *mlo_ctxt,
168 				 bool is_force_down);
169 	void (*mlo_setup_complete)(struct cdp_mlo_ctxt *mlo_ctxt);
170 	struct cdp_mlo_ctxt *(*mlo_ctxt_attach)(struct cdp_ctrl_mlo_mgr *m_ctx);
171 	void (*mlo_ctxt_detach)(struct cdp_mlo_ctxt *mlo_ctxt);
172 	void (*mlo_update_delta_tsf2)(struct cdp_soc_t *soc_hdl,
173 				      uint8_t pdev_id,
174 				      uint64_t delta_tsf2);
175 	void (*mlo_update_delta_tqm)(struct cdp_soc_t *soc_hdl,
176 				     uint64_t delta_tqm);
177 	void (*mlo_update_mlo_ts_offset)(struct cdp_soc_t *soc_hdl,
178 					 uint64_t offset);
179 	QDF_STATUS (*mlo_get_mld_vdev_stats)(struct cdp_soc_t *soc,
180 					     uint8_t vdev_id, void *buf,
181 					     bool link_vdev_only);
182 };
183 #endif
184 
185 #if defined(WLAN_FEATURE_11BE_MLO)
186 /**
187  * struct cdp_cmn_mlo_ops - CDP common MLO ops
188  * @mlo_dev_ctxt_create: MLO device context create
189  * @mlo_dev_ctxt_attach: MLO device context attach
190  * @mlo_dev_ctxt_detach: MLO device context detach
191  * @mlo_dev_ctxt_destroy: MLO device context destroy
192  */
193 struct cdp_cmn_mlo_ops {
194 	QDF_STATUS (*mlo_dev_ctxt_create)(struct cdp_soc_t *soc,
195 					  uint8_t *mld_mac_addr);
196 	QDF_STATUS (*mlo_dev_ctxt_attach)(struct cdp_soc_t *soc,
197 					  uint8_t vdev_id,
198 					  uint8_t *mld_mac_addr);
199 	QDF_STATUS (*mlo_dev_ctxt_detach)(struct cdp_soc_t *soc,
200 					  uint8_t vdev_id,
201 					  uint8_t *mld_mac_addr);
202 	QDF_STATUS (*mlo_dev_ctxt_destroy)(struct cdp_soc_t *soc,
203 					   uint8_t *mld_mac_addr);
204 };
205 #endif
206 
207 /******************************************************************************
208  *
209  * Control Interface (A Interface)
210  *
211  *****************************************************************************/
212 
213 struct cdp_cmn_ops {
214 
215 	QDF_STATUS (*txrx_soc_attach_target)(ol_txrx_soc_handle soc);
216 
217 	int (*txrx_pdev_attach_target)(ol_txrx_soc_handle soc, uint8_t pdev_id);
218 
219 	QDF_STATUS (*txrx_vdev_attach)
220 		(struct cdp_soc_t *soc, uint8_t pdev_id,
221 		 struct cdp_vdev_info *vdev_info);
222 
223 	QDF_STATUS
224 	(*txrx_vdev_detach)(struct cdp_soc_t *cdp_soc, uint8_t vdev_id,
225 			    ol_txrx_vdev_delete_cb callback,
226 			    void *cb_context);
227 
228 	QDF_STATUS (*txrx_pdev_attach)
229 		(ol_txrx_soc_handle soc,
230 		 struct cdp_pdev_attach_params *params);
231 
232 	int (*txrx_pdev_post_attach)(struct cdp_soc_t *soc, uint8_t pdev_id);
233 
234 	void
235 	(*txrx_pdev_pre_detach)(struct cdp_soc_t *soc, uint8_t pdev_id,
236 				int force);
237 
238 	QDF_STATUS
239 	(*txrx_pdev_detach)(struct cdp_soc_t *psoc, uint8_t pdev_id,
240 			    int force);
241 
242 	/**
243 	 * txrx_pdev_deinit() - Deinitialize pdev and dp ring memory
244 	 * @soc: soc dp handle
245 	 * @pdev_id: id of Dp pdev handle
246 	 * @force: Force deinit or not
247 	 *
248 	 * Return: QDF_STATUS
249 	 */
250 	QDF_STATUS
251 	(*txrx_pdev_deinit)(struct cdp_soc_t *soc, uint8_t pdev_id,
252 			    int force);
253 
254 	QDF_STATUS
255 	(*txrx_peer_create)
256 		(ol_txrx_soc_handle soc, uint8_t vdev_id,
257 		 uint8_t *peer_mac_addr, enum cdp_peer_type peer_type);
258 
259 	QDF_STATUS
260 	(*txrx_peer_setup)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
261 			   uint8_t *peer_mac,
262 			   struct cdp_peer_setup_info *setup_info);
263 
264 	QDF_STATUS
265 	(*txrx_cp_peer_del_response)
266 		(ol_txrx_soc_handle soc, uint8_t vdev_id,
267 		 uint8_t *peer_mac_addr);
268 
269 	QDF_STATUS
270 	(*txrx_peer_teardown)
271 		(struct cdp_soc_t *soc, uint8_t vdev_id, uint8_t *peer_mac);
272 
273 	int (*txrx_peer_add_ast)
274 		(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac,
275 		uint8_t *mac_addr, enum  cdp_txrx_ast_entry_type type,
276 		uint32_t flags);
277 
278 	int (*txrx_peer_update_ast)
279 		(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac,
280 		uint8_t *mac_addr, uint32_t flags);
281 
282 	bool (*txrx_peer_get_ast_info_by_soc)
283 		(ol_txrx_soc_handle soc, uint8_t *ast_mac_addr,
284 		 struct cdp_ast_entry_info *ast_entry_info);
285 
286 	bool (*txrx_peer_get_ast_info_by_pdev)
287 		(ol_txrx_soc_handle soc, uint8_t *ast_mac_addr,
288 		 uint8_t pdev_id,
289 		 struct cdp_ast_entry_info *ast_entry_info);
290 
291 	QDF_STATUS (*txrx_peer_ast_delete_by_soc)
292 		(ol_txrx_soc_handle soc, uint8_t *ast_mac_addr,
293 		txrx_ast_free_cb callback,
294 		void *cookie);
295 
296 	QDF_STATUS (*txrx_peer_ast_delete_by_pdev)
297 		(ol_txrx_soc_handle soc, uint8_t *ast_mac_addr,
298 		 uint8_t pdev_id,
299 		txrx_ast_free_cb callback,
300 		void *cookie);
301 
302 	QDF_STATUS (*txrx_peer_HMWDS_ast_delete)
303 		(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *dest_mac,
304 		 uint8_t type, uint8_t delete_in_fw);
305 
306 	QDF_STATUS
307 	(*txrx_peer_delete)(struct cdp_soc_t *soc, uint8_t vdev_id,
308 			    uint8_t *peer_mac, uint32_t bitmap,
309 			    enum cdp_peer_type peer_type);
310 
311 	QDF_STATUS (*txrx_set_monitor_mode)(struct cdp_soc_t *soc,
312 					    uint8_t vdev_id,
313 					    uint8_t smart_monitor);
314 	void (*txrx_peer_delete_sync)(struct cdp_soc_t *soc, uint8_t vdev_id,
315 				      uint8_t *peer_mac,
316 				      QDF_STATUS(*delete_cb)(
317 						uint8_t vdev_id,
318 						uint32_t peerid_cnt,
319 						uint16_t *peerid_list),
320 				      uint32_t bitmap);
321 
322 	void (*txrx_peer_unmap_sync_cb_set)(struct cdp_soc_t *soc_hdl,
323 					    uint8_t pdev_id,
324 					    ol_txrx_peer_unmap_sync_cb
325 					    peer_unmap_sync);
326 
327 	QDF_STATUS
328 	(*txrx_get_peer_mac_from_peer_id)
329 		(struct cdp_soc_t *cdp_soc,
330 		 uint32_t peer_id, uint8_t *peer_mac);
331 
332 	void
333 	(*txrx_vdev_tx_lock)(struct cdp_soc_t *soc, uint8_t vdev_id);
334 
335 	void
336 	(*txrx_vdev_tx_unlock)(struct cdp_soc_t *soc, uint8_t vdev_id);
337 
338 	QDF_STATUS
339 	(*txrx_ath_getstats)(struct cdp_soc_t *soc, uint8_t id,
340 			     struct cdp_dev_stats *stats, uint8_t type);
341 
342 	QDF_STATUS
343 	(*txrx_set_gid_flag)(struct cdp_soc_t *soc, uint8_t pdev_id,
344 			     u_int8_t *mem_status,
345 			     u_int8_t *user_position);
346 
347 	uint32_t (*txrx_fw_supported_enh_stats_version)(struct cdp_soc_t *soc,
348 							uint8_t pdev_id);
349 
350 	QDF_STATUS
351 	(*txrx_if_mgmt_drain)(struct cdp_soc_t *soc, uint8_t pdev_id,
352 			      int force);
353 
354 	QDF_STATUS
355 	(*txrx_set_curchan)(struct cdp_soc_t *soc, uint8_t pdev_id,
356 			    uint32_t chan_mhz);
357 
358 	QDF_STATUS
359 	(*txrx_set_privacy_filters)
360 		(struct cdp_soc_t *soc, uint8_t vdev_id, void *filter,
361 		 uint32_t num);
362 
363 	uint32_t (*txrx_get_cfg)(struct cdp_soc_t *soc, enum cdp_dp_cfg cfg);
364 
365 	/********************************************************************
366 	 * Data Interface (B Interface)
367 	 ********************************************************************/
368 
369 	QDF_STATUS
370 	(*txrx_vdev_register)(struct cdp_soc_t *soc, uint8_t vdev_id,
371 			      ol_osif_vdev_handle osif_vdev,
372 			      struct ol_txrx_ops *txrx_ops);
373 
374 	int (*txrx_mgmt_send)(struct cdp_soc_t *soc, uint8_t vdev_id,
375 			      qdf_nbuf_t tx_mgmt_frm, uint8_t type);
376 
377 	int (*txrx_mgmt_send_ext)(struct cdp_soc_t *soc, uint8_t vdev_id,
378 				  qdf_nbuf_t tx_mgmt_frm, uint8_t type,
379 				  uint8_t use_6mbps, uint16_t chanfreq);
380 
381 	/**
382 	 * ol_txrx_mgmt_tx_cb - tx management delivery notification
383 	 * callback function
384 	 */
385 
386 	QDF_STATUS
387 	(*txrx_mgmt_tx_cb_set)(struct cdp_soc_t *soc, uint8_t pdev_id,
388 			       uint8_t type,
389 			       ol_txrx_mgmt_tx_cb download_cb,
390 			       ol_txrx_mgmt_tx_cb ota_ack_cb,
391 			       void *ctxt);
392 
393 	/**
394 	 * ol_txrx_data_tx_cb - Function registered with the data path
395 	 * that is called when tx frames marked as "no free" are
396 	 * done being transmitted
397 	 */
398 
399 	void (*txrx_data_tx_cb_set)(struct cdp_soc_t *soc, uint8_t vdev_id,
400 				    ol_txrx_data_tx_cb callback, void *ctxt);
401 
402 	qdf_nbuf_t (*tx_send_exc)
403 		(ol_txrx_soc_handle soc, uint8_t vdev_id, qdf_nbuf_t msdu_list,
404 		 struct cdp_tx_exception_metadata *tx_exc_metadata);
405 
406 	/*******************************************************************
407 	 * Statistics and Debugging Interface (C Interface)
408 	 ********************************************************************/
409 
410 	int (*txrx_aggr_cfg)(struct cdp_soc_t *soc, uint8_t vdev_id,
411 			     int max_subfrms_ampdu,
412 			     int max_subfrms_amsdu);
413 
414 	A_STATUS
415 	(*txrx_fw_stats_get)(struct cdp_soc_t *soc, uint8_t vdev_id,
416 			     struct ol_txrx_stats_req *req,
417 			     bool per_vdev, bool response_expected);
418 
419 	int (*txrx_debug)(struct cdp_soc_t *soc, uint8_t vdev_id,
420 			  int debug_specs);
421 
422 	QDF_STATUS
423 	(*txrx_fw_stats_cfg)(struct cdp_soc_t *soc, uint8_t vdev_id,
424 			     uint8_t cfg_stats_type, uint32_t cfg_val);
425 
426 	void (*txrx_print_level_set)(unsigned level);
427 
428 	/**
429 	 * ol_txrx_get_vdev_mac_addr() - Return mac addr of vdev
430 	 * @soc: datapath soc handle
431 	 * @vdev_id: vdev id
432 	 *
433 	 * Return: vdev mac address
434 	 */
435 	uint8_t * (*txrx_get_vdev_mac_addr)(struct cdp_soc_t *soc,
436 					    uint8_t vdev_id);
437 
438 	/**
439 	 * ol_txrx_get_ctrl_pdev_from_vdev() - Return control pdev of vdev
440 	 * @soc: datapath soc handle
441 	 * @vdev_id: vdev id
442 	 *
443 	 * Return: Handle to control pdev
444 	 */
445 	struct cdp_cfg *(*txrx_get_ctrl_pdev_from_vdev)(struct cdp_soc_t *soc,
446 							uint8_t vdev_id);
447 
448 	/**
449 	 * txrx_get_mon_vdev_from_pdev() - Return monitor mode vdev
450 	 * @soc: datapath soc handle
451 	 * @pdev: pdev id
452 	 *
453 	 * Return: vdev_id
454 	 */
455 	uint8_t (*txrx_get_mon_vdev_from_pdev)(struct cdp_soc_t *soc,
456 					       uint8_t pdev_id);
457 
458 	void (*txrx_soc_detach)(struct cdp_soc_t *soc);
459 
460 	/**
461 	 * txrx_soc_deinit() - Deinitialize dp soc and dp ring memory
462 	 * @soc: Opaque Dp handle
463 	 *
464 	 * Return None
465 	 */
466 	void (*txrx_soc_deinit)(struct cdp_soc_t *soc);
467 
468 	/**
469 	 * txrx_soc_init() - Initialize dp soc and dp ring memory
470 	 * @soc: Opaque Dp handle
471 	 * @ctrl_psoc: Opaque Cp handle
472 	 * @htchdl: Opaque htc handle
473 	 * @hifhdl: Opaque hif handle
474 	 *
475 	 * Return: None
476 	 */
477 	void *(*txrx_soc_init)(struct cdp_soc_t *soc,
478 			       struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
479 			       struct hif_opaque_softc *hif_handle,
480 			       HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
481 			       struct ol_if_ops *ol_ops, uint16_t device_id);
482 
483 	QDF_STATUS (*txrx_pdev_init)(ol_txrx_soc_handle soc,
484 				     HTC_HANDLE htc_handle,
485 				     qdf_device_t qdf_osdev,
486 				     uint8_t pdev_id);
487 
488 	/**
489 	 * txrx_tso_soc_attach() - TSO attach handler triggered during
490 	 * dynamic tso activation
491 	 * @soc: Opaque Dp handle
492 	 *
493 	 * Return: QDF status
494 	 */
495 	QDF_STATUS (*txrx_tso_soc_attach)(struct cdp_soc_t *soc);
496 
497 	/**
498 	 * txrx_tso_soc_detach() - TSO detach handler triggered during
499 	 * dynamic tso de-activation
500 	 * @soc: Opaque Dp handle
501 	 *
502 	 * Return: QDF status
503 	 */
504 	QDF_STATUS (*txrx_tso_soc_detach)(struct cdp_soc_t *soc);
505 	int (*addba_resp_tx_completion)(struct cdp_soc_t *cdp_soc,
506 					uint8_t *peer_mac,
507 					uint16_t vdev_id, uint8_t tid,
508 					int status);
509 
510 	int (*addba_requestprocess)(struct cdp_soc_t *cdp_soc,
511 				    uint8_t *peer_mac,
512 				    uint16_t vdev_id,
513 				    uint8_t dialogtoken,
514 				    uint16_t tid, uint16_t batimeout,
515 				    uint16_t buffersize,
516 				    uint16_t startseqnum);
517 
518 	QDF_STATUS
519 	(*addba_responsesetup)(struct cdp_soc_t *cdp_soc,
520 			       uint8_t *peer_mac,
521 			       uint16_t vdev_id, uint8_t tid,
522 			       uint8_t *dialogtoken, uint16_t *statuscode,
523 			       uint16_t *buffersize, uint16_t *batimeout);
524 
525 	int (*delba_process)(struct cdp_soc_t *cdp_soc, uint8_t *peer_mac,
526 			     uint16_t vdev_id, int tid, uint16_t reasoncode);
527 
528 	QDF_STATUS (*tid_update_ba_win_size)(ol_txrx_soc_handle soc,
529 					     uint8_t *peer_mac,
530 					     uint16_t vdev_id, uint8_t tid,
531 					     uint16_t buffersize);
532 	/**
533 	 * delba_tx_completion() - Indicate delba tx status
534 	 * @cdp_soc: soc handle
535 	 * @peer_mac: Peer mac address
536 	 * @vdev_id: vdev id
537 	 * @tid: Tid number
538 	 * @status: Tx completion status
539 	 *
540 	 * Return: 0 on Success, 1 on failure
541 	 */
542 	int (*delba_tx_completion)(struct cdp_soc_t *cdp_soc, uint8_t *peer_mac,
543 				   uint16_t vdev_id,
544 				   uint8_t tid, int status);
545 
546 	QDF_STATUS
547 	(*set_addba_response)(struct cdp_soc_t *cdp_soc, uint8_t *peer_mac,
548 			      uint16_t vdev_id, uint8_t tid,
549 			      uint16_t statuscode);
550 
551 	QDF_STATUS
552 	(*set_vdev_dscp_tid_map)(struct cdp_soc_t *soc_handle,
553 				 uint8_t vdev_id, uint8_t map_id);
554 	int (*txrx_get_total_per)(struct cdp_soc_t *soc, uint8_t pdev_id);
555 
556 	void (*flush_cache_rx_queue)(void);
557 
558 	QDF_STATUS (*set_pdev_dscp_tid_map)(struct cdp_soc_t *soc_handle,
559 					    uint8_t pdev_id,
560 					    uint8_t map_id,
561 					    uint8_t tos, uint8_t tid);
562 
563 	QDF_STATUS (*txrx_stats_request)(struct cdp_soc_t *soc_handle,
564 					 uint8_t vdev_id,
565 					 struct cdp_txrx_stats_req *req);
566 
567 	QDF_STATUS (*display_stats)(struct cdp_soc_t *psoc, uint16_t value,
568 				    enum qdf_stats_verbosity_level level);
569 
570 	/**
571 	 * notify_asserted_soc() - Notified asserted soc info to UMAC Reset
572 	 * @cdp_soc: soc handle
573 	 *
574 	 * Return: QDF_STATUS
575 	 */
576 	QDF_STATUS (*notify_asserted_soc)(struct cdp_soc_t *psoc);
577 
578 	QDF_STATUS (*txrx_intr_attach)(struct cdp_soc_t *soc_handle);
579 	void (*txrx_intr_detach)(struct cdp_soc_t *soc_handle);
580 	void (*txrx_ppeds_stop)(struct cdp_soc_t *soc_handle);
581 	QDF_STATUS  (*set_pn_check)(struct cdp_soc_t *soc_handle,
582 				    uint8_t vdev_id, uint8_t *peermac,
583 				    enum cdp_sec_type sec_type,
584 				    uint32_t *rx_pn);
585 
586 	QDF_STATUS(*set_key_sec_type)(struct cdp_soc_t *soc_handle,
587 				      uint8_t vdev_id, uint8_t *peermac,
588 				      enum cdp_sec_type sec_type,
589 				      bool is_unicast);
590 
591 	QDF_STATUS (*update_config_parameters)(struct cdp_soc *psoc,
592 			struct cdp_config_params *params);
593 
594 	void *(*get_dp_txrx_handle)(ol_txrx_soc_handle soc, uint8_t pdev_id);
595 	void (*set_dp_txrx_handle)(ol_txrx_soc_handle soc, uint8_t pdev_id,
596 				   void *dp_hdl);
597 
598 	void *(*get_vdev_dp_ext_txrx_handle)(struct cdp_soc_t *soc,
599 					     uint8_t vdev_id);
600 	QDF_STATUS (*set_vdev_dp_ext_txrx_handle)(struct cdp_soc_t *soc,
601 						  uint8_t vdev_id,
602 						  uint16_t size);
603 
604 	void *(*get_soc_dp_txrx_handle)(struct cdp_soc *soc_handle);
605 	void (*set_soc_dp_txrx_handle)(struct cdp_soc *soc_handle,
606 			void *dp_txrx_handle);
607 
608 	QDF_STATUS (*map_pdev_to_lmac)(ol_txrx_soc_handle soc, uint8_t pdev_id,
609 				       uint32_t lmac_id);
610 
611 	QDF_STATUS (*handle_mode_change)(ol_txrx_soc_handle soc,
612 					 uint8_t pdev_id, uint32_t lmac_id);
613 
614 	QDF_STATUS (*set_pdev_status_down)(struct cdp_soc_t *soc_handle,
615 					   uint8_t pdev_id, bool is_pdev_down);
616 
617 	QDF_STATUS (*txrx_peer_reset_ast)
618 		(ol_txrx_soc_handle soc, uint8_t *ast_macaddr,
619 		 uint8_t *peer_macaddr, uint8_t vdev_id);
620 
621 	QDF_STATUS (*txrx_peer_reset_ast_table)(ol_txrx_soc_handle soc,
622 						uint8_t vdev_id);
623 
624 	void (*txrx_peer_flush_ast_table)(ol_txrx_soc_handle soc);
625 	void (*txrx_set_ba_aging_timeout)(struct cdp_soc_t *soc_handle,
626 					  uint8_t ac, uint32_t value);
627 	void (*txrx_get_ba_aging_timeout)(struct cdp_soc_t *soc_handle,
628 					  uint8_t ac, uint32_t *value);
629 
630 	QDF_STATUS (*txrx_peer_map_attach)(ol_txrx_soc_handle soc,
631 					   uint32_t num_peers,
632 					   uint32_t max_ast_index,
633 					   uint8_t peer_map_unmap_v);
634 
635 	QDF_STATUS (*set_soc_param)(ol_txrx_soc_handle soc,
636 				    enum cdp_soc_param_t param,
637 				    uint32_t value);
638 
639 	ol_txrx_tx_fp tx_send;
640 
641 	/* tx_fast_send will be called only in AP mode when all the
642 	 * transmit path features are disabled including extended stats
643 	 */
644 	ol_txrx_tx_fast_fp tx_fast_send;
645 
646 	void (*set_tx_pause)(ol_txrx_soc_handle soc, bool flag);
647 
648 	/**
649 	 * txrx_get_os_rx_handles_from_vdev() - Return function, osif vdev
650 	 *					to deliver pkt to stack.
651 	 * @soc: datapath soc handle
652 	 * @vdev: vdev id
653 	 * @stack_fn: pointer to - function pointer to deliver RX pkt to stack
654 	 * @osif_vdev: pointer to - osif vdev to deliver RX packet to.
655 	 */
656 	void (*txrx_get_os_rx_handles_from_vdev)
657 					(ol_txrx_soc_handle soc,
658 					 uint8_t vdev_id,
659 					 ol_txrx_rx_fp *stack_fn,
660 					 ol_osif_vdev_handle *osif_vdev);
661 
662 	void (*set_rate_stats_ctx)(struct cdp_soc_t *soc,
663 				   void *ctx);
664 
665 	int (*txrx_classify_update)
666 		(struct cdp_soc_t *soc, uint8_t vdev_id, qdf_nbuf_t skb,
667 		 enum txrx_direction, struct ol_txrx_nbuf_classify *nbuf_class);
668 
669 	bool (*get_dp_capabilities)(struct cdp_soc_t *soc,
670 				    enum cdp_capabilities dp_caps);
671 	void* (*get_rate_stats_ctx)(struct cdp_soc_t *soc);
672 	QDF_STATUS (*txrx_peer_flush_rate_stats)(struct cdp_soc_t *soc,
673 						 uint8_t pdev_id,
674 						 void *buf);
675 	void* (*txrx_peer_get_peerstats_ctx)(struct cdp_soc_t *soc,
676 					     uint8_t vdev_id,
677 					     uint8_t *mac_addr);
678 
679 	QDF_STATUS (*txrx_flush_rate_stats_request)(struct cdp_soc_t *soc,
680 						    uint8_t pdev_id);
681 	QDF_STATUS (*set_pdev_pcp_tid_map)(struct cdp_soc_t *soc,
682 					   uint8_t pdev_id,
683 					   uint8_t pcp, uint8_t tid);
684 	QDF_STATUS (*set_vdev_pcp_tid_map)(struct cdp_soc_t *soc,
685 					   uint8_t vdev_id,
686 					   uint8_t pcp, uint8_t tid);
687 #ifdef DP_RX_UDP_OVER_PEER_ROAM
688 	QDF_STATUS (*txrx_update_roaming_peer)(struct cdp_soc_t *soc,
689 					       uint8_t vdev_id,
690 					       uint8_t *peer_mac,
691 					       uint32_t auth_status);
692 #endif
693 
694 #ifdef QCA_MULTIPASS_SUPPORT
695 	QDF_STATUS (*set_vlan_groupkey)(struct cdp_soc_t *soc, uint8_t vdev_id,
696 					uint16_t vlan_id, uint16_t group_key);
697 #endif
698 
699 	uint16_t (*get_peer_mac_list)
700 		 (ol_txrx_soc_handle soc, uint8_t vdev_id,
701 		  u_int8_t newmac[][QDF_MAC_ADDR_SIZE], uint16_t mac_cnt,
702 		  bool limit);
703 	uint16_t (*get_peer_id)(ol_txrx_soc_handle soc,
704 				uint8_t vdev_id,
705 				uint8_t *mac);
706 #ifdef QCA_SUPPORT_WDS_EXTENDED
707 	QDF_STATUS (*set_wds_ext_peer_rx)(ol_txrx_soc_handle soc,
708 					  uint8_t vdev_id,
709 					  uint8_t *mac,
710 					  ol_txrx_rx_fp rx,
711 					  ol_osif_peer_handle osif_peer);
712 	QDF_STATUS (*get_wds_ext_peer_osif_handle)
713 					(ol_txrx_soc_handle soc,
714 					 uint8_t vdev_id,
715 					 uint8_t *mac,
716 					 ol_osif_peer_handle *osif_peer);
717 	QDF_STATUS (*set_wds_ext_peer_bit)(ol_txrx_soc_handle soc,
718 					   uint8_t *mac);
719 #endif /* QCA_SUPPORT_WDS_EXTENDED */
720 	QDF_STATUS (*txrx_drain)(ol_txrx_soc_handle soc, uint8_t rx_only);
721 	int (*get_free_desc_poolsize)(struct cdp_soc_t *soc);
722 #ifdef WLAN_SYSFS_DP_STATS
723 	QDF_STATUS (*txrx_sysfs_fill_stats)(ol_txrx_soc_handle soc,
724 					    char *buf, uint32_t buf_size);
725 	QDF_STATUS (*txrx_sysfs_set_stat_type)(ol_txrx_soc_handle soc,
726 					       uint32_t stat_type,
727 					       uint32_t mac_id);
728 #endif /* WLAN_SYSFS_DP_STATS */
729 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
730 	void (*set_pkt_capture_mode)(struct cdp_soc_t *soc, bool val);
731 #endif
732 
733 #ifdef FEATURE_RUNTIME_PM
734 	void (*set_rtpm_tput_policy)(struct cdp_soc_t *soc, bool val);
735 #endif
736 
737 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
738 	void (*txrx_recovery_vdev_flush_peers)(struct cdp_soc_t *soc,
739 					       uint8_t vdev_id,
740 					       bool mlo_peers_only);
741 #endif
742 	QDF_STATUS (*txrx_umac_reset_deinit)(ol_txrx_soc_handle soc);
743 	QDF_STATUS (*txrx_umac_reset_init)(ol_txrx_soc_handle soc);
744 	void (*txrx_get_tsf_time)(struct cdp_soc_t *soc_hdl, uint32_t tsf_id,
745 				  uint32_t mac_id, uint64_t *tsf,
746 				  uint64_t *tsf_sync_soc_time);
747 
748 	void (*txrx_get_tsf2_offset)(struct cdp_soc_t *soc_hdl, uint8_t mac_id,
749 				     uint64_t *value);
750 	void (*txrx_get_tqm_offset)(struct cdp_soc_t *soc_hdl, uint64_t *value);
751 	uint64_t (*get_fst_cmem_base)(struct cdp_soc_t *soc_hdl, uint64_t size);
752 #ifdef WLAN_SUPPORT_DPDK
753 	uint8_t (*dpdk_get_ring_info)(struct cdp_soc_t *soc_hdl,
754 				      qdf_uio_info_t *uio_info);
755 	int (*cfgmgr_get_soc_info)(struct cdp_soc_t *soc_hdl, uint8_t soc_id,
756 				   struct dpdk_wlan_soc_info_event *ev_buf);
757 	int (*cfgmgr_get_vdev_info)(struct cdp_soc_t *soc_hdl, uint8_t soc_id,
758 				    struct dpdk_wlan_vdev_info_event *ev_buf);
759 	int (*cfgmgr_get_peer_info)(struct cdp_soc_t *soc_hdl, uint8_t soc_id,
760 				    struct dpdk_wlan_peer_info *ev_buf);
761 	int (*cfgmgr_get_vdev_create_evt_info)(
762 				struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
763 				struct dpdk_wlan_vdev_create_info *ev_buf);
764 	int (*cfgmgr_get_peer_create_evt_info)(
765 				struct cdp_soc_t *soc_hdl, uint16_t peer_id,
766 				struct dpdk_wlan_peer_create_info *ev_buf);
767 #endif
768 };
769 
770 struct cdp_ctrl_ops {
771 
772 	int
773 		(*txrx_mempools_attach)(ol_txrx_soc_handle dp_soc);
774 
775 	/* Is this similar to ol_txrx_peer_state_update() in MCL */
776 	/**
777 	 * @brief Update the authorize peer object at association time
778 	 * @details
779 	 * For the host-based implementation of rate-control, it
780 	 * updates the peer/node-related parameters within rate-control
781 	 * context of the peer at association.
782 	 *
783 	 * @param soc_hdl - pointer to the soc object
784 	 * @param vdev_id - id of the virtual object
785 	 * @param peer_mac - mac address of the node's object
786 	 * @authorize - either to authorize or unauthorize peer
787 	 *
788 	 * @return QDF_STATUS
789 	 */
790 	QDF_STATUS
791 		(*txrx_peer_authorize)(struct cdp_soc_t *soc_hdl,
792 				       uint8_t vdev_id,
793 				       uint8_t *peer_mac,
794 				       u_int32_t authorize);
795 	bool
796 		(*txrx_peer_get_authorize)(struct cdp_soc_t *soc_hdl,
797 					   uint8_t vdev_id,
798 					   uint8_t *peer_mac);
799 
800 	void (*tx_flush_buffers)(struct cdp_soc_t *soc, uint8_t vdev_id);
801 
802 	int (*txrx_is_target_ar900b)(struct cdp_soc_t *soc_hdl);
803 
804 	QDF_STATUS
805 	(*txrx_set_vdev_param)(struct cdp_soc_t *soc, uint8_t vdev_id,
806 			       enum cdp_vdev_param_type param,
807 			       cdp_config_param_type val);
808 
809 	/**
810 	 * @brief Set the reo dest ring num of the radio
811 	 * @details
812 	 *  Set the reo destination ring no on which we will receive
813 	 *  pkts for this radio.
814 	 *
815 	 * @txrx_soc - soc handle
816 	 * @param pdev_id - id of physical device
817 	 * @return the reo destination ring number
818 	 * @param reo_dest_ring_num - value ranges between 1 - 4
819 	 */
820 	QDF_STATUS (*txrx_set_pdev_reo_dest)(
821 			struct cdp_soc_t *txrx_soc,
822 			uint8_t pdev_id,
823 			enum cdp_host_reo_dest_ring reo_dest_ring_num);
824 
825 	/**
826 	 * @brief Get the reo dest ring num of the radio
827 	 * @details
828 	 *  Get the reo destination ring no on which we will receive
829 	 *  pkts for this radio.
830 	 *
831 	 * @txrx_soc - soc handle
832 	 * @param pdev_id - id of physical device
833 	 * @return the reo destination ring number
834 	 */
835 	enum cdp_host_reo_dest_ring (*txrx_get_pdev_reo_dest)(
836 				     struct cdp_soc_t *txrx_soc,
837 				     uint8_t pdev_id);
838 
839 	int (*txrx_wdi_event_sub)(struct cdp_soc_t *soc, uint8_t pdev_id,
840 				  wdi_event_subscribe *event_cb_sub,
841 				  uint32_t event);
842 
843 	int (*txrx_wdi_event_unsub)(struct cdp_soc_t *soc, uint8_t pdev_id,
844 				    wdi_event_subscribe *event_cb_sub,
845 				    uint32_t event);
846 
847 	int (*txrx_get_sec_type)(ol_txrx_soc_handle soc, uint8_t vdev_id,
848 				 uint8_t *peer_mac, uint8_t sec_idx);
849 
850 	QDF_STATUS
851 	(*txrx_update_mgmt_txpow_vdev)(struct cdp_soc_t *soc,
852 				       uint8_t vdev_id,
853 				       uint8_t subtype, uint8_t tx_power);
854 
855 	/**
856 	 * txrx_set_pdev_param() - callback to set pdev parameter
857 	 * @soc: opaque soc handle
858 	 * @pdev_id:id of data path pdev handle
859 	 * @val: value of pdev_tx_capture
860 	 *
861 	 * Return: status: 0 - Success, non-zero: Failure
862 	 */
863 	QDF_STATUS (*txrx_set_pdev_param)(struct cdp_soc_t *soc,
864 					  uint8_t pdev_id,
865 					  enum cdp_pdev_param_type type,
866 					  cdp_config_param_type val);
867 
868 	QDF_STATUS (*txrx_get_pdev_param)(struct cdp_soc_t *soc,
869 					  uint8_t pdev_id,
870 					  enum cdp_pdev_param_type type,
871 					  cdp_config_param_type *val);
872 
873 	QDF_STATUS (*txrx_set_peer_param)(struct cdp_soc_t *soc,
874 					  uint8_t vdev_id, uint8_t *peer_mac,
875 					  enum cdp_peer_param_type param,
876 					  cdp_config_param_type val);
877 
878 	QDF_STATUS (*txrx_get_peer_param)(struct cdp_soc_t *soc,
879 					  uint8_t vdev_id, uint8_t *peer_mac,
880 					  enum cdp_peer_param_type param,
881 					  cdp_config_param_type *val);
882 
883 	void * (*txrx_get_pldev)(struct cdp_soc_t *soc, uint8_t pdev_id);
884 	void (*txrx_peer_flush_frags)(struct cdp_soc_t *soc, uint8_t vdev_id,
885 				      uint8_t *peer_mac);
886 
887 #ifdef VDEV_PEER_PROTOCOL_COUNT
888 	void (*txrx_peer_protocol_cnt)(struct cdp_soc_t *soc,
889 				       int8_t vdev_id,
890 				       qdf_nbuf_t nbuf,
891 				       bool is_egress,
892 				       bool is_rx);
893 #endif
894 
895 #ifdef WLAN_SUPPORT_MSCS
896 	QDF_STATUS
897 		(*txrx_record_mscs_params) (
898 				struct cdp_soc_t *soc, uint8_t *macaddr,
899 				uint8_t vdev_id,
900 				struct cdp_mscs_params *mscs_params,
901 				bool active);
902 #endif
903 
904 	QDF_STATUS
905 	(*set_key)(struct cdp_soc_t *soc, uint8_t vdev_id, uint8_t *mac,
906 		   bool is_unicast, uint32_t *key);
907 
908 	QDF_STATUS (*txrx_get_vdev_param)(struct cdp_soc_t *soc,
909 					  uint8_t vdev_id,
910 					  enum cdp_vdev_param_type param,
911 					  cdp_config_param_type *val);
912 	int (*enable_peer_based_pktlog)(struct cdp_soc_t *cdp_soc,
913 					uint8_t pdev_id,
914 					uint8_t *macaddr, uint8_t enb_dsb);
915 
916 	QDF_STATUS
917 	(*calculate_delay_stats)(struct cdp_soc_t *cdp_soc,
918 				 uint8_t vdev_id, qdf_nbuf_t nbuf);
919 #ifdef WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG
920 	QDF_STATUS (*txrx_update_pdev_rx_protocol_tag)(
921 			struct cdp_soc_t  *soc, uint8_t pdev_id,
922 			uint32_t protocol_mask, uint16_t protocol_type,
923 			uint16_t tag);
924 #ifdef WLAN_SUPPORT_RX_TAG_STATISTICS
925 	void (*txrx_dump_pdev_rx_protocol_tag_stats)(
926 				struct cdp_soc_t  *soc, uint8_t pdev_id,
927 				uint16_t protocol_type);
928 #endif /* WLAN_SUPPORT_RX_TAG_STATISTICS */
929 #endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */
930 #ifdef WLAN_SUPPORT_RX_FLOW_TAG
931 	QDF_STATUS (*txrx_set_rx_flow_tag)(
932 		struct cdp_soc_t *cdp_soc, uint8_t pdev_id,
933 		struct cdp_rx_flow_info *flow_info);
934 	QDF_STATUS (*txrx_dump_rx_flow_tag_stats)(
935 		struct cdp_soc_t *cdp_soc, uint8_t pdev_id,
936 		struct cdp_rx_flow_info *flow_info);
937 #endif /* WLAN_SUPPORT_RX_FLOW_TAG */
938 #ifdef QCA_MULTIPASS_SUPPORT
939 	void (*txrx_peer_set_vlan_id)(struct cdp_soc_t *cdp_soc,
940 				      uint8_t vdev_id, uint8_t *peer_mac,
941 				      uint16_t vlan_id);
942 #endif
943 #if defined(WLAN_TX_PKT_CAPTURE_ENH) || defined(WLAN_RX_PKT_CAPTURE_ENH)
944 	QDF_STATUS (*txrx_update_peer_pkt_capture_params)(
945 			ol_txrx_soc_handle soc, uint8_t pdev_id,
946 			bool is_rx_pkt_cap_enable, uint8_t is_tx_pkt_cap_enable,
947 			uint8_t *peer_mac);
948 #endif /* WLAN_TX_PKT_CAPTURE_ENH || WLAN_RX_PKT_CAPTURE_ENH */
949 	QDF_STATUS
950 	(*txrx_set_psoc_param)(struct cdp_soc_t *soc,
951 			       enum cdp_psoc_param_type param,
952 			       cdp_config_param_type val);
953 
954 	QDF_STATUS (*txrx_get_psoc_param)(ol_txrx_soc_handle soc,
955 					  enum cdp_psoc_param_type type,
956 					  cdp_config_param_type *val);
957 #ifdef VDEV_PEER_PROTOCOL_COUNT
958 	/*
959 	 * Enable per-peer protocol counters
960 	 */
961 	void (*txrx_enable_peer_protocol_count)(struct cdp_soc_t *soc,
962 						int8_t vdev_id, bool enable);
963 	void (*txrx_set_peer_protocol_drop_mask)(struct cdp_soc_t *soc,
964 						 int8_t vdev_id, int mask);
965 	int (*txrx_is_peer_protocol_count_enabled)(struct cdp_soc_t *soc,
966 						   int8_t vdev_id);
967 	int (*txrx_get_peer_protocol_drop_mask)(struct cdp_soc_t *soc,
968 						int8_t vdev_id);
969 
970 #endif
971 
972 #if defined(WLAN_FEATURE_TSF_AUTO_REPORT) || defined(WLAN_CONFIG_TX_DELAY)
973 	void (*txrx_set_delta_tsf)(struct cdp_soc_t *soc, uint8_t vdev_id,
974 				   uint32_t delta_tsf);
975 #endif
976 #ifdef WLAN_FEATURE_TSF_UPLINK_DELAY
977 	QDF_STATUS (*txrx_set_tsf_ul_delay_report)(struct cdp_soc_t *soc,
978 						   uint8_t vdev_id,
979 						   bool enable);
980 	QDF_STATUS (*txrx_get_uplink_delay)(struct cdp_soc_t *soc,
981 					    uint8_t vdev_id,
982 					    uint32_t *val);
983 #endif
984 #ifdef QCA_UNDECODED_METADATA_SUPPORT
985 	QDF_STATUS (*txrx_set_pdev_phyrx_error_mask)(struct cdp_soc_t *soc,
986 						     uint8_t pdev_id,
987 						     uint32_t mask,
988 						     uint32_t mask_cont);
989 	QDF_STATUS (*txrx_get_pdev_phyrx_error_mask)(struct cdp_soc_t *soc,
990 						     uint8_t pdev_id,
991 						     uint32_t *mask,
992 						     uint32_t *mask_cont);
993 #endif
994 #ifdef WLAN_SUPPORT_RX_FISA
995 	QDF_STATUS (*txrx_fisa_config)(struct cdp_soc_t *soc, uint8_t pdev_id,
996 				       enum cdp_fisa_config_id config_id,
997 				       union cdp_fisa_config *cfg);
998 #endif
999 #ifdef DP_UMAC_HW_RESET_SUPPORT
1000 	enum cdp_umac_reset_state (*get_umac_reset_in_progress_state)(
1001 				   struct cdp_soc_t *psoc);
1002 #endif
1003 };
1004 
1005 struct cdp_me_ops {
1006 
1007 	void (*tx_me_alloc_descriptor)(struct cdp_soc_t *soc,
1008 				       uint8_t pdev_id);
1009 
1010 	void (*tx_me_free_descriptor)(struct cdp_soc_t *soc, uint8_t pdev_id);
1011 
1012 	uint16_t (*tx_me_convert_ucast)(struct cdp_soc_t *soc, uint8_t vdev_id,
1013 					qdf_nbuf_t wbuf, u_int8_t newmac[][6],
1014 					uint8_t newmaccnt, uint8_t tid,
1015 					bool is_igmp, bool is_dms_pkt);
1016 };
1017 
1018 /**
1019  * struct cdp_mon_ops - host mon ops
1020  * @txrx_reset_monitor_mode: Handler to reset monitor mode
1021  * @txrx_deliver_tx_mgmt: deliver mgmt tx frame
1022  * @txrx_set_advance_monitor_filter: set advanced monitor mode
1023  * @config_full_mon_mode: configure full monitor mode
1024  * @soc_config_full_mon_mode: pdev configure full monitor mode
1025  * @get_mon_pdev_rx_stats: Get monitor mode pdev stats
1026  * @txrx_enable_mon_reap_timer: Enable/Disable reap timer of monitor status ring
1027  * @txrx_update_filter_neighbour_peers: config nac peer
1028  * @txrx_vdev_config_for_nac_rssi: config nac rssi peer
1029  * @txrx_vdev_get_neighbour_rssi: get nac peer rssi
1030  * @txrx_set_lite_mon_config:  set lite monitor config
1031  * @txrx_get_lite_mon_config:  get lite monitor config
1032  * @txrx_set_lite_mon_peer_config: set lite monitor peer config
1033  * @txrx_get_lite_mon_peer_config: get lite monitor peer list
1034  * @txrx_is_lite_mon_enabled: get lite monitor enable/disable status
1035  * @txrx_enable_enhanced_stats: Enable enhanced stats
1036  * @txrx_disable_enhanced_stats: Disable enhanced stats
1037  * @txrx_get_lite_mon_legacy_feature_enabled: returns the legacy filter enabled
1038  * @txrx_set_mon_pdev_params_rssi_dbm_conv: To set RSSI dbm conversion params
1039  *                                           in monitor pdev
1040  * @txrx_update_pdev_mon_telemetry_airtime_stats: update telemetry airtime
1041  *                                                stats in monitor pdev
1042  * @txrx_cfr_filter: Handler to configure host rx monitor status ring
1043  * @txrx_update_mon_mac_filter: Handler to configure mon mac filter
1044  * @start_local_pkt_capture: start local packet capture
1045  * @stop_local_pkt_capture: stop local packet capture
1046  * @is_local_pkt_capture_running: is local packet capture running
1047  */
1048 struct cdp_mon_ops {
1049 
1050 	QDF_STATUS (*txrx_reset_monitor_mode)
1051 		(ol_txrx_soc_handle soc, uint8_t pdev_id, u_int8_t smart_monitor);
1052 
1053 	QDF_STATUS (*txrx_deliver_tx_mgmt)
1054 		(struct cdp_soc_t *cdp_soc, uint8_t pdev_id, qdf_nbuf_t nbuf);
1055 
1056 	QDF_STATUS (*txrx_set_advance_monitor_filter)
1057 		(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1058 		 struct cdp_monitor_filter *filter_val);
1059 
1060 	QDF_STATUS
1061 		(*config_full_mon_mode)(struct cdp_soc_t *soc, uint8_t val);
1062 	QDF_STATUS (*soc_config_full_mon_mode)(struct cdp_pdev *cdp_pdev,
1063 					       uint8_t val);
1064 
1065 	QDF_STATUS
1066 		(*get_mon_pdev_rx_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1067 					 struct cdp_pdev_mon_stats *stats);
1068 
1069 	bool (*txrx_enable_mon_reap_timer)(struct cdp_soc_t *soc_hdl,
1070 					   enum cdp_mon_reap_source source,
1071 					   bool enable);
1072 
1073 	QDF_STATUS (*txrx_enable_enhanced_stats)(struct cdp_soc_t *soc,
1074 						 uint8_t pdev_id);
1075 
1076 	QDF_STATUS (*txrx_disable_enhanced_stats)(struct cdp_soc_t *soc,
1077 						  uint8_t pdev_id);
1078 
1079 	int
1080 		(*txrx_update_filter_neighbour_peers)(
1081 				struct cdp_soc_t *soc, uint8_t vdev_id,
1082 				uint32_t cmd, uint8_t *macaddr);
1083 
1084 #ifdef ATH_SUPPORT_NAC_RSSI
1085 	QDF_STATUS (*txrx_vdev_config_for_nac_rssi)(struct cdp_soc_t *cdp_soc,
1086 						    uint8_t vdev_id,
1087 						    enum cdp_nac_param_cmd cmd,
1088 						    char *bssid,
1089 						    char *client_macaddr,
1090 						    uint8_t chan_num);
1091 
1092 	QDF_STATUS (*txrx_vdev_get_neighbour_rssi)(struct cdp_soc_t *cdp_soc,
1093 						   uint8_t vdev_id,
1094 						   char *macaddr,
1095 						   uint8_t *rssi);
1096 #endif
1097 
1098 #ifdef QCA_SUPPORT_LITE_MONITOR
1099 	QDF_STATUS
1100 	(*txrx_set_lite_mon_config)(
1101 			struct cdp_soc_t *soc,
1102 			struct cdp_lite_mon_filter_config *mon_config,
1103 			uint8_t pdev_id);
1104 
1105 	QDF_STATUS
1106 	(*txrx_get_lite_mon_config)(
1107 			struct cdp_soc_t *soc,
1108 			struct cdp_lite_mon_filter_config *mon_config,
1109 			uint8_t pdev_id);
1110 
1111 	QDF_STATUS
1112 	(*txrx_set_lite_mon_peer_config)(
1113 			struct cdp_soc_t *soc,
1114 			struct cdp_lite_mon_peer_config *peer_config,
1115 			uint8_t pdev_id);
1116 
1117 	QDF_STATUS
1118 	(*txrx_get_lite_mon_peer_config)(
1119 			struct cdp_soc_t *soc,
1120 			struct cdp_lite_mon_peer_info *info,
1121 			uint8_t pdev_id);
1122 
1123 	int
1124 	(*txrx_is_lite_mon_enabled)(struct cdp_soc_t *soc,
1125 				    uint8_t pdev_id,
1126 				    uint8_t direction);
1127 
1128 	/* get the legacy feature enabled */
1129 	int
1130 	(*txrx_get_lite_mon_legacy_feature_enabled)(struct cdp_soc_t *soc,
1131 						    uint8_t pdev_id,
1132 						    uint8_t direction);
1133 #endif
1134 	QDF_STATUS (*txrx_set_mon_pdev_params_rssi_dbm_conv)
1135 		(struct cdp_soc_t *soc,
1136 		 struct cdp_rssi_db2dbm_param_dp *params);
1137 
1138 #ifdef WLAN_CONFIG_TELEMETRY_AGENT
1139 	QDF_STATUS (*txrx_update_pdev_mon_telemetry_airtime_stats)
1140 		(struct cdp_soc_t *soc,
1141 		 uint8_t pdev_id);
1142 #endif
1143 
1144 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
1145 	void (*txrx_cfr_filter)(struct cdp_soc_t *soc_hdl,
1146 				uint8_t pdev_id,
1147 				bool enable,
1148 				struct cdp_monitor_filter *filter_val,
1149 				bool cfr_enable_monitor_mode);
1150 #endif
1151 
1152 	QDF_STATUS (*txrx_update_mon_mac_filter)(struct cdp_soc_t *soc,
1153 						 uint8_t vdev_id,
1154 						 uint32_t cmd);
1155 #ifdef WLAN_FEATURE_LOCAL_PKT_CAPTURE
1156 	QDF_STATUS (*start_local_pkt_capture)
1157 			(struct cdp_soc_t *soc, uint8_t pdev_id,
1158 			 struct cdp_monitor_filter *filter);
1159 
1160 	QDF_STATUS (*stop_local_pkt_capture)(struct cdp_soc_t *soc,
1161 					     uint8_t pdev_id);
1162 	bool (*is_local_pkt_capture_running)(struct cdp_soc_t *soc,
1163 					     uint8_t pdev_id);
1164 #endif
1165 };
1166 
1167 /**
1168  * struct cdp_host_stats_ops - statistic operations
1169  * @txrx_host_stats_get:
1170  * @txrx_host_stats_clr:
1171  * @txrx_host_ce_stats:
1172  * @txrx_stats_publish:
1173  * @tx_print_tso_stats:
1174  * @tx_rst_tso_stats:
1175  * @tx_print_sg_stats:
1176  * @tx_rst_sg_stats:
1177  * @print_rx_cksum_stats:
1178  * @rst_rx_cksum_stats:
1179  * @txrx_host_me_stats:
1180  * @txrx_per_peer_stats:
1181  * @txrx_host_msdu_ttl_stats:
1182  * @ol_txrx_update_peer_stats:
1183  * @get_fw_peer_stats:
1184  * @get_htt_stats:
1185  * @txrx_update_pdev_stats:
1186  * @txrx_get_peer_stats_param:
1187  * @txrx_get_peer_stats:
1188  * @txrx_get_peer_stats_based_on_peer_type:
1189  * @txrx_get_per_link_stats:
1190  * @txrx_get_soc_stats:
1191  * @txrx_reset_peer_ald_stats:
1192  * @txrx_reset_peer_stats:
1193  * @txrx_get_vdev_stats:
1194  * @txrx_process_wmi_host_vdev_stats:
1195  * @txrx_get_vdev_extd_stats:
1196  * @txrx_update_vdev_stats:
1197  * @txrx_get_radio_stats:
1198  * @txrx_get_pdev_stats:
1199  * @txrx_get_ratekbps:
1200  * @txrx_update_peer_stats:
1201  * @txrx_get_scan_spcl_vap_stats:
1202  * @txrx_get_peer_delay_stats:
1203  * @txrx_get_peer_jitter_stats:
1204  * @txrx_alloc_vdev_stats_id:
1205  * @txrx_reset_vdev_stats_id:
1206  * @get_peer_tx_capture_stats:
1207  * @get_pdev_tx_capture_stats:
1208  * @enable_disable_vdev_tx_delay_stats:
1209  * @is_tx_delay_stats_enabled:
1210  * @txrx_get_pdev_tid_stats:
1211  * @txrx_pdev_telemetry_stats:
1212  * @txrx_peer_telemetry_stats:
1213  * @txrx_pdev_deter_stats:
1214  * @txrx_peer_deter_stats:
1215  * @txrx_update_pdev_chan_util_stats:
1216  * @txrx_get_peer_extd_rate_link_stats:
1217  * @get_pdev_obss_stats:
1218  * @clear_pdev_obss_pd_stats:
1219  * @txrx_get_interface_stats:
1220  * @tx_latency_stats_config: config tx latency stats for specified vdev
1221  * @tx_latency_stats_fetch: fetch tx latency stats for specified link
1222  * mac address
1223  * @tx_latency_stats_register_cb: register tx latency stats callback
1224  */
1225 struct cdp_host_stats_ops {
1226 	int (*txrx_host_stats_get)(struct cdp_soc_t *soc, uint8_t vdev_id,
1227 				   struct ol_txrx_stats_req *req);
1228 
1229 	QDF_STATUS (*txrx_host_stats_clr)(struct cdp_soc_t *soc,
1230 					  uint8_t vdev_id);
1231 
1232 	QDF_STATUS
1233 	(*txrx_host_ce_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1234 
1235 	int (*txrx_stats_publish)(struct cdp_soc_t *soc, uint8_t pdev_id,
1236 				  struct cdp_stats_extd *buf);
1237 
1238 	QDF_STATUS
1239 		(*tx_print_tso_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1240 
1241 	QDF_STATUS
1242 		(*tx_rst_tso_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1243 
1244 	QDF_STATUS
1245 		(*tx_print_sg_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1246 
1247 	QDF_STATUS
1248 		(*tx_rst_sg_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1249 
1250 	QDF_STATUS
1251 		(*print_rx_cksum_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1252 
1253 	QDF_STATUS
1254 		(*rst_rx_cksum_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1255 
1256 	QDF_STATUS
1257 		(*txrx_host_me_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1258 
1259 	QDF_STATUS
1260 		(*txrx_per_peer_stats)(struct cdp_soc_t *soc, uint8_t *addr);
1261 
1262 	int (*txrx_host_msdu_ttl_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
1263 					struct ol_txrx_stats_req *req);
1264 
1265 	int (*ol_txrx_update_peer_stats)(struct cdp_soc_t *soc,
1266 					 uint8_t pdev_id,
1267 					 uint8_t *addr, void *stats,
1268 					 uint32_t last_tx_rate_mcs,
1269 					 uint32_t stats_id);
1270 
1271 	QDF_STATUS
1272 		(*get_fw_peer_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1273 				     uint8_t *addr,
1274 				     uint32_t cap, uint32_t copy_stats);
1275 
1276 	QDF_STATUS
1277 		(*get_htt_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1278 				 void *data,
1279 				 uint32_t data_len);
1280 	QDF_STATUS
1281 		(*txrx_update_pdev_stats)(struct cdp_soc_t *soc,
1282 					  uint8_t pdev_id, void *data,
1283 					  uint16_t stats_id);
1284 	QDF_STATUS
1285 		(*txrx_get_peer_stats_param)(struct cdp_soc_t *soc,
1286 					     uint8_t vdev_id,
1287 					     uint8_t *peer_mac,
1288 					     enum cdp_peer_stats_type type,
1289 					     cdp_peer_stats_param_t *buf);
1290 	QDF_STATUS
1291 		(*txrx_get_peer_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
1292 				       uint8_t *peer_mac,
1293 				       struct cdp_peer_stats *peer_stats);
1294 	QDF_STATUS
1295 		(*txrx_get_peer_stats_based_on_peer_type)(struct cdp_soc_t *soc,
1296 							  uint8_t vdev_id,
1297 							  uint8_t *peer_mac,
1298 							  struct cdp_peer_stats *peer_stats,
1299 							  enum cdp_peer_type peer_type);
1300 	QDF_STATUS
1301 		(*txrx_get_per_link_stats)(struct cdp_soc_t *soc,
1302 					   uint8_t vdev_id, uint8_t *peer_mac,
1303 					   struct cdp_peer_stats *stats,
1304 					   enum cdp_peer_type peer_type,
1305 					   uint8_t num_link);
1306 	QDF_STATUS
1307 		(*txrx_get_soc_stats)(struct cdp_soc_t *soc,
1308 				      struct cdp_soc_stats *soc_stats);
1309 	QDF_STATUS
1310 		(*txrx_reset_peer_ald_stats)(struct cdp_soc_t *soc,
1311 					     uint8_t vdev_id,
1312 					     uint8_t *peer_mac);
1313 	QDF_STATUS
1314 		(*txrx_reset_peer_stats)(struct cdp_soc_t *soc,
1315 					 uint8_t vdev_id, uint8_t *peer_mac);
1316 	QDF_STATUS
1317 		(*txrx_get_vdev_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
1318 				       void *buf, bool is_aggregate);
1319 	int
1320 		(*txrx_process_wmi_host_vdev_stats)(ol_txrx_soc_handle soc,
1321 						    void *data, uint32_t len,
1322 						    uint32_t stats_id);
1323 	int
1324 		(*txrx_get_vdev_extd_stats)(struct cdp_soc_t *soc,
1325 					    uint8_t vdev_id,
1326 					    wmi_host_vdev_extd_stats *buffer);
1327 	QDF_STATUS
1328 		(*txrx_update_vdev_stats)(struct cdp_soc_t *soc,
1329 					  uint8_t vdev_id, void *buf,
1330 					  uint16_t stats_id, uint8_t xmit_type);
1331 	int
1332 		(*txrx_get_radio_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1333 					void *buf);
1334 	QDF_STATUS
1335 		(*txrx_get_pdev_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1336 				       struct cdp_pdev_stats *buf);
1337 	int
1338 		(*txrx_get_ratekbps)(int preamb, int mcs,
1339 				     int htflag, int gintval);
1340 
1341 	QDF_STATUS
1342 	(*txrx_update_peer_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
1343 				  uint8_t *peer_mac, void *stats,
1344 				  uint32_t last_tx_rate_mcs,
1345 				  uint32_t stats_id);
1346 
1347 #ifdef QCA_SUPPORT_SCAN_SPCL_VAP_STATS
1348 	QDF_STATUS
1349 	(*txrx_get_scan_spcl_vap_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
1350 					struct cdp_scan_spcl_vap_stats *stats);
1351 #endif
1352 
1353 	QDF_STATUS
1354 	(*txrx_get_peer_delay_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
1355 				     uint8_t *peer_mac,
1356 				     struct cdp_delay_tid_stats *delay_stats);
1357 
1358 	QDF_STATUS
1359 	(*txrx_get_peer_jitter_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1360 				      uint8_t vdev_id, uint8_t *peer_mac,
1361 				      struct cdp_peer_tid_stats *tid_stats);
1362 
1363 	QDF_STATUS
1364 	(*txrx_alloc_vdev_stats_id)(struct cdp_soc_t *soc,
1365 				    uint8_t *vdev_stats_id);
1366 
1367 	void (*txrx_reset_vdev_stats_id)(struct cdp_soc_t *soc,
1368 					 uint8_t vdev_stats_id);
1369 
1370 #ifdef WLAN_TX_PKT_CAPTURE_ENH
1371 	QDF_STATUS
1372 	(*get_peer_tx_capture_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
1373 				     uint8_t *peer_mac,
1374 				     struct cdp_peer_tx_capture_stats *stats);
1375 
1376 	QDF_STATUS
1377 	(*get_pdev_tx_capture_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1378 				     struct cdp_pdev_tx_capture_stats *stats);
1379 #endif /* WLAN_TX_PKT_CAPTURE_ENH */
1380 #ifdef HW_TX_DELAY_STATS_ENABLE
1381 	void
1382 	(*enable_disable_vdev_tx_delay_stats)(struct cdp_soc_t *soc,
1383 					      uint8_t vdev_id,
1384 					      uint8_t value);
1385 	uint8_t (*is_tx_delay_stats_enabled)(struct cdp_soc_t *soc_hdl,
1386 					     uint8_t vdev_id);
1387 #endif
1388 	QDF_STATUS
1389 	(*txrx_get_pdev_tid_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1390 				   struct cdp_tid_stats_intf *tid_stats);
1391 #ifdef WLAN_CONFIG_TELEMETRY_AGENT
1392 	QDF_STATUS
1393 		(*txrx_pdev_telemetry_stats)(
1394 				struct cdp_soc_t *soc,
1395 				uint8_t pdev_id,
1396 				struct cdp_pdev_telemetry_stats *stats);
1397 	QDF_STATUS
1398 		(*txrx_peer_telemetry_stats)(
1399 				struct cdp_soc_t *soc,
1400 				uint8_t *addr,
1401 				struct cdp_peer_telemetry_stats *stats);
1402 	QDF_STATUS
1403 		(*txrx_pdev_deter_stats)(
1404 				struct cdp_soc_t *soc,
1405 				uint8_t pdev_id,
1406 				struct cdp_pdev_deter_stats *stats);
1407 	QDF_STATUS
1408 		(*txrx_peer_deter_stats)(
1409 				struct cdp_soc_t *soc,
1410 				uint8_t vdev_id,
1411 				uint8_t *addr,
1412 				struct cdp_peer_deter_stats *stats);
1413 	QDF_STATUS
1414 		(*txrx_update_pdev_chan_util_stats)(
1415 				struct cdp_soc_t *soc,
1416 				uint8_t pdev_id,
1417 				struct cdp_pdev_chan_util_stats *ch_util);
1418 #endif
1419 	QDF_STATUS
1420 		(*txrx_get_peer_extd_rate_link_stats)
1421 				(struct cdp_soc_t *soc, uint8_t *mac_addr);
1422 	QDF_STATUS
1423 		(*get_pdev_obss_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1424 				       struct cdp_pdev_obss_pd_stats_tlv *buf,
1425 				       struct cdp_txrx_stats_req *req);
1426 	QDF_STATUS (*clear_pdev_obss_pd_stats)(struct cdp_soc_t *soc,
1427 					       uint8_t pdev_id,
1428 					       struct cdp_txrx_stats_req *req);
1429 	QDF_STATUS (*txrx_get_interface_stats)(struct cdp_soc_t *soc,
1430 					       uint8_t vdev_id,
1431 					       void *buf,
1432 					       bool is_aggregate);
1433 #ifdef WLAN_FEATURE_TX_LATENCY_STATS
1434 	QDF_STATUS
1435 	(*tx_latency_stats_config)(struct cdp_soc_t *soc,
1436 				   uint8_t vdev_id,
1437 				   struct cdp_tx_latency_config *config);
1438 	QDF_STATUS (*tx_latency_stats_fetch)(struct cdp_soc_t *soc,
1439 					     uint8_t vdev_id,
1440 					     uint8_t *mac,
1441 					     struct cdp_tx_latency *latency);
1442 	QDF_STATUS (*tx_latency_stats_register_cb)(struct cdp_soc_t *soc,
1443 						   cdp_tx_latency_cb cb);
1444 #endif
1445 };
1446 
1447 /**
1448  * struct cdp_wds_ops - WDS operations
1449  * @txrx_set_wds_rx_policy:
1450  * @txrx_wds_peer_tx_policy_update:
1451  * @vdev_set_wds:
1452  */
1453 struct cdp_wds_ops {
1454 	QDF_STATUS
1455 	(*txrx_set_wds_rx_policy)(struct cdp_soc_t *soc, uint8_t vdev_id,
1456 				  u_int32_t val);
1457 	QDF_STATUS
1458 	(*txrx_wds_peer_tx_policy_update)(struct cdp_soc_t *soc,
1459 					  uint8_t vdev_id, uint8_t *peer_mac,
1460 					  int wds_tx_ucast, int wds_tx_mcast);
1461 	int (*vdev_set_wds)(struct cdp_soc_t *soc, uint8_t vdev_id,
1462 			    uint32_t val);
1463 };
1464 
1465 /**
1466  * struct cdp_raw_ops - raw packet operations
1467  * @rsim_get_astentry:
1468  */
1469 struct cdp_raw_ops {
1470 	QDF_STATUS
1471 	(*rsim_get_astentry)(struct cdp_soc_t *soc, uint8_t vdev_id,
1472 			     qdf_nbuf_t *pnbuf, struct cdp_raw_ast *raw_ast);
1473 };
1474 
1475 #ifdef PEER_FLOW_CONTROL
1476 /**
1477  * struct cdp_pflow_ops - peer flow control operations
1478  * @pflow_update_pdev_params:
1479  */
1480 struct cdp_pflow_ops {
1481 	uint32_t (*pflow_update_pdev_params)(struct cdp_soc_t *soc,
1482 					     uint8_t pdev_id,
1483 					     enum _dp_param_t,
1484 					     uint32_t, void *);
1485 };
1486 #endif /* PEER_FLOW_CONTROL */
1487 
1488 #define LRO_IPV4_SEED_ARR_SZ 5
1489 #define LRO_IPV6_SEED_ARR_SZ 11
1490 
1491 /**
1492  * struct cdp_lro_hash_config - set rx_offld(LRO/GRO) init parameters
1493  * @lro_enable: indicates whether rx_offld is enabled
1494  * @tcp_flag: If the TCP flags from the packet do not match
1495  * the values in this field after masking with TCP flags mask
1496  * below, packet is not rx_offld eligible
1497  * @tcp_flag_mask: field for comparing the TCP values provided
1498  * above with the TCP flags field in the received packet
1499  * @toeplitz_hash_ipv4: contains seed needed to compute the flow id
1500  * 5-tuple toeplitz hash for ipv4 packets
1501  * @toeplitz_hash_ipv6: contains seed needed to compute the flow id
1502  * 5-tuple toeplitz hash for ipv6 packets
1503  */
1504 struct cdp_lro_hash_config {
1505 	uint32_t lro_enable;
1506 	uint32_t tcp_flag:9,
1507 		tcp_flag_mask:9;
1508 	uint32_t toeplitz_hash_ipv4[LRO_IPV4_SEED_ARR_SZ];
1509 	uint32_t toeplitz_hash_ipv6[LRO_IPV6_SEED_ARR_SZ];
1510 };
1511 
1512 struct ol_if_ops {
1513 	void
1514 	(*peer_set_default_routing)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
1515 				    uint8_t pdev_id, uint8_t *peer_macaddr,
1516 				    uint8_t vdev_id,
1517 				    bool hash_based, uint8_t ring_num,
1518 				    uint8_t lmac_peer_id_msb);
1519 	QDF_STATUS
1520 	(*peer_rx_reorder_queue_setup)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
1521 				       uint8_t pdev_id,
1522 				       uint8_t vdev_id, uint8_t *peer_mac,
1523 				       qdf_dma_addr_t hw_qdesc, int tid,
1524 				       uint16_t queue_num,
1525 				       uint8_t ba_window_size_valid,
1526 				       uint16_t ba_window_size);
1527 	QDF_STATUS
1528 	(*peer_multi_rx_reorder_queue_setup)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
1529 					     uint8_t pdev_id,
1530 					     struct multi_rx_reorder_queue_setup_params *tid_params);
1531 	QDF_STATUS
1532 	(*peer_rx_reorder_queue_remove)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
1533 					uint8_t pdev_id,
1534 					uint8_t vdev_id, uint8_t *peer_macaddr,
1535 					uint32_t tid_mask);
1536 	int (*peer_unref_delete)(struct cdp_ctrl_objmgr_psoc *psoc,
1537 				 uint8_t pdev_id,
1538 				 uint8_t *peer_mac,
1539 				 uint8_t *vdev_mac, enum wlan_op_mode opmode);
1540 	bool (*is_hw_dbs_capable)(struct wlan_objmgr_psoc *psoc);
1541 	int (*peer_add_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc,
1542 				  uint8_t vdev_id,
1543 				  uint8_t *peer_macaddr,
1544 				  uint16_t peer_id,
1545 				  const uint8_t *dest_macaddr,
1546 				  uint8_t *next_node_mac,
1547 				  uint32_t flags,
1548 				  uint8_t type);
1549 	int (*peer_update_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc,
1550 				     uint8_t vdev_id,
1551 				     uint8_t *dest_macaddr,
1552 				     uint8_t *peer_macaddr,
1553 				     uint32_t flags);
1554 	void (*peer_del_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc,
1555 				   uint8_t vdev_id,
1556 				   uint8_t *wds_macaddr,
1557 				   uint8_t type,
1558 				   uint8_t delete_in_fw);
1559 #ifdef WLAN_FEATURE_MULTI_AST_DEL
1560 	void (*peer_del_multi_wds_entry)(
1561 			struct cdp_ctrl_objmgr_psoc *soc,
1562 			uint8_t vdev_id,
1563 			struct peer_del_multi_wds_entries *wds_list);
1564 #endif
1565 	QDF_STATUS
1566 	(*lro_hash_config)(struct cdp_ctrl_objmgr_psoc *psoc, uint8_t pdev_id,
1567 			   struct cdp_lro_hash_config *rx_offld_hash);
1568 
1569 	void (*update_dp_stats)(void *soc, void *stats, uint16_t id,
1570 			uint8_t type);
1571 #ifdef RX_PEER_INVALID_ENH
1572 	uint8_t (*rx_invalid_peer)(struct cdp_ctrl_objmgr_psoc *soc,
1573 				   uint8_t pdev_id, void *msg);
1574 #else
1575 	uint8_t (*rx_invalid_peer)(uint8_t vdev_id, void *wh);
1576 #endif
1577 
1578 	int  (*peer_map_event)(struct cdp_ctrl_objmgr_psoc *psoc,
1579 			       uint16_t peer_id, uint16_t hw_peer_id,
1580 			       uint8_t vdev_id, uint8_t *peer_mac_addr,
1581 			       enum cdp_txrx_ast_entry_type peer_type,
1582 			       uint32_t tx_ast_hashidx);
1583 
1584 	int (*peer_unmap_event)(struct cdp_ctrl_objmgr_psoc *psoc,
1585 				uint16_t peer_id,
1586 				uint8_t vdev_id, uint8_t *mac_addr);
1587 
1588 	int (*get_dp_cfg_param)(struct cdp_ctrl_objmgr_psoc *psoc,
1589 				enum cdp_cfg_param_type param_num);
1590 
1591 	void (*rx_mic_error)(struct cdp_ctrl_objmgr_psoc *psoc,
1592 			     uint8_t pdev_id,
1593 			     struct cdp_rx_mic_err_info *info);
1594 
1595 	bool (*rx_frag_tkip_demic)(struct cdp_ctrl_objmgr_psoc *psoc,
1596 				   uint8_t vdev_id, uint8_t *peer_mac_addr,
1597 				   qdf_nbuf_t nbuf,
1598 				   uint16_t hdr_space);
1599 
1600 #ifdef QCA_SUPPORT_PRIMARY_LINK_MIGRATE
1601 	void (*update_primary_link)(struct cdp_ctrl_objmgr_psoc *psoc,
1602 				    uint8_t *mac_addr);
1603 #endif
1604 
1605 	uint8_t (*freq_to_channel)(struct cdp_ctrl_objmgr_psoc *psoc,
1606 				   uint8_t pdev_id, uint16_t freq);
1607 
1608 	uint8_t (*freq_to_band)(struct cdp_ctrl_objmgr_psoc *psoc,
1609 				uint8_t pdev_id, uint16_t freq);
1610 
1611 	QDF_STATUS(*set_mec_timer)(struct cdp_ctrl_objmgr_psoc *psoc,
1612 				   uint8_t vdev_id, uint16_t mec_timer_val);
1613 
1614 #ifdef INTRA_BSS_FWD_OFFLOAD
1615 	void (*vdev_set_intra_bss)(struct cdp_ctrl_objmgr_psoc *psoc,
1616 				   uint16_t vdev_id, bool enable);
1617 #endif
1618 #ifdef ATH_SUPPORT_NAC_RSSI
1619 	int (*config_fw_for_nac_rssi)(struct cdp_ctrl_objmgr_psoc *psoc,
1620 				      uint8_t pdev_id,
1621 				      u_int8_t vdev_id,
1622 				      enum cdp_nac_param_cmd cmd, char *bssid,
1623 				      char *client_macaddr, uint8_t chan_num);
1624 
1625 	int
1626 	(*config_bssid_in_fw_for_nac_rssi)(struct cdp_ctrl_objmgr_psoc *psoc,
1627 					   uint8_t pdev_id, u_int8_t vdev_id,
1628 					   enum cdp_nac_param_cmd cmd,
1629 					   char *bssid, char *client_mac);
1630 #endif
1631 	int (*peer_sta_kickout)(struct cdp_ctrl_objmgr_psoc *psoc,
1632 				uint16_t pdev_id, uint8_t *peer_macaddr);
1633 
1634 	/**
1635 	 * send_delba() - Send delba to peer
1636 	 * @psoc: Objmgr soc handle
1637 	 * @vdev_id: dp vdev id
1638 	 * @peer_macaddr: Peer mac addr
1639 	 * @tid: Tid number
1640 	 * @reason_code: Reason code
1641 	 * @cdp_rcode: CDP reason code for sending DELBA
1642 	 *
1643 	 * Return: 0 for success, non-zero for failure
1644 	 */
1645 	int (*send_delba)(struct cdp_ctrl_objmgr_psoc *psoc, uint8_t vdev_id,
1646 			  uint8_t *peer_macaddr, uint8_t tid,
1647 			  uint8_t reason_code, uint8_t cdp_rcode);
1648 
1649 	int
1650 	(*peer_delete_multiple_wds_entries)(struct cdp_ctrl_objmgr_psoc *psoc,
1651 					    uint8_t vdev_id,
1652 					    uint8_t *dest_macaddr,
1653 					    uint8_t *peer_macaddr,
1654 					    uint32_t flags);
1655 	int
1656 	(*pdev_update_lmac_n_target_pdev_id)(struct cdp_ctrl_objmgr_psoc *psoc,
1657 					    uint8_t *pdev_id,
1658 					    uint8_t *lmac_id,
1659 					    uint8_t *target_pdev_id);
1660 	bool (*is_roam_inprogress)(uint32_t vdev_id);
1661 	enum QDF_GLOBAL_MODE (*get_con_mode)(void);
1662 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
1663 	uint8_t (*peer_get_num_mlo_links)(struct cdp_ctrl_objmgr_psoc *psoc,
1664 					  uint8_t vdev_id,
1665 					  uint8_t *peer_macaddr,
1666 					  bool is_mld_peer);
1667 #endif
1668 #ifdef QCA_PEER_MULTIQ_SUPPORT
1669 	int (*peer_ast_flowid_map)(struct cdp_ctrl_objmgr_psoc *ol_soc_handle,
1670 				   uint16_t peer_id, uint8_t vdev_id,
1671 				   uint8_t *peer_mac_addr);
1672 #endif
1673 #ifdef DP_MEM_PRE_ALLOC
1674 	void *(*dp_prealloc_get_context)(uint32_t ctxt_type, size_t ctxt_size);
1675 
1676 	QDF_STATUS(*dp_prealloc_put_context)(uint32_t ctxt_type, void *vaddr);
1677 	void *(*dp_prealloc_get_consistent)(uint32_t *size,
1678 					    void **base_vaddr_unaligned,
1679 					    qdf_dma_addr_t *paddr_unaligned,
1680 					    qdf_dma_addr_t *paddr_aligned,
1681 					    uint32_t align,
1682 					    uint32_t ring_type);
1683 	void (*dp_prealloc_put_consistent)(qdf_size_t size,
1684 					   void *vaddr_unligned,
1685 					   qdf_dma_addr_t paddr);
1686 	void (*dp_get_multi_pages)(uint32_t desc_type,
1687 				   size_t element_size,
1688 				   uint16_t element_num,
1689 				   struct qdf_mem_multi_page_t *pages,
1690 				   bool cacheable);
1691 	void (*dp_put_multi_pages)(uint32_t desc_type,
1692 				   struct qdf_mem_multi_page_t *pages);
1693 #endif
1694 	int (*get_soc_nss_cfg)(struct cdp_ctrl_objmgr_psoc *ol_soc_handle);
1695 
1696 	char *(*get_device_name)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
1697 				 uint8_t pdev_id);
1698 	QDF_STATUS(*nss_stats_clr)(struct cdp_ctrl_objmgr_psoc *psoc,
1699 				   uint8_t vdev_id);
1700 	int (*dp_rx_get_pending)(ol_txrx_soc_handle soc);
1701 	void (*dp_rx_sched_refill_thread)(ol_txrx_soc_handle soc);
1702 	/* TODO: Add any other control path calls required to OL_IF/WMA layer */
1703 #ifdef WLAN_SUPPORT_RX_FLOW_TAG
1704 	void (*send_wakeup_trigger)(struct cdp_ctrl_objmgr_psoc *soc,
1705 				    uint8_t vdev_id);
1706 #endif
1707 #ifdef QCA_SUPPORT_WDS_EXTENDED
1708 	void (*rx_wds_ext_peer_learn)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
1709 				      uint16_t peer_id, uint8_t vdev_id,
1710 				      uint8_t *peer_macaddr);
1711 #endif /* QCA_SUPPORT_WDS_EXTENDED */
1712 #ifdef WLAN_SUPPORT_MESH_LATENCY
1713 	QDF_STATUS(*peer_update_mesh_latency_params)(
1714 			     struct cdp_ctrl_objmgr_psoc *psoc,
1715 				   uint8_t vdev_id, uint8_t *peer_mac, uint8_t tid,
1716 				   uint32_t service_interval_dl, uint32_t burst_size_dl,
1717 				   uint32_t service_interval_ul, uint32_t burst_size_ul,
1718 				   uint8_t add_or_sub, uint8_t ac);
1719 #endif
1720 #ifdef CONFIG_SAWF
1721 	QDF_STATUS
1722 	(*peer_update_sawf_ul_params)(struct cdp_ctrl_objmgr_psoc *soc,
1723 				      uint8_t vdev_id, uint8_t *peer_mac,
1724 				      uint8_t tid, uint8_t ac,
1725 				      uint32_t service_interval,
1726 				      uint32_t burst_size, uint32_t min_tput,
1727 				      uint32_t max_latency, uint8_t add_sub);
1728 #endif
1729 	uint32_t (*dp_get_tx_inqueue)(ol_txrx_soc_handle soc);
1730 	QDF_STATUS(*dp_send_unit_test_cmd)(uint32_t vdev_id,
1731 					   uint32_t module_id,
1732 					   uint32_t arg_count, uint32_t *arg);
1733 
1734 #ifdef QCA_SUPPORT_LITE_MONITOR
1735 	int (*config_lite_mon_peer)(struct cdp_ctrl_objmgr_psoc *psoc,
1736 				    uint8_t pdev_id,
1737 				    uint8_t vdev_id,
1738 				    enum cdp_nac_param_cmd cmd,
1739 				    uint8_t *peer_mac);
1740 	int (*config_lite_mon_tx_peer)(struct cdp_ctrl_objmgr_psoc *psoc,
1741 				       uint8_t pdev_id, uint8_t vdev_id,
1742 				       enum cdp_tx_filter_action cmd,
1743 				       uint8_t *peer_mac);
1744 #endif
1745 #ifdef WLAN_SUPPORT_SCS
1746 	bool (*peer_scs_rule_match)(struct cdp_ctrl_objmgr_psoc *psoc,
1747 				    uint8_t vdev_id, uint32_t rule_id,
1748 				    uint8_t *peer_mac);
1749 #endif
1750 #ifdef DP_UMAC_HW_RESET_SUPPORT
1751 	void (*dp_update_tx_hardstart)(struct cdp_ctrl_objmgr_psoc *psoc,
1752 				       uint8_t vdev_id,
1753 				       struct ol_txrx_hardtart_ctxt *ctxt);
1754 #endif
1755 #if defined(IPA_WDS_EASYMESH_FEATURE) && defined(FEATURE_AST)
1756 void (*peer_send_wds_disconnect)(struct cdp_ctrl_objmgr_psoc *psoc,
1757 				 uint8_t *mac_addr, uint8_t vdev_id);
1758 #endif
1759 #ifdef WLAN_SUPPORT_PPEDS
1760 	QDF_STATUS
1761 	(*peer_set_ppeds_default_routing)(struct cdp_ctrl_objmgr_psoc *psoc,
1762 					  uint8_t *peer_macaddr,
1763 					  uint16_t service_code,
1764 					  uint8_t priority_valid,
1765 					  uint16_t src_info,
1766 					  uint8_t vdev_id, uint8_t use_ppe,
1767 					  uint8_t routing_enabled);
1768 
1769 	QDF_STATUS
1770 	(*get_ppeds_profile_info_for_vap)(struct cdp_ctrl_objmgr_psoc *psoc,
1771 					  uint8_t vdev_id,
1772 					  struct cdp_ds_vp_params *vp_params);
1773 
1774 #endif /* WLAN_SUPPORT_PPEDS */
1775 
1776 #ifdef CONFIG_SAWF_DEF_QUEUES
1777 	int (*disable_sawf_svc)(uint8_t svc_id);
1778 #endif
1779 	void (*dp_print_fisa_stats)(enum cdp_fisa_stats_id stats_id);
1780 };
1781 
1782 #ifdef DP_PEER_EXTENDED_API
1783 /**
1784  * struct cdp_misc_ops - mcl ops not classified
1785  * @set_ibss_vdev_heart_beat_timer: Update ibss vdev heart beat timer
1786  * @set_wmm_param: set wmm parameters
1787  * @bad_peer_txctl_set_setting: configure bad peer tx limit setting
1788  * @bad_peer_txctl_update_threshold: configure bad peer tx threshold limit
1789  * @hl_tdls_flag_reset: reset tdls flag for vdev
1790  * @tx_non_std: Allow the control-path SW to send data frames
1791  * @get_vdev_id: get vdev id
1792  * @get_tx_ack_stats:
1793  * @set_wisa_mode: set wisa mode for a vdev
1794  * @txrx_data_stall_cb_register: register data stall callback
1795  * @txrx_data_stall_cb_deregister: deregister data stall callback
1796  * @txrx_post_data_stall_event: post data stall event
1797  * @runtime_suspend: ensure TXRX is ready to runtime suspend
1798  * @runtime_resume: ensure TXRX is ready to runtime resume
1799  * @get_opmode: get operation mode of vdev
1800  * @mark_first_wakeup_packet: set flag to indicate that fw is compatible for
1801  *			      marking first packet after wow wakeup
1802  * @update_mac_id: update mac_id for vdev
1803  * @flush_rx_frames: flush rx frames on the queue
1804  * @get_intra_bss_fwd_pkts_count: to get the total tx and rx packets that
1805  *				  has been forwarded from txrx layer
1806  *				  without going to upper layers
1807  * @pkt_log_init: handler to initialize packet log
1808  * @pkt_log_con_service: handler to connect packet log service
1809  * @pkt_log_exit:
1810  * @get_num_rx_contexts: handler to get number of RX contexts
1811  * @register_pktdump_cb: register callback for different pktlog
1812  * @unregister_pktdump_cb: unregister callback for different pktlog
1813  * @pdev_reset_driver_del_ack: reset driver delayed ack enabled flag
1814  * @vdev_set_driver_del_ack_enable: set driver delayed ack enabled flag
1815  *
1816  * @vdev_set_bundle_require_flag:
1817  * @pdev_reset_bundle_require_flag:
1818  * @txrx_ext_stats_request:
1819  * @request_rx_hw_stats:
1820  * @reset_rx_hw_ext_stats:
1821  * @vdev_inform_ll_conn: inform DP to add/delete a latency critical connection
1822  *			 for this particular vdev.
1823  * @set_swlm_enable: Enable or Disable Software Latency Manager.
1824  * @is_swlm_enabled: Check if Software latency manager is enabled or not.
1825  * @display_txrx_hw_info: Dump the DP rings info
1826  * @get_tx_rings_grp_bitmap:
1827  * @set_peer_txq_flush_config: Configures the ac/tid to be flushed and policy
1828  *			       to flush.
1829  * @set_bus_vote_lvl_high: The bus lvl is set to high or low based on tput
1830  * @get_bus_vote_lvl_high: Get bus lvl to determine whether or not get
1831  *                         rx rate stats
1832  * @evaluate_update_tx_ilp_cfg: Evaluate and update DP TX ILP configuration
1833  *
1834  * Function pointers for miscellaneous soc/pdev/vdev related operations.
1835  */
1836 struct cdp_misc_ops {
1837 	uint16_t (*set_ibss_vdev_heart_beat_timer)(struct cdp_soc_t *soc_hdl,
1838 						   uint8_t vdev_id,
1839 						   uint16_t timer_value_sec);
1840 	void (*set_wmm_param)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1841 			      struct ol_tx_wmm_param_t wmm_param);
1842 	void (*bad_peer_txctl_set_setting)(struct cdp_soc_t *soc_hdl,
1843 					   uint8_t pdev_id, int enable,
1844 					   int period, int txq_limit);
1845 	void (*bad_peer_txctl_update_threshold)(struct cdp_soc_t *soc_hdl,
1846 						uint8_t pdev_id,
1847 						int level, int tput_thresh,
1848 						int tx_limit);
1849 	void (*hl_tdls_flag_reset)(struct cdp_soc_t *soc_hdl,
1850 				   uint8_t vdev_id, bool flag);
1851 	qdf_nbuf_t (*tx_non_std)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1852 				 enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list);
1853 	uint16_t (*get_vdev_id)(struct cdp_vdev *vdev);
1854 	uint32_t (*get_tx_ack_stats)(struct cdp_soc_t *soc_hdl,
1855 				     uint8_t vdev_id);
1856 	QDF_STATUS (*set_wisa_mode)(struct cdp_soc_t *soc_hdl,
1857 				    uint8_t vdev_id, bool enable);
1858 	QDF_STATUS (*txrx_data_stall_cb_register)(struct cdp_soc_t *soc_hdl,
1859 						  uint8_t pdev_id,
1860 						  data_stall_detect_cb cb);
1861 	QDF_STATUS (*txrx_data_stall_cb_deregister)(struct cdp_soc_t *soc_hdl,
1862 						    uint8_t pdev_id,
1863 						    data_stall_detect_cb cb);
1864 	void (*txrx_post_data_stall_event)(
1865 			struct cdp_soc_t *soc_hdl,
1866 			enum data_stall_log_event_indicator indicator,
1867 			enum data_stall_log_event_type data_stall_type,
1868 			uint32_t pdev_id, uint32_t vdev_id_bitmap,
1869 			enum data_stall_log_recovery_type recovery_type);
1870 	QDF_STATUS (*runtime_suspend)(struct cdp_soc_t *soc_hdl,
1871 				      uint8_t pdev_id);
1872 	QDF_STATUS (*runtime_resume)(struct cdp_soc_t *soc_hdl,
1873 				     uint8_t pdev_id);
1874 	int (*get_opmode)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id);
1875 	void (*mark_first_wakeup_packet)(struct cdp_soc_t *soc_hdl,
1876 					 uint8_t pdev_id, uint8_t value);
1877 	void (*update_mac_id)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1878 			      uint8_t mac_id);
1879 	void (*flush_rx_frames)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1880 				void *peer, bool drop);
1881 	A_STATUS(*get_intra_bss_fwd_pkts_count)(struct cdp_soc_t *soc_hdl,
1882 						uint8_t vdev_id,
1883 						uint64_t *fwd_tx_packets,
1884 						uint64_t *fwd_rx_packets);
1885 	void (*pkt_log_init)(struct cdp_soc_t *soc_hdl, uint8_t pdev,
1886 			     void *scn);
1887 	void (*pkt_log_con_service)(struct cdp_soc_t *soc_hdl,
1888 				    uint8_t pdev_id, void *scn);
1889 	void (*pkt_log_exit)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
1890 	int (*get_num_rx_contexts)(struct cdp_soc_t *soc_hdl);
1891 	void (*register_pktdump_cb)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1892 				    ol_txrx_pktdump_cb tx_cb,
1893 				    ol_txrx_pktdump_cb rx_cb);
1894 	void (*unregister_pktdump_cb)(struct cdp_soc_t *soc_hdl,
1895 				      uint8_t pdev_id);
1896 	void (*pdev_reset_driver_del_ack)(struct cdp_soc_t *soc_hdl,
1897 					  uint8_t pdev_id);
1898 	void (*vdev_set_driver_del_ack_enable)(struct cdp_soc_t *soc_hdl,
1899 					       uint8_t vdev_id,
1900 					       unsigned long rx_packets,
1901 					       uint32_t time_in_ms,
1902 					       uint32_t high_th,
1903 					       uint32_t low_th);
1904 	void (*vdev_set_bundle_require_flag)(uint8_t vdev_id,
1905 					     unsigned long tx_bytes,
1906 					     uint32_t time_in_ms,
1907 					     uint32_t high_th,
1908 					     uint32_t low_th);
1909 	void (*pdev_reset_bundle_require_flag)(struct cdp_soc_t *soc_hdl,
1910 					       uint8_t pdev_id);
1911 	QDF_STATUS (*txrx_ext_stats_request)(struct cdp_soc_t *soc_hdl,
1912 					     uint8_t pdev_id,
1913 					     struct cdp_txrx_ext_stats *req);
1914 	QDF_STATUS (*request_rx_hw_stats)(struct cdp_soc_t *soc_hdl,
1915 					  uint8_t vdev_id);
1916 	void (*reset_rx_hw_ext_stats)(struct cdp_soc_t *soc_hdl);
1917 	QDF_STATUS (*vdev_inform_ll_conn)(struct cdp_soc_t *soc_hdl,
1918 					  uint8_t vdev_id,
1919 					  enum vdev_ll_conn_actions action);
1920 	QDF_STATUS (*set_swlm_enable)(struct cdp_soc_t *soc_hdl,
1921 				      uint8_t val);
1922 	uint8_t (*is_swlm_enabled)(struct cdp_soc_t *soc_hdl);
1923 	bool (*display_txrx_hw_info)(struct cdp_soc_t *soc_hdl);
1924 	uint32_t (*get_tx_rings_grp_bitmap)(struct cdp_soc_t *soc_hdl);
1925 #ifdef WLAN_FEATURE_PEER_TXQ_FLUSH_CONF
1926 	int (*set_peer_txq_flush_config)(struct cdp_soc_t *soc_hdl,
1927 					 uint8_t vdev_id, uint8_t *addr,
1928 					 uint8_t ac, uint32_t tid,
1929 					 enum cdp_peer_txq_flush_policy policy);
1930 #endif
1931 #ifdef FEATURE_RX_LINKSPEED_ROAM_TRIGGER
1932 	void (*set_bus_vote_lvl_high)(struct cdp_soc_t *soc_hdl, bool high);
1933 	bool (*get_bus_vote_lvl_high)(struct cdp_soc_t *soc_hdl);
1934 #endif
1935 #ifdef DP_TX_PACKET_INSPECT_FOR_ILP
1936 	bool (*evaluate_update_tx_ilp_cfg)(struct cdp_soc_t *soc_hdl,
1937 					   uint8_t num_msdu_idx_map,
1938 					   uint8_t *msdu_idx_map_arr);
1939 #endif
1940 };
1941 
1942 /**
1943  * struct cdp_ocb_ops - mcl ocb ops
1944  * @set_ocb_chan_info: set OCB channel info
1945  * @get_ocb_chan_info: get OCB channel info
1946  *
1947  * Function pointers for operations related to OCB.
1948  */
1949 struct cdp_ocb_ops {
1950 	void (*set_ocb_chan_info)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1951 				  struct ol_txrx_ocb_set_chan ocb_set_chan);
1952 	struct ol_txrx_ocb_chan_info *(*get_ocb_chan_info)(
1953 				struct cdp_soc_t *soc_hdl, uint8_t vdev_id);
1954 };
1955 
1956 /**
1957  * struct cdp_peer_ops - mcl peer related ops
1958  * @register_peer:
1959  * @clear_peer:
1960  * @find_peer_exist:
1961  * @find_peer_exist_on_vdev:
1962  * @find_peer_exist_on_other_vdev:
1963  * @peer_state_update:
1964  * @get_vdevid:
1965  * @get_vdev_by_peer_addr:
1966  * @register_ocb_peer:
1967  * @peer_get_peer_mac_addr:
1968  * @get_peer_state:
1969  * @get_vdev_for_peer:
1970  * @update_ibss_add_peer_num_of_vdev:
1971  * @remove_peers_for_vdev:
1972  * @remove_peers_for_vdev_no_lock:
1973  * @copy_mac_addr_raw:
1974  * @add_last_real_peer:
1975  * @is_vdev_restore_last_peer:
1976  * @update_last_real_peer:
1977  * @peer_detach_force_delete:
1978  * @set_tdls_offchan_enabled:
1979  * @set_peer_as_tdls_peer:
1980  * @peer_flush_frags:
1981  */
1982 struct cdp_peer_ops {
1983 	QDF_STATUS (*register_peer)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1984 				    struct ol_txrx_desc_type *sta_desc);
1985 	QDF_STATUS (*clear_peer)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1986 				 struct qdf_mac_addr peer_addr);
1987 	bool (*find_peer_exist)(struct cdp_soc_t *soc, uint8_t pdev_id,
1988 				uint8_t *peer_addr);
1989 	bool (*find_peer_exist_on_vdev)(struct cdp_soc_t *soc, uint8_t vdev_id,
1990 					uint8_t *peer_addr);
1991 	bool (*find_peer_exist_on_other_vdev)(struct cdp_soc_t *soc,
1992 					      uint8_t vdev_id,
1993 					      uint8_t *peer_addr,
1994 					      uint16_t max_bssid);
1995 	QDF_STATUS (*peer_state_update)(struct cdp_soc_t *soc,
1996 					uint8_t *peer_addr,
1997 					enum ol_txrx_peer_state state);
1998 	QDF_STATUS (*get_vdevid)(struct cdp_soc_t *soc_hdl, uint8_t *peer_mac,
1999 				 uint8_t *vdev_id);
2000 	struct cdp_vdev * (*get_vdev_by_peer_addr)(struct cdp_pdev *pdev,
2001 			struct qdf_mac_addr peer_addr);
2002 	QDF_STATUS (*register_ocb_peer)(uint8_t *mac_addr);
2003 	uint8_t * (*peer_get_peer_mac_addr)(void *peer);
2004 	int (*get_peer_state)(struct cdp_soc_t *soc, uint8_t vdev_id,
2005 			      uint8_t *peer_mac, bool slowpath);
2006 	struct cdp_vdev * (*get_vdev_for_peer)(void *peer);
2007 	int16_t (*update_ibss_add_peer_num_of_vdev)(struct cdp_soc_t *soc,
2008 						    uint8_t vdev_id,
2009 						    int16_t peer_num_delta);
2010 	void (*remove_peers_for_vdev)(struct cdp_vdev *vdev,
2011 			ol_txrx_vdev_peer_remove_cb callback,
2012 			void *callback_context, bool remove_last_peer);
2013 	void (*remove_peers_for_vdev_no_lock)(struct cdp_vdev *vdev,
2014 			ol_txrx_vdev_peer_remove_cb callback,
2015 			void *callback_context);
2016 	void (*copy_mac_addr_raw)(struct cdp_soc_t *soc, uint8_t vdev_id,
2017 				  uint8_t *bss_addr);
2018 	void (*add_last_real_peer)(struct cdp_soc_t *soc, uint8_t pdev_id,
2019 				   uint8_t vdev_id);
2020 	bool (*is_vdev_restore_last_peer)(struct cdp_soc_t *soc,
2021 					  uint8_t vdev_id,
2022 					  uint8_t *peer_mac);
2023 	void (*update_last_real_peer)(struct cdp_soc_t *soc, uint8_t pdev_id,
2024 				      uint8_t vdev_id, bool restore_last_peer);
2025 	void (*peer_detach_force_delete)(struct cdp_soc_t *soc_hdl,
2026 					 uint8_t vdev_id, uint8_t *peer_addr);
2027 	void (*set_tdls_offchan_enabled)(struct cdp_soc_t *soc, uint8_t vdev_id,
2028 					 uint8_t *peer_mac, bool val);
2029 	void (*set_peer_as_tdls_peer)(struct cdp_soc_t *soc, uint8_t vdev_id,
2030 				      uint8_t *peer_mac, bool val);
2031 	void (*peer_flush_frags)(struct cdp_soc_t *soc_hdl,
2032 				 uint8_t vdev_id, uint8_t *peer_mac);
2033 };
2034 
2035 /**
2036  * struct cdp_mob_stats_ops - mcl mob stats ops
2037  * @clear_stats: handler to clear ol txrx stats
2038  * @stats: handler to update ol txrx stats
2039  */
2040 struct cdp_mob_stats_ops {
2041 	QDF_STATUS(*clear_stats)(struct cdp_soc_t *soc_hdl,
2042 				 uint8_t pdev_id, uint8_t bitmap);
2043 	int (*stats)(uint8_t vdev_id, char *buffer, unsigned buf_len);
2044 };
2045 
2046 /**
2047  * struct cdp_pmf_ops - mcl protected management frame ops
2048  * @get_pn_info: handler to get pn info from peer
2049  *
2050  * Function pointers for pmf related operations.
2051  */
2052 struct cdp_pmf_ops {
2053 	void (*get_pn_info)(struct cdp_soc_t *soc, uint8_t *peer_mac,
2054 			    uint8_t vdev_id, uint8_t **last_pn_valid,
2055 			    uint64_t **last_pn, uint32_t **rmf_pn_replays);
2056 };
2057 #endif
2058 
2059 
2060 #ifdef DP_FLOW_CTL
2061 /**
2062  * struct cdp_cfg_ops - mcl configuration ops
2063  * @set_cfg_rx_fwd_disabled: set rx_fwd_disabled flag
2064  * @set_cfg_packet_log_enabled: set is_packet_log_enabled flag
2065  * @cfg_attach: hardcode the configuration parameters
2066  * @vdev_rx_set_intrabss_fwd: set disable_intrabss_fwd flag
2067  * @is_rx_fwd_disabled: get the rx_fwd_disabled flag,
2068  *                      1 enabled, 0 disabled.
2069  * @tx_set_is_mgmt_over_wmi_enabled: set is_mgmt_over_wmi_enabled flag to
2070  *                                   indicate that mgmt over wmi is enabled
2071  *                                   or not,
2072  *                                   1 for enabled, 0 for disable
2073  * @is_high_latency: get device is high or low latency device,
2074  *                   1 high latency bus, 0 low latency bus
2075  * @set_flow_control_parameters: set flow control parameters
2076  * @set_flow_steering: set flow_steering_enabled flag
2077  * @set_ptp_rx_opt_enabled: set is_ptp_rx_opt_enabled flag
2078  * @set_new_htt_msg_format: set new_htt_msg_format flag
2079  * @set_peer_unmap_conf_support: set enable_peer_unmap_conf_support flag
2080  * @get_peer_unmap_conf_support: get enable_peer_unmap_conf_support flag
2081  * @set_tx_compl_tsf64: set enable_tx_compl_tsf64 flag,
2082  *                      1 enabled, 0 disabled.
2083  * @get_tx_compl_tsf64: get enable_tx_compl_tsf64 flag,
2084  *                      1 enabled, 0 disabled.
2085  */
2086 struct cdp_cfg_ops {
2087 	void (*set_cfg_rx_fwd_disabled)(struct cdp_cfg *cfg_pdev,
2088 		uint8_t disable_rx_fwd);
2089 	void (*set_cfg_packet_log_enabled)(struct cdp_cfg *cfg_pdev,
2090 		uint8_t val);
2091 	struct cdp_cfg * (*cfg_attach)(qdf_device_t osdev, void *cfg_param);
2092 	void (*vdev_rx_set_intrabss_fwd)(struct cdp_soc_t *soc_hdl,
2093 					 uint8_t vdev_id, bool val);
2094 	uint8_t (*is_rx_fwd_disabled)(struct cdp_vdev *vdev);
2095 	void (*tx_set_is_mgmt_over_wmi_enabled)(uint8_t value);
2096 	int (*is_high_latency)(struct cdp_cfg *cfg_pdev);
2097 	void (*set_flow_control_parameters)(struct cdp_cfg *cfg_pdev,
2098 		void *param);
2099 	void (*set_flow_steering)(struct cdp_cfg *cfg_pdev, uint8_t val);
2100 	void (*set_ptp_rx_opt_enabled)(struct cdp_cfg *cfg_pdev, uint8_t val);
2101 	void (*set_new_htt_msg_format)(uint8_t val);
2102 	void (*set_peer_unmap_conf_support)(bool val);
2103 	bool (*get_peer_unmap_conf_support)(void);
2104 	void (*set_tx_compl_tsf64)(bool val);
2105 	bool (*get_tx_compl_tsf64)(void);
2106 };
2107 
2108 /**
2109  * struct cdp_flowctl_ops - mcl flow control
2110  * @flow_pool_map_handler: handler to map flow_id and pool descriptors
2111  * @flow_pool_unmap_handler: handler to unmap flow_id and pool descriptors
2112  * @register_pause_cb: handler to register tx pause callback
2113  * @set_desc_global_pool_size: handler to set global pool size
2114  * @dump_flow_pool_info: handler to dump global and flow pool info
2115  * @tx_desc_thresh_reached: handler to set tx desc threshold
2116  *
2117  * Function pointers for operations related to flow control
2118  */
2119 struct cdp_flowctl_ops {
2120 	QDF_STATUS (*flow_pool_map_handler)(struct cdp_soc_t *soc,
2121 					    uint8_t pdev_id,
2122 					    uint8_t vdev_id);
2123 	void (*flow_pool_unmap_handler)(struct cdp_soc_t *soc,
2124 					uint8_t pdev_id,
2125 					uint8_t vdev_id);
2126 	QDF_STATUS (*register_pause_cb)(struct cdp_soc_t *soc,
2127 					tx_pause_callback);
2128 	void (*set_desc_global_pool_size)(uint32_t num_msdu_desc);
2129 
2130 	void (*dump_flow_pool_info)(struct cdp_soc_t *soc_hdl);
2131 
2132 	bool (*tx_desc_thresh_reached)(struct cdp_soc_t *soc_hdl,
2133 				       uint8_t vdev_id);
2134 };
2135 
2136 /**
2137  * struct cdp_lflowctl_ops - mcl legacy flow control ops
2138  * @register_tx_flow_control: Register tx flow control callback
2139  * @set_vdev_tx_desc_limit:  Set tx descriptor limit for a vdev
2140  * @set_vdev_os_queue_status: Set vdev queue status
2141  * @deregister_tx_flow_control_cb: Deregister tx flow control callback
2142  * @flow_control_cb: Call osif flow control callback
2143  * @get_tx_resource: Get tx resources and compare with watermark
2144  * @ll_set_tx_pause_q_depth: set pause queue depth
2145  * @vdev_flush: Flush all packets on a particular vdev
2146  * @vdev_pause: Pause a particular vdev
2147  * @vdev_unpause: Unpause a particular vdev
2148  *
2149  * Function pointers for operations related to flow control
2150  */
2151 struct cdp_lflowctl_ops {
2152 #ifdef QCA_HL_NETDEV_FLOW_CONTROL
2153 	int (*register_tx_flow_control)(struct cdp_soc_t *soc_hdl,
2154 					uint8_t pdev_id,
2155 					tx_pause_callback flowcontrol);
2156 	int (*set_vdev_tx_desc_limit)(struct cdp_soc_t *soc_hdl,
2157 				      uint8_t vdev_id, uint32_t chan_freq);
2158 	int (*set_vdev_os_queue_status)(struct cdp_soc_t *soc_hdl,
2159 					uint8_t vdev_id,
2160 					enum netif_action_type action);
2161 #else
2162 	int (*register_tx_flow_control)(
2163 		struct cdp_soc_t *soc_hdl,
2164 		uint8_t vdev_id,
2165 		ol_txrx_tx_flow_control_fp flowControl, void *osif_fc_ctx,
2166 		ol_txrx_tx_flow_control_is_pause_fp flow_control_is_pause);
2167 #endif /* QCA_HL_NETDEV_FLOW_CONTROL */
2168 	int (*deregister_tx_flow_control_cb)(struct cdp_soc_t *soc_hdl,
2169 					     uint8_t vdev_id);
2170 	void (*flow_control_cb)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
2171 				bool tx_resume);
2172 	bool (*get_tx_resource)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
2173 				struct qdf_mac_addr peer_addr,
2174 				unsigned int low_watermark,
2175 				unsigned int high_watermark_offset);
2176 	int (*ll_set_tx_pause_q_depth)(struct cdp_soc_t *soc, uint8_t vdev_id,
2177 				       int pause_q_depth);
2178 	void (*vdev_flush)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id);
2179 	void (*vdev_pause)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
2180 			   uint32_t reason, uint32_t pause_type);
2181 	void (*vdev_unpause)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
2182 			     uint32_t reason, uint32_t pause_type);
2183 };
2184 
2185 /**
2186  * struct cdp_throttle_ops - mcl throttle ops
2187  * @throttle_init_period: handler to initialize tx throttle time
2188  * @throttle_set_level: handler to set tx throttle level
2189  */
2190 struct cdp_throttle_ops {
2191 	void (*throttle_init_period)(struct cdp_soc_t *soc_hdl,
2192 				     uint8_t pdev_id, int period,
2193 				     uint8_t *dutycycle_level);
2194 	void (*throttle_set_level)(struct cdp_soc_t *soc_hdl,
2195 				   uint8_t pdev_id, int level);
2196 };
2197 #endif
2198 
2199 #ifdef IPA_OFFLOAD
2200 /**
2201  * struct cdp_ipa_ops - mcl ipa data path ops
2202  * @ipa_get_resource:
2203  * @ipa_set_doorbell_paddr:
2204  * @ipa_iounmap_doorbell_vaddr: I/O unmap ipa doorbell vaddr
2205  * @ipa_set_active:
2206  * @ipa_op_response:
2207  * @ipa_register_op_cb:
2208  * @ipa_deregister_op_cb:
2209  * @ipa_get_stat:
2210  * @ipa_tx_data_frame:
2211  * @ipa_set_uc_tx_partition_base:
2212  * @ipa_update_peer_rx_stats:
2213  * @ipa_uc_get_share_stats:
2214  * @ipa_uc_set_quota:
2215  * @ipa_pcie_link_up: Hold PCIe link in L0
2216  * @ipa_pcie_link_down: Release PCIe link L0 hold
2217  * @ipa_enable_autonomy:
2218  * @ipa_disable_autonomy:
2219  * @ipa_setup:
2220  * @ipa_cleanup:
2221  * @ipa_setup_iface:
2222  * @ipa_cleanup_iface:
2223  * @ipa_enable_pipes:
2224  * @ipa_disable_pipes:
2225  * @ipa_set_perf_level:
2226  * @ipa_rx_intrabss_fwd:
2227  * @ipa_tx_buf_smmu_mapping: Create SMMU mappings for Tx
2228  * @ipa_tx_buf_smmu_unmapping: Release SMMU mappings for Tx
2229  * buffers to IPA
2230  * @ipa_rx_buf_smmu_pool_mapping: Create SMMU mapping for Rx
2231  * @ipa_set_smmu_mapped: Set IPA SMMU mapped value
2232  * @ipa_get_smmu_mapped: Get IPA SMMU mapped value
2233  * @ipa_rx_wdsext_iface: Forward RX exception packets to wdsext interface
2234  * @ipa_rx_super_rule_setup: Setup cce super rules based on filter tuple
2235  * @ipa_ast_create: Create/Update ast entry
2236  * @ipa_get_wdi_version: Get WDI version
2237  */
2238 struct cdp_ipa_ops {
2239 	QDF_STATUS (*ipa_get_resource)(struct cdp_soc_t *soc_hdl,
2240 				       uint8_t pdev_id);
2241 	QDF_STATUS (*ipa_set_doorbell_paddr)(struct cdp_soc_t *soc_hdl,
2242 					     uint8_t pdev_id);
2243 	QDF_STATUS (*ipa_iounmap_doorbell_vaddr)(struct cdp_soc_t *soc_hdl,
2244 						 uint8_t pdev_id);
2245 	QDF_STATUS (*ipa_set_active)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
2246 				     bool uc_active, bool is_tx);
2247 	QDF_STATUS (*ipa_op_response)(struct cdp_soc_t *soc_hdl,
2248 				      uint8_t pdev_id, uint8_t *op_msg);
2249 	QDF_STATUS (*ipa_register_op_cb)(struct cdp_soc_t *soc_hdl,
2250 					 uint8_t pdev_id,
2251 					 void (*ipa_uc_op_cb_type)
2252 					 (uint8_t *op_msg, void *osif_ctxt),
2253 					 void *usr_ctxt);
2254 	void (*ipa_deregister_op_cb)(struct cdp_soc_t *soc_hdl,
2255 				     uint8_t pdev_id);
2256 	QDF_STATUS (*ipa_get_stat)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
2257 	qdf_nbuf_t (*ipa_tx_data_frame)(struct cdp_soc_t *soc_hdl,
2258 					uint8_t vdev_id, qdf_nbuf_t skb);
2259 	void (*ipa_set_uc_tx_partition_base)(struct cdp_cfg *pdev,
2260 		uint32_t value);
2261 	QDF_STATUS (*ipa_update_peer_rx_stats)(struct cdp_soc_t *soc_hdl,
2262 					       uint8_t vdev_id,
2263 					       uint8_t *peer_mac,
2264 					       qdf_nbuf_t nbuf);
2265 #ifdef FEATURE_METERING
2266 	QDF_STATUS (*ipa_uc_get_share_stats)(struct cdp_soc_t *soc_hdl,
2267 					     uint8_t pdev_id,
2268 					     uint8_t reset_stats);
2269 	QDF_STATUS (*ipa_uc_set_quota)(struct cdp_soc_t *soc_hdl,
2270 				       uint8_t pdev_id, uint64_t quota_bytes);
2271 #endif
2272 #ifdef IPA_OPT_WIFI_DP
2273 	int (*ipa_pcie_link_up)(struct cdp_soc_t *soc_hdl);
2274 	void (*ipa_pcie_link_down)(struct cdp_soc_t *soc_hdl);
2275 #endif
2276 	QDF_STATUS (*ipa_enable_autonomy)(struct cdp_soc_t *soc_hdl,
2277 					  uint8_t pdev_id);
2278 	QDF_STATUS (*ipa_disable_autonomy)(struct cdp_soc_t *soc_hdl,
2279 					   uint8_t pdev_id);
2280 
2281 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || \
2282 	defined(CONFIG_IPA_WDI_UNIFIED_API)
2283 	QDF_STATUS (*ipa_setup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
2284 				void *ipa_i2w_cb, void *ipa_w2i_cb,
2285 				void *ipa_wdi_meter_notifier_cb,
2286 				uint32_t ipa_desc_size, void *ipa_priv,
2287 				bool is_rm_enabled, uint32_t *tx_pipe_handle,
2288 				uint32_t *rx_pipe_handle, bool is_smmu_enabled,
2289 				qdf_ipa_sys_connect_params_t *sys_in,
2290 				bool over_gsi, qdf_ipa_wdi_hdl_t hdl,
2291 				qdf_ipa_wdi_hdl_t id,
2292 				void *ipa_ast_notify_cb);
2293 #else /* CONFIG_IPA_WDI_UNIFIED_API */
2294 	QDF_STATUS (*ipa_setup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
2295 				void *ipa_i2w_cb, void *ipa_w2i_cb,
2296 				void *ipa_wdi_meter_notifier_cb,
2297 				uint32_t ipa_desc_size, void *ipa_priv,
2298 				bool is_rm_enabled, uint32_t *tx_pipe_handle,
2299 				uint32_t *rx_pipe_handle);
2300 #endif /* CONFIG_IPA_WDI_UNIFIED_API */
2301 	QDF_STATUS (*ipa_cleanup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
2302 				  uint32_t tx_pipe_handle,
2303 				  uint32_t rx_pipe_handle,
2304 				  qdf_ipa_wdi_hdl_t hdl);
2305 	QDF_STATUS (*ipa_setup_iface)(char *ifname, uint8_t *mac_addr,
2306 				      qdf_ipa_client_type_t prod_client,
2307 				      qdf_ipa_client_type_t cons_client,
2308 				      uint8_t session_id, bool is_ipv6_enabled,
2309 				      qdf_ipa_wdi_hdl_t hdl);
2310 	QDF_STATUS (*ipa_cleanup_iface)(char *ifname, bool is_ipv6_enabled,
2311 					qdf_ipa_wdi_hdl_t hdl);
2312 	QDF_STATUS (*ipa_enable_pipes)(struct cdp_soc_t *soc_hdl,
2313 				       uint8_t pdev_id, qdf_ipa_wdi_hdl_t hdl);
2314 	QDF_STATUS (*ipa_disable_pipes)(struct cdp_soc_t *soc_hdl,
2315 					uint8_t pdev_id, qdf_ipa_wdi_hdl_t hdl);
2316 	QDF_STATUS (*ipa_set_perf_level)(int client,
2317 					 uint32_t max_supported_bw_mbps,
2318 					 qdf_ipa_wdi_hdl_t hdl);
2319 	bool (*ipa_rx_intrabss_fwd)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
2320 				    qdf_nbuf_t nbuf, bool *fwd_success);
2321 	QDF_STATUS (*ipa_tx_buf_smmu_mapping)(struct cdp_soc_t *soc_hdl,
2322 					      uint8_t pdev_id,
2323 					      const char *func,
2324 					      uint32_t line);
2325 	QDF_STATUS (*ipa_tx_buf_smmu_unmapping)(struct cdp_soc_t *soc_hdl,
2326 						uint8_t pdev_id,
2327 						const char *func,
2328 						uint32_t line);
2329 	QDF_STATUS (*ipa_rx_buf_smmu_pool_mapping)(
2330 					      struct cdp_soc_t *soc_hdl,
2331 					      uint8_t pdev_id,
2332 					      bool create,
2333 					      const char *func,
2334 					      uint32_t line);
2335 	QDF_STATUS (*ipa_set_smmu_mapped)(struct cdp_soc_t *soc_hdl, int val);
2336 	int (*ipa_get_smmu_mapped)(struct cdp_soc_t *soc_hdl);
2337 
2338 #ifdef QCA_SUPPORT_WDS_EXTENDED
2339 	bool (*ipa_rx_wdsext_iface)(struct cdp_soc_t *soc_hdl,
2340 				    uint8_t peer_id,
2341 				    qdf_nbuf_t nbuf_head);
2342 #endif
2343 #ifdef IPA_OPT_WIFI_DP
2344 	QDF_STATUS (*ipa_rx_super_rule_setup)(struct cdp_soc_t *soc_hdl,
2345 					      void *flt_params);
2346 #endif
2347 #ifdef IPA_WDS_EASYMESH_FEATURE
2348 	QDF_STATUS (*ipa_ast_create)(struct cdp_soc_t *soc_hdl,
2349 				     qdf_ipa_ast_info_type_t *data);
2350 #endif
2351 	void (*ipa_get_wdi_version)(struct cdp_soc_t *soc_hdl,
2352 				    uint8_t *wdi_ver);
2353 };
2354 #endif
2355 
2356 #ifdef DP_POWER_SAVE
2357 /**
2358  * struct cdp_tx_delay_ops - mcl tx delay ops
2359  * @tx_delay: handler to get tx packet delay
2360  * @tx_delay_hist: handler to get tx packet delay histogram
2361  * @tx_packet_count: handler to get tx packet count
2362  * @tx_set_compute_interval: update compute interval period for TSM stats
2363  *
2364  * Function pointer for operations related to tx delay.
2365  */
2366 struct cdp_tx_delay_ops {
2367 	void (*tx_delay)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
2368 			 uint32_t *queue_delay_microsec,
2369 			 uint32_t *tx_delay_microsec, int category);
2370 	void (*tx_delay_hist)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
2371 			      uint16_t *bin_values, int category);
2372 	void (*tx_packet_count)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
2373 				uint16_t *out_packet_count,
2374 				uint16_t *out_packet_loss_count, int category);
2375 	void (*tx_set_compute_interval)(struct cdp_soc_t *soc_hdl,
2376 					uint8_t pdev_id, uint32_t interval);
2377 };
2378 
2379 /**
2380  * struct cdp_bus_ops - mcl bus suspend/resume ops
2381  * @bus_suspend: handler for bus suspend
2382  * @bus_resume: handler for bus resume
2383  * @process_wow_ack_rsp: handler for wow ack response
2384  * @process_target_suspend_req: handler for target suspend request
2385  */
2386 struct cdp_bus_ops {
2387 	QDF_STATUS (*bus_suspend)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
2388 	QDF_STATUS (*bus_resume)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
2389 	void (*process_wow_ack_rsp)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
2390 	void (*process_target_suspend_req)(struct cdp_soc_t *soc_hdl,
2391 					   uint8_t pdev_id);
2392 };
2393 #endif
2394 
2395 #ifdef RECEIVE_OFFLOAD
2396 /**
2397  * struct cdp_rx_offld_ops - mcl host receive offload ops
2398  * @register_rx_offld_flush_cb:
2399  * @deregister_rx_offld_flush_cb:
2400  */
2401 struct cdp_rx_offld_ops {
2402 	void (*register_rx_offld_flush_cb)(void (rx_offld_flush_cb)(void *));
2403 	void (*deregister_rx_offld_flush_cb)(void);
2404 };
2405 #endif
2406 
2407 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
2408 /**
2409  * struct cdp_cfr_ops - host cfr ops
2410  * @txrx_get_cfr_rcc: Handler to get CFR mode
2411  * @txrx_set_cfr_rcc: Handler to enable/disable CFR mode
2412  * @txrx_get_cfr_dbg_stats: Handler to get debug statistics for CFR mode
2413  * @txrx_clear_cfr_dbg_stats: Handler to clear debug statistics for CFR mode
2414  */
2415 struct cdp_cfr_ops {
2416 	bool (*txrx_get_cfr_rcc)(struct cdp_soc_t *soc_hdl,
2417 				 uint8_t pdev_id);
2418 	void (*txrx_set_cfr_rcc)(struct cdp_soc_t *soc_hdl,
2419 				 uint8_t pdev_id,
2420 				 bool enable);
2421 	void (*txrx_get_cfr_dbg_stats)(struct cdp_soc_t *soc_hdl,
2422 				       uint8_t pdev_id,
2423 				       struct cdp_cfr_rcc_stats *buf);
2424 	void (*txrx_clear_cfr_dbg_stats)(struct cdp_soc_t *soc_hdl,
2425 					 uint8_t pdev_id);
2426 };
2427 #endif
2428 
2429 #ifdef WLAN_SUPPORT_MSCS
2430 /**
2431  * struct cdp_mscs_ops - data path ops for MSCS
2432  * @mscs_peer_lookup_n_get_priority:
2433  */
2434 struct cdp_mscs_ops {
2435 	int (*mscs_peer_lookup_n_get_priority)(struct cdp_soc_t *soc,
2436 			uint8_t *src_mac,
2437 			uint8_t *dst_mac,
2438 			qdf_nbuf_t nbuf);
2439 };
2440 #endif
2441 
2442 #ifdef WLAN_SUPPORT_MESH_LATENCY
2443 /**
2444  * struct cdp_mesh_latency_ops - data path ops for Mesh latency
2445  * @mesh_latency_update_peer_parameter:
2446  */
2447 struct cdp_mesh_latency_ops {
2448 	QDF_STATUS (*mesh_latency_update_peer_parameter)(
2449 			struct cdp_soc_t *soc,
2450 			uint8_t *dest_mac, uint32_t service_interval_dl,
2451 			uint32_t burst_size_dl, uint32_t service_interval_ul,
2452 			uint32_t burst_size_ul, uint16_t priority,
2453 			uint8_t add_or_sub);
2454 };
2455 #endif
2456 
2457 #ifdef WLAN_SUPPORT_SCS
2458 /**
2459  * struct cdp_scs_ops - data path ops for SCS
2460  * @scs_peer_lookup_n_rule_match : Handler for peer lookup and scs rule match
2461  */
2462 struct cdp_scs_ops {
2463 	bool (*scs_peer_lookup_n_rule_match)(struct cdp_soc_t *soc,
2464 					     uint32_t rule_id,
2465 					     uint8_t *dst_mac_addr);
2466 };
2467 #endif
2468 
2469 #ifdef CONFIG_SAWF_DEF_QUEUES
2470 struct cdp_sawf_ops {
2471 	QDF_STATUS
2472 	(*sawf_def_queues_map_req)(struct cdp_soc_t *soc, uint8_t *mac_addr,
2473 				   uint8_t svc_class_id);
2474 	QDF_STATUS
2475 	(*sawf_def_queues_unmap_req)(struct cdp_soc_t *soc, uint8_t *mac_addr,
2476 				     uint8_t svc_class_id);
2477 	QDF_STATUS
2478 	(*sawf_def_queues_get_map_report)(struct cdp_soc_t *soc,
2479 					  uint8_t *mac_addr);
2480 #ifdef CONFIG_SAWF
2481 	QDF_STATUS
2482 	(*sawf_get_peer_msduq_info)(struct cdp_soc_t *soc, uint8_t *mac_addr);
2483 	QDF_STATUS
2484 	(*txrx_get_peer_sawf_delay_stats)(struct cdp_soc_t *soc,
2485 					  uint32_t svc_id, uint8_t *mac,
2486 					  void *data);
2487 	QDF_STATUS
2488 	(*txrx_get_peer_sawf_tx_stats)(struct cdp_soc_t *soc,
2489 				       uint32_t svc_id, uint8_t *mac,
2490 				       void *data);
2491 	QDF_STATUS
2492 	(*sawf_mpdu_stats_req)(struct cdp_soc_t *soc, uint8_t enable);
2493 	QDF_STATUS
2494 	(*sawf_mpdu_details_stats_req)(struct cdp_soc_t *soc, uint8_t enable);
2495 	QDF_STATUS
2496 	(*txrx_sawf_set_mov_avg_params)(uint32_t num_pkt, uint32_t num_win);
2497 	QDF_STATUS
2498 	(*txrx_sawf_set_sla_params)(uint32_t num_pkt, uint32_t time_secs);
2499 	QDF_STATUS
2500 	(*txrx_sawf_init_telemtery_params)(void);
2501 	QDF_STATUS
2502 	(*telemetry_get_throughput_stats)(void *arg, uint64_t *in_bytes,
2503 					  uint64_t *in_cnt, uint64_t *tx_bytes,
2504 					  uint64_t *tx_cnt, uint8_t tid,
2505 					  uint8_t msduq);
2506 	QDF_STATUS
2507 	(*telemetry_get_mpdu_stats)(void *arg, uint64_t *svc_int_pass,
2508 				    uint64_t *svc_int_fail,
2509 				    uint64_t *burst_pass, uint64_t *burst_fail,
2510 				    uint8_t tid, uint8_t msduq);
2511 	QDF_STATUS
2512 	(*telemetry_get_drop_stats)(void *arg, uint64_t *pass, uint64_t *drop,
2513 				    uint64_t *drop_ttl, uint8_t tid,
2514 				    uint8_t msduq);
2515 	QDF_STATUS
2516 	(*peer_config_ul)(struct cdp_soc_t *hdl, uint8_t *mac_addr, uint8_t tid,
2517 			  uint32_t service_interval, uint32_t burst_size,
2518 			  uint32_t min_tput, uint32_t max_latency,
2519 			  uint8_t add_or_sub, uint16_t peer_id);
2520 	QDF_STATUS
2521 	(*swaf_peer_sla_configuration)(struct cdp_soc_t *soc,
2522 				       uint8_t *mac_addr, uint16_t *sla_mask);
2523 
2524 	QDF_STATUS
2525 	(*sawf_peer_flow_count)(struct cdp_soc_t *hdl, uint8_t *mac_addr,
2526 				uint8_t svc_id, uint8_t direction,
2527 				uint8_t start_or_stop, uint8_t *peer_mac,
2528 				uint16_t peer_id);
2529 #endif
2530 #ifdef WLAN_FEATURE_11BE_MLO_3_LINK_TX
2531 	uint16_t
2532 	(*get_peer_msduq)(struct net_device *netdev, uint8_t *dest_mac,
2533 			  uint32_t dscp_pcp, bool pcp);
2534 	QDF_STATUS
2535 	(*sawf_3_link_peer_flow_count)(struct cdp_soc_t *hdl,
2536 				       uint8_t *mac_addr,
2537 				       uint16_t peer_id,
2538 				       uint32_t mark_metadata);
2539 #endif
2540 };
2541 #endif
2542 
2543 #ifdef WLAN_SUPPORT_PPEDS
2544 struct cdp_ppeds_txrx_ops {
2545 	QDF_STATUS
2546 	(*ppeds_vp_setup_recovery)(struct cdp_soc_t *soc,
2547 				   uint8_t vdev_id, uint16_t profile_idx);
2548 	QDF_STATUS
2549 	(*ppeds_entry_attach)(struct cdp_soc_t *soc,
2550 			      uint8_t vdev_id, void *vpai,
2551 			      int32_t *ppe_vp_num,
2552 			      struct cdp_ds_vp_params *vp_params);
2553 	QDF_STATUS
2554 	(*ppeds_enable_pri2tid)(struct cdp_soc_t *soc,
2555 				uint8_t vdev_id, bool val);
2556 	void (*ppeds_entry_detach)(struct cdp_soc_t *soc,
2557 				   uint8_t vdev_id,
2558 				   struct cdp_ds_vp_params *vp_params);
2559 	void (*ppeds_set_int_pri2tid)(struct cdp_soc_t *soc,
2560 				      uint8_t *pri2tid);
2561 	void (*ppeds_update_int_pri2tid)(struct cdp_soc_t *soc,
2562 					 uint8_t pri, uint8_t tid);
2563 	void (*ppeds_entry_dump)(struct cdp_soc_t *soc);
2564 	void
2565 	(*ppeds_stats_sync)(struct cdp_soc_t *soc,
2566 			    uint16_t vdev_id,
2567 			    struct cdp_ds_vp_params *vp_params,
2568 			    void *stats);
2569 };
2570 #endif /* WLAN_SUPPORT_PPEDS */
2571 
2572 #ifdef WLAN_SUPPORT_RX_FLOW_TAG
2573 struct cdp_fse_ops {
2574 	QDF_STATUS
2575 	(*fse_rule_add)(struct cdp_soc_t *soc,
2576 			uint32_t *src_ip, uint32_t src_port,
2577 			uint32_t *dest_ip, uint32_t dest_port,
2578 			uint8_t protocol, uint8_t version);
2579 	QDF_STATUS
2580 	(*fse_rule_delete)(struct cdp_soc_t *soc,
2581 			   uint32_t *src_ip, uint32_t src_port,
2582 			   uint32_t *dest_ip, uint32_t dest_port,
2583 			   uint8_t protocol, uint8_t version);
2584 };
2585 #endif /* WLAN_SUPPORT_RX_FLOW_TAG */
2586 
2587 struct cdp_ops {
2588 	struct cdp_cmn_ops          *cmn_drv_ops;
2589 	struct cdp_ctrl_ops         *ctrl_ops;
2590 	struct cdp_me_ops           *me_ops;
2591 	struct cdp_mon_ops          *mon_ops;
2592 	struct cdp_host_stats_ops   *host_stats_ops;
2593 	struct cdp_wds_ops          *wds_ops;
2594 	struct cdp_raw_ops          *raw_ops;
2595 	struct cdp_pflow_ops        *pflow_ops;
2596 #ifdef DP_PEER_EXTENDED_API
2597 	struct cdp_misc_ops         *misc_ops;
2598 	struct cdp_peer_ops         *peer_ops;
2599 	struct cdp_ocb_ops          *ocb_ops;
2600 	struct cdp_mob_stats_ops    *mob_stats_ops;
2601 	struct cdp_pmf_ops          *pmf_ops;
2602 #endif
2603 #ifdef DP_FLOW_CTL
2604 	struct cdp_cfg_ops          *cfg_ops;
2605 	struct cdp_flowctl_ops      *flowctl_ops;
2606 	struct cdp_lflowctl_ops     *l_flowctl_ops;
2607 	struct cdp_throttle_ops     *throttle_ops;
2608 #endif
2609 #ifdef DP_POWER_SAVE
2610 	struct cdp_bus_ops          *bus_ops;
2611 	struct cdp_tx_delay_ops     *delay_ops;
2612 #endif
2613 #ifdef IPA_OFFLOAD
2614 	struct cdp_ipa_ops          *ipa_ops;
2615 #endif
2616 #ifdef RECEIVE_OFFLOAD
2617 	struct cdp_rx_offld_ops     *rx_offld_ops;
2618 #endif
2619 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
2620 	struct cdp_cfr_ops          *cfr_ops;
2621 #endif
2622 #ifdef WLAN_SUPPORT_MSCS
2623 	struct cdp_mscs_ops         *mscs_ops;
2624 #endif
2625 #ifdef WLAN_SUPPORT_MESH_LATENCY
2626 	struct cdp_mesh_latency_ops         *mesh_latency_ops;
2627 #endif
2628 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
2629 	struct cdp_mlo_ops  *mlo_ops;
2630 #endif
2631 #if defined(WLAN_FEATURE_11BE_MLO)
2632 	struct cdp_cmn_mlo_ops  *cmn_mlo_ops;
2633 #endif
2634 #ifdef CONFIG_SAWF_DEF_QUEUES
2635 	struct cdp_sawf_ops  *sawf_ops;
2636 #endif
2637 #ifdef WLAN_SUPPORT_SCS
2638 	struct cdp_scs_ops   *scs_ops;
2639 #endif
2640 #ifdef WLAN_SUPPORT_PPEDS
2641 	struct cdp_ppeds_txrx_ops *ppeds_ops;
2642 #endif
2643 #ifdef WLAN_SUPPORT_RX_FLOW_TAG
2644 	struct cdp_fse_ops *fse_ops;
2645 #endif
2646 };
2647 #endif
2648