xref: /wlan-dirver/qca-wifi-host-cmn/dp/inc/cdp_txrx_ops.h (revision d78dedc9dd8c4ee677ac1649d1d42f2a7c3cc1b7)
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)(void *pdev,
142 			struct cdp_dev_stats *stats, uint8_t type);
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 Interface)
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, void *vdev_hdl);
301 
302 	void (*txrx_peer_reset_ast_table)(ol_txrx_soc_handle soc,
303 					  void *vdev_hdl);
304 
305 	void (*txrx_peer_flush_ast_table)(ol_txrx_soc_handle soc);
306 
307 	QDF_STATUS (*txrx_peer_map_attach)(ol_txrx_soc_handle soc,
308 			uint32_t num_peers);
309 
310 	ol_txrx_tx_fp tx_send;
311 };
312 
313 struct cdp_ctrl_ops {
314 
315 	int
316 		(*txrx_mempools_attach)(void *ctrl_pdev);
317 	int
318 		(*txrx_set_filter_neighbour_peers)(
319 				struct cdp_pdev *pdev,
320 				uint32_t val);
321 	int
322 		(*txrx_update_filter_neighbour_peers)(
323 				struct cdp_pdev *pdev,
324 				uint32_t cmd, uint8_t *macaddr);
325 	/**
326 	 * @brief set the safemode of the device
327 	 * @details
328 	 * This flag is used to bypass the encrypt and decrypt processes when
329 	 * send and receive packets. It works like open AUTH mode, HW will
330 	 * ctreate all packets as non-encrypt frames because no key installed.
331 	 * For rx fragmented frames,it bypasses all the rx defragmentaion.
332 	 *
333 	 * @param vdev - the data virtual device object
334 	 * @param val - the safemode state
335 	 * @return - void
336 	 */
337 
338 	void
339 		(*txrx_set_safemode)(
340 				struct cdp_vdev *vdev,
341 				u_int32_t val);
342 	/**
343 	 * @brief configure the drop unencrypted frame flag
344 	 * @details
345 	 * Rx related. When set this flag, all the unencrypted frames
346 	 * received over a secure connection will be discarded
347 	 *
348 	 * @param vdev - the data virtual device object
349 	 * @param val - flag
350 	 * @return - void
351 	 */
352 	void
353 		(*txrx_set_drop_unenc)(
354 				struct cdp_vdev *vdev,
355 				u_int32_t val);
356 
357 
358 	/**
359 	 * @brief set the Tx encapsulation type of the VDEV
360 	 * @details
361 	 * This will be used to populate the HTT desc packet type field
362 	 * during Tx
363 	 * @param vdev - the data virtual device object
364 	 * @param val - the Tx encap type
365 	 * @return - void
366 	 */
367 	void
368 		(*txrx_set_tx_encap_type)(
369 				struct cdp_vdev *vdev,
370 				enum htt_cmn_pkt_type val);
371 	/**
372 	 * @brief set the Rx decapsulation type of the VDEV
373 	 * @details
374 	 * This will be used to configure into firmware and hardware
375 	 * which format to decap all Rx packets into, for all peers under
376 	 * the VDEV.
377 	 * @param vdev - the data virtual device object
378 	 * @param val - the Rx decap mode
379 	 * @return - void
380 	 */
381 	void
382 		(*txrx_set_vdev_rx_decap_type)(
383 				struct cdp_vdev *vdev,
384 				enum htt_cmn_pkt_type val);
385 
386 	/**
387 	 * @brief get the Rx decapsulation type of the VDEV
388 	 *
389 	 * @param vdev - the data virtual device object
390 	 * @return - the Rx decap type
391 	 */
392 	enum htt_cmn_pkt_type
393 		(*txrx_get_vdev_rx_decap_type)(struct cdp_vdev *vdev);
394 
395 	/* Is this similar to ol_txrx_peer_state_update() in MCL */
396 	/**
397 	 * @brief Update the authorize peer object at association time
398 	 * @details
399 	 * For the host-based implementation of rate-control, it
400 	 * updates the peer/node-related parameters within rate-control
401 	 * context of the peer at association.
402 	 *
403 	 * @param peer - pointer to the node's object
404 	 * @authorize - either to authorize or unauthorize peer
405 	 *
406 	 * @return none
407 	 */
408 	void
409 		(*txrx_peer_authorize)(struct cdp_peer *peer,
410 				u_int32_t authorize);
411 
412 	bool
413 		(*txrx_set_inact_params)(struct cdp_pdev *pdev,
414 				u_int16_t inact_check_interval,
415 				u_int16_t inact_normal,
416 				u_int16_t inact_overload);
417 	bool
418 		(*txrx_start_inact_timer)(
419 				struct cdp_pdev *pdev,
420 				bool enable);
421 
422 
423 	/**
424 	 * @brief Set the overload status of the radio
425 	 * @details
426 	 *  Set the overload status of the radio, updating the inactivity
427 	 *  threshold and inactivity count for each node.
428 	 *
429 	 * @param pdev - the data physical device object
430 	 * @param overload - whether the radio is overloaded or not
431 	 */
432 	void (*txrx_set_overload)(
433 			struct cdp_pdev *pdev,
434 			bool overload);
435 	/**
436 	 * @brief Check the inactivity status of the peer/node
437 	 *
438 	 * @param peer - pointer to the node's object
439 	 * @return true if the node is inactive; otherwise return false
440 	 */
441 	bool
442 		(*txrx_peer_is_inact)(void *peer);
443 
444 	/**
445 	 * @brief Mark inactivity status of the peer/node
446 	 * @details
447 	 *  If it becomes active, reset inactivity count to reload value;
448 	 *  if the inactivity status changed, notify umac band steering.
449 	 *
450 	 * @param peer - pointer to the node's object
451 	 * @param inactive - whether the node is inactive or not
452 	 */
453 	void (*txrx_mark_peer_inact)(
454 			void *peer,
455 			bool inactive);
456 
457 
458 	/* Should be ol_txrx_ctrl_api.h */
459 	void (*txrx_set_mesh_mode)(struct cdp_vdev *vdev, u_int32_t val);
460 
461 	/**
462 	 * @brief setting mesh rx filter
463 	 * @details
464 	 *  based on the bits enabled in the filter packets has to be dropped.
465 	 *
466 	 * @param vdev - the data virtual device object
467 	 * @param val - value to set
468 	 */
469 	void (*txrx_set_mesh_rx_filter)(struct cdp_vdev *vdev, uint32_t val);
470 
471 	void (*tx_flush_buffers)(struct cdp_vdev *vdev);
472 
473 	int (*txrx_is_target_ar900b)(struct cdp_vdev *vdev);
474 
475 	void (*txrx_set_vdev_param)(struct cdp_vdev *vdev,
476 			enum cdp_vdev_param_type param, uint32_t val);
477 
478 	void (*txrx_peer_set_nawds)(struct cdp_peer *peer, uint8_t value);
479 	/**
480 	 * @brief Set the reo dest ring num of the radio
481 	 * @details
482 	 *  Set the reo destination ring no on which we will receive
483 	 *  pkts for this radio.
484 	 *
485 	 * @param pdev - the data physical device object
486 	 * @param reo_dest_ring_num - value ranges between 1 - 4
487 	 */
488 	void (*txrx_set_pdev_reo_dest)(
489 			struct cdp_pdev *pdev,
490 			enum cdp_host_reo_dest_ring reo_dest_ring_num);
491 
492 	/**
493 	 * @brief Get the reo dest ring num of the radio
494 	 * @details
495 	 *  Get the reo destination ring no on which we will receive
496 	 *  pkts for this radio.
497 	 *
498 	 * @param pdev - the data physical device object
499 	 * @return the reo destination ring number
500 	 */
501 	enum cdp_host_reo_dest_ring (*txrx_get_pdev_reo_dest)(
502 						struct cdp_pdev *pdev);
503 
504 	int (*txrx_wdi_event_sub)(struct cdp_pdev *pdev, void *event_cb_sub,
505 			uint32_t event);
506 
507 	int (*txrx_wdi_event_unsub)(struct cdp_pdev *pdev, void *event_cb_sub,
508 			uint32_t event);
509 	int (*txrx_get_sec_type)(struct cdp_peer *peer, uint8_t sec_idx);
510 
511 	void (*txrx_update_mgmt_txpow_vdev)(struct cdp_vdev *vdev,
512 			uint8_t subtype, uint8_t tx_power);
513 
514 	void (*txrx_set_pdev_param)(struct cdp_pdev *pdev,
515 			enum cdp_pdev_param_type type, uint8_t val);
516 	void * (*txrx_get_pldev)(struct cdp_pdev *pdev);
517 
518 #ifdef ATH_SUPPORT_NAC_RSSI
519 	QDF_STATUS (*txrx_vdev_config_for_nac_rssi)(struct cdp_vdev *vdev,
520 		enum cdp_nac_param_cmd cmd, char *bssid, char *client_macaddr,
521 		uint8_t chan_num);
522 #endif
523 };
524 
525 struct cdp_me_ops {
526 
527 	u_int16_t (*tx_desc_alloc_and_mark_for_mcast_clone)
528 		(struct cdp_pdev *pdev, u_int16_t buf_count);
529 
530 		u_int16_t (*tx_desc_free_and_unmark_for_mcast_clone)(
531 				struct cdp_pdev *pdev,
532 				u_int16_t buf_count);
533 
534 	u_int16_t
535 		(*tx_get_mcast_buf_allocated_marked)
536 			(struct cdp_pdev *pdev);
537 	void
538 		(*tx_me_alloc_descriptor)(struct cdp_pdev *pdev);
539 
540 	void
541 		(*tx_me_free_descriptor)(struct cdp_pdev *pdev);
542 
543 	uint16_t
544 		(*tx_me_convert_ucast)(struct cdp_vdev *vdev,
545 			qdf_nbuf_t wbuf, u_int8_t newmac[][6],
546 			uint8_t newmaccnt);
547 	/* Should be a function pointer in ol_txrx_osif_ops{} */
548 	/**
549 	 * @brief notify mcast frame indication from FW.
550 	 * @details
551 	 *     This notification will be used to convert
552 	 *     multicast frame to unicast.
553 	 *
554 	 * @param pdev - handle to the ctrl SW's physical device object
555 	 * @param vdev_id - ID of the virtual device received the special data
556 	 * @param msdu - the multicast msdu returned by FW for host inspect
557 	 */
558 
559 	int (*mcast_notify)(struct cdp_pdev *pdev,
560 			u_int8_t vdev_id, qdf_nbuf_t msdu);
561 };
562 
563 struct cdp_mon_ops {
564 
565 	void (*txrx_monitor_set_filter_ucast_data)
566 		(struct cdp_pdev *, u_int8_t val);
567 	void (*txrx_monitor_set_filter_mcast_data)
568 		(struct cdp_pdev *, u_int8_t val);
569 	void (*txrx_monitor_set_filter_non_data)
570 		(struct cdp_pdev *, u_int8_t val);
571 
572 	bool (*txrx_monitor_get_filter_ucast_data)
573 		(struct cdp_vdev *vdev_txrx_handle);
574 	bool (*txrx_monitor_get_filter_mcast_data)
575 		(struct cdp_vdev *vdev_txrx_handle);
576 	bool (*txrx_monitor_get_filter_non_data)
577 		(struct cdp_vdev *vdev_txrx_handle);
578 	int (*txrx_reset_monitor_mode)(struct cdp_pdev *pdev);
579 
580 	/* HK advance monitor filter support */
581 	int (*txrx_set_advance_monitor_filter)
582 		(struct cdp_pdev *pdev, struct cdp_monitor_filter *filter_val);
583 };
584 
585 struct cdp_host_stats_ops {
586 	int (*txrx_host_stats_get)(struct cdp_vdev *vdev,
587 			struct ol_txrx_stats_req *req);
588 
589 	void (*txrx_host_stats_clr)(struct cdp_vdev *vdev);
590 
591 	void (*txrx_host_ce_stats)(struct cdp_vdev *vdev);
592 
593 	int (*txrx_stats_publish)(struct cdp_pdev *pdev,
594 			void *buf);
595 	/**
596 	 * @brief Enable enhanced stats functionality.
597 	 *
598 	 * @param pdev - the physical device object
599 	 * @return - void
600 	 */
601 	void (*txrx_enable_enhanced_stats)(struct cdp_pdev *pdev);
602 
603 	/**
604 	 * @brief Disable enhanced stats functionality.
605 	 *
606 	 * @param pdev - the physical device object
607 	 * @return - void
608 	 */
609 	void (*txrx_disable_enhanced_stats)(struct cdp_pdev *pdev);
610 
611 	/**
612 	 * @brief Get the desired stats from the message.
613 	 *
614 	 * @param pdev - the physical device object
615 	 * @param stats_base - stats buffer received from FW
616 	 * @param type - stats type.
617 	 * @return - pointer to requested stat identified by type
618 	 */
619 	uint32_t * (*txrx_get_stats_base)(struct cdp_pdev *pdev,
620 			uint32_t *stats_base, uint32_t msg_len, uint8_t type);
621 	void
622 		(*tx_print_tso_stats)(struct cdp_vdev *vdev);
623 
624 	void
625 		(*tx_rst_tso_stats)(struct cdp_vdev *vdev);
626 
627 	void
628 		(*tx_print_sg_stats)(struct cdp_vdev *vdev);
629 
630 	void
631 		(*tx_rst_sg_stats)(struct cdp_vdev *vdev);
632 
633 	void
634 		(*print_rx_cksum_stats)(struct cdp_vdev *vdev);
635 
636 	void
637 		(*rst_rx_cksum_stats)(struct cdp_vdev *vdev);
638 
639 	A_STATUS
640 		(*txrx_host_me_stats)(struct cdp_vdev *vdev);
641 	void
642 		(*txrx_per_peer_stats)(struct cdp_pdev *pdev, char *addr);
643 	int (*txrx_host_msdu_ttl_stats)(struct cdp_vdev *vdev,
644 			struct ol_txrx_stats_req *req);
645 
646 	void
647 		(*print_lro_stats)(struct cdp_vdev *vdev);
648 
649 	void
650 		(*reset_lro_stats)(struct cdp_vdev *vdev);
651 
652 	void
653 		(*get_fw_peer_stats)(struct cdp_pdev *pdev, uint8_t *addr,
654 				uint32_t cap);
655 	void
656 		(*get_htt_stats)(struct cdp_pdev *pdev, void *data,
657 				uint32_t data_len);
658 };
659 
660 struct cdp_wds_ops {
661 	void
662 		(*txrx_set_wds_rx_policy)(struct cdp_vdev *vdev,
663 				u_int32_t val);
664 	void
665 		(*txrx_wds_peer_tx_policy_update)(struct cdp_peer *peer,
666 				int wds_tx_ucast, int wds_tx_mcast);
667 	int (*vdev_set_wds)(void *vdev, uint32_t val);
668 };
669 
670 struct cdp_raw_ops {
671 	int (*txrx_get_nwifi_mode)(struct cdp_vdev *vdev);
672 
673 	void (*rsim_get_astentry)(struct cdp_vdev *vdev,
674 				qdf_nbuf_t *pnbuf,
675 				struct cdp_raw_ast *raw_ast);
676 };
677 
678 #ifdef CONFIG_WIN
679 struct cdp_pflow_ops {
680 	uint32_t(*pflow_update_pdev_params)(void *,
681 			enum _ol_ath_param_t, uint32_t, void *);
682 };
683 #endif /* CONFIG_WIN */
684 
685 #define LRO_IPV4_SEED_ARR_SZ 5
686 #define LRO_IPV6_SEED_ARR_SZ 11
687 
688 /**
689  * struct cdp_lro_hash_config - set rx_offld(LRO/GRO) init parameters
690  * @lro_enable: indicates whether rx_offld is enabled
691  * @tcp_flag: If the TCP flags from the packet do not match
692  * the values in this field after masking with TCP flags mask
693  * below, packet is not rx_offld eligible
694  * @tcp_flag_mask: field for comparing the TCP values provided
695  * above with the TCP flags field in the received packet
696  * @toeplitz_hash_ipv4: contains seed needed to compute the flow id
697  * 5-tuple toeplitz hash for ipv4 packets
698  * @toeplitz_hash_ipv6: contains seed needed to compute the flow id
699  * 5-tuple toeplitz hash for ipv6 packets
700  */
701 struct cdp_lro_hash_config {
702 	uint32_t lro_enable;
703 	uint32_t tcp_flag:9,
704 		tcp_flag_mask:9;
705 	uint32_t toeplitz_hash_ipv4[LRO_IPV4_SEED_ARR_SZ];
706 	uint32_t toeplitz_hash_ipv6[LRO_IPV6_SEED_ARR_SZ];
707 };
708 
709 struct ol_if_ops {
710 	void (*peer_set_default_routing)(void *scn_handle,
711 			uint8_t *peer_macaddr, uint8_t vdev_id,
712 			bool hash_based, uint8_t ring_num);
713 	int (*peer_rx_reorder_queue_setup)(void *scn_handle,
714 			uint8_t vdev_id, uint8_t *peer_mac,
715 			qdf_dma_addr_t hw_qdesc, int tid, uint16_t queue_num);
716 	int (*peer_rx_reorder_queue_remove)(void *scn_handle,
717 			uint8_t vdev_id, uint8_t *peer_macaddr,
718 			uint32_t tid_mask);
719 	int (*peer_unref_delete)(void *scn_handle, uint8_t vdev_id,
720 			uint8_t *peer_macaddr);
721 	bool (*is_hw_dbs_2x2_capable)(struct wlan_objmgr_psoc *psoc);
722 	int (*peer_add_wds_entry)(void *ol_soc_handle,
723 			const uint8_t *dest_macaddr, uint8_t *peer_macaddr,
724 			uint32_t flags);
725 	int (*peer_update_wds_entry)(void *ol_soc_handle,
726 			uint8_t *dest_macaddr, uint8_t *peer_macaddr,
727 			uint32_t flags);
728 	void (*peer_del_wds_entry)(void *ol_soc_handle,
729 			uint8_t *wds_macaddr);
730 	QDF_STATUS (*lro_hash_config)(void *scn_handle,
731 			struct cdp_lro_hash_config *rx_offld_hash);
732 	void (*update_dp_stats)(void *soc, void *stats, uint16_t id,
733 			uint8_t type);
734 	uint8_t (*rx_invalid_peer)(void *osif_pdev, void *msg);
735 
736 	int  (*peer_map_event)(void *ol_soc_handle, uint16_t peer_id, uint16_t hw_peer_id,
737 			uint8_t vdev_id, uint8_t *peer_mac_addr,
738 			enum cdp_txrx_ast_entry_type peer_type);
739 	int (*peer_unmap_event)(void *ol_soc_handle, uint16_t peer_id);
740 
741 	int (*get_dp_cfg_param)(void *ol_soc_handle, enum cdp_cfg_param_type param_num);
742 
743 	void (*rx_mic_error)(void *ol_soc_handle,
744 			 uint16_t vdev_id, void *wh);
745 	uint8_t (*freq_to_channel)(void *ol_soc_handle,  uint16_t vdev_id);
746 
747 	void (*record_act_change)(struct wlan_objmgr_pdev *pdev,
748 				  u_int8_t *dstmac, bool active);
749 #ifdef ATH_SUPPORT_NAC_RSSI
750 	int (*config_fw_for_nac_rssi)(struct wlan_objmgr_pdev *pdev,
751 		u_int8_t vdev_id, enum cdp_nac_param_cmd cmd, char *bssid,
752 		char *client_macaddr, uint8_t chan_num);
753 	int (*config_bssid_in_fw_for_nac_rssi)(struct wlan_objmgr_pdev *pdev,
754 		u_int8_t vdev_id, enum cdp_nac_param_cmd cmd, char *bssid);
755 #endif
756 	int (*peer_sta_kickout)(void *osif_pdev, uint8_t *peer_macaddr);
757 
758 	/* TODO: Add any other control path calls required to OL_IF/WMA layer */
759 };
760 
761 #ifndef CONFIG_WIN
762 /* From here MCL specific OPs */
763 /**
764  * struct cdp_misc_ops - mcl ops not classified
765  * @set_ibss_vdev_heart_beat_timer:
766  * @bad_peer_txctl_set_setting:
767  * @bad_peer_txctl_update_threshold:
768  * @hl_tdls_flag_reset:
769  * @tx_non_std:
770  * @get_vdev_id:
771  * @set_wisa_mode:
772  * @txrx_data_stall_cb_register:
773  * @txrx_data_stall_cb_deregister:
774  * @txrx_post_data_stall_event
775  * @runtime_suspend:
776  * @runtime_resume:
777  */
778 struct cdp_misc_ops {
779 	uint16_t (*set_ibss_vdev_heart_beat_timer)(struct cdp_vdev *vdev,
780 			uint16_t timer_value_sec);
781 	void (*set_wmm_param)(struct cdp_pdev *cfg_pdev,
782 			struct ol_tx_wmm_param_t wmm_param);
783 	void (*bad_peer_txctl_set_setting)(struct cdp_pdev *pdev, int enable,
784 			int period, int txq_limit);
785 	void (*bad_peer_txctl_update_threshold)(struct cdp_pdev *pdev,
786 		int level, int tput_thresh, int tx_limit);
787 	void (*hl_tdls_flag_reset)(struct cdp_vdev *vdev, bool flag);
788 	qdf_nbuf_t (*tx_non_std)(struct cdp_vdev *vdev,
789 		enum ol_tx_spec tx_spec, qdf_nbuf_t msdu_list);
790 	uint16_t (*get_vdev_id)(struct cdp_vdev *vdev);
791 	uint32_t (*get_tx_ack_stats)(uint8_t vdev_id);
792 	QDF_STATUS (*set_wisa_mode)(struct cdp_vdev *vdev, bool enable);
793 	QDF_STATUS (*txrx_data_stall_cb_register)(data_stall_detect_cb cb);
794 	QDF_STATUS (*txrx_data_stall_cb_deregister)(data_stall_detect_cb cb);
795 	void (*txrx_post_data_stall_event)(
796 			enum data_stall_log_event_indicator indicator,
797 			enum data_stall_log_event_type data_stall_type,
798 			uint32_t pdev_id, uint32_t vdev_id_bitmap,
799 			enum data_stall_log_recovery_type recovery_type);
800 	QDF_STATUS (*runtime_suspend)(struct cdp_pdev *pdev);
801 	QDF_STATUS (*runtime_resume)(struct cdp_pdev *pdev);
802 	int (*get_opmode)(struct cdp_vdev *vdev);
803 	void (*mark_first_wakeup_packet)(uint8_t value);
804 	void (*update_mac_id)(uint8_t vdev_id, uint8_t mac_id);
805 	void (*flush_rx_frames)(void *peer, bool drop);
806 	A_STATUS (*get_intra_bss_fwd_pkts_count)(uint8_t vdev_id,
807 		uint64_t *fwd_tx_packets, uint64_t *fwd_rx_packets);
808 	void (*pkt_log_init)(struct cdp_pdev *handle, void *scn);
809 	void (*pkt_log_con_service)(struct cdp_pdev *pdev, void *scn);
810 };
811 
812 /**
813  * struct cdp_tx_delay_ops - mcl tx delay ops
814  * @tx_delay:
815  * @tx_delay_hist:
816  * @tx_packet_count:
817  * @tx_set_compute_interval:
818  */
819 struct cdp_tx_delay_ops {
820 	void (*tx_delay)(struct cdp_pdev *pdev, uint32_t *queue_delay_microsec,
821 		uint32_t *tx_delay_microsec, int category);
822 	void (*tx_delay_hist)(struct cdp_pdev *pdev,
823 		uint16_t *bin_values, int category);
824 	void (*tx_packet_count)(struct cdp_pdev *pdev,
825 		uint16_t *out_packet_count,
826 		uint16_t *out_packet_loss_count, int category);
827 	void (*tx_set_compute_interval)(struct cdp_pdev *pdev,
828 		uint32_t interval);
829 };
830 
831 /**
832  * struct cdp_pmf_ops - mcl protected management frame ops
833  * @get_pn_info:
834  */
835 struct cdp_pmf_ops {
836 	void (*get_pn_info)(void *peer, uint8_t **last_pn_valid,
837 			uint64_t **last_pn, uint32_t **rmf_pn_replays);
838 };
839 
840 /**
841  * struct cdp_cfg_ops - mcl configuration ops
842  * @set_cfg_rx_fwd_disabled:
843  * @set_cfg_packet_log_enabled:
844  * @cfg_attach:
845  * @vdev_rx_set_intrabss_fwd:
846  * @get_opmode:
847  * @is_rx_fwd_disabled:
848  * @tx_set_is_mgmt_over_wmi_enabled:
849  * @is_high_latency:
850  * @set_flow_control_parameters:
851  */
852 struct cdp_cfg_ops {
853 	void (*set_cfg_rx_fwd_disabled)(struct cdp_cfg *cfg_pdev,
854 		uint8_t disable_rx_fwd);
855 	void (*set_cfg_packet_log_enabled)(struct cdp_cfg *cfg_pdev,
856 		uint8_t val);
857 	struct cdp_cfg * (*cfg_attach)(qdf_device_t osdev, void *cfg_param);
858 	void (*vdev_rx_set_intrabss_fwd)(struct cdp_vdev *vdev, bool val);
859 	uint8_t (*is_rx_fwd_disabled)(struct cdp_vdev *vdev);
860 	void (*tx_set_is_mgmt_over_wmi_enabled)(uint8_t value);
861 	int (*is_high_latency)(struct cdp_cfg *cfg_pdev);
862 	void (*set_flow_control_parameters)(struct cdp_cfg *cfg_pdev,
863 		void *param);
864 	void (*set_flow_steering)(struct cdp_cfg *cfg_pdev, uint8_t val);
865 	void (*set_ptp_rx_opt_enabled)(struct cdp_cfg *cfg_pdev, uint8_t val);
866 };
867 
868 /**
869  * struct cdp_flowctl_ops - mcl flow control
870  * @register_pause_cb:
871  * @set_desc_global_pool_size:
872  * @dump_flow_pool_info:
873  */
874 struct cdp_flowctl_ops {
875 	QDF_STATUS (*flow_pool_map_handler)(struct cdp_soc_t *soc,
876 					    struct cdp_pdev *pdev,
877 					    uint8_t vdev_id);
878 	void (*flow_pool_unmap_handler)(struct cdp_soc_t *soc,
879 					struct cdp_pdev *pdev,
880 					uint8_t vdev_id);
881 	QDF_STATUS (*register_pause_cb)(struct cdp_soc_t *soc,
882 					tx_pause_callback);
883 	void (*set_desc_global_pool_size)(uint32_t num_msdu_desc);
884 
885 	void (*dump_flow_pool_info)(void *);
886 };
887 
888 /**
889  * struct cdp_lflowctl_ops - mcl legacy flow control ops
890  * @register_tx_flow_control:
891  * @deregister_tx_flow_control_cb:
892  * @flow_control_cb:
893  * @get_tx_resource:
894  * @ll_set_tx_pause_q_depth:
895  * @vdev_flush:
896  * @vdev_pause:
897  * @vdev_unpause:
898  */
899 struct cdp_lflowctl_ops {
900 	int (*register_tx_flow_control)(uint8_t vdev_id,
901 		ol_txrx_tx_flow_control_fp flowControl, void *osif_fc_ctx,
902 		ol_txrx_tx_flow_control_is_pause_fp flow_control_is_pause);
903 	int (*deregister_tx_flow_control_cb)(uint8_t vdev_id);
904 	void (*flow_control_cb)(struct cdp_vdev *vdev, bool tx_resume);
905 	bool (*get_tx_resource)(uint8_t sta_id,
906 			 unsigned int low_watermark,
907 			 unsigned int high_watermark_offset);
908 	int (*ll_set_tx_pause_q_depth)(uint8_t vdev_id, int pause_q_depth);
909 	void (*vdev_flush)(struct cdp_vdev *vdev);
910 	void (*vdev_pause)(struct cdp_vdev *vdev, uint32_t reason);
911 	void (*vdev_unpause)(struct cdp_vdev *vdev, uint32_t reason);
912 };
913 
914 #ifdef IPA_OFFLOAD
915 /**
916  * struct cdp_ipa_ops - mcl ipa data path ops
917  * @ipa_get_resource:
918  * @ipa_set_doorbell_paddr:
919  * @ipa_set_active:
920  * @ipa_op_response:
921  * @ipa_register_op_cb:
922  * @ipa_get_stat:
923  * @ipa_tx_data_frame:
924  */
925 struct cdp_ipa_ops {
926 	QDF_STATUS (*ipa_get_resource)(struct cdp_pdev *pdev);
927 	QDF_STATUS (*ipa_set_doorbell_paddr)(struct cdp_pdev *pdev);
928 	QDF_STATUS (*ipa_set_active)(struct cdp_pdev *pdev, bool uc_active,
929 		bool is_tx);
930 	QDF_STATUS (*ipa_op_response)(struct cdp_pdev *pdev, uint8_t *op_msg);
931 	QDF_STATUS (*ipa_register_op_cb)(struct cdp_pdev *pdev,
932 		void (*ipa_uc_op_cb_type)(uint8_t *op_msg, void *osif_ctxt),
933 		void *usr_ctxt);
934 	QDF_STATUS (*ipa_get_stat)(struct cdp_pdev *pdev);
935 	qdf_nbuf_t (*ipa_tx_data_frame)(struct cdp_vdev *vdev, qdf_nbuf_t skb);
936 	void (*ipa_set_uc_tx_partition_base)(struct cdp_cfg *pdev,
937 		uint32_t value);
938 #ifdef FEATURE_METERING
939 	QDF_STATUS (*ipa_uc_get_share_stats)(struct cdp_pdev *pdev,
940 		uint8_t reset_stats);
941 	QDF_STATUS (*ipa_uc_set_quota)(struct cdp_pdev *pdev,
942 		uint64_t quota_bytes);
943 #endif
944 	QDF_STATUS (*ipa_enable_autonomy)(struct cdp_pdev *pdev);
945 	QDF_STATUS (*ipa_disable_autonomy)(struct cdp_pdev *pdev);
946 #ifdef CONFIG_IPA_WDI_UNIFIED_API
947 	QDF_STATUS (*ipa_setup)(struct cdp_pdev *pdev, void *ipa_i2w_cb,
948 		void *ipa_w2i_cb, void *ipa_wdi_meter_notifier_cb,
949 		uint32_t ipa_desc_size, void *ipa_priv, bool is_rm_enabled,
950 		uint32_t *tx_pipe_handle, uint32_t *rx_pipe_handle,
951 		bool is_smmu_enabled, qdf_ipa_sys_connect_params_t *sys_in);
952 #else /* CONFIG_IPA_WDI_UNIFIED_API */
953 	QDF_STATUS (*ipa_setup)(struct cdp_pdev *pdev, void *ipa_i2w_cb,
954 		void *ipa_w2i_cb, void *ipa_wdi_meter_notifier_cb,
955 		uint32_t ipa_desc_size, void *ipa_priv, bool is_rm_enabled,
956 		uint32_t *tx_pipe_handle, uint32_t *rx_pipe_handle);
957 #endif /* CONFIG_IPA_WDI_UNIFIED_API */
958 	QDF_STATUS (*ipa_cleanup)(uint32_t tx_pipe_handle,
959 		uint32_t rx_pipe_handle);
960 	QDF_STATUS (*ipa_setup_iface)(char *ifname, uint8_t *mac_addr,
961 		qdf_ipa_client_type_t prod_client,
962 		qdf_ipa_client_type_t cons_client,
963 		uint8_t session_id, bool is_ipv6_enabled);
964 	QDF_STATUS (*ipa_cleanup_iface)(char *ifname, bool is_ipv6_enabled);
965 	QDF_STATUS (*ipa_enable_pipes)(struct cdp_pdev *pdev);
966 	QDF_STATUS (*ipa_disable_pipes)(struct cdp_pdev *pdev);
967 	QDF_STATUS (*ipa_set_perf_level)(int client,
968 		uint32_t max_supported_bw_mbps);
969 };
970 #endif
971 
972 /**
973  * struct cdp_bus_ops - mcl bus suspend/resume ops
974  * @bus_suspend:
975  * @bus_resume:
976  */
977 struct cdp_bus_ops {
978 	QDF_STATUS (*bus_suspend)(struct cdp_pdev *opaque_pdev);
979 	QDF_STATUS (*bus_resume)(struct cdp_pdev *opaque_pdev);
980 };
981 
982 /**
983  * struct cdp_ocb_ops - mcl ocb ops
984  * @set_ocb_chan_info:
985  * @get_ocb_chan_info:
986  */
987 struct cdp_ocb_ops {
988 	void (*set_ocb_chan_info)(struct cdp_vdev *vdev,
989 			struct ol_txrx_ocb_set_chan ocb_set_chan);
990 	struct ol_txrx_ocb_chan_info *
991 		(*get_ocb_chan_info)(struct cdp_vdev *vdev);
992 };
993 
994 /**
995  * struct cdp_peer_ops - mcl peer related ops
996  * @register_peer:
997  * @clear_peer:
998  * @cfg_attach:
999  * @find_peer_by_addr:
1000  * @find_peer_by_addr_and_vdev:
1001  * @local_peer_id:
1002  * @peer_find_by_local_id:
1003  * @peer_state_update:
1004  * @get_vdevid:
1005  * @get_vdev_by_sta_id:
1006  * @register_ocb_peer:
1007  * @peer_get_peer_mac_addr:
1008  * @get_peer_state:
1009  * @get_vdev_for_peer:
1010  * @update_ibss_add_peer_num_of_vdev:
1011  * @remove_peers_for_vdev:
1012  * @remove_peers_for_vdev_no_lock:
1013  * @copy_mac_addr_raw:
1014  * @add_last_real_peer:
1015  * @last_assoc_received:
1016  * @last_disassoc_received:
1017  * @last_deauth_received:
1018  * @is_vdev_restore_last_peer:
1019  * @update_last_real_peer:
1020  */
1021 struct cdp_peer_ops {
1022 	QDF_STATUS (*register_peer)(struct cdp_pdev *pdev,
1023 			struct ol_txrx_desc_type *sta_desc);
1024 	QDF_STATUS (*clear_peer)(struct cdp_pdev *pdev, uint8_t sta_id);
1025 	QDF_STATUS (*change_peer_state)(uint8_t sta_id,
1026 			enum ol_txrx_peer_state sta_state,
1027 			bool roam_synch_in_progress);
1028 	void * (*peer_get_ref_by_addr)(struct cdp_pdev *pdev,
1029 				       u8 *peer_addr, uint8_t *peer_id,
1030 				       enum peer_debug_id_type debug_id);
1031 	void (*peer_release_ref)(void *peer, enum peer_debug_id_type debug_id);
1032 	void * (*find_peer_by_addr)(struct cdp_pdev *pdev,
1033 			uint8_t *peer_addr, uint8_t *peer_id);
1034 	void * (*find_peer_by_addr_and_vdev)(struct cdp_pdev *pdev,
1035 			struct cdp_vdev *vdev,
1036 			uint8_t *peer_addr, uint8_t *peer_id);
1037 	uint16_t (*local_peer_id)(void *peer);
1038 	void * (*peer_find_by_local_id)(struct cdp_pdev *pdev,
1039 			uint8_t local_peer_id);
1040 	QDF_STATUS (*peer_state_update)(struct cdp_pdev *pdev,
1041 			uint8_t *peer_addr,
1042 			enum ol_txrx_peer_state state);
1043 	QDF_STATUS (*get_vdevid)(void *peer, uint8_t *vdev_id);
1044 	struct cdp_vdev * (*get_vdev_by_sta_id)(struct cdp_pdev *pdev,
1045 			uint8_t sta_id);
1046 	QDF_STATUS (*register_ocb_peer)(uint8_t *mac_addr, uint8_t *peer_id);
1047 	uint8_t * (*peer_get_peer_mac_addr)(void *peer);
1048 	int (*get_peer_state)(void *peer);
1049 	struct cdp_vdev * (*get_vdev_for_peer)(void *peer);
1050 	int16_t (*update_ibss_add_peer_num_of_vdev)(struct cdp_vdev *vdev,
1051 			int16_t peer_num_delta);
1052 	void (*remove_peers_for_vdev)(struct cdp_vdev *vdev,
1053 			ol_txrx_vdev_peer_remove_cb callback,
1054 			void *callback_context, bool remove_last_peer);
1055 	void (*remove_peers_for_vdev_no_lock)(struct cdp_vdev *vdev,
1056 			ol_txrx_vdev_peer_remove_cb callback,
1057 			void *callback_context);
1058 	void (*copy_mac_addr_raw)(struct cdp_vdev *vdev, uint8_t *bss_addr);
1059 	void (*add_last_real_peer)(struct cdp_pdev *pdev,
1060 		struct cdp_vdev *vdev, uint8_t *peer_id);
1061 	qdf_time_t * (*last_assoc_received)(void *peer);
1062 	qdf_time_t * (*last_disassoc_received)(void *peer);
1063 	qdf_time_t * (*last_deauth_received)(void *peer);
1064 	bool (*is_vdev_restore_last_peer)(void *peer);
1065 	void (*update_last_real_peer)(struct cdp_pdev *pdev, void *peer,
1066 			uint8_t *peer_id, bool restore_last_peer);
1067 	void (*peer_detach_force_delete)(void *peer);
1068 };
1069 
1070 /**
1071  * struct cdp_ocb_ops - mcl ocb ops
1072  * @throttle_init_period:
1073  * @throttle_set_level:
1074  */
1075 struct cdp_throttle_ops {
1076 	void (*throttle_init_period)(struct cdp_pdev *pdev, int period,
1077 			uint8_t *dutycycle_level);
1078 	void (*throttle_set_level)(struct cdp_pdev *pdev, int level);
1079 };
1080 
1081 /**
1082  * struct cdp_ocb_ops - mcl ocb ops
1083  * @clear_stats:
1084  * @stats:
1085  */
1086 struct cdp_mob_stats_ops {
1087 	void (*clear_stats)(uint16_t bitmap);
1088 	int (*stats)(uint8_t vdev_id, char *buffer, unsigned buf_len);
1089 };
1090 #endif /* CONFIG_WIN */
1091 
1092 #ifdef RECEIVE_OFFLOAD
1093 /**
1094  * struct cdp_rx_offld_ops - mcl receive offload ops
1095  * @register_rx_offld_flush_cb:
1096  * @deregister_rx_offld_flush_cb:
1097  */
1098 struct cdp_rx_offld_ops {
1099 	void (*register_rx_offld_flush_cb)(void (rx_offld_flush_cb)(void *));
1100 	void (*deregister_rx_offld_flush_cb)(void);
1101 };
1102 #endif
1103 
1104 struct cdp_ops {
1105 	struct cdp_cmn_ops          *cmn_drv_ops;
1106 	struct cdp_ctrl_ops         *ctrl_ops;
1107 	struct cdp_me_ops           *me_ops;
1108 	struct cdp_mon_ops          *mon_ops;
1109 	struct cdp_host_stats_ops   *host_stats_ops;
1110 	struct cdp_wds_ops          *wds_ops;
1111 	struct cdp_raw_ops          *raw_ops;
1112 	struct cdp_pflow_ops        *pflow_ops;
1113 #ifndef CONFIG_WIN
1114 	struct cdp_misc_ops         *misc_ops;
1115 	struct cdp_cfg_ops          *cfg_ops;
1116 	struct cdp_flowctl_ops      *flowctl_ops;
1117 	struct cdp_lflowctl_ops     *l_flowctl_ops;
1118 #ifdef IPA_OFFLOAD
1119 	struct cdp_ipa_ops          *ipa_ops;
1120 #endif
1121 #ifdef RECEIVE_OFFLOAD
1122 	struct cdp_rx_offld_ops     *rx_offld_ops;
1123 #endif
1124 	struct cdp_bus_ops          *bus_ops;
1125 	struct cdp_ocb_ops          *ocb_ops;
1126 	struct cdp_peer_ops         *peer_ops;
1127 	struct cdp_throttle_ops     *throttle_ops;
1128 	struct cdp_mob_stats_ops    *mob_stats_ops;
1129 	struct cdp_tx_delay_ops     *delay_ops;
1130 	struct cdp_pmf_ops          *pmf_ops;
1131 #endif /* CONFIG_WIN */
1132 };
1133 #endif
1134