xref: /wlan-dirver/qca-wifi-host-cmn/dp/inc/cdp_txrx_ops.h (revision 6ecd284e5a94a1c96e26d571dd47419ac305990d)
1 /*
2  * Copyright (c) 2017-2018 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 /**
21  * @file cdp_txrx_ops.h
22  * @brief Define the host data path converged API functions
23  * called by the host control SW and the OS interface module
24  */
25 #ifndef _CDP_TXRX_CMN_OPS_H_
26 #define _CDP_TXRX_CMN_OPS_H_
27 
28 #include <cdp_txrx_cmn_struct.h>
29 #include <cdp_txrx_stats_struct.h>
30 #include "cdp_txrx_handle.h"
31 #include <cdp_txrx_mon_struct.h>
32 #include "wlan_objmgr_psoc_obj.h"
33 
34 #ifdef IPA_OFFLOAD
35 #ifdef CONFIG_IPA_WDI_UNIFIED_API
36 #include <qdf_ipa_wdi3.h>
37 #else
38 #include <qdf_ipa.h>
39 #endif
40 #endif
41 
42 /**
43  * bitmap values to indicate special handling of peer_delete
44  */
45 #define CDP_PEER_DELETE_NO_SPECIAL             0
46 #define CDP_PEER_DO_NOT_START_UNMAP_TIMER      1
47 
48 /* same as ieee80211_nac_param */
49 enum cdp_nac_param_cmd {
50 	/* IEEE80211_NAC_PARAM_ADD */
51 	CDP_NAC_PARAM_ADD = 1,
52 	/* IEEE80211_NAC_PARAM_DEL */
53 	CDP_NAC_PARAM_DEL,
54 	/* IEEE80211_NAC_PARAM_LIST */
55 	CDP_NAC_PARAM_LIST,
56 };
57 /******************************************************************************
58  *
59  * Control Interface (A Interface)
60  *
61  *****************************************************************************/
62 
63 struct cdp_cmn_ops {
64 
65 	int (*txrx_soc_attach_target)(ol_txrx_soc_handle soc);
66 
67 	int (*txrx_pdev_attach_target)(struct cdp_pdev *pdev);
68 
69 	struct cdp_vdev *(*txrx_vdev_attach)
70 		(struct cdp_pdev *pdev, uint8_t *vdev_mac_addr,
71 		 uint8_t vdev_id, enum wlan_op_mode op_mode);
72 
73 	void (*txrx_vdev_detach)
74 		(struct cdp_vdev *vdev, ol_txrx_vdev_delete_cb callback,
75 		 void *cb_context);
76 
77 	struct cdp_pdev *(*txrx_pdev_attach)
78 		(ol_txrx_soc_handle soc, struct cdp_cfg *ctrl_pdev,
79 		HTC_HANDLE htc_pdev, qdf_device_t osdev, uint8_t pdev_id);
80 
81 	int (*txrx_pdev_post_attach)(struct cdp_pdev *pdev);
82 
83 	void (*txrx_pdev_pre_detach)(struct cdp_pdev *pdev, int force);
84 
85 	void (*txrx_pdev_detach)(struct cdp_pdev *pdev, int force);
86 
87 	void *(*txrx_peer_create)
88 		(struct cdp_vdev *vdev, uint8_t *peer_mac_addr);
89 
90 	void (*txrx_peer_setup)
91 		(struct cdp_vdev *vdev_hdl, void *peer_hdl);
92 
93 	void (*txrx_peer_teardown)
94 		(struct cdp_vdev *vdev_hdl, void *peer_hdl);
95 
96 	int (*txrx_peer_add_ast)
97 		(ol_txrx_soc_handle soc, struct cdp_peer *peer_hdl,
98 		uint8_t *mac_addr, enum  cdp_txrx_ast_entry_type type,
99 		uint32_t flags);
100 
101 	void (*txrx_peer_del_ast)
102 		(ol_txrx_soc_handle soc, void *ast_hdl);
103 
104 	int (*txrx_peer_update_ast)
105 		(ol_txrx_soc_handle soc, struct cdp_peer *peer_hdl,
106 		uint8_t *mac_addr, uint32_t flags);
107 
108 
109 	void *(*txrx_peer_ast_hash_find)
110 		(ol_txrx_soc_handle soc, uint8_t *ast_mac_addr);
111 
112 	uint8_t (*txrx_peer_ast_get_pdev_id)
113 		(ol_txrx_soc_handle soc, void *ast_hdl);
114 
115 	uint8_t (*txrx_peer_ast_get_next_hop)
116 		(ol_txrx_soc_handle soc, void *ast_hdl);
117 
118 	void (*txrx_peer_ast_set_type)
119 		(ol_txrx_soc_handle soc, void *ast_hdl,
120 		enum cdp_txrx_ast_entry_type type);
121 
122 	void (*txrx_peer_delete)(void *peer, uint32_t bitmap);
123 
124 	int (*txrx_set_monitor_mode)(struct cdp_vdev *vdev,
125 			uint8_t smart_monitor);
126 
127 	uint8_t (*txrx_get_pdev_id_frm_pdev)(struct cdp_pdev *pdev);
128 
129 	void (*txrx_set_nac)(struct cdp_peer *peer);
130 
131 	void (*txrx_set_pdev_tx_capture)(struct cdp_pdev *pdev, int val);
132 
133 	void (*txrx_get_peer_mac_from_peer_id)
134 		(struct cdp_pdev *pdev_handle,
135 		 uint32_t peer_id, uint8_t *peer_mac);
136 
137 	void (*txrx_vdev_tx_lock)(struct cdp_vdev *vdev);
138 
139 	void (*txrx_vdev_tx_unlock)(struct cdp_vdev *vdev);
140 
141 	void (*txrx_ath_getstats)(struct cdp_pdev *pdev,
142 			struct cdp_dev_stats *stats);
143 
144 	void (*txrx_set_gid_flag)(struct cdp_pdev *pdev, u_int8_t *mem_status,
145 			u_int8_t *user_position);
146 
147 	uint32_t (*txrx_fw_supported_enh_stats_version)(struct cdp_pdev *pdev);
148 
149 	void (*txrx_if_mgmt_drain)(void *ni, int force);
150 
151 	void (*txrx_set_curchan)(struct cdp_pdev *pdev, uint32_t chan_mhz);
152 
153 	void (*txrx_set_privacy_filters)
154 		(struct cdp_vdev *vdev, void *filter, uint32_t num);
155 
156 	/********************************************************************
157 	 * Data Interface (B Interface)
158 	 ********************************************************************/
159 
160 	void (*txrx_vdev_register)(struct cdp_vdev *vdev,
161 			void *osif_vdev, struct ol_txrx_ops *txrx_ops);
162 
163 	int (*txrx_mgmt_send)(struct cdp_vdev *vdev,
164 			qdf_nbuf_t tx_mgmt_frm, uint8_t type);
165 
166 	int (*txrx_mgmt_send_ext)(struct cdp_vdev *vdev,
167 			qdf_nbuf_t tx_mgmt_frm,	uint8_t type, uint8_t use_6mbps,
168 			uint16_t chanfreq);
169 
170 	/**
171 	 * ol_txrx_mgmt_tx_cb - tx management delivery notification
172 	 * callback function
173 	 */
174 
175 	void (*txrx_mgmt_tx_cb_set)(struct cdp_pdev *pdev, uint8_t type,
176 				    ol_txrx_mgmt_tx_cb download_cb,
177 				    ol_txrx_mgmt_tx_cb ota_ack_cb,
178 				    void *ctxt);
179 
180 	int (*txrx_get_tx_pending)(struct cdp_pdev *pdev);
181 
182 	/**
183 	 * ol_txrx_data_tx_cb - Function registered with the data path
184 	 * that is called when tx frames marked as "no free" are
185 	 * done being transmitted
186 	 */
187 
188 	void (*txrx_data_tx_cb_set)(struct cdp_vdev *data_vdev,
189 			ol_txrx_data_tx_cb callback, void *ctxt);
190 
191 	/*******************************************************************
192 	 * Statistics and Debugging Interface (C Inteface)
193 	 ********************************************************************/
194 
195 	int (*txrx_aggr_cfg)(struct cdp_vdev *vdev, int max_subfrms_ampdu,
196 			int max_subfrms_amsdu);
197 
198 	A_STATUS (*txrx_fw_stats_get)(struct cdp_vdev *vdev,
199 			struct ol_txrx_stats_req *req,
200 			bool per_vdev, bool response_expected);
201 
202 	int (*txrx_debug)(struct cdp_vdev *vdev, int debug_specs);
203 
204 	void (*txrx_fw_stats_cfg)(struct cdp_vdev *vdev,
205 			uint8_t cfg_stats_type, uint32_t cfg_val);
206 
207 	void (*txrx_print_level_set)(unsigned level);
208 
209 	/**
210 	 * ol_txrx_get_vdev_mac_addr() - Return mac addr of vdev
211 	 * @vdev: vdev handle
212 	 *
213 	 * Return: vdev mac address
214 	 */
215 	uint8_t * (*txrx_get_vdev_mac_addr)(struct cdp_vdev *vdev);
216 
217 	/**
218 	 * ol_txrx_get_vdev_struct_mac_addr() - Return handle to struct qdf_mac_addr of
219 	 * vdev
220 	 * @vdev: vdev handle
221 	 *
222 	 * Return: Handle to struct qdf_mac_addr
223 	 */
224 	struct qdf_mac_addr *
225 		(*txrx_get_vdev_struct_mac_addr)(struct cdp_vdev *vdev);
226 
227 	/**
228 	 * ol_txrx_get_pdev_from_vdev() - Return handle to pdev of vdev
229 	 * @vdev: vdev handle
230 	 *
231 	 * Return: Handle to pdev
232 	 */
233 	struct cdp_pdev *(*txrx_get_pdev_from_vdev)
234 		(struct cdp_vdev *vdev);
235 
236 	/**
237 	 * ol_txrx_get_ctrl_pdev_from_vdev() - Return control pdev of vdev
238 	 * @vdev: vdev handle
239 	 *
240 	 * Return: Handle to control pdev
241 	 */
242 	struct cdp_cfg *
243 		(*txrx_get_ctrl_pdev_from_vdev)(struct cdp_vdev *vdev);
244 
245 	struct cdp_vdev *
246 		(*txrx_get_vdev_from_vdev_id)(struct cdp_pdev *pdev,
247 				uint8_t vdev_id);
248 
249 	void (*txrx_soc_detach)(void *soc);
250 
251 	int (*addba_requestprocess)(void *peer_handle, uint8_t dialogtoken,
252 		uint16_t tid, uint16_t batimeout, uint16_t buffersize,
253 		uint16_t startseqnum);
254 
255 	void (*addba_responsesetup)(void *peer_handle, uint8_t tid,
256 		uint8_t *dialogtoken, uint16_t *statuscode,
257 		uint16_t *buffersize, uint16_t *batimeout);
258 
259 	int (*delba_process)(void *peer_handle,
260 		int tid, uint16_t reasoncode);
261 
262 	void (*set_addba_response)(void *peer_handle,
263 		uint8_t tid, uint16_t statuscode);
264 
265 	uint8_t (*get_peer_mac_addr_frm_id)(struct cdp_soc_t *soc_handle,
266 			uint16_t peer_id, uint8_t *mac_addr);
267 
268 	void (*set_vdev_dscp_tid_map)(struct cdp_vdev *vdev_handle,
269 			uint8_t map_id);
270 
271 	void (*flush_cache_rx_queue)(void);
272 	void (*set_pdev_dscp_tid_map)(struct cdp_pdev *pdev, uint8_t map_id,
273 			uint8_t tos, uint8_t tid);
274 
275 	int (*txrx_stats_request)(struct cdp_vdev *vdev,
276 			struct cdp_txrx_stats_req *req);
277 
278 	QDF_STATUS (*display_stats)(void *psoc, uint16_t value,
279 				    enum qdf_stats_verbosity_level level);
280 	void (*txrx_soc_set_nss_cfg)(ol_txrx_soc_handle soc, int config);
281 
282 	int(*txrx_soc_get_nss_cfg)(ol_txrx_soc_handle soc);
283 	QDF_STATUS (*txrx_intr_attach)(void *soc);
284 	void (*txrx_intr_detach)(void *soc);
285 	void  (*set_pn_check)(struct cdp_vdev *vdev,
286 		struct cdp_peer *peer_handle, enum cdp_sec_type sec_type,
287 		 uint32_t *rx_pn);
288 	QDF_STATUS (*update_config_parameters)(struct cdp_soc *psoc,
289 			struct cdp_config_params *params);
290 
291 	void *(*get_dp_txrx_handle)(struct cdp_pdev *pdev_hdl);
292 	void (*set_dp_txrx_handle)(struct cdp_pdev *pdev_hdl,
293 			void *dp_txrx_hdl);
294 
295 	void *(*get_soc_dp_txrx_handle)(struct cdp_soc *soc_handle);
296 	void (*set_soc_dp_txrx_handle)(struct cdp_soc *soc_handle,
297 			void *dp_txrx_handle);
298 
299 	void (*txrx_peer_reset_ast)
300 		(ol_txrx_soc_handle soc, uint8_t *ast_macaddr);
301 
302 	void (*txrx_peer_reset_ast_table)(ol_txrx_soc_handle soc);
303 
304 	void (*txrx_peer_flush_ast_table)(ol_txrx_soc_handle soc);
305 
306 	ol_txrx_tx_fp tx_send;
307 };
308 
309 struct cdp_ctrl_ops {
310 
311 	int
312 		(*txrx_mempools_attach)(void *ctrl_pdev);
313 	int
314 		(*txrx_set_filter_neighbour_peers)(
315 				struct cdp_pdev *pdev,
316 				uint32_t val);
317 	int
318 		(*txrx_update_filter_neighbour_peers)(
319 				struct cdp_pdev *pdev,
320 				uint32_t cmd, uint8_t *macaddr);
321 	/**
322 	 * @brief set the safemode of the device
323 	 * @details
324 	 * This flag is used to bypass the encrypt and decrypt processes when
325 	 * send and receive packets. It works like open AUTH mode, HW will
326 	 * ctreate all packets as non-encrypt frames because no key installed.
327 	 * For rx fragmented frames,it bypasses all the rx defragmentaion.
328 	 *
329 	 * @param vdev - the data virtual device object
330 	 * @param val - the safemode state
331 	 * @return - void
332 	 */
333 
334 	void
335 		(*txrx_set_safemode)(
336 				struct cdp_vdev *vdev,
337 				u_int32_t val);
338 	/**
339 	 * @brief configure the drop unencrypted frame flag
340 	 * @details
341 	 * Rx related. When set this flag, all the unencrypted frames
342 	 * received over a secure connection will be discarded
343 	 *
344 	 * @param vdev - the data virtual device object
345 	 * @param val - flag
346 	 * @return - void
347 	 */
348 	void
349 		(*txrx_set_drop_unenc)(
350 				struct cdp_vdev *vdev,
351 				u_int32_t val);
352 
353 
354 	/**
355 	 * @brief set the Tx encapsulation type of the VDEV
356 	 * @details
357 	 * This will be used to populate the HTT desc packet type field
358 	 * during Tx
359 	 * @param vdev - the data virtual device object
360 	 * @param val - the Tx encap type
361 	 * @return - void
362 	 */
363 	void
364 		(*txrx_set_tx_encap_type)(
365 				struct cdp_vdev *vdev,
366 				enum htt_cmn_pkt_type val);
367 	/**
368 	 * @brief set the Rx decapsulation type of the VDEV
369 	 * @details
370 	 * This will be used to configure into firmware and hardware
371 	 * which format to decap all Rx packets into, for all peers under
372 	 * the VDEV.
373 	 * @param vdev - the data virtual device object
374 	 * @param val - the Rx decap mode
375 	 * @return - void
376 	 */
377 	void
378 		(*txrx_set_vdev_rx_decap_type)(
379 				struct cdp_vdev *vdev,
380 				enum htt_cmn_pkt_type val);
381 
382 	/**
383 	 * @brief get the Rx decapsulation type of the VDEV
384 	 *
385 	 * @param vdev - the data virtual device object
386 	 * @return - the Rx decap type
387 	 */
388 	enum htt_cmn_pkt_type
389 		(*txrx_get_vdev_rx_decap_type)(struct cdp_vdev *vdev);
390 
391 	/* Is this similar to ol_txrx_peer_state_update() in MCL */
392 	/**
393 	 * @brief Update the authorize peer object at association time
394 	 * @details
395 	 * For the host-based implementation of rate-control, it
396 	 * updates the peer/node-related parameters within rate-control
397 	 * context of the peer at association.
398 	 *
399 	 * @param peer - pointer to the node's object
400 	 * @authorize - either to authorize or unauthorize peer
401 	 *
402 	 * @return none
403 	 */
404 	void
405 		(*txrx_peer_authorize)(struct cdp_peer *peer,
406 				u_int32_t authorize);
407 
408 	bool
409 		(*txrx_set_inact_params)(struct cdp_pdev *pdev,
410 				u_int16_t inact_check_interval,
411 				u_int16_t inact_normal,
412 				u_int16_t inact_overload);
413 	bool
414 		(*txrx_start_inact_timer)(
415 				struct cdp_pdev *pdev,
416 				bool enable);
417 
418 
419 	/**
420 	 * @brief Set the overload status of the radio
421 	 * @details
422 	 *  Set the overload status of the radio, updating the inactivity
423 	 *  threshold and inactivity count for each node.
424 	 *
425 	 * @param pdev - the data physical device object
426 	 * @param overload - whether the radio is overloaded or not
427 	 */
428 	void (*txrx_set_overload)(
429 			struct cdp_pdev *pdev,
430 			bool overload);
431 	/**
432 	 * @brief Check the inactivity status of the peer/node
433 	 *
434 	 * @param peer - pointer to the node's object
435 	 * @return true if the node is inactive; otherwise return false
436 	 */
437 	bool
438 		(*txrx_peer_is_inact)(void *peer);
439 
440 	/**
441 	 * @brief Mark inactivity status of the peer/node
442 	 * @details
443 	 *  If it becomes active, reset inactivity count to reload value;
444 	 *  if the inactivity status changed, notify umac band steering.
445 	 *
446 	 * @param peer - pointer to the node's object
447 	 * @param inactive - whether the node is inactive or not
448 	 */
449 	void (*txrx_mark_peer_inact)(
450 			void *peer,
451 			bool inactive);
452 
453 
454 	/* Should be ol_txrx_ctrl_api.h */
455 	void (*txrx_set_mesh_mode)(struct cdp_vdev *vdev, u_int32_t val);
456 
457 	/**
458 	 * @brief setting mesh rx filter
459 	 * @details
460 	 *  based on the bits enabled in the filter packets has to be dropped.
461 	 *
462 	 * @param vdev - the data virtual device object
463 	 * @param val - value to set
464 	 */
465 	void (*txrx_set_mesh_rx_filter)(struct cdp_vdev *vdev, uint32_t val);
466 
467 	void (*tx_flush_buffers)(struct cdp_vdev *vdev);
468 
469 	int (*txrx_is_target_ar900b)(struct cdp_vdev *vdev);
470 
471 	void (*txrx_set_vdev_param)(struct cdp_vdev *vdev,
472 			enum cdp_vdev_param_type param, uint32_t val);
473 
474 	void (*txrx_peer_set_nawds)(struct cdp_peer *peer, uint8_t value);
475 	/**
476 	 * @brief Set the reo dest ring num of the radio
477 	 * @details
478 	 *  Set the reo destination ring no on which we will receive
479 	 *  pkts for this radio.
480 	 *
481 	 * @param pdev - the data physical device object
482 	 * @param reo_dest_ring_num - value ranges between 1 - 4
483 	 */
484 	void (*txrx_set_pdev_reo_dest)(
485 			struct cdp_pdev *pdev,
486 			enum cdp_host_reo_dest_ring reo_dest_ring_num);
487 
488 	/**
489 	 * @brief Get the reo dest ring num of the radio
490 	 * @details
491 	 *  Get the reo destination ring no on which we will receive
492 	 *  pkts for this radio.
493 	 *
494 	 * @param pdev - the data physical device object
495 	 * @return the reo destination ring number
496 	 */
497 	enum cdp_host_reo_dest_ring (*txrx_get_pdev_reo_dest)(
498 						struct cdp_pdev *pdev);
499 
500 	int (*txrx_wdi_event_sub)(struct cdp_pdev *pdev, void *event_cb_sub,
501 			uint32_t event);
502 
503 	int (*txrx_wdi_event_unsub)(struct cdp_pdev *pdev, void *event_cb_sub,
504 			uint32_t event);
505 	int (*txrx_get_sec_type)(struct cdp_peer *peer, uint8_t sec_idx);
506 
507 	void (*txrx_update_mgmt_txpow_vdev)(struct cdp_vdev *vdev,
508 			uint8_t subtype, uint8_t tx_power);
509 
510 	void (*txrx_set_pdev_param)(struct cdp_pdev *pdev,
511 			enum cdp_pdev_param_type type, uint8_t val);
512 	void * (*txrx_get_pldev)(struct cdp_pdev *pdev);
513 
514 #ifdef ATH_SUPPORT_NAC_RSSI
515 	QDF_STATUS (*txrx_vdev_config_for_nac_rssi)(struct cdp_vdev *vdev,
516 		enum cdp_nac_param_cmd cmd, char *bssid, char *client_macaddr,
517 		uint8_t chan_num);
518 #endif
519 };
520 
521 struct cdp_me_ops {
522 
523 	u_int16_t (*tx_desc_alloc_and_mark_for_mcast_clone)
524 		(struct cdp_pdev *pdev, u_int16_t buf_count);
525 
526 		u_int16_t (*tx_desc_free_and_unmark_for_mcast_clone)(
527 				struct cdp_pdev *pdev,
528 				u_int16_t buf_count);
529 
530 	u_int16_t
531 		(*tx_get_mcast_buf_allocated_marked)
532 			(struct cdp_pdev *pdev);
533 	void
534 		(*tx_me_alloc_descriptor)(struct cdp_pdev *pdev);
535 
536 	void
537 		(*tx_me_free_descriptor)(struct cdp_pdev *pdev);
538 
539 	uint16_t
540 		(*tx_me_convert_ucast)(struct cdp_vdev *vdev,
541 			qdf_nbuf_t wbuf, u_int8_t newmac[][6],
542 			uint8_t newmaccnt);
543 	/* Should be a function pointer in ol_txrx_osif_ops{} */
544 	/**
545 	 * @brief notify mcast frame indication from FW.
546 	 * @details
547 	 *     This notification will be used to convert
548 	 *     multicast frame to unicast.
549 	 *
550 	 * @param pdev - handle to the ctrl SW's physical device object
551 	 * @param vdev_id - ID of the virtual device received the special data
552 	 * @param msdu - the multicast msdu returned by FW for host inspect
553 	 */
554 
555 	int (*mcast_notify)(struct cdp_pdev *pdev,
556 			u_int8_t vdev_id, qdf_nbuf_t msdu);
557 };
558 
559 struct cdp_mon_ops {
560 
561 	void (*txrx_monitor_set_filter_ucast_data)
562 		(struct cdp_pdev *, u_int8_t val);
563 	void (*txrx_monitor_set_filter_mcast_data)
564 		(struct cdp_pdev *, u_int8_t val);
565 	void (*txrx_monitor_set_filter_non_data)
566 		(struct cdp_pdev *, u_int8_t val);
567 
568 	bool (*txrx_monitor_get_filter_ucast_data)
569 		(struct cdp_vdev *vdev_txrx_handle);
570 	bool (*txrx_monitor_get_filter_mcast_data)
571 		(struct cdp_vdev *vdev_txrx_handle);
572 	bool (*txrx_monitor_get_filter_non_data)
573 		(struct cdp_vdev *vdev_txrx_handle);
574 	int (*txrx_reset_monitor_mode)(struct cdp_pdev *pdev);
575 
576 	/* HK advance monitor filter support */
577 	int (*txrx_set_advance_monitor_filter)
578 		(struct cdp_pdev *pdev, struct cdp_monitor_filter *filter_val);
579 };
580 
581 struct cdp_host_stats_ops {
582 	int (*txrx_host_stats_get)(struct cdp_vdev *vdev,
583 			struct ol_txrx_stats_req *req);
584 
585 	void (*txrx_host_stats_clr)(struct cdp_vdev *vdev);
586 
587 	void (*txrx_host_ce_stats)(struct cdp_vdev *vdev);
588 
589 	int (*txrx_stats_publish)(struct cdp_pdev *pdev,
590 			void *buf);
591 	/**
592 	 * @brief Enable enhanced stats functionality.
593 	 *
594 	 * @param pdev - the physical device object
595 	 * @return - void
596 	 */
597 	void (*txrx_enable_enhanced_stats)(struct cdp_pdev *pdev);
598 
599 	/**
600 	 * @brief Disable enhanced stats functionality.
601 	 *
602 	 * @param pdev - the physical device object
603 	 * @return - void
604 	 */
605 	void (*txrx_disable_enhanced_stats)(struct cdp_pdev *pdev);
606 
607 	/**
608 	 * @brief Get the desired stats from the message.
609 	 *
610 	 * @param pdev - the physical device object
611 	 * @param stats_base - stats buffer recieved from FW
612 	 * @param type - stats type.
613 	 * @return - pointer to requested stat identified by type
614 	 */
615 	uint32_t * (*txrx_get_stats_base)(struct cdp_pdev *pdev,
616 			uint32_t *stats_base, uint32_t msg_len, uint8_t type);
617 	void
618 		(*tx_print_tso_stats)(struct cdp_vdev *vdev);
619 
620 	void
621 		(*tx_rst_tso_stats)(struct cdp_vdev *vdev);
622 
623 	void
624 		(*tx_print_sg_stats)(struct cdp_vdev *vdev);
625 
626 	void
627 		(*tx_rst_sg_stats)(struct cdp_vdev *vdev);
628 
629 	void
630 		(*print_rx_cksum_stats)(struct cdp_vdev *vdev);
631 
632 	void
633 		(*rst_rx_cksum_stats)(struct cdp_vdev *vdev);
634 
635 	A_STATUS
636 		(*txrx_host_me_stats)(struct cdp_vdev *vdev);
637 	void
638 		(*txrx_per_peer_stats)(struct cdp_pdev *pdev, char *addr);
639 	int (*txrx_host_msdu_ttl_stats)(struct cdp_vdev *vdev,
640 			struct ol_txrx_stats_req *req);
641 
642 	void
643 		(*print_lro_stats)(struct cdp_vdev *vdev);
644 
645 	void
646 		(*reset_lro_stats)(struct cdp_vdev *vdev);
647 
648 	void
649 		(*get_fw_peer_stats)(struct cdp_pdev *pdev, uint8_t *addr,
650 				uint32_t cap);
651 	void
652 		(*get_htt_stats)(struct cdp_pdev *pdev, void *data,
653 				uint32_t data_len);
654 };
655 
656 struct cdp_wds_ops {
657 	void
658 		(*txrx_set_wds_rx_policy)(struct cdp_vdev *vdev,
659 				u_int32_t val);
660 	void
661 		(*txrx_wds_peer_tx_policy_update)(struct cdp_peer *peer,
662 				int wds_tx_ucast, int wds_tx_mcast);
663 	int (*vdev_set_wds)(void *vdev, uint32_t val);
664 };
665 
666 struct cdp_raw_ops {
667 	int (*txrx_get_nwifi_mode)(struct cdp_vdev *vdev);
668 
669 	void (*rsim_get_astentry)(struct cdp_vdev *vdev,
670 				qdf_nbuf_t *pnbuf,
671 				struct cdp_raw_ast *raw_ast);
672 };
673 
674 #ifdef CONFIG_WIN
675 struct cdp_pflow_ops {
676 	uint32_t(*pflow_update_pdev_params)(void *,
677 			enum _ol_ath_param_t, uint32_t, void *);
678 };
679 #endif /* CONFIG_WIN */
680 
681 #define LRO_IPV4_SEED_ARR_SZ 5
682 #define LRO_IPV6_SEED_ARR_SZ 11
683 
684 /**
685  * struct cdp_lro_config - set LRO init parameters
686  * @lro_enable: indicates whether lro is enabled
687  * @tcp_flag: If the TCP flags from the packet do not match
688  * the values in this field after masking with TCP flags mask
689  * below, packet is not LRO eligible
690  * @tcp_flag_mask: field for comparing the TCP values provided
691  * above with the TCP flags field in the received packet
692  * @toeplitz_hash_ipv4: contains seed needed to compute the flow id
693  * 5-tuple toeplitz hash for ipv4 packets
694  * @toeplitz_hash_ipv6: contains seed needed to compute the flow id
695  * 5-tuple toeplitz hash for ipv6 packets
696  */
697 struct cdp_lro_hash_config {
698 	uint32_t lro_enable;
699 	uint32_t tcp_flag:9,
700 		tcp_flag_mask:9;
701 	uint32_t toeplitz_hash_ipv4[LRO_IPV4_SEED_ARR_SZ];
702 	uint32_t toeplitz_hash_ipv6[LRO_IPV6_SEED_ARR_SZ];
703 };
704 
705 struct ol_if_ops {
706 	void (*peer_set_default_routing)(void *scn_handle,
707 			uint8_t *peer_macaddr, uint8_t vdev_id,
708 			bool hash_based, uint8_t ring_num);
709 	int (*peer_rx_reorder_queue_setup)(void *scn_handle,
710 			uint8_t vdev_id, uint8_t *peer_mac,
711 			qdf_dma_addr_t hw_qdesc, int tid, uint16_t queue_num);
712 	int (*peer_rx_reorder_queue_remove)(void *scn_handle,
713 			uint8_t vdev_id, uint8_t *peer_macaddr,
714 			uint32_t tid_mask);
715 	int (*peer_unref_delete)(void *scn_handle, uint8_t vdev_id,
716 			uint8_t *peer_macaddr);
717 	bool (*is_hw_dbs_2x2_capable)(struct wlan_objmgr_psoc *psoc);
718 	int (*peer_add_wds_entry)(void *ol_soc_handle,
719 			const uint8_t *dest_macaddr, uint8_t *peer_macaddr,
720 			uint32_t flags);
721 	int (*peer_update_wds_entry)(void *ol_soc_handle,
722 			uint8_t *dest_macaddr, uint8_t *peer_macaddr,
723 			uint32_t flags);
724 	void (*peer_del_wds_entry)(void *ol_soc_handle,
725 			uint8_t *wds_macaddr);
726 	QDF_STATUS (*lro_hash_config)(void *scn_handle,
727 			struct cdp_lro_hash_config *lro_hash);
728 	void (*update_dp_stats)(void *soc, void *stats, uint16_t id,
729 			uint8_t type);
730 	uint8_t (*rx_invalid_peer)(void *osif_pdev, void *msg);
731 
732 	int  (*peer_map_event)(void *ol_soc_handle, uint16_t peer_id, uint16_t hw_peer_id,
733 			uint8_t vdev_id, uint8_t *peer_mac_addr,
734 			enum cdp_txrx_ast_entry_type peer_type);
735 	int (*peer_unmap_event)(void *ol_soc_handle, uint16_t peer_id);
736 
737 	int (*get_dp_cfg_param)(void *ol_soc_handle, enum cdp_cfg_param_type param_num);
738 
739 	void (*rx_mic_error)(void *ol_soc_handle,
740 			 uint16_t vdev_id, void *wh);
741 	uint8_t (*freq_to_channel)(void *ol_soc_handle,  uint16_t vdev_id);
742 
743 	void (*record_act_change)(struct wlan_objmgr_pdev *pdev,
744 				  u_int8_t *dstmac, bool active);
745 #ifdef ATH_SUPPORT_NAC_RSSI
746 	int (*config_fw_for_nac_rssi)(struct wlan_objmgr_pdev *pdev,
747 		u_int8_t vdev_id, enum cdp_nac_param_cmd cmd, char *bssid,
748 		char *client_macaddr, uint8_t chan_num);
749 	int (*config_bssid_in_fw_for_nac_rssi)(struct wlan_objmgr_pdev *pdev,
750 		u_int8_t vdev_id, enum cdp_nac_param_cmd cmd, char *bssid);
751 #endif
752 	int (*peer_sta_kickout)(void *osif_pdev, uint8_t *peer_macaddr);
753 
754 	/* TODO: Add any other control path calls required to OL_IF/WMA layer */
755 };
756 
757 #ifndef CONFIG_WIN
758 /* From here MCL specific OPs */
759 /**
760  * struct cdp_misc_ops - mcl ops not classified
761  * @set_ibss_vdev_heart_beat_timer:
762  * @bad_peer_txctl_set_setting:
763  * @bad_peer_txctl_update_threshold:
764  * @hl_tdls_flag_reset:
765  * @tx_non_std:
766  * @get_vdev_id:
767  * @set_wisa_mode:
768  * @txrx_data_stall_cb_register:
769  * @txrx_data_stall_cb_deregister:
770  * @txrx_post_data_stall_event
771  * @runtime_suspend:
772  * @runtime_resume:
773  */
774 struct cdp_misc_ops {
775 	uint16_t (*set_ibss_vdev_heart_beat_timer)(struct cdp_vdev *vdev,
776 			uint16_t timer_value_sec);
777 	void (*set_wmm_param)(struct cdp_pdev *cfg_pdev,
778 			struct ol_tx_wmm_param_t wmm_param);
779 	void (*bad_peer_txctl_set_setting)(struct cdp_pdev *pdev, int enable,
780 			int period, int txq_limit);
781 	void (*bad_peer_txctl_update_threshold)(struct cdp_pdev *pdev,
782 		int level, int tput_thresh, int tx_limit);
783 	void (*hl_tdls_flag_reset)(struct cdp_vdev *vdev, bool flag);
784 	qdf_nbuf_t (*tx_non_std)(struct cdp_vdev *vdev,
785 		enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list);
786 	uint16_t (*get_vdev_id)(struct cdp_vdev *vdev);
787 	uint32_t (*get_tx_ack_stats)(uint8_t vdev_id);
788 	QDF_STATUS (*set_wisa_mode)(struct cdp_vdev *vdev, bool enable);
789 	QDF_STATUS (*txrx_data_stall_cb_register)(data_stall_detect_cb cb);
790 	QDF_STATUS (*txrx_data_stall_cb_deregister)(data_stall_detect_cb cb);
791 	void (*txrx_post_data_stall_event)(
792 			enum data_stall_log_event_indicator indicator,
793 			enum data_stall_log_event_type data_stall_type,
794 			uint32_t pdev_id, uint32_t vdev_id_bitmap,
795 			enum data_stall_log_recovery_type recovery_type);
796 	QDF_STATUS (*runtime_suspend)(struct cdp_pdev *pdev);
797 	QDF_STATUS (*runtime_resume)(struct cdp_pdev *pdev);
798 	int (*get_opmode)(struct cdp_vdev *vdev);
799 	void (*mark_first_wakeup_packet)(uint8_t value);
800 	void (*update_mac_id)(uint8_t vdev_id, uint8_t mac_id);
801 	void (*flush_rx_frames)(void *peer, bool drop);
802 	A_STATUS (*get_intra_bss_fwd_pkts_count)(uint8_t vdev_id,
803 		uint64_t *fwd_tx_packets, uint64_t *fwd_rx_packets);
804 	void (*pkt_log_init)(struct cdp_pdev *handle, void *scn);
805 	void (*pkt_log_con_service)(struct cdp_pdev *pdev, void *scn);
806 };
807 
808 /**
809  * struct cdp_tx_delay_ops - mcl tx delay ops
810  * @tx_delay:
811  * @tx_delay_hist:
812  * @tx_packet_count:
813  * @tx_set_compute_interval:
814  */
815 struct cdp_tx_delay_ops {
816 	void (*tx_delay)(struct cdp_pdev *pdev, uint32_t *queue_delay_microsec,
817 		uint32_t *tx_delay_microsec, int category);
818 	void (*tx_delay_hist)(struct cdp_pdev *pdev,
819 		uint16_t *bin_values, int category);
820 	void (*tx_packet_count)(struct cdp_pdev *pdev,
821 		uint16_t *out_packet_count,
822 		uint16_t *out_packet_loss_count, int category);
823 	void (*tx_set_compute_interval)(struct cdp_pdev *pdev,
824 		uint32_t interval);
825 };
826 
827 /**
828  * struct cdp_pmf_ops - mcl protected management frame ops
829  * @get_pn_info:
830  */
831 struct cdp_pmf_ops {
832 	void (*get_pn_info)(void *peer, uint8_t **last_pn_valid,
833 			uint64_t **last_pn, uint32_t **rmf_pn_replays);
834 };
835 
836 /**
837  * struct cdp_cfg_ops - mcl configuration ops
838  * @set_cfg_rx_fwd_disabled:
839  * @set_cfg_packet_log_enabled:
840  * @cfg_attach:
841  * @vdev_rx_set_intrabss_fwd:
842  * @get_opmode:
843  * @is_rx_fwd_disabled:
844  * @tx_set_is_mgmt_over_wmi_enabled:
845  * @is_high_latency:
846  * @set_flow_control_parameters:
847  */
848 struct cdp_cfg_ops {
849 	void (*set_cfg_rx_fwd_disabled)(struct cdp_cfg *cfg_pdev,
850 		uint8_t disable_rx_fwd);
851 	void (*set_cfg_packet_log_enabled)(struct cdp_cfg *cfg_pdev,
852 		uint8_t val);
853 	struct cdp_cfg * (*cfg_attach)(qdf_device_t osdev, void *cfg_param);
854 	void (*vdev_rx_set_intrabss_fwd)(struct cdp_vdev *vdev, bool val);
855 	uint8_t (*is_rx_fwd_disabled)(struct cdp_vdev *vdev);
856 	void (*tx_set_is_mgmt_over_wmi_enabled)(uint8_t value);
857 	int (*is_high_latency)(struct cdp_cfg *cfg_pdev);
858 	void (*set_flow_control_parameters)(struct cdp_cfg *cfg_pdev,
859 		void *param);
860 	void (*set_flow_steering)(struct cdp_cfg *cfg_pdev, uint8_t val);
861 	void (*set_ptp_rx_opt_enabled)(struct cdp_cfg *cfg_pdev, uint8_t val);
862 };
863 
864 /**
865  * struct cdp_flowctl_ops - mcl flow control
866  * @register_pause_cb:
867  * @set_desc_global_pool_size:
868  * @dump_flow_pool_info:
869  */
870 struct cdp_flowctl_ops {
871 	QDF_STATUS (*flow_pool_map_handler)(struct cdp_soc_t *soc,
872 					    struct cdp_pdev *pdev,
873 					    uint8_t vdev_id);
874 	void (*flow_pool_unmap_handler)(struct cdp_soc_t *soc,
875 					struct cdp_pdev *pdev,
876 					uint8_t vdev_id);
877 	QDF_STATUS (*register_pause_cb)(struct cdp_soc_t *soc,
878 					tx_pause_callback);
879 	void (*set_desc_global_pool_size)(uint32_t num_msdu_desc);
880 
881 	void (*dump_flow_pool_info)(void *);
882 };
883 
884 /**
885  * struct cdp_lflowctl_ops - mcl legacy flow control ops
886  * @register_tx_flow_control:
887  * @deregister_tx_flow_control_cb:
888  * @flow_control_cb:
889  * @get_tx_resource:
890  * @ll_set_tx_pause_q_depth:
891  * @vdev_flush:
892  * @vdev_pause:
893  * @vdev_unpause:
894  */
895 struct cdp_lflowctl_ops {
896 	int (*register_tx_flow_control)(uint8_t vdev_id,
897 		ol_txrx_tx_flow_control_fp flowControl, void *osif_fc_ctx,
898 		ol_txrx_tx_flow_control_is_pause_fp flow_control_is_pause);
899 	int (*deregister_tx_flow_control_cb)(uint8_t vdev_id);
900 	void (*flow_control_cb)(struct cdp_vdev *vdev, bool tx_resume);
901 	bool (*get_tx_resource)(uint8_t sta_id,
902 			 unsigned int low_watermark,
903 			 unsigned int high_watermark_offset);
904 	int (*ll_set_tx_pause_q_depth)(uint8_t vdev_id, int pause_q_depth);
905 	void (*vdev_flush)(struct cdp_vdev *vdev);
906 	void (*vdev_pause)(struct cdp_vdev *vdev, uint32_t reason);
907 	void (*vdev_unpause)(struct cdp_vdev *vdev, uint32_t reason);
908 };
909 
910 #ifdef IPA_OFFLOAD
911 /**
912  * struct cdp_ipa_ops - mcl ipa data path ops
913  * @ipa_get_resource:
914  * @ipa_set_doorbell_paddr:
915  * @ipa_set_active:
916  * @ipa_op_response:
917  * @ipa_register_op_cb:
918  * @ipa_get_stat:
919  * @ipa_tx_data_frame:
920  */
921 struct cdp_ipa_ops {
922 	QDF_STATUS (*ipa_get_resource)(struct cdp_pdev *pdev);
923 	QDF_STATUS (*ipa_set_doorbell_paddr)(struct cdp_pdev *pdev);
924 	QDF_STATUS (*ipa_set_active)(struct cdp_pdev *pdev, bool uc_active,
925 		bool is_tx);
926 	QDF_STATUS (*ipa_op_response)(struct cdp_pdev *pdev, uint8_t *op_msg);
927 	QDF_STATUS (*ipa_register_op_cb)(struct cdp_pdev *pdev,
928 		void (*ipa_uc_op_cb_type)(uint8_t *op_msg, void *osif_ctxt),
929 		void *usr_ctxt);
930 	QDF_STATUS (*ipa_get_stat)(struct cdp_pdev *pdev);
931 	qdf_nbuf_t (*ipa_tx_data_frame)(struct cdp_vdev *vdev, qdf_nbuf_t skb);
932 	void (*ipa_set_uc_tx_partition_base)(struct cdp_cfg *pdev,
933 		uint32_t value);
934 #ifdef FEATURE_METERING
935 	QDF_STATUS (*ipa_uc_get_share_stats)(struct cdp_pdev *pdev,
936 		uint8_t reset_stats);
937 	QDF_STATUS (*ipa_uc_set_quota)(struct cdp_pdev *pdev,
938 		uint64_t quota_bytes);
939 #endif
940 	QDF_STATUS (*ipa_enable_autonomy)(struct cdp_pdev *pdev);
941 	QDF_STATUS (*ipa_disable_autonomy)(struct cdp_pdev *pdev);
942 #ifdef CONFIG_IPA_WDI_UNIFIED_API
943 	QDF_STATUS (*ipa_setup)(struct cdp_pdev *pdev, void *ipa_i2w_cb,
944 		void *ipa_w2i_cb, void *ipa_wdi_meter_notifier_cb,
945 		uint32_t ipa_desc_size, void *ipa_priv, bool is_rm_enabled,
946 		uint32_t *tx_pipe_handle, uint32_t *rx_pipe_handle,
947 		bool is_smmu_enabled, qdf_ipa_sys_connect_params_t *sys_in);
948 #else /* CONFIG_IPA_WDI_UNIFIED_API */
949 	QDF_STATUS (*ipa_setup)(struct cdp_pdev *pdev, void *ipa_i2w_cb,
950 		void *ipa_w2i_cb, void *ipa_wdi_meter_notifier_cb,
951 		uint32_t ipa_desc_size, void *ipa_priv, bool is_rm_enabled,
952 		uint32_t *tx_pipe_handle, uint32_t *rx_pipe_handle);
953 #endif /* CONFIG_IPA_WDI_UNIFIED_API */
954 	QDF_STATUS (*ipa_cleanup)(uint32_t tx_pipe_handle,
955 		uint32_t rx_pipe_handle);
956 	QDF_STATUS (*ipa_setup_iface)(char *ifname, uint8_t *mac_addr,
957 		qdf_ipa_client_type_t prod_client,
958 		qdf_ipa_client_type_t cons_client,
959 		uint8_t session_id, bool is_ipv6_enabled);
960 	QDF_STATUS (*ipa_cleanup_iface)(char *ifname, bool is_ipv6_enabled);
961 	QDF_STATUS (*ipa_enable_pipes)(struct cdp_pdev *pdev);
962 	QDF_STATUS (*ipa_disable_pipes)(struct cdp_pdev *pdev);
963 	QDF_STATUS (*ipa_set_perf_level)(int client,
964 		uint32_t max_supported_bw_mbps);
965 };
966 #endif
967 
968 /**
969  * struct cdp_bus_ops - mcl bus suspend/resume ops
970  * @bus_suspend:
971  * @bus_resume:
972  */
973 struct cdp_bus_ops {
974 	QDF_STATUS (*bus_suspend)(struct cdp_pdev *opaque_pdev);
975 	QDF_STATUS (*bus_resume)(struct cdp_pdev *opaque_pdev);
976 };
977 
978 /**
979  * struct cdp_ocb_ops - mcl ocb ops
980  * @set_ocb_chan_info:
981  * @get_ocb_chan_info:
982  */
983 struct cdp_ocb_ops {
984 	void (*set_ocb_chan_info)(struct cdp_vdev *vdev,
985 			struct ol_txrx_ocb_set_chan ocb_set_chan);
986 	struct ol_txrx_ocb_chan_info *
987 		(*get_ocb_chan_info)(struct cdp_vdev *vdev);
988 };
989 
990 /**
991  * struct cdp_peer_ops - mcl peer related ops
992  * @register_peer:
993  * @clear_peer:
994  * @cfg_attach:
995  * @find_peer_by_addr:
996  * @find_peer_by_addr_and_vdev:
997  * @local_peer_id:
998  * @peer_find_by_local_id:
999  * @peer_state_update:
1000  * @get_vdevid:
1001  * @get_vdev_by_sta_id:
1002  * @register_ocb_peer:
1003  * @peer_get_peer_mac_addr:
1004  * @get_peer_state:
1005  * @get_vdev_for_peer:
1006  * @update_ibss_add_peer_num_of_vdev:
1007  * @remove_peers_for_vdev:
1008  * @remove_peers_for_vdev_no_lock:
1009  * @copy_mac_addr_raw:
1010  * @add_last_real_peer:
1011  * @last_assoc_received:
1012  * @last_disassoc_received:
1013  * @last_deauth_received:
1014  * @is_vdev_restore_last_peer:
1015  * @update_last_real_peer:
1016  */
1017 struct cdp_peer_ops {
1018 	QDF_STATUS (*register_peer)(struct cdp_pdev *pdev,
1019 			struct ol_txrx_desc_type *sta_desc);
1020 	QDF_STATUS (*clear_peer)(struct cdp_pdev *pdev, uint8_t sta_id);
1021 	QDF_STATUS (*change_peer_state)(uint8_t sta_id,
1022 			enum ol_txrx_peer_state sta_state,
1023 			bool roam_synch_in_progress);
1024 	void * (*peer_get_ref_by_addr)(struct cdp_pdev *pdev,
1025 				       u8 *peer_addr, uint8_t *peer_id,
1026 				       enum peer_debug_id_type debug_id);
1027 	void (*peer_release_ref)(void *peer, enum peer_debug_id_type debug_id);
1028 	void * (*find_peer_by_addr)(struct cdp_pdev *pdev,
1029 			uint8_t *peer_addr, uint8_t *peer_id);
1030 	void * (*find_peer_by_addr_and_vdev)(struct cdp_pdev *pdev,
1031 			struct cdp_vdev *vdev,
1032 			uint8_t *peer_addr, uint8_t *peer_id);
1033 	uint16_t (*local_peer_id)(void *peer);
1034 	void * (*peer_find_by_local_id)(struct cdp_pdev *pdev,
1035 			uint8_t local_peer_id);
1036 	QDF_STATUS (*peer_state_update)(struct cdp_pdev *pdev,
1037 			uint8_t *peer_addr,
1038 			enum ol_txrx_peer_state state);
1039 	QDF_STATUS (*get_vdevid)(void *peer, uint8_t *vdev_id);
1040 	struct cdp_vdev * (*get_vdev_by_sta_id)(struct cdp_pdev *pdev,
1041 			uint8_t sta_id);
1042 	QDF_STATUS (*register_ocb_peer)(uint8_t *mac_addr, uint8_t *peer_id);
1043 	uint8_t * (*peer_get_peer_mac_addr)(void *peer);
1044 	int (*get_peer_state)(void *peer);
1045 	struct cdp_vdev * (*get_vdev_for_peer)(void *peer);
1046 	int16_t (*update_ibss_add_peer_num_of_vdev)(struct cdp_vdev *vdev,
1047 			int16_t peer_num_delta);
1048 	void (*remove_peers_for_vdev)(struct cdp_vdev *vdev,
1049 			ol_txrx_vdev_peer_remove_cb callback,
1050 			void *callback_context, bool remove_last_peer);
1051 	void (*remove_peers_for_vdev_no_lock)(struct cdp_vdev *vdev,
1052 			ol_txrx_vdev_peer_remove_cb callback,
1053 			void *callback_context);
1054 	void (*copy_mac_addr_raw)(struct cdp_vdev *vdev, uint8_t *bss_addr);
1055 	void (*add_last_real_peer)(struct cdp_pdev *pdev,
1056 		struct cdp_vdev *vdev, uint8_t *peer_id);
1057 	qdf_time_t * (*last_assoc_received)(void *peer);
1058 	qdf_time_t * (*last_disassoc_received)(void *peer);
1059 	qdf_time_t * (*last_deauth_received)(void *peer);
1060 	bool (*is_vdev_restore_last_peer)(void *peer);
1061 	void (*update_last_real_peer)(struct cdp_pdev *pdev, void *peer,
1062 			uint8_t *peer_id, bool restore_last_peer);
1063 	void (*peer_detach_force_delete)(void *peer);
1064 };
1065 
1066 /**
1067  * struct cdp_ocb_ops - mcl ocb ops
1068  * @throttle_init_period:
1069  * @throttle_set_level:
1070  */
1071 struct cdp_throttle_ops {
1072 	void (*throttle_init_period)(struct cdp_pdev *pdev, int period,
1073 			uint8_t *dutycycle_level);
1074 	void (*throttle_set_level)(struct cdp_pdev *pdev, int level);
1075 };
1076 
1077 /**
1078  * struct cdp_ocb_ops - mcl ocb ops
1079  * @clear_stats:
1080  * @stats:
1081  */
1082 struct cdp_mob_stats_ops {
1083 	void (*clear_stats)(uint16_t bitmap);
1084 	int (*stats)(uint8_t vdev_id, char *buffer, unsigned buf_len);
1085 };
1086 #endif /* CONFIG_WIN */
1087 
1088 struct cdp_ops {
1089 	struct cdp_cmn_ops          *cmn_drv_ops;
1090 	struct cdp_ctrl_ops         *ctrl_ops;
1091 	struct cdp_me_ops           *me_ops;
1092 	struct cdp_mon_ops          *mon_ops;
1093 	struct cdp_host_stats_ops   *host_stats_ops;
1094 	struct cdp_wds_ops          *wds_ops;
1095 	struct cdp_raw_ops          *raw_ops;
1096 	struct cdp_pflow_ops        *pflow_ops;
1097 #ifndef CONFIG_WIN
1098 	struct cdp_misc_ops         *misc_ops;
1099 	struct cdp_cfg_ops          *cfg_ops;
1100 	struct cdp_flowctl_ops      *flowctl_ops;
1101 	struct cdp_lflowctl_ops     *l_flowctl_ops;
1102 #ifdef IPA_OFFLOAD
1103 	struct cdp_ipa_ops          *ipa_ops;
1104 #endif
1105 	struct cdp_bus_ops          *bus_ops;
1106 	struct cdp_ocb_ops          *ocb_ops;
1107 	struct cdp_peer_ops         *peer_ops;
1108 	struct cdp_throttle_ops     *throttle_ops;
1109 	struct cdp_mob_stats_ops    *mob_stats_ops;
1110 	struct cdp_tx_delay_ops     *delay_ops;
1111 	struct cdp_pmf_ops          *pmf_ops;
1112 #endif /* CONFIG_WIN */
1113 };
1114 
1115 #endif
1116