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