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