xref: /wlan-dirver/qca-wifi-host-cmn/dp/inc/cdp_txrx_ops.h (revision 6d768494e5ce14eb1603a695c86739d12ecc6ec2)
1 /*
2  * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
3  *
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 #ifdef CONFIG_IPA_WDI_UNIFIED_API
37 #include <qdf_ipa_wdi3.h>
38 #else
39 #include <qdf_ipa.h>
40 #endif
41 #endif
42 
43 /**
44  * bitmap values to indicate special handling of peer_delete
45  */
46 #define CDP_PEER_DELETE_NO_SPECIAL             0
47 #define CDP_PEER_DO_NOT_START_UNMAP_TIMER      1
48 
49 struct hif_opaque_softc;
50 
51 /* same as ieee80211_nac_param */
52 enum cdp_nac_param_cmd {
53 	/* IEEE80211_NAC_PARAM_ADD */
54 	CDP_NAC_PARAM_ADD = 1,
55 	/* IEEE80211_NAC_PARAM_DEL */
56 	CDP_NAC_PARAM_DEL,
57 	/* IEEE80211_NAC_PARAM_LIST */
58 	CDP_NAC_PARAM_LIST,
59 };
60 
61 /**
62  * enum vdev_peer_protocol_enter_exit - whether ingress or egress
63  * @CDP_VDEV_PEER_PROTOCOL_IS_INGRESS: ingress
64  * @CDP_VDEV_PEER_PROTOCOL_IS_EGRESS: egress
65  *
66  * whether ingress or egress
67  */
68 enum vdev_peer_protocol_enter_exit {
69 	CDP_VDEV_PEER_PROTOCOL_IS_INGRESS,
70 	CDP_VDEV_PEER_PROTOCOL_IS_EGRESS
71 };
72 
73 /**
74  * enum vdev_peer_protocol_tx_rx - whether tx or rx
75  * @CDP_VDEV_PEER_PROTOCOL_IS_TX: tx
76  * @CDP_VDEV_PEER_PROTOCOL_IS_RX: rx
77  *
78  * whether tx or rx
79  */
80 enum vdev_peer_protocol_tx_rx {
81 	CDP_VDEV_PEER_PROTOCOL_IS_TX,
82 	CDP_VDEV_PEER_PROTOCOL_IS_RX
83 };
84 
85 /******************************************************************************
86  *
87  * Control Interface (A Interface)
88  *
89  *****************************************************************************/
90 
91 struct cdp_cmn_ops {
92 
93 	QDF_STATUS (*txrx_soc_attach_target)(ol_txrx_soc_handle soc);
94 
95 	int (*txrx_pdev_attach_target)(ol_txrx_soc_handle soc, uint8_t pdev_id);
96 
97 	QDF_STATUS (*txrx_vdev_attach)
98 		(struct cdp_soc_t *soc, uint8_t pdev_id, uint8_t *mac,
99 		 uint8_t vdev_id, enum wlan_op_mode op_mode,
100 		 enum wlan_op_subtype subtype);
101 
102 	QDF_STATUS
103 	(*txrx_vdev_detach)(struct cdp_soc_t *cdp_soc, uint8_t vdev_id,
104 			    ol_txrx_vdev_delete_cb callback,
105 			    void *cb_context);
106 
107 	QDF_STATUS (*txrx_pdev_attach)
108 		(ol_txrx_soc_handle soc, HTC_HANDLE htc_pdev,
109 		 qdf_device_t osdev, uint8_t pdev_id);
110 
111 	int (*txrx_pdev_post_attach)(struct cdp_soc_t *soc, uint8_t pdev_id);
112 
113 	void
114 	(*txrx_pdev_pre_detach)(struct cdp_soc_t *soc, uint8_t pdev_id,
115 				int force);
116 
117 	QDF_STATUS
118 	(*txrx_pdev_detach)(struct cdp_soc_t *psoc, uint8_t pdev_id,
119 			    int force);
120 
121 	/**
122 	 * txrx_pdev_deinit() - Deinitialize pdev and dp ring memory
123 	 * @soc: soc dp handle
124 	 * @pdev_id: id of Dp pdev handle
125 	 * @force: Force deinit or not
126 	 *
127 	 * Return: QDF_STATUS
128 	 */
129 	QDF_STATUS
130 	(*txrx_pdev_deinit)(struct cdp_soc_t *soc, uint8_t pdev_id,
131 			    int force);
132 
133 	QDF_STATUS
134 	(*txrx_peer_create)
135 		(ol_txrx_soc_handle soc, uint8_t vdev_id,
136 		uint8_t *peer_mac_addr);
137 
138 	QDF_STATUS
139 	(*txrx_peer_setup)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
140 			   uint8_t *peer_mac);
141 
142 	QDF_STATUS
143 	(*txrx_cp_peer_del_response)
144 		(ol_txrx_soc_handle soc, uint8_t vdev_id,
145 		 uint8_t *peer_mac_addr);
146 
147 	QDF_STATUS
148 	(*txrx_peer_teardown)
149 		(struct cdp_soc_t *soc, uint8_t vdev_id, uint8_t *peer_mac);
150 
151 	int (*txrx_peer_add_ast)
152 		(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac,
153 		uint8_t *mac_addr, enum  cdp_txrx_ast_entry_type type,
154 		uint32_t flags);
155 
156 	int (*txrx_peer_update_ast)
157 		(ol_txrx_soc_handle soc, uint8_t vdev_id, uint8_t *peer_mac,
158 		uint8_t *mac_addr, uint32_t flags);
159 
160 	bool (*txrx_peer_get_ast_info_by_soc)
161 		(ol_txrx_soc_handle soc, uint8_t *ast_mac_addr,
162 		 struct cdp_ast_entry_info *ast_entry_info);
163 
164 	bool (*txrx_peer_get_ast_info_by_pdev)
165 		(ol_txrx_soc_handle soc, uint8_t *ast_mac_addr,
166 		 uint8_t pdev_id,
167 		 struct cdp_ast_entry_info *ast_entry_info);
168 
169 	QDF_STATUS (*txrx_peer_ast_delete_by_soc)
170 		(ol_txrx_soc_handle soc, uint8_t *ast_mac_addr,
171 		txrx_ast_free_cb callback,
172 		void *cookie);
173 
174 	QDF_STATUS (*txrx_peer_ast_delete_by_pdev)
175 		(ol_txrx_soc_handle soc, uint8_t *ast_mac_addr,
176 		 uint8_t pdev_id,
177 		txrx_ast_free_cb callback,
178 		void *cookie);
179 
180 	QDF_STATUS
181 	(*txrx_peer_delete)(struct cdp_soc_t *soc, uint8_t vdev_id,
182 			    uint8_t *peer_mac, uint32_t bitmap);
183 
184 	QDF_STATUS (*txrx_set_monitor_mode)(struct cdp_soc_t *soc,
185 					    uint8_t vdev_id,
186 					    uint8_t smart_monitor);
187 	void (*txrx_peer_delete_sync)(struct cdp_soc_t *soc, uint8_t vdev_id,
188 				      uint8_t *peer_mac,
189 				      QDF_STATUS(*delete_cb)(
190 						uint8_t vdev_id,
191 						uint32_t peerid_cnt,
192 						uint16_t *peerid_list),
193 				      uint32_t bitmap);
194 
195 	void (*txrx_peer_unmap_sync_cb_set)(struct cdp_soc_t *soc_hdl,
196 					    uint8_t pdev_id,
197 					    ol_txrx_peer_unmap_sync_cb
198 					    peer_unmap_sync);
199 
200 	QDF_STATUS
201 	(*txrx_get_peer_mac_from_peer_id)
202 		(struct cdp_soc_t *cdp_soc,
203 		 uint32_t peer_id, uint8_t *peer_mac);
204 
205 	void
206 	(*txrx_vdev_tx_lock)(struct cdp_soc_t *soc, uint8_t vdev_id);
207 
208 	void
209 	(*txrx_vdev_tx_unlock)(struct cdp_soc_t *soc, uint8_t vdev_id);
210 
211 	QDF_STATUS
212 	(*txrx_ath_getstats)(struct cdp_soc_t *soc, uint8_t id,
213 			     struct cdp_dev_stats *stats, uint8_t type);
214 
215 	QDF_STATUS
216 	(*txrx_set_gid_flag)(struct cdp_soc_t *soc, uint8_t pdev_id,
217 			     u_int8_t *mem_status,
218 			     u_int8_t *user_position);
219 
220 	uint32_t (*txrx_fw_supported_enh_stats_version)(struct cdp_soc_t *soc,
221 							uint8_t pdev_id);
222 
223 	QDF_STATUS
224 	(*txrx_if_mgmt_drain)(struct cdp_soc_t *soc, uint8_t pdev_id,
225 			      int force);
226 
227 	QDF_STATUS
228 	(*txrx_set_curchan)(struct cdp_soc_t *soc, uint8_t pdev_id,
229 			    uint32_t chan_mhz);
230 
231 	QDF_STATUS
232 	(*txrx_set_privacy_filters)
233 		(struct cdp_soc_t *soc, uint8_t vdev_id, void *filter,
234 		 uint32_t num);
235 
236 	uint32_t (*txrx_get_cfg)(struct cdp_soc_t *soc, enum cdp_dp_cfg cfg);
237 
238 	/********************************************************************
239 	 * Data Interface (B Interface)
240 	 ********************************************************************/
241 
242 	QDF_STATUS
243 	(*txrx_vdev_register)(struct cdp_soc_t *soc, uint8_t vdev_id,
244 			      ol_osif_vdev_handle osif_vdev,
245 			      struct ol_txrx_ops *txrx_ops);
246 
247 	int (*txrx_mgmt_send)(struct cdp_soc_t *soc, uint8_t vdev_id,
248 			      qdf_nbuf_t tx_mgmt_frm, uint8_t type);
249 
250 	int (*txrx_mgmt_send_ext)(struct cdp_soc_t *soc, uint8_t vdev_id,
251 				  qdf_nbuf_t tx_mgmt_frm, uint8_t type,
252 				  uint8_t use_6mbps, uint16_t chanfreq);
253 
254 	/**
255 	 * ol_txrx_mgmt_tx_cb - tx management delivery notification
256 	 * callback function
257 	 */
258 
259 	QDF_STATUS
260 	(*txrx_mgmt_tx_cb_set)(struct cdp_soc_t *soc, uint8_t pdev_id,
261 			       uint8_t type,
262 			       ol_txrx_mgmt_tx_cb download_cb,
263 			       ol_txrx_mgmt_tx_cb ota_ack_cb,
264 			       void *ctxt);
265 
266 	/**
267 	 * ol_txrx_data_tx_cb - Function registered with the data path
268 	 * that is called when tx frames marked as "no free" are
269 	 * done being transmitted
270 	 */
271 
272 	void (*txrx_data_tx_cb_set)(struct cdp_soc_t *soc, uint8_t vdev_id,
273 				    ol_txrx_data_tx_cb callback, void *ctxt);
274 
275 	qdf_nbuf_t (*tx_send_exc)
276 		(ol_txrx_soc_handle soc, uint8_t vdev_id, qdf_nbuf_t msdu_list,
277 		 struct cdp_tx_exception_metadata *tx_exc_metadata);
278 
279 	/*******************************************************************
280 	 * Statistics and Debugging Interface (C Interface)
281 	 ********************************************************************/
282 
283 	int (*txrx_aggr_cfg)(struct cdp_soc_t *soc, uint8_t vdev_id,
284 			     int max_subfrms_ampdu,
285 			     int max_subfrms_amsdu);
286 
287 	A_STATUS
288 	(*txrx_fw_stats_get)(struct cdp_soc_t *soc, uint8_t vdev_id,
289 			     struct ol_txrx_stats_req *req,
290 			     bool per_vdev, bool response_expected);
291 
292 	int (*txrx_debug)(struct cdp_soc_t *soc, uint8_t vdev_id,
293 			  int debug_specs);
294 
295 	QDF_STATUS
296 	(*txrx_fw_stats_cfg)(struct cdp_soc_t *soc, uint8_t vdev_id,
297 			     uint8_t cfg_stats_type, uint32_t cfg_val);
298 
299 	void (*txrx_print_level_set)(unsigned level);
300 
301 	/**
302 	 * ol_txrx_get_vdev_mac_addr() - Return mac addr of vdev
303 	 * @soc: datapath soc handle
304 	 * @vdev_id: vdev id
305 	 *
306 	 * Return: vdev mac address
307 	 */
308 	uint8_t * (*txrx_get_vdev_mac_addr)(struct cdp_soc_t *soc,
309 					    uint8_t vdev_id);
310 
311 	/**
312 	 * ol_txrx_get_ctrl_pdev_from_vdev() - Return control pdev of vdev
313 	 * @soc: datapath soc handle
314 	 * @vdev_id: vdev id
315 	 *
316 	 * Return: Handle to control pdev
317 	 */
318 	struct cdp_cfg *(*txrx_get_ctrl_pdev_from_vdev)(struct cdp_soc_t *soc,
319 							uint8_t vdev_id);
320 
321 	/**
322 	 * txrx_get_mon_vdev_from_pdev() - Return monitor mode vdev
323 	 * @soc: datapath soc handle
324 	 * @pdev: pdev id
325 	 *
326 	 * Return: vdev_id
327 	 */
328 	uint8_t (*txrx_get_mon_vdev_from_pdev)(struct cdp_soc_t *soc,
329 					       uint8_t pdev_id);
330 
331 	void (*txrx_soc_detach)(struct cdp_soc_t *soc);
332 
333 	/**
334 	 * txrx_soc_deinit() - Deinitialize dp soc and dp ring memory
335 	 * @soc: Opaque Dp handle
336 	 *
337 	 * Return None
338 	 */
339 	void (*txrx_soc_deinit)(struct cdp_soc_t *soc);
340 
341 	/**
342 	 * txrx_soc_init() - Initialize dp soc and dp ring memory
343 	 * @soc: Opaque Dp handle
344 	 * @ctrl_psoc: Opaque Cp handle
345 	 * @htchdl: Opaque htc handle
346 	 * @hifhdl: Opaque hif handle
347 	 *
348 	 * Return: None
349 	 */
350 	void *(*txrx_soc_init)(struct cdp_soc_t *soc,
351 			       struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
352 			       struct hif_opaque_softc *hif_handle,
353 			       HTC_HANDLE htc_handle, qdf_device_t qdf_osdev,
354 			       struct ol_if_ops *ol_ops, uint16_t device_id);
355 
356 	QDF_STATUS (*txrx_pdev_init)(ol_txrx_soc_handle soc,
357 				     HTC_HANDLE htc_handle,
358 				     qdf_device_t qdf_osdev,
359 				     uint8_t pdev_id);
360 
361 	/**
362 	 * txrx_tso_soc_attach() - TSO attach handler triggered during
363 	 * dynamic tso activation
364 	 * @soc: Opaque Dp handle
365 	 *
366 	 * Return: QDF status
367 	 */
368 	QDF_STATUS (*txrx_tso_soc_attach)(struct cdp_soc_t *soc);
369 
370 	/**
371 	 * txrx_tso_soc_detach() - TSO detach handler triggered during
372 	 * dynamic tso de-activation
373 	 * @soc: Opaque Dp handle
374 	 *
375 	 * Return: QDF status
376 	 */
377 	QDF_STATUS (*txrx_tso_soc_detach)(struct cdp_soc_t *soc);
378 	int (*addba_resp_tx_completion)(struct cdp_soc_t *cdp_soc,
379 					uint8_t *peer_mac,
380 					uint16_t vdev_id, uint8_t tid,
381 					int status);
382 
383 	int (*addba_requestprocess)(struct cdp_soc_t *cdp_soc,
384 				    uint8_t *peer_mac,
385 				    uint16_t vdev_id,
386 				    uint8_t dialogtoken,
387 				    uint16_t tid, uint16_t batimeout,
388 				    uint16_t buffersize,
389 				    uint16_t startseqnum);
390 
391 	QDF_STATUS
392 	(*addba_responsesetup)(struct cdp_soc_t *cdp_soc,
393 			       uint8_t *peer_mac,
394 			       uint16_t vdev_id, uint8_t tid,
395 			       uint8_t *dialogtoken, uint16_t *statuscode,
396 			       uint16_t *buffersize, uint16_t *batimeout);
397 
398 	int (*delba_process)(struct cdp_soc_t *cdp_soc, uint8_t *peer_mac,
399 			     uint16_t vdev_id, int tid, uint16_t reasoncode);
400 
401 	/**
402 	 * delba_tx_completion() - Indicate delba tx status
403 	 * @cdp_soc: soc handle
404 	 * @peer_mac: Peer mac address
405 	 * @vdev_id: vdev id
406 	 * @tid: Tid number
407 	 * @status: Tx completion status
408 	 *
409 	 * Return: 0 on Success, 1 on failure
410 	 */
411 	int (*delba_tx_completion)(struct cdp_soc_t *cdp_soc, uint8_t *peer_mac,
412 				   uint16_t vdev_id,
413 				   uint8_t tid, int status);
414 
415 	QDF_STATUS
416 	(*set_addba_response)(struct cdp_soc_t *cdp_soc, uint8_t *peer_mac,
417 			      uint16_t vdev_id, uint8_t tid,
418 			      uint16_t statuscode);
419 
420 	QDF_STATUS
421 	(*set_vdev_dscp_tid_map)(struct cdp_soc_t *soc_handle,
422 				 uint8_t vdev_id, uint8_t map_id);
423 	int (*txrx_get_total_per)(struct cdp_soc_t *soc, uint8_t pdev_id);
424 
425 	void (*flush_cache_rx_queue)(void);
426 
427 	QDF_STATUS (*set_pdev_dscp_tid_map)(struct cdp_soc_t *soc_handle,
428 					    uint8_t pdev_id,
429 					    uint8_t map_id,
430 					    uint8_t tos, uint8_t tid);
431 
432 	QDF_STATUS (*txrx_stats_request)(struct cdp_soc_t *soc_handle,
433 					 uint8_t vdev_id,
434 					 struct cdp_txrx_stats_req *req);
435 
436 	QDF_STATUS (*display_stats)(struct cdp_soc_t *psoc, uint16_t value,
437 				    enum qdf_stats_verbosity_level level);
438 
439 	QDF_STATUS (*txrx_intr_attach)(struct cdp_soc_t *soc_handle);
440 	void (*txrx_intr_detach)(struct cdp_soc_t *soc_handle);
441 	QDF_STATUS  (*set_pn_check)(struct cdp_soc_t *soc_handle,
442 				    uint8_t vdev_id, uint8_t *peermac,
443 				    enum cdp_sec_type sec_type,
444 				    uint32_t *rx_pn);
445 
446 	QDF_STATUS(*set_key_sec_type)(struct cdp_soc_t *soc_handle,
447 				      uint8_t vdev_id, uint8_t *peermac,
448 				      enum cdp_sec_type sec_type,
449 				      bool is_unicast);
450 
451 	QDF_STATUS (*update_config_parameters)(struct cdp_soc *psoc,
452 			struct cdp_config_params *params);
453 
454 	void *(*get_dp_txrx_handle)(ol_txrx_soc_handle soc, uint8_t pdev_id);
455 	void (*set_dp_txrx_handle)(ol_txrx_soc_handle soc, uint8_t pdev_id,
456 				   void *dp_hdl);
457 
458 	void *(*get_vdev_dp_ext_txrx_handle)(struct cdp_soc_t *soc,
459 					     uint8_t vdev_id);
460 	QDF_STATUS (*set_vdev_dp_ext_txrx_handle)(struct cdp_soc_t *soc,
461 						  uint8_t vdev_id,
462 						  uint16_t size);
463 
464 	void *(*get_soc_dp_txrx_handle)(struct cdp_soc *soc_handle);
465 	void (*set_soc_dp_txrx_handle)(struct cdp_soc *soc_handle,
466 			void *dp_txrx_handle);
467 
468 	QDF_STATUS (*map_pdev_to_lmac)(ol_txrx_soc_handle soc, uint8_t pdev_id,
469 				       uint32_t lmac_id);
470 
471 	QDF_STATUS (*handle_mode_change)(ol_txrx_soc_handle soc,
472 					 uint8_t pdev_id, uint32_t lmac_id);
473 
474 	QDF_STATUS (*set_pdev_status_down)(struct cdp_soc_t *soc_handle,
475 					   uint8_t pdev_id, bool is_pdev_down);
476 
477 	QDF_STATUS (*txrx_peer_reset_ast)
478 		(ol_txrx_soc_handle soc, uint8_t *ast_macaddr,
479 		 uint8_t *peer_macaddr, uint8_t vdev_id);
480 
481 	QDF_STATUS (*txrx_peer_reset_ast_table)(ol_txrx_soc_handle soc,
482 						uint8_t vdev_id);
483 
484 	void (*txrx_peer_flush_ast_table)(ol_txrx_soc_handle soc);
485 	void (*txrx_set_ba_aging_timeout)(struct cdp_soc_t *soc_handle,
486 					  uint8_t ac, uint32_t value);
487 	void (*txrx_get_ba_aging_timeout)(struct cdp_soc_t *soc_handle,
488 					  uint8_t ac, uint32_t *value);
489 
490 	QDF_STATUS (*txrx_peer_map_attach)(ol_txrx_soc_handle soc,
491 					   uint32_t num_peers,
492 					   uint32_t max_ast_index,
493 					   bool peer_map_unmap_v2);
494 
495 	QDF_STATUS (*set_soc_param)(ol_txrx_soc_handle soc,
496 				    enum cdp_soc_param_t param,
497 				    uint32_t value);
498 
499 	ol_txrx_tx_fp tx_send;
500 	/**
501 	 * txrx_get_os_rx_handles_from_vdev() - Return function, osif vdev
502 	 *					to deliver pkt to stack.
503 	 * @soc: datapath soc handle
504 	 * @vdev: vdev id
505 	 * @stack_fn: pointer to - function pointer to deliver RX pkt to stack
506 	 * @osif_vdev: pointer to - osif vdev to deliver RX packet to.
507 	 */
508 	void (*txrx_get_os_rx_handles_from_vdev)
509 					(ol_txrx_soc_handle soc,
510 					 uint8_t vdev_id,
511 					 ol_txrx_rx_fp *stack_fn,
512 					 ol_osif_vdev_handle *osif_vdev);
513 
514 	void (*set_rate_stats_ctx)(struct cdp_soc_t *soc,
515 				   void *ctx);
516 
517 	int (*txrx_classify_update)
518 		(struct cdp_soc_t *soc, uint8_t vdev_id, qdf_nbuf_t skb,
519 		 enum txrx_direction, struct ol_txrx_nbuf_classify *nbuf_class);
520 
521 	bool (*get_dp_capabilities)(struct cdp_soc_t *soc,
522 				    enum cdp_capabilities dp_caps);
523 	void* (*get_rate_stats_ctx)(struct cdp_soc_t *soc);
524 	QDF_STATUS (*txrx_peer_flush_rate_stats)(struct cdp_soc_t *soc,
525 						 uint8_t pdev_id,
526 						 void *buf);
527 
528 	QDF_STATUS (*txrx_flush_rate_stats_request)(struct cdp_soc_t *soc,
529 						    uint8_t pdev_id);
530 	QDF_STATUS (*set_pdev_pcp_tid_map)(struct cdp_soc_t *soc,
531 					   uint8_t pdev_id,
532 					   uint8_t pcp, uint8_t tid);
533 	QDF_STATUS (*set_vdev_pcp_tid_map)(struct cdp_soc_t *soc,
534 					   uint8_t vdev_id,
535 					   uint8_t pcp, uint8_t tid);
536 #ifdef QCA_MULTIPASS_SUPPORT
537 	QDF_STATUS (*set_vlan_groupkey)(struct cdp_soc_t *soc, uint8_t vdev_id,
538 					uint16_t vlan_id, uint16_t group_key);
539 #endif
540 
541 	uint16_t (*get_peer_mac_list)
542 		 (ol_txrx_soc_handle soc, uint8_t vdev_id,
543 		  u_int8_t newmac[][QDF_MAC_ADDR_SIZE], uint16_t mac_cnt);
544 };
545 
546 struct cdp_ctrl_ops {
547 
548 	int
549 		(*txrx_mempools_attach)(ol_txrx_soc_handle dp_soc);
550 	int
551 		(*txrx_update_filter_neighbour_peers)(
552 				struct cdp_soc_t *soc, uint8_t vdev_id,
553 				uint32_t cmd, uint8_t *macaddr);
554 
555 	/* Is this similar to ol_txrx_peer_state_update() in MCL */
556 	/**
557 	 * @brief Update the authorize peer object at association time
558 	 * @details
559 	 * For the host-based implementation of rate-control, it
560 	 * updates the peer/node-related parameters within rate-control
561 	 * context of the peer at association.
562 	 *
563 	 * @param soc_hdl - pointer to the soc object
564 	 * @param vdev_id - id of the virtual object
565 	 * @param peer_mac - mac address of the node's object
566 	 * @authorize - either to authorize or unauthorize peer
567 	 *
568 	 * @return QDF_STATUS
569 	 */
570 	QDF_STATUS
571 		(*txrx_peer_authorize)(struct cdp_soc_t *soc_hdl,
572 				       uint8_t vdev_id,
573 				       uint8_t *peer_mac,
574 				       u_int32_t authorize);
575 
576 	void (*tx_flush_buffers)(struct cdp_soc_t *soc, uint8_t vdev_id);
577 
578 	int (*txrx_is_target_ar900b)(struct cdp_soc_t *soc_hdl);
579 
580 	QDF_STATUS
581 	(*txrx_set_vdev_param)(struct cdp_soc_t *soc, uint8_t vdev_id,
582 			       enum cdp_vdev_param_type param,
583 			       cdp_config_param_type val);
584 
585 	/**
586 	 * @brief Set the reo dest ring num of the radio
587 	 * @details
588 	 *  Set the reo destination ring no on which we will receive
589 	 *  pkts for this radio.
590 	 *
591 	 * @txrx_soc - soc handle
592 	 * @param pdev_id - id of physical device
593 	 * @return the reo destination ring number
594 	 * @param reo_dest_ring_num - value ranges between 1 - 4
595 	 */
596 	QDF_STATUS (*txrx_set_pdev_reo_dest)(
597 			struct cdp_soc_t *txrx_soc,
598 			uint8_t pdev_id,
599 			enum cdp_host_reo_dest_ring reo_dest_ring_num);
600 
601 	/**
602 	 * @brief Get the reo dest ring num of the radio
603 	 * @details
604 	 *  Get the reo destination ring no on which we will receive
605 	 *  pkts for this radio.
606 	 *
607 	 * @txrx_soc - soc handle
608 	 * @param pdev_id - id of physical device
609 	 * @return the reo destination ring number
610 	 */
611 	enum cdp_host_reo_dest_ring (*txrx_get_pdev_reo_dest)(
612 				     struct cdp_soc_t *txrx_soc,
613 				     uint8_t pdev_id);
614 
615 	int (*txrx_wdi_event_sub)(struct cdp_soc_t *soc, uint8_t pdev_id,
616 				  wdi_event_subscribe *event_cb_sub,
617 				  uint32_t event);
618 
619 	int (*txrx_wdi_event_unsub)(struct cdp_soc_t *soc, uint8_t pdev_id,
620 				    wdi_event_subscribe *event_cb_sub,
621 				    uint32_t event);
622 
623 	int (*txrx_get_sec_type)(ol_txrx_soc_handle soc, uint8_t vdev_id,
624 				 uint8_t *peer_mac, uint8_t sec_idx);
625 
626 	QDF_STATUS
627 	(*txrx_update_mgmt_txpow_vdev)(struct cdp_soc_t *soc,
628 				       uint8_t vdev_id,
629 				       uint8_t subtype, uint8_t tx_power);
630 
631 	/**
632 	 * txrx_set_pdev_param() - callback to set pdev parameter
633 	 * @soc: opaque soc handle
634 	 * @pdev_id:id of data path pdev handle
635 	 * @val: value of pdev_tx_capture
636 	 *
637 	 * Return: status: 0 - Success, non-zero: Failure
638 	 */
639 	QDF_STATUS (*txrx_set_pdev_param)(struct cdp_soc_t *soc,
640 					  uint8_t pdev_id,
641 					  enum cdp_pdev_param_type type,
642 					  cdp_config_param_type val);
643 
644 	QDF_STATUS (*txrx_get_pdev_param)(struct cdp_soc_t *soc,
645 					  uint8_t pdev_id,
646 					  enum cdp_pdev_param_type type,
647 					  cdp_config_param_type *val);
648 
649 	QDF_STATUS (*txrx_set_peer_param)(struct cdp_soc_t *soc,
650 					  uint8_t vdev_id, uint8_t *peer_mac,
651 					  enum cdp_peer_param_type param,
652 					  cdp_config_param_type val);
653 
654 	QDF_STATUS (*txrx_get_peer_param)(struct cdp_soc_t *soc,
655 					  uint8_t vdev_id, uint8_t *peer_mac,
656 					  enum cdp_peer_param_type param,
657 					  cdp_config_param_type *val);
658 
659 	void * (*txrx_get_pldev)(struct cdp_soc_t *soc, uint8_t pdev_id);
660 #ifdef VDEV_PEER_PROTOCOL_COUNT
661 	void (*txrx_peer_protocol_cnt)(struct cdp_soc_t *soc,
662 				       int8_t vdev_id,
663 				       qdf_nbuf_t nbuf,
664 				       bool is_egress,
665 				       bool is_rx);
666 #endif
667 #ifdef ATH_SUPPORT_NAC_RSSI
668 	QDF_STATUS (*txrx_vdev_config_for_nac_rssi)(struct cdp_soc_t *cdp_soc,
669 						    uint8_t vdev_id,
670 						    enum cdp_nac_param_cmd cmd,
671 						    char *bssid,
672 						    char *client_macaddr,
673 						    uint8_t chan_num);
674 
675 	QDF_STATUS (*txrx_vdev_get_neighbour_rssi)(struct cdp_soc_t *cdp_soc,
676 						   uint8_t vdev_id,
677 						   char *macaddr,
678 						   uint8_t *rssi);
679 #endif
680 	QDF_STATUS
681 	(*set_key)(struct cdp_soc_t *soc, uint8_t vdev_id, uint8_t *mac,
682 		   bool is_unicast, uint32_t *key);
683 
684 	QDF_STATUS (*txrx_get_vdev_param)(struct cdp_soc_t *soc,
685 					  uint8_t vdev_id,
686 					  enum cdp_vdev_param_type param,
687 					  cdp_config_param_type *val);
688 	int (*enable_peer_based_pktlog)(struct cdp_soc_t *cdp_soc,
689 					uint8_t pdev_id,
690 					uint8_t *macaddr, uint8_t enb_dsb);
691 
692 	QDF_STATUS
693 	(*calculate_delay_stats)(struct cdp_soc_t *cdp_soc,
694 				 uint8_t vdev_id, qdf_nbuf_t nbuf);
695 #ifdef WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG
696 	QDF_STATUS (*txrx_update_pdev_rx_protocol_tag)(
697 			struct cdp_soc_t  *soc, uint8_t pdev_id,
698 			uint32_t protocol_mask, uint16_t protocol_type,
699 			uint16_t tag);
700 #ifdef WLAN_SUPPORT_RX_TAG_STATISTICS
701 	void (*txrx_dump_pdev_rx_protocol_tag_stats)(
702 				struct cdp_soc_t  *soc, uint8_t pdev_id,
703 				uint16_t protocol_type);
704 #endif /* WLAN_SUPPORT_RX_TAG_STATISTICS */
705 #endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */
706 #ifdef WLAN_SUPPORT_RX_FLOW_TAG
707 	QDF_STATUS (*txrx_set_rx_flow_tag)(
708 		struct cdp_soc_t *cdp_soc, uint8_t pdev_id,
709 		struct cdp_rx_flow_info *flow_info);
710 	QDF_STATUS (*txrx_dump_rx_flow_tag_stats)(
711 		struct cdp_soc_t *cdp_soc, uint8_t pdev_id,
712 		struct cdp_rx_flow_info *flow_info);
713 #endif /* WLAN_SUPPORT_RX_FLOW_TAG */
714 #ifdef QCA_MULTIPASS_SUPPORT
715 	void (*txrx_peer_set_vlan_id)(struct cdp_soc_t *cdp_soc,
716 				      uint8_t vdev_id, uint8_t *peer_mac,
717 				      uint16_t vlan_id);
718 #endif
719 #if defined(WLAN_TX_PKT_CAPTURE_ENH) || defined(WLAN_RX_PKT_CAPTURE_ENH)
720 	QDF_STATUS (*txrx_update_peer_pkt_capture_params)(
721 			ol_txrx_soc_handle soc, uint8_t pdev_id,
722 			bool is_rx_pkt_cap_enable, uint8_t is_tx_pkt_cap_enable,
723 			uint8_t *peer_mac);
724 #endif /* WLAN_TX_PKT_CAPTURE_ENH || WLAN_RX_PKT_CAPTURE_ENH */
725 	QDF_STATUS
726 	(*txrx_set_psoc_param)(struct cdp_soc_t *soc,
727 			       enum cdp_psoc_param_type param,
728 			       cdp_config_param_type val);
729 
730 	QDF_STATUS (*txrx_get_psoc_param)(ol_txrx_soc_handle soc,
731 					  enum cdp_psoc_param_type type,
732 					  cdp_config_param_type *val);
733 #ifdef VDEV_PEER_PROTOCOL_COUNT
734 	/*
735 	 * Enable per-peer protocol counters
736 	 */
737 	void (*txrx_enable_peer_protocol_count)(struct cdp_soc_t *soc,
738 						int8_t vdev_id, bool enable);
739 	void (*txrx_set_peer_protocol_drop_mask)(struct cdp_soc_t *soc,
740 						 int8_t vdev_id, int mask);
741 	int (*txrx_is_peer_protocol_count_enabled)(struct cdp_soc_t *soc,
742 						   int8_t vdev_id);
743 	int (*txrx_get_peer_protocol_drop_mask)(struct cdp_soc_t *soc,
744 						int8_t vdev_id);
745 
746 #endif
747 };
748 
749 struct cdp_me_ops {
750 
751 	void (*tx_me_alloc_descriptor)(struct cdp_soc_t *soc,
752 				       uint8_t pdev_id);
753 
754 	void (*tx_me_free_descriptor)(struct cdp_soc_t *soc, uint8_t pdev_id);
755 
756 	uint16_t (*tx_me_convert_ucast)(struct cdp_soc_t *soc, uint8_t vdev_id,
757 					qdf_nbuf_t wbuf, u_int8_t newmac[][6],
758 					uint8_t newmaccnt);
759 };
760 
761 struct cdp_mon_ops {
762 
763 	QDF_STATUS (*txrx_reset_monitor_mode)
764 		(ol_txrx_soc_handle soc, uint8_t pdev_id, u_int8_t smart_monitor);
765 
766 	QDF_STATUS (*txrx_deliver_tx_mgmt)
767 		(struct cdp_soc_t *cdp_soc, uint8_t pdev_id, qdf_nbuf_t nbuf);
768 
769 	/* HK advance monitor filter support */
770 	QDF_STATUS (*txrx_set_advance_monitor_filter)
771 		(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
772 		 struct cdp_monitor_filter *filter_val);
773 
774 	/* Configure full monitor mode */
775 	QDF_STATUS
776 		(*config_full_mon_mode)(struct cdp_soc_t *soc, uint8_t val);
777 };
778 
779 struct cdp_host_stats_ops {
780 	int (*txrx_host_stats_get)(struct cdp_soc_t *soc, uint8_t vdev_id,
781 				   struct ol_txrx_stats_req *req);
782 
783 	QDF_STATUS (*txrx_host_stats_clr)(struct cdp_soc_t *soc,
784 					  uint8_t vdev_id);
785 
786 	QDF_STATUS
787 	(*txrx_host_ce_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
788 
789 	int (*txrx_stats_publish)(struct cdp_soc_t *soc, uint8_t pdev_id,
790 				  struct cdp_stats_extd *buf);
791 	/**
792 	 * @brief Enable enhanced stats functionality.
793 	 *
794 	 * @param soc - the soc handle
795 	 * @param pdev_id - pdev_id of pdev
796 	 * @return - QDF_STATUS
797 	 */
798 	QDF_STATUS (*txrx_enable_enhanced_stats)(struct cdp_soc_t *soc,
799 						 uint8_t pdev_id);
800 
801 	/**
802 	 * @brief Disable enhanced stats functionality.
803 	 *
804 	 * @param soc - the soc handle
805 	 * @param pdev_id - pdev_id of pdev
806 	 * @return - QDF_STATUS
807 	 */
808 	QDF_STATUS (*txrx_disable_enhanced_stats)(struct cdp_soc_t *soc,
809 						  uint8_t pdev_id);
810 
811 	QDF_STATUS
812 		(*tx_print_tso_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
813 
814 	QDF_STATUS
815 		(*tx_rst_tso_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
816 
817 	QDF_STATUS
818 		(*tx_print_sg_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
819 
820 	QDF_STATUS
821 		(*tx_rst_sg_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
822 
823 	QDF_STATUS
824 		(*print_rx_cksum_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
825 
826 	QDF_STATUS
827 		(*rst_rx_cksum_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
828 
829 	QDF_STATUS
830 		(*txrx_host_me_stats)(struct cdp_soc_t *soc, uint8_t vdev_id);
831 
832 	QDF_STATUS
833 		(*txrx_per_peer_stats)(struct cdp_soc_t *soc, uint8_t *addr);
834 
835 	int (*txrx_host_msdu_ttl_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
836 					struct ol_txrx_stats_req *req);
837 
838 	int (*ol_txrx_update_peer_stats)(struct cdp_soc_t *soc,
839 					 uint8_t pdev_id,
840 					 uint8_t *addr, void *stats,
841 					 uint32_t last_tx_rate_mcs,
842 					 uint32_t stats_id);
843 
844 	QDF_STATUS
845 		(*get_fw_peer_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
846 				     uint8_t *addr,
847 				     uint32_t cap, uint32_t copy_stats);
848 
849 	QDF_STATUS
850 		(*get_htt_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
851 				 void *data,
852 				 uint32_t data_len);
853 	QDF_STATUS
854 		(*txrx_update_pdev_stats)(struct cdp_soc_t *soc,
855 					  uint8_t pdev_id, void *data,
856 					  uint16_t stats_id);
857 	QDF_STATUS
858 		(*txrx_get_peer_stats_param)(struct cdp_soc_t *soc,
859 					     uint8_t vdev_id,
860 					     uint8_t *peer_mac,
861 					     enum cdp_peer_stats_type type,
862 					     cdp_peer_stats_param_t *buf);
863 	QDF_STATUS
864 		(*txrx_get_peer_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
865 				       uint8_t *peer_mac,
866 				       struct cdp_peer_stats *peer_stats);
867 	QDF_STATUS
868 		(*txrx_reset_peer_ald_stats)(struct cdp_soc_t *soc,
869 					     uint8_t vdev_id,
870 					     uint8_t *peer_mac);
871 	QDF_STATUS
872 		(*txrx_reset_peer_stats)(struct cdp_soc_t *soc,
873 					 uint8_t vdev_id, uint8_t *peer_mac);
874 	int
875 		(*txrx_get_vdev_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
876 				       void *buf, bool is_aggregate);
877 	int
878 		(*txrx_process_wmi_host_vdev_stats)(ol_txrx_soc_handle soc,
879 						    void *data, uint32_t len,
880 						    uint32_t stats_id);
881 	int
882 		(*txrx_get_vdev_extd_stats)(struct cdp_soc_t *soc,
883 					    uint8_t vdev_id,
884 					    wmi_host_vdev_extd_stats *buffer);
885 	QDF_STATUS
886 		(*txrx_update_vdev_stats)(struct cdp_soc_t *soc,
887 					  uint8_t vdev_id, void *buf,
888 					  uint16_t stats_id);
889 	int
890 		(*txrx_get_radio_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
891 					void *buf);
892 	QDF_STATUS
893 		(*txrx_get_pdev_stats)(struct cdp_soc_t *soc, uint8_t pdev_id,
894 				       struct cdp_pdev_stats *buf);
895 	int
896 		(*txrx_get_ratekbps)(int preamb, int mcs,
897 				     int htflag, int gintval);
898 
899 	QDF_STATUS
900 	(*txrx_update_peer_stats)(struct cdp_soc_t *soc, uint8_t vdev_id,
901 				  uint8_t *peer_mac, void *stats,
902 				  uint32_t last_tx_rate_mcs,
903 				  uint32_t stats_id);
904 };
905 
906 struct cdp_wds_ops {
907 	QDF_STATUS
908 	(*txrx_set_wds_rx_policy)(struct cdp_soc_t *soc, uint8_t vdev_id,
909 				  u_int32_t val);
910 	QDF_STATUS
911 	(*txrx_wds_peer_tx_policy_update)(struct cdp_soc_t *soc,
912 					  uint8_t vdev_id, uint8_t *peer_mac,
913 					  int wds_tx_ucast, int wds_tx_mcast);
914 	int (*vdev_set_wds)(struct cdp_soc_t *soc, uint8_t vdev_id,
915 			    uint32_t val);
916 };
917 
918 struct cdp_raw_ops {
919 	int (*txrx_get_nwifi_mode)(struct cdp_soc_t *soc, uint8_t vdev_id);
920 
921 	QDF_STATUS
922 	(*rsim_get_astentry)(struct cdp_soc_t *soc, uint8_t vdev_id,
923 			     qdf_nbuf_t *pnbuf, struct cdp_raw_ast *raw_ast);
924 };
925 
926 #ifdef PEER_FLOW_CONTROL
927 struct cdp_pflow_ops {
928 	uint32_t (*pflow_update_pdev_params)(struct cdp_soc_t *soc,
929 					     uint8_t pdev_id,
930 					     enum _dp_param_t,
931 					     uint32_t, void *);
932 };
933 #endif /* PEER_FLOW_CONTROL */
934 
935 #define LRO_IPV4_SEED_ARR_SZ 5
936 #define LRO_IPV6_SEED_ARR_SZ 11
937 
938 /**
939  * struct cdp_lro_hash_config - set rx_offld(LRO/GRO) init parameters
940  * @lro_enable: indicates whether rx_offld is enabled
941  * @tcp_flag: If the TCP flags from the packet do not match
942  * the values in this field after masking with TCP flags mask
943  * below, packet is not rx_offld eligible
944  * @tcp_flag_mask: field for comparing the TCP values provided
945  * above with the TCP flags field in the received packet
946  * @toeplitz_hash_ipv4: contains seed needed to compute the flow id
947  * 5-tuple toeplitz hash for ipv4 packets
948  * @toeplitz_hash_ipv6: contains seed needed to compute the flow id
949  * 5-tuple toeplitz hash for ipv6 packets
950  */
951 struct cdp_lro_hash_config {
952 	uint32_t lro_enable;
953 	uint32_t tcp_flag:9,
954 		tcp_flag_mask:9;
955 	uint32_t toeplitz_hash_ipv4[LRO_IPV4_SEED_ARR_SZ];
956 	uint32_t toeplitz_hash_ipv6[LRO_IPV6_SEED_ARR_SZ];
957 };
958 
959 struct ol_if_ops {
960 	void
961 	(*peer_set_default_routing)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
962 				    uint8_t pdev_id, uint8_t *peer_macaddr,
963 				    uint8_t vdev_id,
964 				    bool hash_based, uint8_t ring_num);
965 	QDF_STATUS
966 	(*peer_rx_reorder_queue_setup)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
967 				       uint8_t pdev_id,
968 				       uint8_t vdev_id, uint8_t *peer_mac,
969 				       qdf_dma_addr_t hw_qdesc, int tid,
970 				       uint16_t queue_num,
971 				       uint8_t ba_window_size_valid,
972 				       uint16_t ba_window_size);
973 	QDF_STATUS
974 	(*peer_rx_reorder_queue_remove)(struct cdp_ctrl_objmgr_psoc *ctrl_psoc,
975 					uint8_t pdev_id,
976 					uint8_t vdev_id, uint8_t *peer_macaddr,
977 					uint32_t tid_mask);
978 	int (*peer_unref_delete)(struct cdp_ctrl_objmgr_psoc *psoc,
979 				 uint8_t pdev_id,
980 				 uint8_t *peer_mac,
981 				 uint8_t *vdev_mac, enum wlan_op_mode opmode);
982 	bool (*is_hw_dbs_2x2_capable)(struct wlan_objmgr_psoc *psoc);
983 	int (*peer_add_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc,
984 				  uint8_t vdev_id,
985 				  uint8_t *peer_macaddr,
986 				  uint16_t peer_id,
987 				  const uint8_t *dest_macaddr,
988 				  uint8_t *next_node_mac,
989 				  uint32_t flags,
990 				  uint8_t type);
991 	int (*peer_update_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc,
992 				     uint8_t vdev_id,
993 				     uint8_t *dest_macaddr,
994 				     uint8_t *peer_macaddr,
995 				     uint32_t flags);
996 	void (*peer_del_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc,
997 				   uint8_t vdev_id,
998 				   uint8_t *wds_macaddr,
999 				   uint8_t type,
1000 				   uint8_t delete_in_fw);
1001 	QDF_STATUS
1002 	(*lro_hash_config)(struct cdp_ctrl_objmgr_psoc *psoc, uint8_t pdev_id,
1003 			   struct cdp_lro_hash_config *rx_offld_hash);
1004 
1005 	void (*update_dp_stats)(void *soc, void *stats, uint16_t id,
1006 			uint8_t type);
1007 #ifdef FEATURE_NAC_RSSI
1008 	uint8_t (*rx_invalid_peer)(struct cdp_ctrl_objmgr_psoc *soc,
1009 				   uint8_t pdev_id, void *msg);
1010 #else
1011 	uint8_t (*rx_invalid_peer)(uint8_t vdev_id, void *wh);
1012 #endif
1013 
1014 	int  (*peer_map_event)(struct cdp_ctrl_objmgr_psoc *psoc,
1015 			       uint16_t peer_id, uint16_t hw_peer_id,
1016 			       uint8_t vdev_id, uint8_t *peer_mac_addr,
1017 			       enum cdp_txrx_ast_entry_type peer_type,
1018 			       uint32_t tx_ast_hashidx);
1019 	int (*peer_unmap_event)(struct cdp_ctrl_objmgr_psoc *psoc,
1020 				uint16_t peer_id,
1021 				uint8_t vdev_id);
1022 
1023 	int (*get_dp_cfg_param)(struct cdp_ctrl_objmgr_psoc *psoc,
1024 				enum cdp_cfg_param_type param_num);
1025 
1026 	void (*rx_mic_error)(struct cdp_ctrl_objmgr_psoc *psoc,
1027 			     uint8_t pdev_id,
1028 			     struct cdp_rx_mic_err_info *info);
1029 
1030 	bool (*rx_frag_tkip_demic)(struct cdp_ctrl_objmgr_psoc *psoc,
1031 				   uint8_t vdev_id, uint8_t *peer_mac_addr,
1032 				   qdf_nbuf_t nbuf,
1033 				   uint16_t hdr_space);
1034 
1035 	uint8_t (*freq_to_channel)(struct cdp_ctrl_objmgr_psoc *psoc,
1036 				   uint8_t pdev_id, uint16_t freq);
1037 
1038 	uint8_t (*freq_to_band)(struct cdp_ctrl_objmgr_psoc *psoc,
1039 				uint8_t pdev_id, uint16_t freq);
1040 
1041 #ifdef ATH_SUPPORT_NAC_RSSI
1042 	int (*config_fw_for_nac_rssi)(struct cdp_ctrl_objmgr_psoc *psoc,
1043 				      uint8_t pdev_id,
1044 				      u_int8_t vdev_id,
1045 				      enum cdp_nac_param_cmd cmd, char *bssid,
1046 				      char *client_macaddr, uint8_t chan_num);
1047 
1048 	int
1049 	(*config_bssid_in_fw_for_nac_rssi)(struct cdp_ctrl_objmgr_psoc *psoc,
1050 					   uint8_t pdev_id, u_int8_t vdev_id,
1051 					   enum cdp_nac_param_cmd cmd,
1052 					   char *bssid, char *client_mac);
1053 #endif
1054 	int (*peer_sta_kickout)(struct cdp_ctrl_objmgr_psoc *psoc,
1055 				uint16_t pdev_id, uint8_t *peer_macaddr);
1056 
1057 	/**
1058 	 * send_delba() - Send delba to peer
1059 	 * @psoc: Objmgr soc handle
1060 	 * @vdev_id: dp vdev id
1061 	 * @peer_macaddr: Peer mac addr
1062 	 * @tid: Tid number
1063 	 *
1064 	 * Return: 0 for success, non-zero for failure
1065 	 */
1066 	int (*send_delba)(struct cdp_ctrl_objmgr_psoc *psoc, uint8_t vdev_id,
1067 			  uint8_t *peer_macaddr, uint8_t tid,
1068 			  uint8_t reason_code);
1069 
1070 	int
1071 	(*peer_delete_multiple_wds_entries)(struct cdp_ctrl_objmgr_psoc *psoc,
1072 					    uint8_t vdev_id,
1073 					    uint8_t *dest_macaddr,
1074 					    uint8_t *peer_macaddr,
1075 					    uint32_t flags);
1076 	int
1077 	(*pdev_update_lmac_n_target_pdev_id)(struct cdp_ctrl_objmgr_psoc *psoc,
1078 					    uint8_t *pdev_id,
1079 					    uint8_t *lmac_id,
1080 					    uint8_t *target_pdev_id);
1081 	bool (*is_roam_inprogress)(uint32_t vdev_id);
1082 	enum QDF_GLOBAL_MODE (*get_con_mode)(void);
1083 #ifdef QCA_PEER_MULTIQ_SUPPORT
1084 	int  (*peer_ast_flowid_map)(struct cdp_ctrl_objmgr_psoc *ol_soc_handle,
1085 			       uint16_t peer_id, uint8_t vdev_id, uint8_t *peer_mac_addr);
1086 #endif
1087 	int (*get_soc_nss_cfg)(struct cdp_ctrl_objmgr_psoc *ol_soc_handle);
1088 	/* TODO: Add any other control path calls required to OL_IF/WMA layer */
1089 
1090 };
1091 
1092 #ifdef DP_PEER_EXTENDED_API
1093 /**
1094  * struct cdp_misc_ops - mcl ops not classified
1095  * @set_ibss_vdev_heart_beat_timer: Update ibss vdev heart beat timer
1096  * @set_wmm_param: set wmm parameters
1097  * @bad_peer_txctl_set_setting: configure bad peer tx limit setting
1098  * @bad_peer_txctl_update_threshold: configure bad peer tx threshold limit
1099  * @hl_tdls_flag_reset: reset tdls flag for vdev
1100  * @tx_non_std: Allow the control-path SW to send data frames
1101  * @get_vdev_id: get vdev id
1102  * @set_wisa_mode: set wisa mode for a vdev
1103  * @txrx_data_stall_cb_register: register data stall callback
1104  * @txrx_data_stall_cb_deregister: deregister data stall callback
1105  * @txrx_post_data_stall_event: post data stall event
1106  * @runtime_suspend: ensure TXRX is ready to runtime suspend
1107  * @runtime_resume: ensure TXRX is ready to runtime resume
1108  * @get_opmode: get operation mode of vdev
1109  * @mark_first_wakeup_packet: set flag to indicate that fw is compatible for
1110 			      marking first packet after wow wakeup
1111  * @update_mac_id: update mac_id for vdev
1112  * @flush_rx_frames: flush rx frames on the queue
1113  * @get_intra_bss_fwd_pkts_count: to get the total tx and rx packets that
1114 				  has been forwarded from txrx layer
1115 				  without going to upper layers
1116  * @pkt_log_init: handler to initialize packet log
1117  * @pkt_log_con_service: handler to connect packet log service
1118  * @get_num_rx_contexts: handler to get number of RX contexts
1119  * @register_packetdump_cb: register callback for different pktlog
1120  * @unregister_packetdump_cb: unregister callback for different pktlog
1121  * @pdev_reset_driver_del_ack: reset driver delayed ack enabled flag
1122  * @vdev_set_driver_del_ack_enable: set driver delayed ack enabled flag
1123  *
1124  * Function pointers for miscellaneous soc/pdev/vdev related operations.
1125  */
1126 struct cdp_misc_ops {
1127 	uint16_t (*set_ibss_vdev_heart_beat_timer)(struct cdp_soc_t *soc_hdl,
1128 						   uint8_t vdev_id,
1129 						   uint16_t timer_value_sec);
1130 	void (*set_wmm_param)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1131 			      struct ol_tx_wmm_param_t wmm_param);
1132 	void (*bad_peer_txctl_set_setting)(struct cdp_soc_t *soc_hdl,
1133 					   uint8_t pdev_id, int enable,
1134 					   int period, int txq_limit);
1135 	void (*bad_peer_txctl_update_threshold)(struct cdp_soc_t *soc_hdl,
1136 						uint8_t pdev_id,
1137 						int level, int tput_thresh,
1138 						int tx_limit);
1139 	void (*hl_tdls_flag_reset)(struct cdp_soc_t *soc_hdl,
1140 				   uint8_t vdev_id, bool flag);
1141 	qdf_nbuf_t (*tx_non_std)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1142 				 enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list);
1143 	uint16_t (*get_vdev_id)(struct cdp_vdev *vdev);
1144 	uint32_t (*get_tx_ack_stats)(struct cdp_soc_t *soc_hdl,
1145 				     uint8_t vdev_id);
1146 	QDF_STATUS (*set_wisa_mode)(struct cdp_soc_t *soc_hdl,
1147 				    uint8_t vdev_id, bool enable);
1148 	QDF_STATUS (*txrx_data_stall_cb_register)(struct cdp_soc_t *soc_hdl,
1149 						  uint8_t pdev_id,
1150 						  data_stall_detect_cb cb);
1151 	QDF_STATUS (*txrx_data_stall_cb_deregister)(struct cdp_soc_t *soc_hdl,
1152 						    uint8_t pdev_id,
1153 						    data_stall_detect_cb cb);
1154 	void (*txrx_post_data_stall_event)(
1155 			struct cdp_soc_t *soc_hdl,
1156 			enum data_stall_log_event_indicator indicator,
1157 			enum data_stall_log_event_type data_stall_type,
1158 			uint32_t pdev_id, uint32_t vdev_id_bitmap,
1159 			enum data_stall_log_recovery_type recovery_type);
1160 	QDF_STATUS (*runtime_suspend)(struct cdp_soc_t *soc_hdl,
1161 				      uint8_t pdev_id);
1162 	QDF_STATUS (*runtime_resume)(struct cdp_soc_t *soc_hdl,
1163 				     uint8_t pdev_id);
1164 	int (*get_opmode)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id);
1165 	void (*mark_first_wakeup_packet)(struct cdp_soc_t *soc_hdl,
1166 					 uint8_t pdev_id, uint8_t value);
1167 	void (*update_mac_id)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1168 			      uint8_t mac_id);
1169 	void (*flush_rx_frames)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1170 				void *peer, bool drop);
1171 	A_STATUS(*get_intra_bss_fwd_pkts_count)(struct cdp_soc_t *soc_hdl,
1172 						uint8_t vdev_id,
1173 						uint64_t *fwd_tx_packets,
1174 						uint64_t *fwd_rx_packets);
1175 	void (*pkt_log_init)(struct cdp_soc_t *soc_hdl, uint8_t pdev,
1176 			     void *scn);
1177 	void (*pkt_log_con_service)(struct cdp_soc_t *soc_hdl,
1178 				    uint8_t pdev_id, void *scn);
1179 	int (*get_num_rx_contexts)(struct cdp_soc_t *soc_hdl);
1180 	void (*register_pktdump_cb)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1181 				    ol_txrx_pktdump_cb tx_cb,
1182 				    ol_txrx_pktdump_cb rx_cb);
1183 	void (*unregister_pktdump_cb)(struct cdp_soc_t *soc_hdl,
1184 				      uint8_t pdev_id);
1185 	void (*pdev_reset_driver_del_ack)(struct cdp_soc_t *soc_hdl,
1186 					  uint8_t pdev_id);
1187 	void (*vdev_set_driver_del_ack_enable)(struct cdp_soc_t *soc_hdl,
1188 					       uint8_t vdev_id,
1189 					       unsigned long rx_packets,
1190 					       uint32_t time_in_ms,
1191 					       uint32_t high_th,
1192 					       uint32_t low_th);
1193 	void (*vdev_set_bundle_require_flag)(uint8_t vdev_id,
1194 					     unsigned long tx_bytes,
1195 					     uint32_t time_in_ms,
1196 					     uint32_t high_th,
1197 					     uint32_t low_th);
1198 	void (*pdev_reset_bundle_require_flag)(struct cdp_soc_t *soc_hdl,
1199 					       uint8_t pdev_id);
1200 	QDF_STATUS (*txrx_ext_stats_request)(struct cdp_soc_t *soc_hdl,
1201 					     uint8_t pdev_id,
1202 					     struct cdp_txrx_ext_stats *req);
1203 	QDF_STATUS (*request_rx_hw_stats)(struct cdp_soc_t *soc_hdl,
1204 					  uint8_t vdev_id);
1205 };
1206 
1207 /**
1208  * struct cdp_ocb_ops - mcl ocb ops
1209  * @set_ocb_chan_info: set OCB channel info
1210  * @get_ocb_chan_info: get OCB channel info
1211  *
1212  * Function pointers for operations related to OCB.
1213  */
1214 struct cdp_ocb_ops {
1215 	void (*set_ocb_chan_info)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1216 				  struct ol_txrx_ocb_set_chan ocb_set_chan);
1217 	struct ol_txrx_ocb_chan_info *(*get_ocb_chan_info)(
1218 				struct cdp_soc_t *soc_hdl, uint8_t vdev_id);
1219 };
1220 
1221 /**
1222  * struct cdp_peer_ops - mcl peer related ops
1223  * @register_peer:
1224  * @clear_peer:
1225  * @find_peer_exist
1226  * @find_peer_exist_on_vdev
1227  * @find_peer_exist_on_other_vdev
1228  * @peer_state_update:
1229  * @get_vdevid:
1230  * @register_ocb_peer:
1231  * @peer_get_peer_mac_addr:
1232  * @get_peer_state:
1233  * @update_ibss_add_peer_num_of_vdev:
1234  * @copy_mac_addr_raw:
1235  * @add_last_real_peer:
1236  * @is_vdev_restore_last_peer:
1237  * @update_last_real_peer:
1238  */
1239 struct cdp_peer_ops {
1240 	QDF_STATUS (*register_peer)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1241 				    struct ol_txrx_desc_type *sta_desc);
1242 	QDF_STATUS (*clear_peer)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1243 				 struct qdf_mac_addr peer_addr);
1244 	bool (*find_peer_exist)(struct cdp_soc_t *soc, uint8_t pdev_id,
1245 				uint8_t *peer_addr);
1246 	bool (*find_peer_exist_on_vdev)(struct cdp_soc_t *soc, uint8_t vdev_id,
1247 					uint8_t *peer_addr);
1248 	bool (*find_peer_exist_on_other_vdev)(struct cdp_soc_t *soc,
1249 					      uint8_t vdev_id,
1250 					      uint8_t *peer_addr,
1251 					      uint16_t max_bssid);
1252 	QDF_STATUS (*peer_state_update)(struct cdp_soc_t *soc,
1253 					uint8_t *peer_addr,
1254 					enum ol_txrx_peer_state state);
1255 	QDF_STATUS (*get_vdevid)(struct cdp_soc_t *soc_hdl, uint8_t *peer_mac,
1256 				 uint8_t *vdev_id);
1257 	struct cdp_vdev * (*get_vdev_by_peer_addr)(struct cdp_pdev *pdev,
1258 			struct qdf_mac_addr peer_addr);
1259 	QDF_STATUS (*register_ocb_peer)(uint8_t *mac_addr);
1260 	uint8_t * (*peer_get_peer_mac_addr)(void *peer);
1261 	int (*get_peer_state)(struct cdp_soc_t *soc, uint8_t vdev_id,
1262 			      uint8_t *peer_mac);
1263 	struct cdp_vdev * (*get_vdev_for_peer)(void *peer);
1264 	int16_t (*update_ibss_add_peer_num_of_vdev)(struct cdp_soc_t *soc,
1265 						    uint8_t vdev_id,
1266 						    int16_t peer_num_delta);
1267 	void (*remove_peers_for_vdev)(struct cdp_vdev *vdev,
1268 			ol_txrx_vdev_peer_remove_cb callback,
1269 			void *callback_context, bool remove_last_peer);
1270 	void (*remove_peers_for_vdev_no_lock)(struct cdp_vdev *vdev,
1271 			ol_txrx_vdev_peer_remove_cb callback,
1272 			void *callback_context);
1273 	void (*copy_mac_addr_raw)(struct cdp_soc_t *soc, uint8_t vdev_id,
1274 				  uint8_t *bss_addr);
1275 	void (*add_last_real_peer)(struct cdp_soc_t *soc, uint8_t pdev_id,
1276 				   uint8_t vdev_id);
1277 	bool (*is_vdev_restore_last_peer)(struct cdp_soc_t *soc,
1278 					  uint8_t vdev_id,
1279 					  uint8_t *peer_mac);
1280 	void (*update_last_real_peer)(struct cdp_soc_t *soc, uint8_t pdev_id,
1281 				      uint8_t vdev_id, bool restore_last_peer);
1282 	void (*peer_detach_force_delete)(struct cdp_soc_t *soc_hdl,
1283 					 uint8_t vdev_id, uint8_t *peer_addr);
1284 	void (*set_tdls_offchan_enabled)(struct cdp_soc_t *soc, uint8_t vdev_id,
1285 					 uint8_t *peer_mac, bool val);
1286 	void (*set_peer_as_tdls_peer)(struct cdp_soc_t *soc, uint8_t vdev_id,
1287 				      uint8_t *peer_mac, bool val);
1288 };
1289 
1290 /**
1291  * struct cdp_mob_stats_ops - mcl mob stats ops
1292  * @clear_stats: handler to clear ol txrx stats
1293  * @stats: handler to update ol txrx stats
1294  */
1295 struct cdp_mob_stats_ops {
1296 	QDF_STATUS(*clear_stats)(struct cdp_soc_t *soc_hdl,
1297 				 uint8_t pdev_id, uint8_t bitmap);
1298 	int (*stats)(uint8_t vdev_id, char *buffer, unsigned buf_len);
1299 };
1300 
1301 /**
1302  * struct cdp_pmf_ops - mcl protected management frame ops
1303  * @get_pn_info: handler to get pn info from peer
1304  *
1305  * Function pointers for pmf related operations.
1306  */
1307 struct cdp_pmf_ops {
1308 	void (*get_pn_info)(struct cdp_soc_t *soc, uint8_t *peer_mac,
1309 			    uint8_t vdev_id, uint8_t **last_pn_valid,
1310 			    uint64_t **last_pn, uint32_t **rmf_pn_replays);
1311 };
1312 #endif
1313 
1314 
1315 #ifdef DP_FLOW_CTL
1316 /**
1317  * struct cdp_cfg_ops - mcl configuration ops
1318  * @set_cfg_rx_fwd_disabled: set rx_fwd_disabled flag
1319  * @set_cfg_packet_log_enabled: set is_packet_log_enabled flag
1320  * @cfg_attach: hardcode the configuration parameters
1321  * @vdev_rx_set_intrabss_fwd: set disable_intrabss_fwd flag
1322  * @is_rx_fwd_disabled: get the rx_fwd_disabled flag,
1323  *                      1 enabled, 0 disabled.
1324  * @tx_set_is_mgmt_over_wmi_enabled: set is_mgmt_over_wmi_enabled flag to
1325  *                                   indicate that mgmt over wmi is enabled
1326  *                                   or not,
1327  *                                   1 for enabled, 0 for disable
1328  * @is_high_latency: get device is high or low latency device,
1329  *                   1 high latency bus, 0 low latency bus
1330  * @set_flow_control_parameters: set flow control parameters
1331  * @set_flow_steering: set flow_steering_enabled flag
1332  * @set_ptp_rx_opt_enabled: set is_ptp_rx_opt_enabled flag
1333  * @set_new_htt_msg_format: set new_htt_msg_format flag
1334  * @set_peer_unmap_conf_support: set enable_peer_unmap_conf_support flag
1335  * @get_peer_unmap_conf_support: get enable_peer_unmap_conf_support flag
1336  * @set_tx_compl_tsf64: set enable_tx_compl_tsf64 flag,
1337  *                      1 enabled, 0 disabled.
1338  * @get_tx_compl_tsf64: get enable_tx_compl_tsf64 flag,
1339  *                      1 enabled, 0 disabled.
1340  */
1341 struct cdp_cfg_ops {
1342 	void (*set_cfg_rx_fwd_disabled)(struct cdp_cfg *cfg_pdev,
1343 		uint8_t disable_rx_fwd);
1344 	void (*set_cfg_packet_log_enabled)(struct cdp_cfg *cfg_pdev,
1345 		uint8_t val);
1346 	struct cdp_cfg * (*cfg_attach)(qdf_device_t osdev, void *cfg_param);
1347 	void (*vdev_rx_set_intrabss_fwd)(struct cdp_soc_t *soc_hdl,
1348 					 uint8_t vdev_id, bool val);
1349 	uint8_t (*is_rx_fwd_disabled)(struct cdp_vdev *vdev);
1350 	void (*tx_set_is_mgmt_over_wmi_enabled)(uint8_t value);
1351 	int (*is_high_latency)(struct cdp_cfg *cfg_pdev);
1352 	void (*set_flow_control_parameters)(struct cdp_cfg *cfg_pdev,
1353 		void *param);
1354 	void (*set_flow_steering)(struct cdp_cfg *cfg_pdev, uint8_t val);
1355 	void (*set_ptp_rx_opt_enabled)(struct cdp_cfg *cfg_pdev, uint8_t val);
1356 	void (*set_new_htt_msg_format)(uint8_t val);
1357 	void (*set_peer_unmap_conf_support)(bool val);
1358 	bool (*get_peer_unmap_conf_support)(void);
1359 	void (*set_tx_compl_tsf64)(bool val);
1360 	bool (*get_tx_compl_tsf64)(void);
1361 };
1362 
1363 /**
1364  * struct cdp_flowctl_ops - mcl flow control
1365  * @flow_pool_map_handler: handler to map flow_id and pool descriptors
1366  * @flow_pool_unmap_handler: handler to unmap flow_id and pool descriptors
1367  * @register_pause_cb: handler to register tx pause callback
1368  * @set_desc_global_pool_size: handler to set global pool size
1369  * @dump_flow_pool_info: handler to dump global and flow pool info
1370  * @tx_desc_thresh_reached: handler to set tx desc threshold
1371  *
1372  * Function pointers for operations related to flow control
1373  */
1374 struct cdp_flowctl_ops {
1375 	QDF_STATUS (*flow_pool_map_handler)(struct cdp_soc_t *soc,
1376 					    uint8_t pdev_id,
1377 					    uint8_t vdev_id);
1378 	void (*flow_pool_unmap_handler)(struct cdp_soc_t *soc,
1379 					uint8_t pdev_id,
1380 					uint8_t vdev_id);
1381 	QDF_STATUS (*register_pause_cb)(struct cdp_soc_t *soc,
1382 					tx_pause_callback);
1383 	void (*set_desc_global_pool_size)(uint32_t num_msdu_desc);
1384 
1385 	void (*dump_flow_pool_info)(struct cdp_soc_t *soc_hdl);
1386 
1387 	bool (*tx_desc_thresh_reached)(struct cdp_soc_t *soc_hdl,
1388 				       uint8_t vdev_id);
1389 };
1390 
1391 /**
1392  * struct cdp_lflowctl_ops - mcl legacy flow control ops
1393  * @register_tx_flow_control: Register tx flow control callback
1394  * @set_vdev_tx_desc_limit:  Set tx descriptor limit for a vdev
1395  * @set_vdev_os_queue_status: Set vdev queue status
1396  * @deregister_tx_flow_control_cb: Deregister tx flow control callback
1397  * @flow_control_cb: Call osif flow control callback
1398  * @get_tx_resource: Get tx resources and comapre with watermark
1399  * @ll_set_tx_pause_q_depth: set pause queue depth
1400  * @vdev_flush: Flush all packets on a particular vdev
1401  * @vdev_pause: Pause a particular vdev
1402  * @vdev_unpause: Unpause a particular vdev
1403  *
1404  * Function pointers for operations related to flow control
1405  */
1406 struct cdp_lflowctl_ops {
1407 #ifdef QCA_HL_NETDEV_FLOW_CONTROL
1408 	int (*register_tx_flow_control)(struct cdp_soc_t *soc_hdl,
1409 					uint8_t pdev_id,
1410 					tx_pause_callback flowcontrol);
1411 	int (*set_vdev_tx_desc_limit)(struct cdp_soc_t *soc_hdl,
1412 				      uint8_t vdev_id, uint32_t chan_freq);
1413 	int (*set_vdev_os_queue_status)(struct cdp_soc_t *soc_hdl,
1414 					uint8_t vdev_id,
1415 					enum netif_action_type action);
1416 #else
1417 	int (*register_tx_flow_control)(
1418 		struct cdp_soc_t *soc_hdl,
1419 		uint8_t vdev_id,
1420 		ol_txrx_tx_flow_control_fp flowControl, void *osif_fc_ctx,
1421 		ol_txrx_tx_flow_control_is_pause_fp flow_control_is_pause);
1422 #endif /* QCA_HL_NETDEV_FLOW_CONTROL */
1423 	int (*deregister_tx_flow_control_cb)(struct cdp_soc_t *soc_hdl,
1424 					     uint8_t vdev_id);
1425 	void (*flow_control_cb)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1426 				bool tx_resume);
1427 	bool (*get_tx_resource)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1428 				struct qdf_mac_addr peer_addr,
1429 				unsigned int low_watermark,
1430 				unsigned int high_watermark_offset);
1431 	int (*ll_set_tx_pause_q_depth)(struct cdp_soc_t *soc, uint8_t vdev_id,
1432 				       int pause_q_depth);
1433 	void (*vdev_flush)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id);
1434 	void (*vdev_pause)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1435 			   uint32_t reason, uint32_t pause_type);
1436 	void (*vdev_unpause)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1437 			     uint32_t reason, uint32_t pause_type);
1438 };
1439 
1440 /**
1441  * struct cdp_throttle_ops - mcl throttle ops
1442  * @throttle_init_period: handler to initialize tx throttle time
1443  * @throttle_set_level: handler to set tx throttle level
1444  */
1445 struct cdp_throttle_ops {
1446 	void (*throttle_init_period)(struct cdp_soc_t *soc_hdl,
1447 				     uint8_t pdev_id, int period,
1448 				     uint8_t *dutycycle_level);
1449 	void (*throttle_set_level)(struct cdp_soc_t *soc_hdl,
1450 				   uint8_t pdev_id, int level);
1451 };
1452 #endif
1453 
1454 #ifdef IPA_OFFLOAD
1455 /**
1456  * struct cdp_ipa_ops - mcl ipa data path ops
1457  * @ipa_get_resource:
1458  * @ipa_set_doorbell_paddr:
1459  * @ipa_set_active:
1460  * @ipa_op_response:
1461  * @ipa_register_op_cb:
1462  * @ipa_get_stat:
1463  * @ipa_tx_data_frame:
1464  */
1465 struct cdp_ipa_ops {
1466 	QDF_STATUS (*ipa_get_resource)(struct cdp_soc_t *soc_hdl,
1467 				       uint8_t pdev_id);
1468 	QDF_STATUS (*ipa_set_doorbell_paddr)(struct cdp_soc_t *soc_hdl,
1469 					     uint8_t pdev_id);
1470 	QDF_STATUS (*ipa_set_active)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1471 				     bool uc_active, bool is_tx);
1472 	QDF_STATUS (*ipa_op_response)(struct cdp_soc_t *soc_hdl,
1473 				      uint8_t pdev_id, uint8_t *op_msg);
1474 	QDF_STATUS (*ipa_register_op_cb)(struct cdp_soc_t *soc_hdl,
1475 					 uint8_t pdev_id,
1476 					 void (*ipa_uc_op_cb_type)
1477 					 (uint8_t *op_msg, void *osif_ctxt),
1478 					 void *usr_ctxt);
1479 	QDF_STATUS (*ipa_get_stat)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
1480 	qdf_nbuf_t (*ipa_tx_data_frame)(struct cdp_soc_t *soc_hdl,
1481 					uint8_t vdev_id, qdf_nbuf_t skb);
1482 	void (*ipa_set_uc_tx_partition_base)(struct cdp_cfg *pdev,
1483 		uint32_t value);
1484 #ifdef FEATURE_METERING
1485 	QDF_STATUS (*ipa_uc_get_share_stats)(struct cdp_soc_t *soc_hdl,
1486 					     uint8_t pdev_id,
1487 					     uint8_t reset_stats);
1488 	QDF_STATUS (*ipa_uc_set_quota)(struct cdp_soc_t *soc_hdl,
1489 				       uint8_t pdev_id, uint64_t quota_bytes);
1490 #endif
1491 	QDF_STATUS (*ipa_enable_autonomy)(struct cdp_soc_t *soc_hdl,
1492 					  uint8_t pdev_id);
1493 	QDF_STATUS (*ipa_disable_autonomy)(struct cdp_soc_t *soc_hdl,
1494 					   uint8_t pdev_id);
1495 #ifdef CONFIG_IPA_WDI_UNIFIED_API
1496 	QDF_STATUS (*ipa_setup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1497 				void *ipa_i2w_cb, void *ipa_w2i_cb,
1498 				void *ipa_wdi_meter_notifier_cb,
1499 				uint32_t ipa_desc_size, void *ipa_priv,
1500 				bool is_rm_enabled, uint32_t *tx_pipe_handle,
1501 				uint32_t *rx_pipe_handle, bool is_smmu_enabled,
1502 				qdf_ipa_sys_connect_params_t *sys_in,
1503 				bool over_gsi);
1504 #else /* CONFIG_IPA_WDI_UNIFIED_API */
1505 	QDF_STATUS (*ipa_setup)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1506 				void *ipa_i2w_cb, void *ipa_w2i_cb,
1507 				void *ipa_wdi_meter_notifier_cb,
1508 				uint32_t ipa_desc_size, void *ipa_priv,
1509 				bool is_rm_enabled, uint32_t *tx_pipe_handle,
1510 				uint32_t *rx_pipe_handle);
1511 #endif /* CONFIG_IPA_WDI_UNIFIED_API */
1512 	QDF_STATUS (*ipa_cleanup)(uint32_t tx_pipe_handle,
1513 		uint32_t rx_pipe_handle);
1514 	QDF_STATUS (*ipa_setup_iface)(char *ifname, uint8_t *mac_addr,
1515 		qdf_ipa_client_type_t prod_client,
1516 		qdf_ipa_client_type_t cons_client,
1517 		uint8_t session_id, bool is_ipv6_enabled);
1518 	QDF_STATUS (*ipa_cleanup_iface)(char *ifname, bool is_ipv6_enabled);
1519 	QDF_STATUS (*ipa_enable_pipes)(struct cdp_soc_t *soc_hdl,
1520 				       uint8_t pdev_id);
1521 	QDF_STATUS (*ipa_disable_pipes)(struct cdp_soc_t *soc_hdl,
1522 					uint8_t pdev_id);
1523 	QDF_STATUS (*ipa_set_perf_level)(int client,
1524 		uint32_t max_supported_bw_mbps);
1525 	bool (*ipa_rx_intrabss_fwd)(struct cdp_soc_t *soc_hdl, uint8_t vdev_id,
1526 				    qdf_nbuf_t nbuf, bool *fwd_success);
1527 };
1528 #endif
1529 
1530 #ifdef DP_POWER_SAVE
1531 /**
1532  * struct cdp_tx_delay_ops - mcl tx delay ops
1533  * @tx_delay: handler to get tx packet delay
1534  * @tx_delay_hist: handler to get tx packet delay histogram
1535  * @tx_packet_count: handler to get tx packet count
1536  * @tx_set_compute_interval: update compute interval period for TSM stats
1537  *
1538  * Function pointer for operations related to tx delay.
1539  */
1540 struct cdp_tx_delay_ops {
1541 	void (*tx_delay)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1542 			 uint32_t *queue_delay_microsec,
1543 			 uint32_t *tx_delay_microsec, int category);
1544 	void (*tx_delay_hist)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1545 			      uint16_t *bin_values, int category);
1546 	void (*tx_packet_count)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
1547 				uint16_t *out_packet_count,
1548 				uint16_t *out_packet_loss_count, int category);
1549 	void (*tx_set_compute_interval)(struct cdp_soc_t *soc_hdl,
1550 					uint8_t pdev_id, uint32_t interval);
1551 };
1552 
1553 /**
1554  * struct cdp_bus_ops - mcl bus suspend/resume ops
1555  * @bus_suspend: handler for bus suspend
1556  * @bus_resume: handler for bus resume
1557  * @process_wow_ack_rsp: handler for wow ack response
1558  * @process_target_suspend_req: handler for target suspend request
1559  */
1560 struct cdp_bus_ops {
1561 	QDF_STATUS (*bus_suspend)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
1562 	QDF_STATUS (*bus_resume)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
1563 	void (*process_wow_ack_rsp)(struct cdp_soc_t *soc_hdl, uint8_t pdev_id);
1564 	void (*process_target_suspend_req)(struct cdp_soc_t *soc_hdl,
1565 					   uint8_t pdev_id);
1566 };
1567 #endif
1568 
1569 #ifdef RECEIVE_OFFLOAD
1570 /**
1571  * struct cdp_rx_offld_ops - mcl host receive offload ops
1572  * @register_rx_offld_flush_cb:
1573  * @deregister_rx_offld_flush_cb:
1574  */
1575 struct cdp_rx_offld_ops {
1576 	void (*register_rx_offld_flush_cb)(void (rx_offld_flush_cb)(void *));
1577 	void (*deregister_rx_offld_flush_cb)(void);
1578 };
1579 #endif
1580 
1581 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
1582 /**
1583  * struct cdp_cfr_ops - host cfr ops
1584  * @txrx_cfr_filter: Handler to configure host rx monitor status ring
1585  * @txrx_get_cfr_rcc: Handler to get CFR mode
1586  * @txrx_set_cfr_rcc: Handler to enable/disable CFR mode
1587  * @txrx_get_cfr_dbg_stats: Handler to get debug statistics for CFR mode
1588  * @txrx_clear_cfr_dbg_stats: Handler to clear debug statistics for CFR mode
1589  * @txrx_enable_mon_reap_timer: Enable/Disable reap timer of monitor status ring
1590  */
1591 struct cdp_cfr_ops {
1592 	void (*txrx_cfr_filter)(struct cdp_soc_t *soc_hdl,
1593 				uint8_t pdev_id,
1594 				bool enable,
1595 				struct cdp_monitor_filter *filter_val);
1596 	bool (*txrx_get_cfr_rcc)(struct cdp_soc_t *soc_hdl,
1597 				 uint8_t pdev_id);
1598 	void (*txrx_set_cfr_rcc)(struct cdp_soc_t *soc_hdl,
1599 				 uint8_t pdev_id,
1600 				 bool enable);
1601 	void (*txrx_get_cfr_dbg_stats)(struct cdp_soc_t *soc_hdl,
1602 				       uint8_t pdev_id,
1603 				       struct cdp_cfr_rcc_stats *buf);
1604 	void (*txrx_clear_cfr_dbg_stats)(struct cdp_soc_t *soc_hdl,
1605 					 uint8_t pdev_id);
1606 	void (*txrx_enable_mon_reap_timer)(struct cdp_soc_t *soc_hdl,
1607 					   uint8_t pdev_id,
1608 					   bool enable);
1609 };
1610 #endif
1611 
1612 struct cdp_ops {
1613 	struct cdp_cmn_ops          *cmn_drv_ops;
1614 	struct cdp_ctrl_ops         *ctrl_ops;
1615 	struct cdp_me_ops           *me_ops;
1616 	struct cdp_mon_ops          *mon_ops;
1617 	struct cdp_host_stats_ops   *host_stats_ops;
1618 	struct cdp_wds_ops          *wds_ops;
1619 	struct cdp_raw_ops          *raw_ops;
1620 	struct cdp_pflow_ops        *pflow_ops;
1621 #ifdef DP_PEER_EXTENDED_API
1622 	struct cdp_misc_ops         *misc_ops;
1623 	struct cdp_peer_ops         *peer_ops;
1624 	struct cdp_ocb_ops          *ocb_ops;
1625 	struct cdp_mob_stats_ops    *mob_stats_ops;
1626 	struct cdp_pmf_ops          *pmf_ops;
1627 #endif
1628 #ifdef DP_FLOW_CTL
1629 	struct cdp_cfg_ops          *cfg_ops;
1630 	struct cdp_flowctl_ops      *flowctl_ops;
1631 	struct cdp_lflowctl_ops     *l_flowctl_ops;
1632 	struct cdp_throttle_ops     *throttle_ops;
1633 #endif
1634 #ifdef DP_POWER_SAVE
1635 	struct cdp_bus_ops          *bus_ops;
1636 	struct cdp_tx_delay_ops     *delay_ops;
1637 #endif
1638 #ifdef IPA_OFFLOAD
1639 	struct cdp_ipa_ops          *ipa_ops;
1640 #endif
1641 #ifdef RECEIVE_OFFLOAD
1642 	struct cdp_rx_offld_ops     *rx_offld_ops;
1643 #endif
1644 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE)
1645 	struct cdp_cfr_ops          *cfr_ops;
1646 #endif
1647 
1648 };
1649 #endif
1650