xref: /wlan-dirver/qca-wifi-host-cmn/dp/inc/cdp_txrx_ops.h (revision 2888b71da71bce103343119fa1b31f4a0cee07c8)
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 	/**
599 	 * txrx_get_os_rx_handles_from_vdev() - Return function, osif vdev
600 	 *					to deliver pkt to stack.
601 	 * @soc: datapath soc handle
602 	 * @vdev: vdev id
603 	 * @stack_fn: pointer to - function pointer to deliver RX pkt to stack
604 	 * @osif_vdev: pointer to - osif vdev to deliver RX packet to.
605 	 */
606 	void (*txrx_get_os_rx_handles_from_vdev)
607 					(ol_txrx_soc_handle soc,
608 					 uint8_t vdev_id,
609 					 ol_txrx_rx_fp *stack_fn,
610 					 ol_osif_vdev_handle *osif_vdev);
611 
612 	void (*set_rate_stats_ctx)(struct cdp_soc_t *soc,
613 				   void *ctx);
614 
615 	int (*txrx_classify_update)
616 		(struct cdp_soc_t *soc, uint8_t vdev_id, qdf_nbuf_t skb,
617 		 enum txrx_direction, struct ol_txrx_nbuf_classify *nbuf_class);
618 
619 	bool (*get_dp_capabilities)(struct cdp_soc_t *soc,
620 				    enum cdp_capabilities dp_caps);
621 	void* (*get_rate_stats_ctx)(struct cdp_soc_t *soc);
622 	QDF_STATUS (*txrx_peer_flush_rate_stats)(struct cdp_soc_t *soc,
623 						 uint8_t pdev_id,
624 						 void *buf);
625 	void* (*txrx_peer_get_peerstats_ctx)(struct cdp_soc_t *soc,
626 					     uint8_t vdev_id,
627 					     uint8_t *mac_addr);
628 
629 	QDF_STATUS (*txrx_flush_rate_stats_request)(struct cdp_soc_t *soc,
630 						    uint8_t pdev_id);
631 	QDF_STATUS (*set_pdev_pcp_tid_map)(struct cdp_soc_t *soc,
632 					   uint8_t pdev_id,
633 					   uint8_t pcp, uint8_t tid);
634 	QDF_STATUS (*set_vdev_pcp_tid_map)(struct cdp_soc_t *soc,
635 					   uint8_t vdev_id,
636 					   uint8_t pcp, uint8_t tid);
637 #ifdef DP_RX_UDP_OVER_PEER_ROAM
638 	QDF_STATUS (*txrx_update_roaming_peer)(struct cdp_soc_t *soc,
639 					       uint8_t vdev_id,
640 					       uint8_t *peer_mac,
641 					       uint32_t auth_status);
642 #endif
643 
644 #ifdef QCA_MULTIPASS_SUPPORT
645 	QDF_STATUS (*set_vlan_groupkey)(struct cdp_soc_t *soc, uint8_t vdev_id,
646 					uint16_t vlan_id, uint16_t group_key);
647 #endif
648 
649 	uint16_t (*get_peer_mac_list)
650 		 (ol_txrx_soc_handle soc, uint8_t vdev_id,
651 		  u_int8_t newmac[][QDF_MAC_ADDR_SIZE], uint16_t mac_cnt,
652 		  bool limit);
653 	uint16_t (*get_peer_id)(ol_txrx_soc_handle soc,
654 				uint8_t vdev_id,
655 				uint8_t *mac);
656 #ifdef QCA_SUPPORT_WDS_EXTENDED
657 	QDF_STATUS (*set_wds_ext_peer_rx)(ol_txrx_soc_handle soc,
658 					  uint8_t vdev_id,
659 					  uint8_t *mac,
660 					  ol_txrx_rx_fp rx,
661 					  ol_osif_peer_handle osif_peer);
662 #endif /* QCA_SUPPORT_WDS_EXTENDED */
663 	void (*txrx_drain)(ol_txrx_soc_handle soc);
664 	int (*get_free_desc_poolsize)(struct cdp_soc_t *soc);
665 #ifdef WLAN_SYSFS_DP_STATS
666 	QDF_STATUS (*txrx_sysfs_fill_stats)(ol_txrx_soc_handle soc,
667 					    char *buf, uint32_t buf_size);
668 	QDF_STATUS (*txrx_sysfs_set_stat_type)(ol_txrx_soc_handle soc,
669 					       uint32_t stat_type,
670 					       uint32_t mac_id);
671 #endif /* WLAN_SYSFS_DP_STATS */
672 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
673 	void (*set_pkt_capture_mode)(struct cdp_soc_t *soc, bool val);
674 #endif
675 
676 #ifdef FEATURE_RUNTIME_PM
677 	void (*set_rtpm_tput_policy)(struct cdp_soc_t *soc, bool val);
678 #endif
679 
680 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
681 	void (*txrx_recovery_vdev_flush_peers)(struct cdp_soc_t *soc,
682 					       uint8_t vdev_id,
683 					       bool mlo_peers_only);
684 #endif
685 	QDF_STATUS (*txrx_umac_reset_deinit)(ol_txrx_soc_handle soc);
686 };
687 
688 struct cdp_ctrl_ops {
689 
690 	int
691 		(*txrx_mempools_attach)(ol_txrx_soc_handle dp_soc);
692 	int
693 		(*txrx_update_filter_neighbour_peers)(
694 				struct cdp_soc_t *soc, uint8_t vdev_id,
695 				uint32_t cmd, uint8_t *macaddr);
696 
697 	/* Is this similar to ol_txrx_peer_state_update() in MCL */
698 	/**
699 	 * @brief Update the authorize peer object at association time
700 	 * @details
701 	 * For the host-based implementation of rate-control, it
702 	 * updates the peer/node-related parameters within rate-control
703 	 * context of the peer at association.
704 	 *
705 	 * @param soc_hdl - pointer to the soc object
706 	 * @param vdev_id - id of the virtual object
707 	 * @param peer_mac - mac address of the node's object
708 	 * @authorize - either to authorize or unauthorize peer
709 	 *
710 	 * @return QDF_STATUS
711 	 */
712 	QDF_STATUS
713 		(*txrx_peer_authorize)(struct cdp_soc_t *soc_hdl,
714 				       uint8_t vdev_id,
715 				       uint8_t *peer_mac,
716 				       u_int32_t authorize);
717 	bool
718 		(*txrx_peer_get_authorize)(struct cdp_soc_t *soc_hdl,
719 					   uint8_t vdev_id,
720 					   uint8_t *peer_mac);
721 
722 	void (*tx_flush_buffers)(struct cdp_soc_t *soc, uint8_t vdev_id);
723 
724 	int (*txrx_is_target_ar900b)(struct cdp_soc_t *soc_hdl);
725 
726 	QDF_STATUS
727 	(*txrx_set_vdev_param)(struct cdp_soc_t *soc, uint8_t vdev_id,
728 			       enum cdp_vdev_param_type param,
729 			       cdp_config_param_type val);
730 
731 	/**
732 	 * @brief Set the reo dest ring num of the radio
733 	 * @details
734 	 *  Set the reo destination ring no on which we will receive
735 	 *  pkts for this radio.
736 	 *
737 	 * @txrx_soc - soc handle
738 	 * @param pdev_id - id of physical device
739 	 * @return the reo destination ring number
740 	 * @param reo_dest_ring_num - value ranges between 1 - 4
741 	 */
742 	QDF_STATUS (*txrx_set_pdev_reo_dest)(
743 			struct cdp_soc_t *txrx_soc,
744 			uint8_t pdev_id,
745 			enum cdp_host_reo_dest_ring reo_dest_ring_num);
746 
747 	/**
748 	 * @brief Get the reo dest ring num of the radio
749 	 * @details
750 	 *  Get the reo destination ring no on which we will receive
751 	 *  pkts for this radio.
752 	 *
753 	 * @txrx_soc - soc handle
754 	 * @param pdev_id - id of physical device
755 	 * @return the reo destination ring number
756 	 */
757 	enum cdp_host_reo_dest_ring (*txrx_get_pdev_reo_dest)(
758 				     struct cdp_soc_t *txrx_soc,
759 				     uint8_t pdev_id);
760 
761 	int (*txrx_wdi_event_sub)(struct cdp_soc_t *soc, uint8_t pdev_id,
762 				  wdi_event_subscribe *event_cb_sub,
763 				  uint32_t event);
764 
765 	int (*txrx_wdi_event_unsub)(struct cdp_soc_t *soc, uint8_t pdev_id,
766 				    wdi_event_subscribe *event_cb_sub,
767 				    uint32_t event);
768 
769 	int (*txrx_get_sec_type)(ol_txrx_soc_handle soc, uint8_t vdev_id,
770 				 uint8_t *peer_mac, uint8_t sec_idx);
771 
772 	QDF_STATUS
773 	(*txrx_update_mgmt_txpow_vdev)(struct cdp_soc_t *soc,
774 				       uint8_t vdev_id,
775 				       uint8_t subtype, uint8_t tx_power);
776 
777 	/**
778 	 * txrx_set_pdev_param() - callback to set pdev parameter
779 	 * @soc: opaque soc handle
780 	 * @pdev_id:id of data path pdev handle
781 	 * @val: value of pdev_tx_capture
782 	 *
783 	 * Return: status: 0 - Success, non-zero: Failure
784 	 */
785 	QDF_STATUS (*txrx_set_pdev_param)(struct cdp_soc_t *soc,
786 					  uint8_t pdev_id,
787 					  enum cdp_pdev_param_type type,
788 					  cdp_config_param_type val);
789 
790 	QDF_STATUS (*txrx_get_pdev_param)(struct cdp_soc_t *soc,
791 					  uint8_t pdev_id,
792 					  enum cdp_pdev_param_type type,
793 					  cdp_config_param_type *val);
794 
795 	QDF_STATUS (*txrx_set_peer_param)(struct cdp_soc_t *soc,
796 					  uint8_t vdev_id, uint8_t *peer_mac,
797 					  enum cdp_peer_param_type param,
798 					  cdp_config_param_type val);
799 
800 	QDF_STATUS (*txrx_get_peer_param)(struct cdp_soc_t *soc,
801 					  uint8_t vdev_id, uint8_t *peer_mac,
802 					  enum cdp_peer_param_type param,
803 					  cdp_config_param_type *val);
804 
805 	void * (*txrx_get_pldev)(struct cdp_soc_t *soc, uint8_t pdev_id);
806 	void (*txrx_peer_flush_frags)(struct cdp_soc_t *soc, uint8_t vdev_id,
807 				      uint8_t *peer_mac);
808 
809 #ifdef VDEV_PEER_PROTOCOL_COUNT
810 	void (*txrx_peer_protocol_cnt)(struct cdp_soc_t *soc,
811 				       int8_t vdev_id,
812 				       qdf_nbuf_t nbuf,
813 				       bool is_egress,
814 				       bool is_rx);
815 #endif
816 #ifdef ATH_SUPPORT_NAC_RSSI
817 	QDF_STATUS (*txrx_vdev_config_for_nac_rssi)(struct cdp_soc_t *cdp_soc,
818 						    uint8_t vdev_id,
819 						    enum cdp_nac_param_cmd cmd,
820 						    char *bssid,
821 						    char *client_macaddr,
822 						    uint8_t chan_num);
823 
824 	QDF_STATUS (*txrx_vdev_get_neighbour_rssi)(struct cdp_soc_t *cdp_soc,
825 						   uint8_t vdev_id,
826 						   char *macaddr,
827 						   uint8_t *rssi);
828 #endif
829 
830 #ifdef WLAN_SUPPORT_MSCS
831 	QDF_STATUS
832 		(*txrx_record_mscs_params) (
833 				struct cdp_soc_t *soc, uint8_t *macaddr,
834 				uint8_t vdev_id,
835 				struct cdp_mscs_params *mscs_params,
836 				bool active);
837 #endif
838 
839 	QDF_STATUS
840 	(*set_key)(struct cdp_soc_t *soc, uint8_t vdev_id, uint8_t *mac,
841 		   bool is_unicast, uint32_t *key);
842 
843 	QDF_STATUS (*txrx_get_vdev_param)(struct cdp_soc_t *soc,
844 					  uint8_t vdev_id,
845 					  enum cdp_vdev_param_type param,
846 					  cdp_config_param_type *val);
847 	int (*enable_peer_based_pktlog)(struct cdp_soc_t *cdp_soc,
848 					uint8_t pdev_id,
849 					uint8_t *macaddr, uint8_t enb_dsb);
850 
851 	QDF_STATUS
852 	(*calculate_delay_stats)(struct cdp_soc_t *cdp_soc,
853 				 uint8_t vdev_id, qdf_nbuf_t nbuf);
854 #ifdef WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG
855 	QDF_STATUS (*txrx_update_pdev_rx_protocol_tag)(
856 			struct cdp_soc_t  *soc, uint8_t pdev_id,
857 			uint32_t protocol_mask, uint16_t protocol_type,
858 			uint16_t tag);
859 #ifdef WLAN_SUPPORT_RX_TAG_STATISTICS
860 	void (*txrx_dump_pdev_rx_protocol_tag_stats)(
861 				struct cdp_soc_t  *soc, uint8_t pdev_id,
862 				uint16_t protocol_type);
863 #endif /* WLAN_SUPPORT_RX_TAG_STATISTICS */
864 #endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */
865 #ifdef WLAN_SUPPORT_RX_FLOW_TAG
866 	QDF_STATUS (*txrx_set_rx_flow_tag)(
867 		struct cdp_soc_t *cdp_soc, uint8_t pdev_id,
868 		struct cdp_rx_flow_info *flow_info);
869 	QDF_STATUS (*txrx_dump_rx_flow_tag_stats)(
870 		struct cdp_soc_t *cdp_soc, uint8_t pdev_id,
871 		struct cdp_rx_flow_info *flow_info);
872 #endif /* WLAN_SUPPORT_RX_FLOW_TAG */
873 #ifdef QCA_MULTIPASS_SUPPORT
874 	void (*txrx_peer_set_vlan_id)(struct cdp_soc_t *cdp_soc,
875 				      uint8_t vdev_id, uint8_t *peer_mac,
876 				      uint16_t vlan_id);
877 #endif
878 #if defined(WLAN_TX_PKT_CAPTURE_ENH) || defined(WLAN_RX_PKT_CAPTURE_ENH)
879 	QDF_STATUS (*txrx_update_peer_pkt_capture_params)(
880 			ol_txrx_soc_handle soc, uint8_t pdev_id,
881 			bool is_rx_pkt_cap_enable, uint8_t is_tx_pkt_cap_enable,
882 			uint8_t *peer_mac);
883 #endif /* WLAN_TX_PKT_CAPTURE_ENH || WLAN_RX_PKT_CAPTURE_ENH */
884 	QDF_STATUS
885 	(*txrx_set_psoc_param)(struct cdp_soc_t *soc,
886 			       enum cdp_psoc_param_type param,
887 			       cdp_config_param_type val);
888 
889 	QDF_STATUS (*txrx_get_psoc_param)(ol_txrx_soc_handle soc,
890 					  enum cdp_psoc_param_type type,
891 					  cdp_config_param_type *val);
892 #ifdef VDEV_PEER_PROTOCOL_COUNT
893 	/*
894 	 * Enable per-peer protocol counters
895 	 */
896 	void (*txrx_enable_peer_protocol_count)(struct cdp_soc_t *soc,
897 						int8_t vdev_id, bool enable);
898 	void (*txrx_set_peer_protocol_drop_mask)(struct cdp_soc_t *soc,
899 						 int8_t vdev_id, int mask);
900 	int (*txrx_is_peer_protocol_count_enabled)(struct cdp_soc_t *soc,
901 						   int8_t vdev_id);
902 	int (*txrx_get_peer_protocol_drop_mask)(struct cdp_soc_t *soc,
903 						int8_t vdev_id);
904 
905 #endif
906 
907 #if defined(WLAN_FEATURE_TSF_UPLINK_DELAY) || defined(WLAN_CONFIG_TX_DELAY)
908 	void (*txrx_set_delta_tsf)(struct cdp_soc_t *soc, uint8_t vdev_id,
909 				   uint32_t delta_tsf);
910 #endif
911 #ifdef WLAN_FEATURE_TSF_UPLINK_DELAY
912 	QDF_STATUS (*txrx_set_tsf_ul_delay_report)(struct cdp_soc_t *soc,
913 						   uint8_t vdev_id,
914 						   bool enable);
915 	QDF_STATUS (*txrx_get_uplink_delay)(struct cdp_soc_t *soc,
916 					    uint8_t vdev_id,
917 					    uint32_t *val);
918 #endif
919 #ifdef QCA_UNDECODED_METADATA_SUPPORT
920 	QDF_STATUS (*txrx_set_pdev_phyrx_error_mask)(struct cdp_soc_t *soc,
921 						     uint8_t pdev_id,
922 						     uint32_t mask,
923 						     uint32_t mask_cont);
924 	QDF_STATUS (*txrx_get_pdev_phyrx_error_mask)(struct cdp_soc_t *soc,
925 						     uint8_t pdev_id,
926 						     uint32_t *mask,
927 						     uint32_t *mask_cont);
928 #endif
929 };
930 
931 struct cdp_me_ops {
932 
933 	void (*tx_me_alloc_descriptor)(struct cdp_soc_t *soc,
934 				       uint8_t pdev_id);
935 
936 	void (*tx_me_free_descriptor)(struct cdp_soc_t *soc, uint8_t pdev_id);
937 
938 	uint16_t (*tx_me_convert_ucast)(struct cdp_soc_t *soc, uint8_t vdev_id,
939 					qdf_nbuf_t wbuf, u_int8_t newmac[][6],
940 					uint8_t newmaccnt, uint8_t tid,
941 					bool is_igmp, bool is_dms_pkt);
942 };
943 
944 /**
945  * struct cdp_mon_ops - host mon ops
946  * @txrx_reset_monitor_mode: Handler to reset monitor mode
947  * @txrx_deliver_tx_mgmt: deliver mgmt tx frame
948  * @txrx_set_advance_monitor_filter: set advanced monitor mode
949  * @config_full_mon_mode: configure full monitor mode
950  * @txrx_enable_mon_reap_timer: Enable/Disable reap timer of monitor status ring
951  */
952 struct cdp_mon_ops {
953 
954 	QDF_STATUS (*txrx_reset_monitor_mode)
955 		(ol_txrx_soc_handle soc, uint8_t pdev_id, u_int8_t smart_monitor);
956 
957 	QDF_STATUS (*txrx_deliver_tx_mgmt)
958 		(struct cdp_soc_t *cdp_soc, uint8_t pdev_id, qdf_nbuf_t nbuf);
959 
960 	/* HK advance monitor filter support */
961 	QDF_STATUS (*txrx_set_advance_monitor_filter)
962 		(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
963 		 struct cdp_monitor_filter *filter_val);
964 
965 	/* Configure full monitor mode */
966 	QDF_STATUS
967 		(*config_full_mon_mode)(struct cdp_soc_t *soc, uint8_t val);
968 	QDF_STATUS (*soc_config_full_mon_mode)(struct cdp_pdev *cdp_pdev,
969 					       uint8_t val);
970 
971 	/* Get monitor mode pdev stats */
972 	QDF_STATUS
973 		(*get_mon_pdev_rx_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
974 					 struct cdp_pdev_mon_stats *stats);
975 
976 	/* Configure monitor status srng reap timer */
977 	bool (*txrx_enable_mon_reap_timer)(struct cdp_soc_t *soc_hdl,
978 					   enum cdp_mon_reap_source source,
979 					   bool enable);
980 
981 #ifdef QCA_SUPPORT_LITE_MONITOR
982 	/* set lite monitor config */
983 	QDF_STATUS
984 	(*txrx_set_lite_mon_config)(
985 			struct cdp_soc_t *soc,
986 			struct cdp_lite_mon_filter_config *mon_config,
987 			uint8_t pdev_id);
988 
989 	/* get lite monitor config */
990 	QDF_STATUS
991 	(*txrx_get_lite_mon_config)(
992 			struct cdp_soc_t *soc,
993 			struct cdp_lite_mon_filter_config *mon_config,
994 			uint8_t pdev_id);
995 
996 	/* set lite monitor peer config */
997 	QDF_STATUS
998 	(*txrx_set_lite_mon_peer_config)(
999 			struct cdp_soc_t *soc,
1000 			struct cdp_lite_mon_peer_config *peer_config,
1001 			uint8_t pdev_id);
1002 
1003 	/* get lite monitor peer list */
1004 	QDF_STATUS
1005 	(*txrx_get_lite_mon_peer_config)(
1006 			struct cdp_soc_t *soc,
1007 			struct cdp_lite_mon_peer_info *info,
1008 			uint8_t pdev_id);
1009 
1010 	/* get lite monitor enable/disable status */
1011 	int
1012 	(*txrx_is_lite_mon_enabled)(struct cdp_soc_t *soc,
1013 				    uint8_t pdev_id,
1014 				    uint8_t direction);
1015 #endif
1016 	/*To set RSSI dbm converstion params in monitor pdev */
1017 	QDF_STATUS (*txrx_set_mon_pdev_params_rssi_dbm_conv)
1018 		(struct cdp_soc_t *soc,
1019 		 struct cdp_rssi_db2dbm_param_dp *params);
1020 };
1021 
1022 struct cdp_host_stats_ops {
1023 	int (*txrx_host_stats_get)(struct cdp_soc_t *soc, uint8_t vdev_id,
1024 				   struct ol_txrx_stats_req *req);
1025 
1026 	QDF_STATUS (*txrx_host_stats_clr)(struct cdp_soc_t *soc,
1027 					  uint8_t vdev_id);
1028 
1029 	QDF_STATUS
1030 	(*txrx_host_ce_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1031 
1032 	int (*txrx_stats_publish)(struct cdp_soc_t *soc, uint8_t pdev_id,
1033 				  struct cdp_stats_extd *buf);
1034 	/**
1035 	 * @brief Enable enhanced stats functionality.
1036 	 *
1037 	 * @param soc - the soc handle
1038 	 * @param pdev_id - pdev_id of pdev
1039 	 * @return - QDF_STATUS
1040 	 */
1041 	QDF_STATUS (*txrx_enable_enhanced_stats)(struct cdp_soc_t *soc,
1042 						 uint8_t pdev_id);
1043 
1044 	/**
1045 	 * @brief Disable enhanced stats functionality.
1046 	 *
1047 	 * @param soc - the soc handle
1048 	 * @param pdev_id - pdev_id of pdev
1049 	 * @return - QDF_STATUS
1050 	 */
1051 	QDF_STATUS (*txrx_disable_enhanced_stats)(struct cdp_soc_t *soc,
1052 						  uint8_t pdev_id);
1053 
1054 	QDF_STATUS
1055 		(*tx_print_tso_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1056 
1057 	QDF_STATUS
1058 		(*tx_rst_tso_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1059 
1060 	QDF_STATUS
1061 		(*tx_print_sg_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1062 
1063 	QDF_STATUS
1064 		(*tx_rst_sg_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1065 
1066 	QDF_STATUS
1067 		(*print_rx_cksum_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1068 
1069 	QDF_STATUS
1070 		(*rst_rx_cksum_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1071 
1072 	QDF_STATUS
1073 		(*txrx_host_me_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
1074 
1075 	QDF_STATUS
1076 		(*txrx_per_peer_stats)(struct cdp_soc_t *soc, uint8_t *addr);
1077 
1078 	int (*txrx_host_msdu_ttl_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
1079 					struct ol_txrx_stats_req *req);
1080 
1081 	int (*ol_txrx_update_peer_stats)(struct cdp_soc_t *soc,
1082 					 uint8_t pdev_id,
1083 					 uint8_t *addr, void *stats,
1084 					 uint32_t last_tx_rate_mcs,
1085 					 uint32_t stats_id);
1086 
1087 	QDF_STATUS
1088 		(*get_fw_peer_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1089 				     uint8_t *addr,
1090 				     uint32_t cap, uint32_t copy_stats);
1091 
1092 	QDF_STATUS
1093 		(*get_htt_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1094 				 void *data,
1095 				 uint32_t data_len);
1096 	QDF_STATUS
1097 		(*txrx_update_pdev_stats)(struct cdp_soc_t *soc,
1098 					  uint8_t pdev_id, void *data,
1099 					  uint16_t stats_id);
1100 	QDF_STATUS
1101 		(*txrx_get_peer_stats_param)(struct cdp_soc_t *soc,
1102 					     uint8_t vdev_id,
1103 					     uint8_t *peer_mac,
1104 					     enum cdp_peer_stats_type type,
1105 					     cdp_peer_stats_param_t *buf);
1106 	QDF_STATUS
1107 		(*txrx_get_peer_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
1108 				       uint8_t *peer_mac,
1109 				       struct cdp_peer_stats *peer_stats);
1110 	QDF_STATUS
1111 		(*txrx_get_soc_stats)(struct cdp_soc_t *soc,
1112 				      struct cdp_soc_stats *soc_stats);
1113 	QDF_STATUS
1114 		(*txrx_reset_peer_ald_stats)(struct cdp_soc_t *soc,
1115 					     uint8_t vdev_id,
1116 					     uint8_t *peer_mac);
1117 	QDF_STATUS
1118 		(*txrx_reset_peer_stats)(struct cdp_soc_t *soc,
1119 					 uint8_t vdev_id, uint8_t *peer_mac);
1120 	int
1121 		(*txrx_get_vdev_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
1122 				       void *buf, bool is_aggregate);
1123 	int
1124 		(*txrx_process_wmi_host_vdev_stats)(ol_txrx_soc_handle soc,
1125 						    void *data, uint32_t len,
1126 						    uint32_t stats_id);
1127 	int
1128 		(*txrx_get_vdev_extd_stats)(struct cdp_soc_t *soc,
1129 					    uint8_t vdev_id,
1130 					    wmi_host_vdev_extd_stats *buffer);
1131 	QDF_STATUS
1132 		(*txrx_update_vdev_stats)(struct cdp_soc_t *soc,
1133 					  uint8_t vdev_id, void *buf,
1134 					  uint16_t stats_id);
1135 	int
1136 		(*txrx_get_radio_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1137 					void *buf);
1138 	QDF_STATUS
1139 		(*txrx_get_pdev_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1140 				       struct cdp_pdev_stats *buf);
1141 	int
1142 		(*txrx_get_ratekbps)(int preamb, int mcs,
1143 				     int htflag, int gintval);
1144 
1145 	QDF_STATUS
1146 	(*txrx_update_peer_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
1147 				  uint8_t *peer_mac, void *stats,
1148 				  uint32_t last_tx_rate_mcs,
1149 				  uint32_t stats_id);
1150 
1151 #ifdef QCA_SUPPORT_SCAN_SPCL_VAP_STATS
1152 	QDF_STATUS
1153 	(*txrx_get_scan_spcl_vap_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
1154 					struct cdp_scan_spcl_vap_stats *stats);
1155 #endif
1156 
1157 	QDF_STATUS
1158 	(*txrx_get_peer_delay_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
1159 				     uint8_t *peer_mac,
1160 				     struct cdp_delay_tid_stats *delay_stats);
1161 
1162 	QDF_STATUS
1163 	(*txrx_get_peer_jitter_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1164 				      uint8_t vdev_id, uint8_t *peer_mac,
1165 				      struct cdp_peer_tid_stats *tid_stats);
1166 
1167 	QDF_STATUS
1168 	(*txrx_alloc_vdev_stats_id)(struct cdp_soc_t *soc,
1169 				    uint8_t *vdev_stats_id);
1170 
1171 	void (*txrx_reset_vdev_stats_id)(struct cdp_soc_t *soc,
1172 					 uint8_t vdev_stats_id);
1173 
1174 #ifdef WLAN_TX_PKT_CAPTURE_ENH
1175 	QDF_STATUS
1176 	(*get_peer_tx_capture_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
1177 				     uint8_t *peer_mac,
1178 				     struct cdp_peer_tx_capture_stats *stats);
1179 
1180 	QDF_STATUS
1181 	(*get_pdev_tx_capture_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1182 				     struct cdp_pdev_tx_capture_stats *stats);
1183 #endif /* WLAN_TX_PKT_CAPTURE_ENH */
1184 #ifdef HW_TX_DELAY_STATS_ENABLE
1185 	void
1186 	(*enable_disable_vdev_tx_delay_stats)(struct cdp_soc_t *soc,
1187 					      uint8_t vdev_id,
1188 					      uint8_t value);
1189 	uint8_t (*is_tx_delay_stats_enabled)(struct cdp_soc_t *soc_hdl,
1190 					     uint8_t vdev_id);
1191 #endif
1192 	QDF_STATUS
1193 	(*txrx_get_pdev_tid_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
1194 				   struct cdp_tid_stats_intf *tid_stats);
1195 #ifdef WLAN_TELEMETRY_STATS_SUPPORT
1196 	QDF_STATUS
1197 		(*txrx_pdev_telemetry_stats)(
1198 				struct cdp_soc_t *soc,
1199 				uint8_t pdev_id,
1200 				struct cdp_pdev_telemetry_stats *stats);
1201 	QDF_STATUS
1202 		(*txrx_peer_telemetry_stats)(
1203 				struct cdp_soc_t *soc,
1204 				uint8_t *addr,
1205 				struct cdp_peer_telemetry_stats *stats);
1206 #endif
1207 };
1208 
1209 struct cdp_wds_ops {
1210 	QDF_STATUS
1211 	(*txrx_set_wds_rx_policy)(struct cdp_soc_t *soc, uint8_t vdev_id,
1212 				  u_int32_t val);
1213 	QDF_STATUS
1214 	(*txrx_wds_peer_tx_policy_update)(struct cdp_soc_t *soc,
1215 					  uint8_t vdev_id, uint8_t *peer_mac,
1216 					  int wds_tx_ucast, int wds_tx_mcast);
1217 	int (*vdev_set_wds)(struct cdp_soc_t *soc, uint8_t vdev_id,
1218 			    uint32_t val);
1219 };
1220 
1221 struct cdp_raw_ops {
1222 	QDF_STATUS
1223 	(*rsim_get_astentry)(struct cdp_soc_t *soc, uint8_t vdev_id,
1224 			     qdf_nbuf_t *pnbuf, struct cdp_raw_ast *raw_ast);
1225 };
1226 
1227 #ifdef PEER_FLOW_CONTROL
1228 struct cdp_pflow_ops {
1229 	uint32_t (*pflow_update_pdev_params)(struct cdp_soc_t *soc,
1230 					     uint8_t pdev_id,
1231 					     enum _dp_param_t,
1232 					     uint32_t, void *);
1233 };
1234 #endif /* PEER_FLOW_CONTROL */
1235 
1236 #define LRO_IPV4_SEED_ARR_SZ 5
1237 #define LRO_IPV6_SEED_ARR_SZ 11
1238 
1239 /**
1240  * struct cdp_lro_hash_config - set rx_offld(LRO/GRO) init parameters
1241  * @lro_enable: indicates whether rx_offld is enabled
1242  * @tcp_flag: If the TCP flags from the packet do not match
1243  * the values in this field after masking with TCP flags mask
1244  * below, packet is not rx_offld eligible
1245  * @tcp_flag_mask: field for comparing the TCP values provided
1246  * above with the TCP flags field in the received packet
1247  * @toeplitz_hash_ipv4: contains seed needed to compute the flow id
1248  * 5-tuple toeplitz hash for ipv4 packets
1249  * @toeplitz_hash_ipv6: contains seed needed to compute the flow id
1250  * 5-tuple toeplitz hash for ipv6 packets
1251  */
1252 struct cdp_lro_hash_config {
1253 	uint32_t lro_enable;
1254 	uint32_t tcp_flag:9,
1255 		tcp_flag_mask:9;
1256 	uint32_t toeplitz_hash_ipv4[LRO_IPV4_SEED_ARR_SZ];
1257 	uint32_t toeplitz_hash_ipv6[LRO_IPV6_SEED_ARR_SZ];
1258 };
1259 
1260 struct ol_if_ops {
1261 	void
1262 	(*peer_set_default_routing)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
1263 				    uint8_t pdev_id, uint8_t *peer_macaddr,
1264 				    uint8_t vdev_id,
1265 				    bool hash_based, uint8_t ring_num,
1266 				    uint8_t lmac_peer_id_msb);
1267 	QDF_STATUS
1268 	(*peer_rx_reorder_queue_setup)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
1269 				       uint8_t pdev_id,
1270 				       uint8_t vdev_id, uint8_t *peer_mac,
1271 				       qdf_dma_addr_t hw_qdesc, int tid,
1272 				       uint16_t queue_num,
1273 				       uint8_t ba_window_size_valid,
1274 				       uint16_t ba_window_size);
1275 	QDF_STATUS
1276 	(*peer_rx_reorder_queue_remove)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
1277 					uint8_t pdev_id,
1278 					uint8_t vdev_id, uint8_t *peer_macaddr,
1279 					uint32_t tid_mask);
1280 	int (*peer_unref_delete)(struct cdp_ctrl_objmgr_psoc *psoc,
1281 				 uint8_t pdev_id,
1282 				 uint8_t *peer_mac,
1283 				 uint8_t *vdev_mac, enum wlan_op_mode opmode);
1284 	bool (*is_hw_dbs_capable)(struct wlan_objmgr_psoc *psoc);
1285 	int (*peer_add_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc,
1286 				  uint8_t vdev_id,
1287 				  uint8_t *peer_macaddr,
1288 				  uint16_t peer_id,
1289 				  const uint8_t *dest_macaddr,
1290 				  uint8_t *next_node_mac,
1291 				  uint32_t flags,
1292 				  uint8_t type);
1293 	int (*peer_update_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc,
1294 				     uint8_t vdev_id,
1295 				     uint8_t *dest_macaddr,
1296 				     uint8_t *peer_macaddr,
1297 				     uint32_t flags);
1298 	void (*peer_del_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc,
1299 				   uint8_t vdev_id,
1300 				   uint8_t *wds_macaddr,
1301 				   uint8_t type,
1302 				   uint8_t delete_in_fw);
1303 #ifdef WLAN_FEATURE_MULTI_AST_DEL
1304 	void (*peer_del_multi_wds_entry)(
1305 			struct cdp_ctrl_objmgr_psoc *soc,
1306 			uint8_t vdev_id,
1307 			struct peer_del_multi_wds_entries *wds_list);
1308 #endif
1309 	QDF_STATUS
1310 	(*lro_hash_config)(struct cdp_ctrl_objmgr_psoc *psoc, uint8_t pdev_id,
1311 			   struct cdp_lro_hash_config *rx_offld_hash);
1312 
1313 	void (*update_dp_stats)(void *soc, void *stats, uint16_t id,
1314 			uint8_t type);
1315 #ifdef FEATURE_NAC_RSSI
1316 	uint8_t (*rx_invalid_peer)(struct cdp_ctrl_objmgr_psoc *soc,
1317 				   uint8_t pdev_id, void *msg);
1318 #else
1319 	uint8_t (*rx_invalid_peer)(uint8_t vdev_id, void *wh);
1320 #endif
1321 
1322 	int  (*peer_map_event)(struct cdp_ctrl_objmgr_psoc *psoc,
1323 			       uint16_t peer_id, uint16_t hw_peer_id,
1324 			       uint8_t vdev_id, uint8_t *peer_mac_addr,
1325 			       enum cdp_txrx_ast_entry_type peer_type,
1326 			       uint32_t tx_ast_hashidx);
1327 
1328 	int (*peer_unmap_event)(struct cdp_ctrl_objmgr_psoc *psoc,
1329 				uint16_t peer_id,
1330 				uint8_t vdev_id, uint8_t *mac_addr);
1331 
1332 	int (*get_dp_cfg_param)(struct cdp_ctrl_objmgr_psoc *psoc,
1333 				enum cdp_cfg_param_type param_num);
1334 
1335 	void (*rx_mic_error)(struct cdp_ctrl_objmgr_psoc *psoc,
1336 			     uint8_t pdev_id,
1337 			     struct cdp_rx_mic_err_info *info);
1338 
1339 	bool (*rx_frag_tkip_demic)(struct cdp_ctrl_objmgr_psoc *psoc,
1340 				   uint8_t vdev_id, uint8_t *peer_mac_addr,
1341 				   qdf_nbuf_t nbuf,
1342 				   uint16_t hdr_space);
1343 
1344 	uint8_t (*freq_to_channel)(struct cdp_ctrl_objmgr_psoc *psoc,
1345 				   uint8_t pdev_id, uint16_t freq);
1346 
1347 	uint8_t (*freq_to_band)(struct cdp_ctrl_objmgr_psoc *psoc,
1348 				uint8_t pdev_id, uint16_t freq);
1349 
1350 	QDF_STATUS(*set_mec_timer)(struct cdp_ctrl_objmgr_psoc *psoc,
1351 				   uint8_t vdev_id, uint16_t mec_timer_val);
1352 
1353 #ifdef ATH_SUPPORT_NAC_RSSI
1354 	int (*config_fw_for_nac_rssi)(struct cdp_ctrl_objmgr_psoc *psoc,
1355 				      uint8_t pdev_id,
1356 				      u_int8_t vdev_id,
1357 				      enum cdp_nac_param_cmd cmd, char *bssid,
1358 				      char *client_macaddr, uint8_t chan_num);
1359 
1360 	int
1361 	(*config_bssid_in_fw_for_nac_rssi)(struct cdp_ctrl_objmgr_psoc *psoc,
1362 					   uint8_t pdev_id, u_int8_t vdev_id,
1363 					   enum cdp_nac_param_cmd cmd,
1364 					   char *bssid, char *client_mac);
1365 #endif
1366 	int (*peer_sta_kickout)(struct cdp_ctrl_objmgr_psoc *psoc,
1367 				uint16_t pdev_id, uint8_t *peer_macaddr);
1368 
1369 	/**
1370 	 * send_delba() - Send delba to peer
1371 	 * @psoc: Objmgr soc handle
1372 	 * @vdev_id: dp vdev id
1373 	 * @peer_macaddr: Peer mac addr
1374 	 * @tid: Tid number
1375 	 * @reason_code: Reason code
1376 	 * @cdp_rcode: CDP reason code for sending DELBA
1377 	 *
1378 	 * Return: 0 for success, non-zero for failure
1379 	 */
1380 	int (*send_delba)(struct cdp_ctrl_objmgr_psoc *psoc, uint8_t vdev_id,
1381 			  uint8_t *peer_macaddr, uint8_t tid,
1382 			  uint8_t reason_code, uint8_t cdp_rcode);
1383 
1384 	int
1385 	(*peer_delete_multiple_wds_entries)(struct cdp_ctrl_objmgr_psoc *psoc,
1386 					    uint8_t vdev_id,
1387 					    uint8_t *dest_macaddr,
1388 					    uint8_t *peer_macaddr,
1389 					    uint32_t flags);
1390 	int
1391 	(*pdev_update_lmac_n_target_pdev_id)(struct cdp_ctrl_objmgr_psoc *psoc,
1392 					    uint8_t *pdev_id,
1393 					    uint8_t *lmac_id,
1394 					    uint8_t *target_pdev_id);
1395 	bool (*is_roam_inprogress)(uint32_t vdev_id);
1396 	enum QDF_GLOBAL_MODE (*get_con_mode)(void);
1397 #ifdef QCA_PEER_MULTIQ_SUPPORT
1398 	int (*peer_ast_flowid_map)(struct cdp_ctrl_objmgr_psoc *ol_soc_handle,
1399 				   uint16_t peer_id, uint8_t vdev_id,
1400 				   uint8_t *peer_mac_addr);
1401 #endif
1402 #ifdef DP_MEM_PRE_ALLOC
1403 	void *(*dp_prealloc_get_context)(uint32_t ctxt_type, size_t ctxt_size);
1404 
1405 	QDF_STATUS(*dp_prealloc_put_context)(uint32_t ctxt_type, void *vaddr);
1406 	void *(*dp_prealloc_get_consistent)(uint32_t *size,
1407 					    void **base_vaddr_unaligned,
1408 					    qdf_dma_addr_t *paddr_unaligned,
1409 					    qdf_dma_addr_t *paddr_aligned,
1410 					    uint32_t align,
1411 					    uint32_t ring_type);
1412 	void (*dp_prealloc_put_consistent)(qdf_size_t size,
1413 					   void *vaddr_unligned,
1414 					   qdf_dma_addr_t paddr);
1415 	void (*dp_get_multi_pages)(uint32_t desc_type,
1416 				   size_t element_size,
1417 				   uint16_t element_num,
1418 				   struct qdf_mem_multi_page_t *pages,
1419 				   bool cacheable);
1420 	void (*dp_put_multi_pages)(uint32_t desc_type,
1421 				   struct qdf_mem_multi_page_t *pages);
1422 #endif
1423 	int (*get_soc_nss_cfg)(struct cdp_ctrl_objmgr_psoc *ol_soc_handle);
1424 
1425 	char *(*get_device_name)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
1426 				 uint8_t pdev_id);
1427 	QDF_STATUS(*nss_stats_clr)(struct cdp_ctrl_objmgr_psoc *psoc,
1428 				   uint8_t vdev_id);
1429 	int (*dp_rx_get_pending)(ol_txrx_soc_handle soc);
1430 	void (*dp_rx_sched_refill_thread)(ol_txrx_soc_handle soc);
1431 	/* TODO: Add any other control path calls required to OL_IF/WMA layer */
1432 #ifdef QCA_SUPPORT_WDS_EXTENDED
1433 	void (*rx_wds_ext_peer_learn)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
1434 				      uint16_t peer_id, uint8_t vdev_id,
1435 				      uint8_t *peer_macaddr);
1436 #endif /* QCA_SUPPORT_WDS_EXTENDED */
1437 #ifdef WLAN_SUPPORT_MESH_LATENCY
1438 	QDF_STATUS(*peer_update_mesh_latency_params)(
1439 			     struct cdp_ctrl_objmgr_psoc *psoc,
1440 				   uint8_t vdev_id, uint8_t *peer_mac, uint8_t tid,
1441 				   uint32_t service_interval_dl, uint32_t burst_size_dl,
1442 				   uint32_t service_interval_ul, uint32_t burst_size_ul,
1443 				   uint8_t add_or_sub, uint8_t ac);
1444 #endif
1445 	uint32_t (*dp_get_tx_inqueue)(ol_txrx_soc_handle soc);
1446 	QDF_STATUS(*dp_send_unit_test_cmd)(uint32_t vdev_id,
1447 					   uint32_t module_id,
1448 					   uint32_t arg_count, uint32_t *arg);
1449 
1450 #ifdef QCA_SUPPORT_LITE_MONITOR
1451 	int (*config_lite_mon_peer)(struct cdp_ctrl_objmgr_psoc *psoc,
1452 				    uint8_t pdev_id,
1453 				    uint8_t vdev_id,
1454 				    enum cdp_nac_param_cmd cmd,
1455 				    uint8_t *peer_mac);
1456 	int (*config_lite_mon_tx_peer)(struct cdp_ctrl_objmgr_psoc *psoc,
1457 				       uint8_t pdev_id, uint8_t vdev_id,
1458 				       enum cdp_tx_filter_action cmd,
1459 				       uint8_t *peer_mac);
1460 #endif
1461 #ifdef WLAN_SUPPORT_SCS
1462 	bool (*peer_scs_rule_match)(struct cdp_ctrl_objmgr_psoc *psoc,
1463 				    uint8_t vdev_id, uint32_t rule_id,
1464 				    uint8_t *peer_mac);
1465 #endif
1466 #ifdef DP_UMAC_HW_RESET_SUPPORT
1467 	void (*dp_update_tx_hardstart)(struct cdp_ctrl_objmgr_psoc *psoc,
1468 				       uint8_t vdev_id,
1469 				       struct ol_txrx_hardtart_ctxt *ctxt);
1470 #endif
1471 #if defined(IPA_WDS_EASYMESH_FEATURE) && defined(FEATURE_AST)
1472 void (*peer_send_wds_disconnect)(struct cdp_ctrl_objmgr_psoc *psoc,
1473 				 uint8_t *mac_addr, uint8_t vdev_id);
1474 #endif
1475 };
1476 
1477 #ifdef DP_PEER_EXTENDED_API
1478 /**
1479  * struct cdp_misc_ops - mcl ops not classified
1480  * @set_ibss_vdev_heart_beat_timer: Update ibss vdev heart beat timer
1481  * @set_wmm_param: set wmm parameters
1482  * @bad_peer_txctl_set_setting: configure bad peer tx limit setting
1483  * @bad_peer_txctl_update_threshold: configure bad peer tx threshold limit
1484  * @hl_tdls_flag_reset: reset tdls flag for vdev
1485  * @tx_non_std: Allow the control-path SW to send data frames
1486  * @get_vdev_id: get vdev id
1487  * @set_wisa_mode: set wisa mode for a vdev
1488  * @txrx_data_stall_cb_register: register data stall callback
1489  * @txrx_data_stall_cb_deregister: deregister data stall callback
1490  * @txrx_post_data_stall_event: post data stall event
1491  * @runtime_suspend: ensure TXRX is ready to runtime suspend
1492  * @runtime_resume: ensure TXRX is ready to runtime resume
1493  * @get_opmode: get operation mode of vdev
1494  * @mark_first_wakeup_packet: set flag to indicate that fw is compatible for
1495 			      marking first packet after wow wakeup
1496  * @update_mac_id: update mac_id for vdev
1497  * @flush_rx_frames: flush rx frames on the queue
1498  * @get_intra_bss_fwd_pkts_count: to get the total tx and rx packets that
1499 				  has been forwarded from txrx layer
1500 				  without going to upper layers
1501  * @pkt_log_init: handler to initialize packet log
1502  * @pkt_log_con_service: handler to connect packet log service
1503  * @get_num_rx_contexts: handler to get number of RX contexts
1504  * @register_packetdump_cb: register callback for different pktlog
1505  * @unregister_packetdump_cb: unregister callback for different pktlog
1506  * @pdev_reset_driver_del_ack: reset driver delayed ack enabled flag
1507  * @vdev_set_driver_del_ack_enable: set driver delayed ack enabled flag
1508  *
1509  * @vdev_inform_ll_conn: inform DP to add/delete a latency critical connection
1510  *			 for this particular vdev.
1511  * @set_swlm_enable: Enable or Disable Software Latency Manager.
1512  * @is_swlm_enabled: Check if Software latency manager is enabled or not.
1513  * @display_txrx_hw_info: Dump the DP rings info
1514  * @set_tx_flush_pending: Configures the ac/tid to be flushed and policy
1515  *			  to flush.
1516  *
1517  * set_bus_vote_lvl_high: The bus lvl is set to high or low based on tput
1518  * get_bus_vote_lvl_high: Get bus lvl to determine whether or not get
1519  *                        rx rate stats
1520  *
1521  * Function pointers for miscellaneous soc/pdev/vdev related operations.
1522  */
1523 struct cdp_misc_ops {
1524 	uint16_t (*set_ibss_vdev_heart_beat_timer)(struct cdp_soc_t *soc_hdl,
1525 						   uint8_t vdev_id,
1526 						   uint16_t timer_value_sec);
1527 	void (*set_wmm_param)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1528 			      struct ol_tx_wmm_param_t wmm_param);
1529 	void (*bad_peer_txctl_set_setting)(struct cdp_soc_t *soc_hdl,
1530 					   uint8_t pdev_id, int enable,
1531 					   int period, int txq_limit);
1532 	void (*bad_peer_txctl_update_threshold)(struct cdp_soc_t *soc_hdl,
1533 						uint8_t pdev_id,
1534 						int level, int tput_thresh,
1535 						int tx_limit);
1536 	void (*hl_tdls_flag_reset)(struct cdp_soc_t *soc_hdl,
1537 				   uint8_t vdev_id, bool flag);
1538 	qdf_nbuf_t (*tx_non_std)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1539 				 enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list);
1540 	uint16_t (*get_vdev_id)(struct cdp_vdev *vdev);
1541 	uint32_t (*get_tx_ack_stats)(struct cdp_soc_t *soc_hdl,
1542 				     uint8_t vdev_id);
1543 	QDF_STATUS (*set_wisa_mode)(struct cdp_soc_t *soc_hdl,
1544 				    uint8_t vdev_id, bool enable);
1545 	QDF_STATUS (*txrx_data_stall_cb_register)(struct cdp_soc_t *soc_hdl,
1546 						  uint8_t pdev_id,
1547 						  data_stall_detect_cb cb);
1548 	QDF_STATUS (*txrx_data_stall_cb_deregister)(struct cdp_soc_t *soc_hdl,
1549 						    uint8_t pdev_id,
1550 						    data_stall_detect_cb cb);
1551 	void (*txrx_post_data_stall_event)(
1552 			struct cdp_soc_t *soc_hdl,
1553 			enum data_stall_log_event_indicator indicator,
1554 			enum data_stall_log_event_type data_stall_type,
1555 			uint32_t pdev_id, uint32_t vdev_id_bitmap,
1556 			enum data_stall_log_recovery_type recovery_type);
1557 	QDF_STATUS (*runtime_suspend)(struct cdp_soc_t *soc_hdl,
1558 				      uint8_t pdev_id);
1559 	QDF_STATUS (*runtime_resume)(struct cdp_soc_t *soc_hdl,
1560 				     uint8_t pdev_id);
1561 	int (*get_opmode)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id);
1562 	void (*mark_first_wakeup_packet)(struct cdp_soc_t *soc_hdl,
1563 					 uint8_t pdev_id, uint8_t value);
1564 	void (*update_mac_id)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1565 			      uint8_t mac_id);
1566 	void (*flush_rx_frames)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1567 				void *peer, bool drop);
1568 	A_STATUS(*get_intra_bss_fwd_pkts_count)(struct cdp_soc_t *soc_hdl,
1569 						uint8_t vdev_id,
1570 						uint64_t *fwd_tx_packets,
1571 						uint64_t *fwd_rx_packets);
1572 	void (*pkt_log_init)(struct cdp_soc_t *soc_hdl, uint8_t pdev,
1573 			     void *scn);
1574 	void (*pkt_log_con_service)(struct cdp_soc_t *soc_hdl,
1575 				    uint8_t pdev_id, void *scn);
1576 	void (*pkt_log_exit)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
1577 	int (*get_num_rx_contexts)(struct cdp_soc_t *soc_hdl);
1578 	void (*register_pktdump_cb)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1579 				    ol_txrx_pktdump_cb tx_cb,
1580 				    ol_txrx_pktdump_cb rx_cb);
1581 	void (*unregister_pktdump_cb)(struct cdp_soc_t *soc_hdl,
1582 				      uint8_t pdev_id);
1583 	void (*pdev_reset_driver_del_ack)(struct cdp_soc_t *soc_hdl,
1584 					  uint8_t pdev_id);
1585 	void (*vdev_set_driver_del_ack_enable)(struct cdp_soc_t *soc_hdl,
1586 					       uint8_t vdev_id,
1587 					       unsigned long rx_packets,
1588 					       uint32_t time_in_ms,
1589 					       uint32_t high_th,
1590 					       uint32_t low_th);
1591 	void (*vdev_set_bundle_require_flag)(uint8_t vdev_id,
1592 					     unsigned long tx_bytes,
1593 					     uint32_t time_in_ms,
1594 					     uint32_t high_th,
1595 					     uint32_t low_th);
1596 	void (*pdev_reset_bundle_require_flag)(struct cdp_soc_t *soc_hdl,
1597 					       uint8_t pdev_id);
1598 	QDF_STATUS (*txrx_ext_stats_request)(struct cdp_soc_t *soc_hdl,
1599 					     uint8_t pdev_id,
1600 					     struct cdp_txrx_ext_stats *req);
1601 	QDF_STATUS (*request_rx_hw_stats)(struct cdp_soc_t *soc_hdl,
1602 					  uint8_t vdev_id);
1603 	void (*reset_rx_hw_ext_stats)(struct cdp_soc_t *soc_hdl);
1604 	QDF_STATUS (*vdev_inform_ll_conn)(struct cdp_soc_t *soc_hdl,
1605 					  uint8_t vdev_id,
1606 					  enum vdev_ll_conn_actions action);
1607 	QDF_STATUS (*set_swlm_enable)(struct cdp_soc_t *soc_hdl,
1608 				      uint8_t val);
1609 	uint8_t (*is_swlm_enabled)(struct cdp_soc_t *soc_hdl);
1610 	void (*display_txrx_hw_info)(struct cdp_soc_t *soc_hdl);
1611 	uint32_t (*get_tx_rings_grp_bitmap)(struct cdp_soc_t *soc_hdl);
1612 #ifdef WLAN_FEATURE_PEER_TXQ_FLUSH_CONF
1613 	int (*set_peer_txq_flush_config)(struct cdp_soc_t *soc_hdl,
1614 					 uint8_t vdev_id, uint8_t *addr,
1615 					 uint8_t ac, uint32_t tid,
1616 					 enum cdp_peer_txq_flush_policy policy);
1617 #endif
1618 #ifdef FEATURE_RX_LINKSPEED_ROAM_TRIGGER
1619 	void (*set_bus_vote_lvl_high)(struct cdp_soc_t *soc_hdl, bool high);
1620 	bool (*get_bus_vote_lvl_high)(struct cdp_soc_t *soc_hdl);
1621 #endif
1622 };
1623 
1624 /**
1625  * struct cdp_ocb_ops - mcl ocb ops
1626  * @set_ocb_chan_info: set OCB channel info
1627  * @get_ocb_chan_info: get OCB channel info
1628  *
1629  * Function pointers for operations related to OCB.
1630  */
1631 struct cdp_ocb_ops {
1632 	void (*set_ocb_chan_info)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1633 				  struct ol_txrx_ocb_set_chan ocb_set_chan);
1634 	struct ol_txrx_ocb_chan_info *(*get_ocb_chan_info)(
1635 				struct cdp_soc_t *soc_hdl, uint8_t vdev_id);
1636 };
1637 
1638 /**
1639  * struct cdp_peer_ops - mcl peer related ops
1640  * @register_peer:
1641  * @clear_peer:
1642  * @find_peer_exist
1643  * @find_peer_exist_on_vdev
1644  * @find_peer_exist_on_other_vdev
1645  * @peer_state_update:
1646  * @get_vdevid:
1647  * @register_ocb_peer:
1648  * @peer_get_peer_mac_addr:
1649  * @get_peer_state:
1650  * @update_ibss_add_peer_num_of_vdev:
1651  * @copy_mac_addr_raw:
1652  * @add_last_real_peer:
1653  * @is_vdev_restore_last_peer:
1654  * @update_last_real_peer:
1655  */
1656 struct cdp_peer_ops {
1657 	QDF_STATUS (*register_peer)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1658 				    struct ol_txrx_desc_type *sta_desc);
1659 	QDF_STATUS (*clear_peer)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1660 				 struct qdf_mac_addr peer_addr);
1661 	bool (*find_peer_exist)(struct cdp_soc_t *soc, uint8_t pdev_id,
1662 				uint8_t *peer_addr);
1663 	bool (*find_peer_exist_on_vdev)(struct cdp_soc_t *soc, uint8_t vdev_id,
1664 					uint8_t *peer_addr);
1665 	bool (*find_peer_exist_on_other_vdev)(struct cdp_soc_t *soc,
1666 					      uint8_t vdev_id,
1667 					      uint8_t *peer_addr,
1668 					      uint16_t max_bssid);
1669 	QDF_STATUS (*peer_state_update)(struct cdp_soc_t *soc,
1670 					uint8_t *peer_addr,
1671 					enum ol_txrx_peer_state state);
1672 	QDF_STATUS (*get_vdevid)(struct cdp_soc_t *soc_hdl, uint8_t *peer_mac,
1673 				 uint8_t *vdev_id);
1674 	struct cdp_vdev * (*get_vdev_by_peer_addr)(struct cdp_pdev *pdev,
1675 			struct qdf_mac_addr peer_addr);
1676 	QDF_STATUS (*register_ocb_peer)(uint8_t *mac_addr);
1677 	uint8_t * (*peer_get_peer_mac_addr)(void *peer);
1678 	int (*get_peer_state)(struct cdp_soc_t *soc, uint8_t vdev_id,
1679 			      uint8_t *peer_mac);
1680 	struct cdp_vdev * (*get_vdev_for_peer)(void *peer);
1681 	int16_t (*update_ibss_add_peer_num_of_vdev)(struct cdp_soc_t *soc,
1682 						    uint8_t vdev_id,
1683 						    int16_t peer_num_delta);
1684 	void (*remove_peers_for_vdev)(struct cdp_vdev *vdev,
1685 			ol_txrx_vdev_peer_remove_cb callback,
1686 			void *callback_context, bool remove_last_peer);
1687 	void (*remove_peers_for_vdev_no_lock)(struct cdp_vdev *vdev,
1688 			ol_txrx_vdev_peer_remove_cb callback,
1689 			void *callback_context);
1690 	void (*copy_mac_addr_raw)(struct cdp_soc_t *soc, uint8_t vdev_id,
1691 				  uint8_t *bss_addr);
1692 	void (*add_last_real_peer)(struct cdp_soc_t *soc, uint8_t pdev_id,
1693 				   uint8_t vdev_id);
1694 	bool (*is_vdev_restore_last_peer)(struct cdp_soc_t *soc,
1695 					  uint8_t vdev_id,
1696 					  uint8_t *peer_mac);
1697 	void (*update_last_real_peer)(struct cdp_soc_t *soc, uint8_t pdev_id,
1698 				      uint8_t vdev_id, bool restore_last_peer);
1699 	void (*peer_detach_force_delete)(struct cdp_soc_t *soc_hdl,
1700 					 uint8_t vdev_id, uint8_t *peer_addr);
1701 	void (*set_tdls_offchan_enabled)(struct cdp_soc_t *soc, uint8_t vdev_id,
1702 					 uint8_t *peer_mac, bool val);
1703 	void (*set_peer_as_tdls_peer)(struct cdp_soc_t *soc, uint8_t vdev_id,
1704 				      uint8_t *peer_mac, bool val);
1705 	void (*peer_flush_frags)(struct cdp_soc_t *soc_hdl,
1706 				 uint8_t vdev_id, uint8_t *peer_mac);
1707 };
1708 
1709 /**
1710  * struct cdp_mob_stats_ops - mcl mob stats ops
1711  * @clear_stats: handler to clear ol txrx stats
1712  * @stats: handler to update ol txrx stats
1713  */
1714 struct cdp_mob_stats_ops {
1715 	QDF_STATUS(*clear_stats)(struct cdp_soc_t *soc_hdl,
1716 				 uint8_t pdev_id, uint8_t bitmap);
1717 	int (*stats)(uint8_t vdev_id, char *buffer, unsigned buf_len);
1718 };
1719 
1720 /**
1721  * struct cdp_pmf_ops - mcl protected management frame ops
1722  * @get_pn_info: handler to get pn info from peer
1723  *
1724  * Function pointers for pmf related operations.
1725  */
1726 struct cdp_pmf_ops {
1727 	void (*get_pn_info)(struct cdp_soc_t *soc, uint8_t *peer_mac,
1728 			    uint8_t vdev_id, uint8_t **last_pn_valid,
1729 			    uint64_t **last_pn, uint32_t **rmf_pn_replays);
1730 };
1731 #endif
1732 
1733 
1734 #ifdef DP_FLOW_CTL
1735 /**
1736  * struct cdp_cfg_ops - mcl configuration ops
1737  * @set_cfg_rx_fwd_disabled: set rx_fwd_disabled flag
1738  * @set_cfg_packet_log_enabled: set is_packet_log_enabled flag
1739  * @cfg_attach: hardcode the configuration parameters
1740  * @vdev_rx_set_intrabss_fwd: set disable_intrabss_fwd flag
1741  * @is_rx_fwd_disabled: get the rx_fwd_disabled flag,
1742  *                      1 enabled, 0 disabled.
1743  * @tx_set_is_mgmt_over_wmi_enabled: set is_mgmt_over_wmi_enabled flag to
1744  *                                   indicate that mgmt over wmi is enabled
1745  *                                   or not,
1746  *                                   1 for enabled, 0 for disable
1747  * @is_high_latency: get device is high or low latency device,
1748  *                   1 high latency bus, 0 low latency bus
1749  * @set_flow_control_parameters: set flow control parameters
1750  * @set_flow_steering: set flow_steering_enabled flag
1751  * @set_ptp_rx_opt_enabled: set is_ptp_rx_opt_enabled flag
1752  * @set_new_htt_msg_format: set new_htt_msg_format flag
1753  * @set_peer_unmap_conf_support: set enable_peer_unmap_conf_support flag
1754  * @get_peer_unmap_conf_support: get enable_peer_unmap_conf_support flag
1755  * @set_tx_compl_tsf64: set enable_tx_compl_tsf64 flag,
1756  *                      1 enabled, 0 disabled.
1757  * @get_tx_compl_tsf64: get enable_tx_compl_tsf64 flag,
1758  *                      1 enabled, 0 disabled.
1759  */
1760 struct cdp_cfg_ops {
1761 	void (*set_cfg_rx_fwd_disabled)(struct cdp_cfg *cfg_pdev,
1762 		uint8_t disable_rx_fwd);
1763 	void (*set_cfg_packet_log_enabled)(struct cdp_cfg *cfg_pdev,
1764 		uint8_t val);
1765 	struct cdp_cfg * (*cfg_attach)(qdf_device_t osdev, void *cfg_param);
1766 	void (*vdev_rx_set_intrabss_fwd)(struct cdp_soc_t *soc_hdl,
1767 					 uint8_t vdev_id, bool val);
1768 	uint8_t (*is_rx_fwd_disabled)(struct cdp_vdev *vdev);
1769 	void (*tx_set_is_mgmt_over_wmi_enabled)(uint8_t value);
1770 	int (*is_high_latency)(struct cdp_cfg *cfg_pdev);
1771 	void (*set_flow_control_parameters)(struct cdp_cfg *cfg_pdev,
1772 		void *param);
1773 	void (*set_flow_steering)(struct cdp_cfg *cfg_pdev, uint8_t val);
1774 	void (*set_ptp_rx_opt_enabled)(struct cdp_cfg *cfg_pdev, uint8_t val);
1775 	void (*set_new_htt_msg_format)(uint8_t val);
1776 	void (*set_peer_unmap_conf_support)(bool val);
1777 	bool (*get_peer_unmap_conf_support)(void);
1778 	void (*set_tx_compl_tsf64)(bool val);
1779 	bool (*get_tx_compl_tsf64)(void);
1780 };
1781 
1782 /**
1783  * struct cdp_flowctl_ops - mcl flow control
1784  * @flow_pool_map_handler: handler to map flow_id and pool descriptors
1785  * @flow_pool_unmap_handler: handler to unmap flow_id and pool descriptors
1786  * @register_pause_cb: handler to register tx pause callback
1787  * @set_desc_global_pool_size: handler to set global pool size
1788  * @dump_flow_pool_info: handler to dump global and flow pool info
1789  * @tx_desc_thresh_reached: handler to set tx desc threshold
1790  *
1791  * Function pointers for operations related to flow control
1792  */
1793 struct cdp_flowctl_ops {
1794 	QDF_STATUS (*flow_pool_map_handler)(struct cdp_soc_t *soc,
1795 					    uint8_t pdev_id,
1796 					    uint8_t vdev_id);
1797 	void (*flow_pool_unmap_handler)(struct cdp_soc_t *soc,
1798 					uint8_t pdev_id,
1799 					uint8_t vdev_id);
1800 	QDF_STATUS (*register_pause_cb)(struct cdp_soc_t *soc,
1801 					tx_pause_callback);
1802 	void (*set_desc_global_pool_size)(uint32_t num_msdu_desc);
1803 
1804 	void (*dump_flow_pool_info)(struct cdp_soc_t *soc_hdl);
1805 
1806 	bool (*tx_desc_thresh_reached)(struct cdp_soc_t *soc_hdl,
1807 				       uint8_t vdev_id);
1808 };
1809 
1810 /**
1811  * struct cdp_lflowctl_ops - mcl legacy flow control ops
1812  * @register_tx_flow_control: Register tx flow control callback
1813  * @set_vdev_tx_desc_limit:  Set tx descriptor limit for a vdev
1814  * @set_vdev_os_queue_status: Set vdev queue status
1815  * @deregister_tx_flow_control_cb: Deregister tx flow control callback
1816  * @flow_control_cb: Call osif flow control callback
1817  * @get_tx_resource: Get tx resources and comapre with watermark
1818  * @ll_set_tx_pause_q_depth: set pause queue depth
1819  * @vdev_flush: Flush all packets on a particular vdev
1820  * @vdev_pause: Pause a particular vdev
1821  * @vdev_unpause: Unpause a particular vdev
1822  *
1823  * Function pointers for operations related to flow control
1824  */
1825 struct cdp_lflowctl_ops {
1826 #ifdef QCA_HL_NETDEV_FLOW_CONTROL
1827 	int (*register_tx_flow_control)(struct cdp_soc_t *soc_hdl,
1828 					uint8_t pdev_id,
1829 					tx_pause_callback flowcontrol);
1830 	int (*set_vdev_tx_desc_limit)(struct cdp_soc_t *soc_hdl,
1831 				      uint8_t vdev_id, uint32_t chan_freq);
1832 	int (*set_vdev_os_queue_status)(struct cdp_soc_t *soc_hdl,
1833 					uint8_t vdev_id,
1834 					enum netif_action_type action);
1835 #else
1836 	int (*register_tx_flow_control)(
1837 		struct cdp_soc_t *soc_hdl,
1838 		uint8_t vdev_id,
1839 		ol_txrx_tx_flow_control_fp flowControl, void *osif_fc_ctx,
1840 		ol_txrx_tx_flow_control_is_pause_fp flow_control_is_pause);
1841 #endif /* QCA_HL_NETDEV_FLOW_CONTROL */
1842 	int (*deregister_tx_flow_control_cb)(struct cdp_soc_t *soc_hdl,
1843 					     uint8_t vdev_id);
1844 	void (*flow_control_cb)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1845 				bool tx_resume);
1846 	bool (*get_tx_resource)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1847 				struct qdf_mac_addr peer_addr,
1848 				unsigned int low_watermark,
1849 				unsigned int high_watermark_offset);
1850 	int (*ll_set_tx_pause_q_depth)(struct cdp_soc_t *soc, uint8_t vdev_id,
1851 				       int pause_q_depth);
1852 	void (*vdev_flush)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id);
1853 	void (*vdev_pause)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1854 			   uint32_t reason, uint32_t pause_type);
1855 	void (*vdev_unpause)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1856 			     uint32_t reason, uint32_t pause_type);
1857 };
1858 
1859 /**
1860  * struct cdp_throttle_ops - mcl throttle ops
1861  * @throttle_init_period: handler to initialize tx throttle time
1862  * @throttle_set_level: handler to set tx throttle level
1863  */
1864 struct cdp_throttle_ops {
1865 	void (*throttle_init_period)(struct cdp_soc_t *soc_hdl,
1866 				     uint8_t pdev_id, int period,
1867 				     uint8_t *dutycycle_level);
1868 	void (*throttle_set_level)(struct cdp_soc_t *soc_hdl,
1869 				   uint8_t pdev_id, int level);
1870 };
1871 #endif
1872 
1873 #ifdef IPA_OFFLOAD
1874 /**
1875  * struct cdp_ipa_ops - mcl ipa data path ops
1876  * @ipa_get_resource:
1877  * @ipa_set_doorbell_paddr:
1878  * @ipa_iounmap_doorbell_vaddr: I/O unmap ipa doorbell vaddr
1879  * @ipa_set_active:
1880  * @ipa_op_response:
1881  * @ipa_register_op_cb:
1882  * @ipa_get_stat:
1883  * @ipa_tx_data_frame:
1884  * @ipa_tx_buf_smmu_mapping: Create SMMU mappings for Tx
1885  * @ipa_tx_buf_smmu_unmapping: Release SMMU mappings for Tx
1886  * buffers to IPA
1887  * @ipa_ast_create: Create/Update ast entry
1888  */
1889 struct cdp_ipa_ops {
1890 	QDF_STATUS (*ipa_get_resource)(struct cdp_soc_t *soc_hdl,
1891 				       uint8_t pdev_id);
1892 	QDF_STATUS (*ipa_set_doorbell_paddr)(struct cdp_soc_t *soc_hdl,
1893 					     uint8_t pdev_id);
1894 	QDF_STATUS (*ipa_iounmap_doorbell_vaddr)(struct cdp_soc_t *soc_hdl,
1895 						 uint8_t pdev_id);
1896 	QDF_STATUS (*ipa_set_active)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1897 				     bool uc_active, bool is_tx);
1898 	QDF_STATUS (*ipa_op_response)(struct cdp_soc_t *soc_hdl,
1899 				      uint8_t pdev_id, uint8_t *op_msg);
1900 	QDF_STATUS (*ipa_register_op_cb)(struct cdp_soc_t *soc_hdl,
1901 					 uint8_t pdev_id,
1902 					 void (*ipa_uc_op_cb_type)
1903 					 (uint8_t *op_msg, void *osif_ctxt),
1904 					 void *usr_ctxt);
1905 	void (*ipa_deregister_op_cb)(struct cdp_soc_t *soc_hdl,
1906 				     uint8_t pdev_id);
1907 	QDF_STATUS (*ipa_get_stat)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
1908 	qdf_nbuf_t (*ipa_tx_data_frame)(struct cdp_soc_t *soc_hdl,
1909 					uint8_t vdev_id, qdf_nbuf_t skb);
1910 	void (*ipa_set_uc_tx_partition_base)(struct cdp_cfg *pdev,
1911 		uint32_t value);
1912 #ifdef FEATURE_METERING
1913 	QDF_STATUS (*ipa_uc_get_share_stats)(struct cdp_soc_t *soc_hdl,
1914 					     uint8_t pdev_id,
1915 					     uint8_t reset_stats);
1916 	QDF_STATUS (*ipa_uc_set_quota)(struct cdp_soc_t *soc_hdl,
1917 				       uint8_t pdev_id, uint64_t quota_bytes);
1918 #endif
1919 	QDF_STATUS (*ipa_enable_autonomy)(struct cdp_soc_t *soc_hdl,
1920 					  uint8_t pdev_id);
1921 	QDF_STATUS (*ipa_disable_autonomy)(struct cdp_soc_t *soc_hdl,
1922 					   uint8_t pdev_id);
1923 
1924 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)) || \
1925 	defined(CONFIG_IPA_WDI_UNIFIED_API)
1926 	QDF_STATUS (*ipa_setup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1927 				void *ipa_i2w_cb, void *ipa_w2i_cb,
1928 				void *ipa_wdi_meter_notifier_cb,
1929 				uint32_t ipa_desc_size, void *ipa_priv,
1930 				bool is_rm_enabled, uint32_t *tx_pipe_handle,
1931 				uint32_t *rx_pipe_handle, bool is_smmu_enabled,
1932 				qdf_ipa_sys_connect_params_t *sys_in,
1933 				bool over_gsi, qdf_ipa_wdi_hdl_t hdl,
1934 				qdf_ipa_wdi_hdl_t id,
1935 				void *ipa_ast_notify_cb);
1936 #else /* CONFIG_IPA_WDI_UNIFIED_API */
1937 	QDF_STATUS (*ipa_setup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1938 				void *ipa_i2w_cb, void *ipa_w2i_cb,
1939 				void *ipa_wdi_meter_notifier_cb,
1940 				uint32_t ipa_desc_size, void *ipa_priv,
1941 				bool is_rm_enabled, uint32_t *tx_pipe_handle,
1942 				uint32_t *rx_pipe_handle);
1943 #endif /* CONFIG_IPA_WDI_UNIFIED_API */
1944 	QDF_STATUS (*ipa_cleanup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1945 				  uint32_t tx_pipe_handle,
1946 				  uint32_t rx_pipe_handle,
1947 				  qdf_ipa_wdi_hdl_t hdl);
1948 	QDF_STATUS (*ipa_setup_iface)(char *ifname, uint8_t *mac_addr,
1949 				      qdf_ipa_client_type_t prod_client,
1950 				      qdf_ipa_client_type_t cons_client,
1951 				      uint8_t session_id, bool is_ipv6_enabled,
1952 				      qdf_ipa_wdi_hdl_t hdl);
1953 	QDF_STATUS (*ipa_cleanup_iface)(char *ifname, bool is_ipv6_enabled,
1954 					qdf_ipa_wdi_hdl_t hdl);
1955 	QDF_STATUS (*ipa_enable_pipes)(struct cdp_soc_t *soc_hdl,
1956 				       uint8_t pdev_id, qdf_ipa_wdi_hdl_t hdl);
1957 	QDF_STATUS (*ipa_disable_pipes)(struct cdp_soc_t *soc_hdl,
1958 					uint8_t pdev_id, qdf_ipa_wdi_hdl_t hdl);
1959 	QDF_STATUS (*ipa_set_perf_level)(int client,
1960 					 uint32_t max_supported_bw_mbps,
1961 					 qdf_ipa_wdi_hdl_t hdl);
1962 	bool (*ipa_rx_intrabss_fwd)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1963 				    qdf_nbuf_t nbuf, bool *fwd_success);
1964 	QDF_STATUS (*ipa_tx_buf_smmu_mapping)(struct cdp_soc_t *soc_hdl,
1965 					      uint8_t pdev_id);
1966 	QDF_STATUS (*ipa_tx_buf_smmu_unmapping)(struct cdp_soc_t *soc_hdl,
1967 						uint8_t pdev_id);
1968 #ifdef IPA_WDS_EASYMESH_FEATURE
1969 	QDF_STATUS (*ipa_ast_create)(struct cdp_soc_t *soc_hdl,
1970 				     qdf_ipa_ast_info_type_t *data);
1971 #endif
1972 };
1973 #endif
1974 
1975 #ifdef DP_POWER_SAVE
1976 /**
1977  * struct cdp_tx_delay_ops - mcl tx delay ops
1978  * @tx_delay: handler to get tx packet delay
1979  * @tx_delay_hist: handler to get tx packet delay histogram
1980  * @tx_packet_count: handler to get tx packet count
1981  * @tx_set_compute_interval: update compute interval period for TSM stats
1982  *
1983  * Function pointer for operations related to tx delay.
1984  */
1985 struct cdp_tx_delay_ops {
1986 	void (*tx_delay)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1987 			 uint32_t *queue_delay_microsec,
1988 			 uint32_t *tx_delay_microsec, int category);
1989 	void (*tx_delay_hist)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1990 			      uint16_t *bin_values, int category);
1991 	void (*tx_packet_count)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1992 				uint16_t *out_packet_count,
1993 				uint16_t *out_packet_loss_count, int category);
1994 	void (*tx_set_compute_interval)(struct cdp_soc_t *soc_hdl,
1995 					uint8_t pdev_id, uint32_t interval);
1996 };
1997 
1998 /**
1999  * struct cdp_bus_ops - mcl bus suspend/resume ops
2000  * @bus_suspend: handler for bus suspend
2001  * @bus_resume: handler for bus resume
2002  * @process_wow_ack_rsp: handler for wow ack response
2003  * @process_target_suspend_req: handler for target suspend request
2004  */
2005 struct cdp_bus_ops {
2006 	QDF_STATUS (*bus_suspend)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
2007 	QDF_STATUS (*bus_resume)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
2008 	void (*process_wow_ack_rsp)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
2009 	void (*process_target_suspend_req)(struct cdp_soc_t *soc_hdl,
2010 					   uint8_t pdev_id);
2011 };
2012 #endif
2013 
2014 #ifdef RECEIVE_OFFLOAD
2015 /**
2016  * struct cdp_rx_offld_ops - mcl host receive offload ops
2017  * @register_rx_offld_flush_cb:
2018  * @deregister_rx_offld_flush_cb:
2019  */
2020 struct cdp_rx_offld_ops {
2021 	void (*register_rx_offld_flush_cb)(void (rx_offld_flush_cb)(void *));
2022 	void (*deregister_rx_offld_flush_cb)(void);
2023 };
2024 #endif
2025 
2026 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
2027 /**
2028  * struct cdp_cfr_ops - host cfr ops
2029  * @txrx_cfr_filter: Handler to configure host rx monitor status ring
2030  * @txrx_get_cfr_rcc: Handler to get CFR mode
2031  * @txrx_set_cfr_rcc: Handler to enable/disable CFR mode
2032  * @txrx_get_cfr_dbg_stats: Handler to get debug statistics for CFR mode
2033  * @txrx_clear_cfr_dbg_stats: Handler to clear debug statistics for CFR mode
2034  */
2035 struct cdp_cfr_ops {
2036 	void (*txrx_cfr_filter)(struct cdp_soc_t *soc_hdl,
2037 				uint8_t pdev_id,
2038 				bool enable,
2039 				struct cdp_monitor_filter *filter_val);
2040 	bool (*txrx_get_cfr_rcc)(struct cdp_soc_t *soc_hdl,
2041 				 uint8_t pdev_id);
2042 	void (*txrx_set_cfr_rcc)(struct cdp_soc_t *soc_hdl,
2043 				 uint8_t pdev_id,
2044 				 bool enable);
2045 	void (*txrx_get_cfr_dbg_stats)(struct cdp_soc_t *soc_hdl,
2046 				       uint8_t pdev_id,
2047 				       struct cdp_cfr_rcc_stats *buf);
2048 	void (*txrx_clear_cfr_dbg_stats)(struct cdp_soc_t *soc_hdl,
2049 					 uint8_t pdev_id);
2050 };
2051 #endif
2052 
2053 #ifdef WLAN_SUPPORT_MSCS
2054 /**
2055  * struct cdp_mscs_ops - data path ops for MSCS
2056  * @mscs_peer_lookup_n_get_priority:
2057  */
2058 struct cdp_mscs_ops {
2059 	int (*mscs_peer_lookup_n_get_priority)(struct cdp_soc_t *soc,
2060 			uint8_t *src_mac,
2061 			uint8_t *dst_mac,
2062 			qdf_nbuf_t nbuf);
2063 };
2064 #endif
2065 
2066 #ifdef WLAN_SUPPORT_MESH_LATENCY
2067 /**
2068  * struct cdp_mesh_latency_ops - data path ops for Mesh latency
2069  * @mesh_latency_update_peer_parameter:
2070  */
2071 struct cdp_mesh_latency_ops {
2072 	QDF_STATUS (*mesh_latency_update_peer_parameter)(
2073 			struct cdp_soc_t *soc,
2074 			uint8_t *dest_mac, uint32_t service_interval_dl,
2075 			uint32_t burst_size_dl, uint32_t service_interval_ul,
2076 			uint32_t burst_size_ul, uint16_t priority,
2077 			uint8_t add_or_sub);
2078 };
2079 #endif
2080 
2081 #ifdef WLAN_SUPPORT_SCS
2082 /**
2083  * struct cdp_scs_ops - data path ops for SCS
2084  * @scs_peer_lookup_n_rule_match : Handler for peer lookup and scs rule match
2085  */
2086 struct cdp_scs_ops {
2087 	bool (*scs_peer_lookup_n_rule_match)(struct cdp_soc_t *soc,
2088 					     uint32_t rule_id,
2089 					     uint8_t *dst_mac_addr);
2090 };
2091 #endif
2092 
2093 #ifdef CONFIG_SAWF_DEF_QUEUES
2094 struct cdp_sawf_ops {
2095 	QDF_STATUS
2096 	(*sawf_def_queues_map_req)(struct cdp_soc_t *soc, uint8_t *mac_addr,
2097 				   uint8_t svc_class_id);
2098 	QDF_STATUS
2099 	(*sawf_def_queues_unmap_req)(struct cdp_soc_t *soc, uint8_t *mac_addr,
2100 				     uint8_t svc_class_id);
2101 	QDF_STATUS
2102 	(*sawf_def_queues_get_map_report)(struct cdp_soc_t *soc,
2103 					  uint8_t *mac_addr);
2104 #ifdef CONFIG_SAWF
2105 	QDF_STATUS
2106 	(*txrx_get_peer_sawf_delay_stats)(struct cdp_soc_t *soc,
2107 					  uint32_t svc_id, uint8_t *mac,
2108 					  void *data);
2109 	QDF_STATUS
2110 	(*txrx_get_peer_sawf_tx_stats)(struct cdp_soc_t *soc,
2111 				       uint32_t svc_id, uint8_t *mac,
2112 				       void *data);
2113 	QDF_STATUS
2114 	(*sawf_mpdu_stats_req)(struct cdp_soc_t *soc, uint8_t enable);
2115 	QDF_STATUS
2116 	(*sawf_mpdu_details_stats_req)(struct cdp_soc_t *soc, uint8_t enable);
2117 	QDF_STATUS
2118 	(*txrx_sawf_set_mov_avg_params)(uint32_t num_pkt, uint32_t num_win);
2119 	QDF_STATUS
2120 	(*txrx_sawf_set_sla_params)(uint32_t num_pkt, uint32_t time_secs);
2121 	QDF_STATUS
2122 	(*txrx_sawf_init_telemtery_params)(void);
2123 	QDF_STATUS
2124 	(*telemetry_get_throughput_stats)(void *arg, uint64_t *in_bytes,
2125 					  uint64_t *in_cnt, uint64_t *tx_bytes,
2126 					  uint64_t *tx_cnt, uint8_t tid,
2127 					  uint8_t msduq);
2128 	QDF_STATUS
2129 	(*telemetry_get_mpdu_stats)(void *arg, uint64_t *svc_int_pass,
2130 				    uint64_t *svc_int_fail,
2131 				    uint64_t *burst_pass, uint64_t *burst_fail,
2132 				    uint8_t tid, uint8_t msduq);
2133 	QDF_STATUS
2134 	(*telemetry_get_drop_stats)(void *arg, uint64_t *pass, uint64_t *drop,
2135 				    uint64_t *drop_ttl, uint8_t tid,
2136 				    uint8_t msduq);
2137 #endif
2138 };
2139 #endif
2140 
2141 struct cdp_ops {
2142 	struct cdp_cmn_ops          *cmn_drv_ops;
2143 	struct cdp_ctrl_ops         *ctrl_ops;
2144 	struct cdp_me_ops           *me_ops;
2145 	struct cdp_mon_ops          *mon_ops;
2146 	struct cdp_host_stats_ops   *host_stats_ops;
2147 	struct cdp_wds_ops          *wds_ops;
2148 	struct cdp_raw_ops          *raw_ops;
2149 	struct cdp_pflow_ops        *pflow_ops;
2150 #ifdef DP_PEER_EXTENDED_API
2151 	struct cdp_misc_ops         *misc_ops;
2152 	struct cdp_peer_ops         *peer_ops;
2153 	struct cdp_ocb_ops          *ocb_ops;
2154 	struct cdp_mob_stats_ops    *mob_stats_ops;
2155 	struct cdp_pmf_ops          *pmf_ops;
2156 #endif
2157 #ifdef DP_FLOW_CTL
2158 	struct cdp_cfg_ops          *cfg_ops;
2159 	struct cdp_flowctl_ops      *flowctl_ops;
2160 	struct cdp_lflowctl_ops     *l_flowctl_ops;
2161 	struct cdp_throttle_ops     *throttle_ops;
2162 #endif
2163 #ifdef DP_POWER_SAVE
2164 	struct cdp_bus_ops          *bus_ops;
2165 	struct cdp_tx_delay_ops     *delay_ops;
2166 #endif
2167 #ifdef IPA_OFFLOAD
2168 	struct cdp_ipa_ops          *ipa_ops;
2169 #endif
2170 #ifdef RECEIVE_OFFLOAD
2171 	struct cdp_rx_offld_ops     *rx_offld_ops;
2172 #endif
2173 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
2174 	struct cdp_cfr_ops          *cfr_ops;
2175 #endif
2176 #ifdef WLAN_SUPPORT_MSCS
2177 	struct cdp_mscs_ops         *mscs_ops;
2178 #endif
2179 #ifdef WLAN_SUPPORT_MESH_LATENCY
2180 	struct cdp_mesh_latency_ops         *mesh_latency_ops;
2181 #endif
2182 #if defined(WLAN_FEATURE_11BE_MLO) && defined(WLAN_MLO_MULTI_CHIP)
2183 	struct cdp_mlo_ops  *mlo_ops;
2184 #endif
2185 #ifdef CONFIG_SAWF_DEF_QUEUES
2186 	struct cdp_sawf_ops  *sawf_ops;
2187 #endif
2188 #ifdef WLAN_SUPPORT_SCS
2189 	struct cdp_scs_ops   *scs_ops;
2190 #endif
2191 };
2192 #endif
2193