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