xref: /wlan-dirver/qca-wifi-host-cmn/umac/global_umac_dispatcher/lmac_if/inc/wlan_lmac_if_def.h (revision 45a38684b07295822dc8eba39e293408f203eec8)
1 /*
2  * Copyright (c) 2016-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 #ifndef _WLAN_LMAC_IF_DEF_H_
21 #define _WLAN_LMAC_IF_DEF_H_
22 
23 #include "qdf_status.h"
24 #include "wlan_objmgr_cmn.h"
25 #ifdef DFS_COMPONENT_ENABLE
26 #include <wlan_dfs_public_struct.h>
27 #endif
28 #include "wlan_mgmt_txrx_utils_api.h"
29 #include "wlan_scan_public_structs.h"
30 
31 #ifdef WLAN_ATF_ENABLE
32 #include "wlan_atf_utils_defs.h"
33 #endif
34 #ifdef QCA_SUPPORT_SON
35 #include <wlan_son_tgt_api.h>
36 #endif
37 #ifdef WLAN_SA_API_ENABLE
38 #include "wlan_sa_api_utils_defs.h"
39 #endif
40 #ifdef WLAN_CONV_SPECTRAL_ENABLE
41 #include "wlan_spectral_public_structs.h"
42 #endif
43 #include <reg_services_public_struct.h>
44 
45 #ifdef WLAN_CONV_CRYPTO_SUPPORTED
46 #include "wlan_crypto_global_def.h"
47 #endif
48 
49 #ifdef WLAN_CFR_ENABLE
50 #include "wlan_cfr_utils_api.h"
51 #endif
52 
53 #include <wlan_dfs_tgt_api.h>
54 #include <wlan_dfs_ioctl.h>
55 
56 #ifdef WLAN_IOT_SIM_SUPPORT
57 #include <wlan_iot_sim_public_structs.h>
58 #endif
59 
60 /* Number of dev type: Direct attach and Offload */
61 #define MAX_DEV_TYPE 2
62 
63 #ifdef WIFI_POS_CONVERGED
64 /* forward declarations */
65 struct oem_data_req;
66 struct oem_data_rsp;
67 #endif /* WIFI_POS_CONVERGED */
68 
69 #ifdef DIRECT_BUF_RX_ENABLE
70 /* forward declarations for direct buf rx */
71 struct direct_buf_rx_data;
72 /* Forward declaration for module_ring_params */
73 struct module_ring_params;
74 /*Forward declaration for dbr_module_config */
75 struct dbr_module_config;
76 #endif
77 
78 #ifdef FEATURE_WLAN_TDLS
79 #include "wlan_tdls_public_structs.h"
80 #endif
81 
82 #include <wlan_vdev_mgr_tgt_if_tx_defs.h>
83 #include <wlan_vdev_mgr_tgt_if_rx_defs.h>
84 
85 #ifdef DCS_INTERFERENCE_DETECTION
86 #include <wlan_dcs_tgt_api.h>
87 #endif
88 
89 #ifdef QCA_SUPPORT_CP_STATS
90 
91 /**
92  * typedef cp_stats_event - Definition of cp stats event
93  * Define stats_event from external cp stats component to cp_stats_event
94  */
95 typedef struct stats_event cp_stats_event;
96 /**
97  * typedef stats_request_type - Definition of stats_req_type enum
98  * Define stats_req_type from external cp stats component to stats_request_type
99  */
100 typedef enum stats_req_type stats_request_type;
101 /**
102  * typedef stats_req_info - Definition of cp stats req info
103  * Define request_info from external cp stats component to stats_req_info
104  */
105 typedef struct request_info stats_req_info;
106 /**
107  * typedef stats_wake_lock - Definition of cp stats wake lock
108  * Define wake_lock_stats from external cp stats component to stats_wake_lock
109  */
110 typedef struct wake_lock_stats stats_wake_lock;
111 
112 /**
113  * struct wlan_lmac_if_cp_stats_tx_ops - defines southbound tx callbacks for
114  * control plane statistics component
115  * @cp_stats_attach:	function pointer to register events from FW
116  * @cp_stats_detach:	function pointer to unregister events from FW
117  */
118 struct wlan_lmac_if_cp_stats_tx_ops {
119 	QDF_STATUS (*cp_stats_attach)(struct wlan_objmgr_psoc *psoc);
120 	QDF_STATUS (*cp_stats_detach)(struct wlan_objmgr_psoc *posc);
121 	void (*inc_wake_lock_stats)(uint32_t reason,
122 				    stats_wake_lock *stats,
123 				    uint32_t *unspecified_wake_count);
124 	QDF_STATUS (*send_req_stats)(struct wlan_objmgr_psoc *psoc,
125 				     enum stats_req_type type,
126 				     stats_req_info *req);
127 };
128 
129 /**
130  * struct wlan_lmac_if_cp_stats_rx_ops - defines southbound rx callbacks for
131  * control plane statistics component
132  * @cp_stats_rx_event_handler:	function pointer to rx FW events
133  */
134 struct wlan_lmac_if_cp_stats_rx_ops {
135 	QDF_STATUS (*cp_stats_rx_event_handler)(struct wlan_objmgr_vdev *vdev);
136 	QDF_STATUS (*process_stats_event)(struct wlan_objmgr_psoc *psoc,
137 					  cp_stats_event *ev);
138 };
139 #endif
140 
141 #ifdef DCS_INTERFERENCE_DETECTION
142 /**
143  * struct wlan_target_if_dcs_tx_ops - south bound tx function pointers for dcs
144  * @dcs_attach: function to register event handlers with FW
145  * @dcs_detach: function to de-register event handlers with FW
146  * @dcs_cmd_send: function to send dcs commands to FW
147  */
148 struct wlan_target_if_dcs_tx_ops {
149 	QDF_STATUS (*dcs_attach)(struct wlan_objmgr_psoc *psoc);
150 	QDF_STATUS (*dcs_detach)(struct wlan_objmgr_psoc *psoc);
151 	QDF_STATUS (*dcs_cmd_send)(struct wlan_objmgr_psoc *psoc,
152 				   uint32_t pdev_id,
153 				   bool is_host_pdev_id,
154 				   uint32_t dcs_enable);
155 };
156 
157 /**
158  * struct wlan_target_if_dcs_rx_ops - defines southbound rx callbacks for
159  * dcs component
160  * @process_dcs_event:  function pointer to rx FW events
161  */
162 struct wlan_target_if_dcs_rx_ops {
163 	QDF_STATUS (*process_dcs_event)(struct wlan_objmgr_psoc *psoc,
164 					struct dcs_stats_event *event);
165 };
166 #endif
167 
168 /**
169  * struct wlan_lmac_if_mgmt_txrx_tx_ops - structure of tx function
170  *                  pointers for mgmt txrx component
171  * @mgmt_tx_send: function pointer to transmit mgmt tx frame
172  * @beacon_send:  function pointer to transmit beacon frame
173  * @fd_action_frame_send: function pointer to transmit FD action frame
174  * @tx_drain_nbuf_op: function pointer for any umac nbuf realted ops for
175  *                    pending mgmt frames cleanup
176  */
177 struct wlan_lmac_if_mgmt_txrx_tx_ops {
178 	QDF_STATUS (*mgmt_tx_send)(struct wlan_objmgr_vdev *vdev,
179 			qdf_nbuf_t nbuf, u_int32_t desc_id,
180 			void *mgmt_tx_params);
181 	QDF_STATUS (*beacon_send)(struct wlan_objmgr_vdev *vdev,
182 			qdf_nbuf_t nbuf);
183 	QDF_STATUS (*fd_action_frame_send)(struct wlan_objmgr_vdev *vdev,
184 					   qdf_nbuf_t nbuf);
185 	void (*tx_drain_nbuf_op)(struct wlan_objmgr_pdev *pdev,
186 				 qdf_nbuf_t nbuf);
187 };
188 
189 /**
190  * struct wlan_lmac_if_scan_tx_ops - south bound tx function pointers for scan
191  * @scan_start: function to start scan
192  * @scan_cancel: function to cancel scan
193  * @pno_start: start pno scan
194  * @pno_stop: stop pno scan
195  * @scan_reg_ev_handler: function to register for scan events
196  * @scan_unreg_ev_handler: function to unregister for scan events
197  *
198  * scan module uses these functions to avail ol/da lmac services
199  */
200 struct wlan_lmac_if_scan_tx_ops {
201 	QDF_STATUS (*scan_start)(struct wlan_objmgr_pdev *pdev,
202 			struct scan_start_request *req);
203 	QDF_STATUS (*scan_cancel)(struct wlan_objmgr_pdev *pdev,
204 			struct scan_cancel_param *req);
205 	QDF_STATUS (*pno_start)(struct wlan_objmgr_psoc *psoc,
206 			struct pno_scan_req_params *req);
207 	QDF_STATUS (*pno_stop)(struct wlan_objmgr_psoc *psoc,
208 			uint8_t vdev_id);
209 	QDF_STATUS (*scan_reg_ev_handler)(struct wlan_objmgr_psoc *psoc,
210 			void *arg);
211 	QDF_STATUS (*scan_unreg_ev_handler)(struct wlan_objmgr_psoc *psoc,
212 			void *arg);
213 	QDF_STATUS (*set_chan_list)(struct wlan_objmgr_pdev *pdev, void *arg);
214 };
215 
216 /**
217  * struct wlan_lmac_if_ftm_tx_ops - south bound tx function pointers for ftm
218  * @ftm_attach: function to register event handlers with FW
219  * @ftm_detach: function to de-register event handlers with FW
220  * @ftm_cmd_send: function to send FTM commands to FW
221  *
222  * ftm module uses these functions to avail ol/da lmac services
223  */
224 struct wlan_lmac_if_ftm_tx_ops {
225 	QDF_STATUS (*ftm_attach)(struct wlan_objmgr_psoc *psoc);
226 	QDF_STATUS (*ftm_detach)(struct wlan_objmgr_psoc *psoc);
227 	QDF_STATUS (*ftm_cmd_send)(struct wlan_objmgr_pdev *pdev,
228 				uint8_t *buf, uint32_t len, uint8_t mac_id);
229 };
230 
231 enum wlan_mlme_cfg_id;
232 /**
233  * struct wlan_lmac_if_mlme_tx_ops - south bound tx function pointers for mlme
234  * @get_wifi_iface_id: function to get wifi interface id
235  * @vdev_mlme_attach: function to register events
236  * @vdev_mlme_detach: function to unregister events
237  * @vdev_create_send: function to send vdev create
238  * @vdev_start_send: function to send vdev start
239  * @vdev_up_send: function to send vdev up
240  * @vdev_delete_send: function to send vdev delete
241  * @vdev_stop_send: function to send vdev stop
242  * @vdev_down_send: function to send vdev down
243  * @vdev_set_param_send: function to send vdev parameter
244  * @vdev_set_tx_rx_decap_type: function to send vdev tx rx cap/decap type
245  * @vdev_set_nac_rssi_send: function to send nac rssi
246  * @vdev_set_neighbour_rx_cmd_send: function to send vdev neighbour rx cmd
247  * @vdev_sifs_trigger_send: function to send vdev sifs trigger
248  * @vdev_set_custom_aggr_size_cmd_send: function to send custom aggr size
249  * @vdev_config_ratemask_cmd_send: function to send ratemask
250  * @peer_flush_tids_send: function to flush peer tids
251  * @multiple_vdev_restart_req_cmd: function to send multiple vdev restart
252  * @beacon_send_cmd: function to send beacon
253  * @beacon_tmpl_send: function to send beacon template
254  * @vdev_bcn_miss_offload_send: function to send beacon miss offload
255  * @vdev_sta_ps_param_send: function to sent STA power save config
256  * @peer_delete_all_send: function to send vdev delete all peer request
257  * @psoc_vdev_rsp_timer_init: function to initialize psoc vdev response timer
258  * @psoc_vdev_rsp_timer_deinit: function to deinitialize psoc vdev rsp timer
259  * @psoc_vdev_rsp_timer_inuse: function to determine whether the vdev rsp
260  * timer is inuse or not
261  * @psoc_vdev_rsp_timer_mod: function to modify the time of vdev rsp timer
262  * @psoc_wake_lock_init: Initialize psoc wake lock for vdev response timer
263  * @psoc_wake_lock_deinit: De-Initialize psoc wake lock for vdev response timer
264  */
265 struct wlan_lmac_if_mlme_tx_ops {
266 	uint32_t (*get_wifi_iface_id) (struct wlan_objmgr_pdev *pdev);
267 	QDF_STATUS (*vdev_mlme_attach)(struct wlan_objmgr_psoc *psoc);
268 	QDF_STATUS (*vdev_mlme_detach)(struct wlan_objmgr_psoc *psoc);
269 	QDF_STATUS (*vdev_create_send)(struct wlan_objmgr_vdev *vdev,
270 				       struct vdev_create_params *param);
271 	QDF_STATUS (*vdev_start_send)(struct wlan_objmgr_vdev *vdev,
272 				      struct vdev_start_params *param);
273 	QDF_STATUS (*vdev_up_send)(struct wlan_objmgr_vdev *vdev,
274 				   struct vdev_up_params *param);
275 	QDF_STATUS (*vdev_delete_send)(struct wlan_objmgr_vdev *vdev,
276 				       struct vdev_delete_params *param);
277 	QDF_STATUS (*vdev_stop_send)(struct wlan_objmgr_vdev *vdev,
278 				     struct vdev_stop_params *param);
279 	QDF_STATUS (*vdev_down_send)(struct wlan_objmgr_vdev *vdev,
280 				     struct vdev_down_params *param);
281 	QDF_STATUS (*vdev_set_param_send)(struct wlan_objmgr_vdev *vdev,
282 					  struct vdev_set_params *param);
283 	QDF_STATUS (*vdev_set_tx_rx_decap_type)(struct wlan_objmgr_vdev *vdev,
284 						enum wlan_mlme_cfg_id param_id,
285 						uint32_t value);
286 	QDF_STATUS (*vdev_set_nac_rssi_send)(
287 				struct wlan_objmgr_vdev *vdev,
288 				struct vdev_scan_nac_rssi_params *param);
289 	QDF_STATUS (*vdev_set_neighbour_rx_cmd_send)(
290 					struct wlan_objmgr_vdev *vdev,
291 					struct set_neighbour_rx_params *param,
292 					uint8_t *mac);
293 	QDF_STATUS (*vdev_sifs_trigger_send)(
294 					struct wlan_objmgr_vdev *vdev,
295 					struct sifs_trigger_param *param);
296 	QDF_STATUS (*vdev_set_custom_aggr_size_cmd_send)(
297 				struct wlan_objmgr_vdev *vdev,
298 				struct set_custom_aggr_size_params *param);
299 	QDF_STATUS (*vdev_config_ratemask_cmd_send)(
300 					struct wlan_objmgr_vdev *vdev,
301 					struct config_ratemask_params *param);
302 	QDF_STATUS (*peer_flush_tids_send)(
303 					struct wlan_objmgr_vdev *vdev,
304 					struct peer_flush_params *param);
305 	QDF_STATUS (*multiple_vdev_restart_req_cmd)(
306 				struct wlan_objmgr_pdev *pdev,
307 				struct multiple_vdev_restart_params *param);
308 	QDF_STATUS (*beacon_cmd_send)(struct wlan_objmgr_vdev *vdev,
309 				      struct beacon_params *param);
310 	QDF_STATUS (*beacon_tmpl_send)(struct wlan_objmgr_vdev *vdev,
311 				       struct beacon_tmpl_params *param);
312 #if defined(WLAN_SUPPORT_FILS) || defined(CONFIG_BAND_6GHZ)
313 	QDF_STATUS (*vdev_fils_enable_send)(struct wlan_objmgr_vdev *vdev,
314 					    struct config_fils_params *param);
315 #endif
316 	QDF_STATUS (*vdev_bcn_miss_offload_send)(struct wlan_objmgr_vdev *vdev);
317 	QDF_STATUS (*vdev_sta_ps_param_send)(struct wlan_objmgr_vdev *vdev,
318 					     struct sta_ps_params *param);
319 	QDF_STATUS (*peer_delete_all_send)(
320 					struct wlan_objmgr_vdev *vdev,
321 					struct peer_delete_all_params *param);
322 	QDF_STATUS (*psoc_vdev_rsp_timer_init)(
323 				struct wlan_objmgr_psoc *psoc,
324 				uint8_t vdev_id);
325 	void (*psoc_vdev_rsp_timer_deinit)(
326 				struct wlan_objmgr_psoc *psoc,
327 				uint8_t vdev_id);
328 	QDF_STATUS (*psoc_vdev_rsp_timer_inuse)(
329 				struct wlan_objmgr_psoc *psoc,
330 				uint8_t vdev_id);
331 	QDF_STATUS (*psoc_vdev_rsp_timer_mod)(
332 					struct wlan_objmgr_psoc *psoc,
333 					uint8_t vdev_id,
334 					int mseconds);
335 	void (*psoc_wake_lock_init)(
336 				struct wlan_objmgr_psoc *psoc);
337 	void (*psoc_wake_lock_deinit)(
338 				struct wlan_objmgr_psoc *psoc);
339 	QDF_STATUS (*vdev_mgr_rsp_timer_stop)(
340 				struct wlan_objmgr_psoc *psoc,
341 				struct vdev_response_timer *vdev_rsp,
342 				enum wlan_vdev_mgr_tgt_if_rsp_bit clear_bit);
343 };
344 
345 /**
346  * struct wlan_lmac_if_scan_rx_ops  - south bound rx function pointers for scan
347  * @scan_ev_handler: scan event handler
348  * @scan_set_max_active_scans: set max active scans allowed
349  *
350  * lmac modules uses this API to post scan events to scan module
351  */
352 struct wlan_lmac_if_scan_rx_ops {
353 	QDF_STATUS (*scan_ev_handler)(struct wlan_objmgr_psoc *psoc,
354 		struct scan_event_info *event_info);
355 	QDF_STATUS (*scan_set_max_active_scans)(struct wlan_objmgr_psoc *psoc,
356 			uint32_t max_active_scans);
357 };
358 
359 #ifdef CONVERGED_P2P_ENABLE
360 
361 /* forward declarations for p2p tx ops */
362 struct p2p_ps_config;
363 struct p2p_lo_start;
364 struct p2p_set_mac_filter;
365 
366 /**
367  * struct wlan_lmac_if_p2p_tx_ops - structure of tx function pointers
368  * for P2P component
369  * @set_ps:      function pointer to set power save
370  * @lo_start:    function pointer to start listen offload
371  * @lo_stop:     function pointer to stop listen offload
372  * @set_noa:     function pointer to disable/enable NOA
373  * @reg_lo_ev_handler:   function pointer to register lo event handler
374  * @reg_noa_ev_handler:  function pointer to register noa event handler
375  * @unreg_lo_ev_handler: function pointer to unregister lo event handler
376  * @unreg_noa_ev_handler:function pointer to unregister noa event handler
377  * @reg_mac_addr_rx_filter_handler: function pointer to register/unregister
378  *    set mac addr status event callback.
379  * @set_mac_addr_rx_filter_cmd: function pointer to set mac addr rx filter
380  */
381 struct wlan_lmac_if_p2p_tx_ops {
382 	QDF_STATUS (*set_ps)(struct wlan_objmgr_psoc *psoc,
383 		struct p2p_ps_config *ps_config);
384 #ifdef FEATURE_P2P_LISTEN_OFFLOAD
385 	QDF_STATUS (*lo_start)(struct wlan_objmgr_psoc *psoc,
386 		struct p2p_lo_start *lo_start);
387 	QDF_STATUS (*lo_stop)(struct wlan_objmgr_psoc *psoc,
388 		uint32_t vdev_id);
389 	QDF_STATUS (*reg_lo_ev_handler)(struct wlan_objmgr_psoc *psoc,
390 			void *arg);
391 	QDF_STATUS (*unreg_lo_ev_handler)(struct wlan_objmgr_psoc *psoc,
392 			void *arg);
393 #endif
394 	QDF_STATUS (*set_noa)(struct wlan_objmgr_psoc *psoc,
395 			      uint32_t vdev_id, bool disable_noa);
396 	QDF_STATUS (*reg_noa_ev_handler)(struct wlan_objmgr_psoc *psoc,
397 					 void *arg);
398 	QDF_STATUS (*unreg_noa_ev_handler)(struct wlan_objmgr_psoc *psoc,
399 			void *arg);
400 	QDF_STATUS (*reg_mac_addr_rx_filter_handler)(
401 			struct wlan_objmgr_psoc *psoc, bool reg);
402 	QDF_STATUS (*set_mac_addr_rx_filter_cmd)(
403 			struct wlan_objmgr_psoc *psoc,
404 			struct p2p_set_mac_filter *param);
405 };
406 #endif
407 
408 #ifdef WLAN_ATF_ENABLE
409 
410 /**
411  * struct wlan_lmac_if_atf_tx_ops - ATF specific tx function pointers
412  * @atf_node_unblock:             Resume node
413  * @atf_set_enable_disable:       Set atf enable/disable
414  * @atf_tokens_used:              Get used atf tokens
415  * @atf_get_unused_txtoken:       Get unused atf tokens
416  * @atf_peer_resume:              Resume peer
417  * @atf_tokens_unassigned:        Set unassigned atf tockens
418  * @atf_capable_peer:             Set atf state change
419  * @atf_airtime_estimate:         Get estimated airtime
420  * @atf_debug_peerstate:          Get peer state
421  * @atf_enable_disable:           Set atf peer stats enable/disable
422  * @atf_ssid_sched_policy:        Set ssid schedule policy
423  * @atf_set:                      Set atf
424  * @atf_set_grouping:             Set atf grouping
425  * @atf_set_group_ac:             Set atf Group AC
426  * @atf_send_peer_request:        Send peer requests
427  * @atf_set_bwf:                  Set bandwidth fairness
428  * @atf_peer_buf_held:            Get buffer held
429  * @atf_get_peer_airtime:         Get peer airtime
430  * @atf_get_chbusyper:            Get channel busy
431  * @atf_open:                     ATF open
432  * @atf_register_event_handler:   ATF register wmi event handlers
433  * @atf_unregister_event_handler: ATF unregister wmi event handlers
434  * @atf_set_ppdu_stats:           ATF set ppdu stats to get ATF stats
435  */
436 struct wlan_lmac_if_atf_tx_ops {
437 	void (*atf_node_unblock)(struct wlan_objmgr_pdev *pdev,
438 				 struct wlan_objmgr_peer *peer);
439 	void (*atf_set_enable_disable)(struct wlan_objmgr_pdev *pdev,
440 				       uint8_t value);
441 	uint8_t (*atf_tokens_used)(struct wlan_objmgr_pdev *pdev,
442 				   struct wlan_objmgr_peer *peer);
443 	void (*atf_get_unused_txtoken)(struct wlan_objmgr_pdev *pdev,
444 				       struct wlan_objmgr_peer *peer,
445 				       int *unused_token);
446 	void (*atf_peer_resume)(struct wlan_objmgr_pdev *pdev,
447 				struct wlan_objmgr_peer *peer);
448 	void (*atf_tokens_unassigned)(struct wlan_objmgr_pdev *pdev,
449 				      uint32_t tokens_unassigned);
450 	void (*atf_capable_peer)(struct wlan_objmgr_pdev *pdev,
451 				 struct wlan_objmgr_peer *peer,
452 				 uint8_t val, uint8_t atfstate_change);
453 	uint32_t (*atf_airtime_estimate)(struct wlan_objmgr_pdev *pdev,
454 					 struct wlan_objmgr_peer *peer,
455 					 uint32_t tput,
456 					 uint32_t *possible_tput);
457 	uint32_t (*atf_debug_peerstate)(struct wlan_objmgr_pdev *pdev,
458 					struct wlan_objmgr_peer *peer,
459 					struct atf_peerstate *peerstate);
460 	int32_t (*atf_enable_disable)(struct wlan_objmgr_vdev *vdev,
461 				      uint8_t value);
462 	int32_t (*atf_ssid_sched_policy)(struct wlan_objmgr_vdev *vdev,
463 					 uint8_t value);
464 	int32_t (*atf_set)(struct wlan_objmgr_pdev *pdev,
465 			   struct pdev_atf_req *atf_req,
466 			   uint8_t atf_tput_based);
467 	int32_t (*atf_set_grouping)(struct wlan_objmgr_pdev *pdev,
468 				    struct pdev_atf_ssid_group_req *atf_grp_req,
469 				    uint8_t atf_tput_based);
470 	int32_t (*atf_set_group_ac)(struct wlan_objmgr_pdev *pdev,
471 				    struct pdev_atf_group_wmm_ac_req *atf_acreq,
472 				    uint8_t atf_tput_based);
473 	int32_t (*atf_send_peer_request)(struct wlan_objmgr_pdev *pdev,
474 					 struct pdev_atf_peer_ext_request *atfr,
475 					 uint8_t atf_tput_based);
476 	int32_t (*atf_set_bwf)(struct wlan_objmgr_pdev *pdev,
477 			       struct pdev_bwf_req *bwf_req);
478 	uint32_t (*atf_peer_buf_held)(struct wlan_objmgr_peer *peer);
479 	uint32_t (*atf_get_peer_airtime)(struct wlan_objmgr_peer *peer);
480 	uint32_t (*atf_get_chbusyper)(struct wlan_objmgr_pdev *pdev);
481 	void (*atf_open)(struct wlan_objmgr_psoc *psoc);
482 	void (*atf_register_event_handler)(struct wlan_objmgr_psoc *psoc);
483 	void (*atf_unregister_event_handler)(struct wlan_objmgr_psoc *psoc);
484 	void (*atf_set_ppdu_stats)(struct wlan_objmgr_pdev *pdev,
485 				   uint8_t value);
486 };
487 #endif
488 
489 #ifdef WLAN_SUPPORT_FILS
490 /**
491  * struct wlan_lmac_if_fd_tx_ops - FILS Discovery specific Tx function pointers
492  * @fd_vdev_config_fils:         Enable and configure FILS Discovery
493  * @fd_register_event_handler:   Register swfda WMI event handler
494  * @fd_unregister_event_handler: Un-register swfda WMI event handler
495  * @fd_offload_tmpl_send:        Send FD template to FW
496  */
497 struct wlan_lmac_if_fd_tx_ops {
498 	QDF_STATUS (*fd_vdev_config_fils)(struct wlan_objmgr_vdev *vdev,
499 					  uint32_t fd_period);
500 	void (*fd_register_event_handler)(struct wlan_objmgr_psoc *psoc);
501 	void (*fd_unregister_event_handler)(struct wlan_objmgr_psoc *psoc);
502 	QDF_STATUS (*fd_offload_tmpl_send)(struct wlan_objmgr_pdev *pdev,
503 			struct fils_discovery_tmpl_params *fd_tmpl_param);
504 };
505 #endif
506 
507 #ifdef WLAN_SA_API_ENABLE
508 
509 /**
510  * struct wlan_lmac_if_sa_api_tx_ops - SA API specific tx function pointers
511  */
512 
513 struct wlan_lmac_if_sa_api_tx_ops {
514 	void (*sa_api_register_event_handler)(struct wlan_objmgr_psoc *psoc);
515 	void (*sa_api_unregister_event_handler)(struct wlan_objmgr_psoc *posc);
516 	void (*sa_api_enable_sa) (struct wlan_objmgr_pdev *pdev,
517 			uint32_t enable, uint32_t mode, uint32_t rx_antenna);
518 	void (*sa_api_set_rx_antenna) (struct wlan_objmgr_pdev *pdev,
519 			uint32_t antenna);
520 	void (*sa_api_set_tx_antenna) (struct wlan_objmgr_peer *peer,
521 			uint32_t *antenna_array);
522 	void (*sa_api_set_tx_default_antenna) (struct wlan_objmgr_pdev *pdev,
523 			u_int32_t antenna);
524 	void (*sa_api_set_training_info) (struct wlan_objmgr_peer *peer,
525 			uint32_t *rate_array,
526 			uint32_t *antenna_array,
527 			uint32_t numpkts);
528 	void (*sa_api_prepare_rateset)(struct wlan_objmgr_pdev *pdev,
529 			struct wlan_objmgr_peer *peer,
530 			struct sa_rate_info *rate_info);
531 	void (*sa_api_set_node_config_ops) (struct wlan_objmgr_peer *peer,
532 			uint32_t cmd_id, uint16_t args_count,
533 			u_int32_t args_arr[]);
534 };
535 
536 #endif
537 
538 #ifdef WLAN_CFR_ENABLE
539 /**
540  * struct wlan_lmac_if_cfr_tx_ops - CFR specific tx function pointers
541  * @cfr_init_pdev: Initialize CFR
542  * @cfr_deinit_pdev: De-initialize CFR
543  * @cfr_enable_cfr_timer: Function to enable CFR timer
544  * @cfr_start_capture: Function to start CFR capture
545  * @cfr_stop_capture: Function to stop CFR capture
546  * @cfr_config_rcc: Function to set the Repetitive channel capture params
547  * @cfr_start_lut_timer: Function to start timer to flush aged-out LUT entries
548  * @cfr_stop_lut_timer: Function to stop timer to flush aged-out LUT entries
549  * @cfr_default_ta_ra_cfg: Function to configure default values for TA_RA mode
550  * @cfr_dump_lut_enh: Function to dump LUT entries
551  * @cfr_rx_tlv_process: Function to process PPDU status TLVs
552  * @cfr_update_global_cfg: Function to update the global config for
553  * a successful commit session.
554  */
555 struct wlan_lmac_if_cfr_tx_ops {
556 	int (*cfr_init_pdev)(struct wlan_objmgr_psoc *psoc,
557 			     struct wlan_objmgr_pdev *pdev);
558 	int (*cfr_deinit_pdev)(struct wlan_objmgr_psoc *psoc,
559 			       struct wlan_objmgr_pdev *pdev);
560 	int (*cfr_enable_cfr_timer)(struct wlan_objmgr_pdev *pdev,
561 				    uint32_t cfr_timer);
562 	int (*cfr_start_capture)(struct wlan_objmgr_pdev *pdev,
563 				 struct wlan_objmgr_peer *peer,
564 				 struct cfr_capture_params *params);
565 	int (*cfr_stop_capture)(struct wlan_objmgr_pdev *pdev,
566 				struct wlan_objmgr_peer *peer);
567 #ifdef WLAN_ENH_CFR_ENABLE
568 	QDF_STATUS (*cfr_config_rcc)(struct wlan_objmgr_pdev *pdev,
569 				     struct cfr_rcc_param *params);
570 	void (*cfr_start_lut_timer)(struct wlan_objmgr_pdev *pdev);
571 	void (*cfr_stop_lut_timer)(struct wlan_objmgr_pdev *pdev);
572 	void (*cfr_default_ta_ra_cfg)(struct cfr_rcc_param *params,
573 				      bool allvalid, uint16_t reset_cfg);
574 	void (*cfr_dump_lut_enh)(struct wlan_objmgr_pdev *pdev);
575 	void (*cfr_rx_tlv_process)(struct wlan_objmgr_pdev *pdev, void *nbuf);
576 	void (*cfr_update_global_cfg)(struct wlan_objmgr_pdev *pdev);
577 	QDF_STATUS (*cfr_subscribe_ppdu_desc)(struct wlan_objmgr_pdev *pdev,
578 					      bool is_subscribe);
579 #endif
580 };
581 #endif /* WLAN_CFR_ENABLE */
582 
583 #ifdef WLAN_CONV_SPECTRAL_ENABLE
584 struct spectral_wmi_ops;
585 struct spectral_tgt_ops;
586 /**
587  * struct wlan_lmac_if_sptrl_tx_ops - Spectral south bound Tx operations
588  * @sptrlto_pdev_spectral_init: Initialize target_if pdev Spectral object
589  * @sptrlto_pdev_spectral_deinit: De-initialize target_if pdev Spectral object
590  * @sptrlto_psoc_spectral_init: Initialize target_if psoc Spectral object
591  * @sptrlto_psoc_spectral_deinit: De-initialize target_if psoc Spectral object
592  * @sptrlto_set_spectral_config:    Set Spectral configuration
593  * @sptrlto_get_spectral_config:    Get Spectral configuration
594  * @sptrlto_start_spectral_scan:    Start Spectral Scan
595  * @sptrlto_stop_spectral_scan:     Stop Spectral Scan
596  * @sptrlto_is_spectral_active:     Get whether Spectral is active
597  * @sptrlto_is_spectral_enabled:    Get whether Spectral is enabled
598  * @sptrlto_set_icm_active:         Set whether ICM is active or inactive
599  * @sptrlto_get_icm_active:         Get whether ICM is active or inactive
600  * @sptrlto_get_nominal_nf:         Get Nominal Noise Floor for the current
601  *                                  frequency band
602  * @sptrlto_set_debug_level:        Set Spectral debug level
603  * @sptrlto_get_debug_level:        Get Spectral debug level
604  * @sptrlto_get_chaninfo:           Get channel information
605  * @sptrlto_clear_chaninfo:         Clear channel information
606  * @sptrlto_get_spectral_capinfo:   Get Spectral capability information
607  * @sptrlto_get_spectral_diagstats: Get Spectral diagnostic statistics
608  * @sptrlto_register_spectral_wmi_ops: Register Spectral WMI operations
609  * @sptrlto_register_spectral_tgt_ops: Register Spectral target operations
610  * @sptrlto_register_netlink_cb: Register Spectral Netlink callbacks
611  * @sptrlto_use_nl_bcast: Get whether to use Netlink broadcast/unicast
612  * @sptrlto_deregister_netlink_cb: De-register Spectral Netlink callbacks
613  * @sptrlto_process_spectral_report: Process spectral report
614  * @sptrlto_set_dma_debug: Set DMA debug for Spectral
615  * @sptrlto_direct_dma_support: Whether Direct-DMA is supported on this radio
616  * @sptrlto_check_and_do_dbr_ring_debug: Start/Stop Spectral ring debug based
617  *                                       on the previous state
618  * @sptrlto_check_and_do_dbr_buff_debug: Start/Stop Spectral buffer debug based
619  *                                       on the previous state
620  * @sptrlto_register_events: Registration of WMI events for Spectral
621  * @sptrlto_unregister_events: Unregistration of WMI events for Spectral
622  **/
623 struct wlan_lmac_if_sptrl_tx_ops {
624 	void *(*sptrlto_pdev_spectral_init)(struct wlan_objmgr_pdev *pdev);
625 	void (*sptrlto_pdev_spectral_deinit)(struct wlan_objmgr_pdev *pdev);
626 	void *(*sptrlto_psoc_spectral_init)(struct wlan_objmgr_psoc *psoc);
627 	void (*sptrlto_psoc_spectral_deinit)(struct wlan_objmgr_psoc *psoc);
628 	QDF_STATUS (*sptrlto_set_spectral_config)
629 					(struct wlan_objmgr_pdev *pdev,
630 					 const struct spectral_cp_param *param,
631 					 const enum spectral_scan_mode smode,
632 					 enum spectral_cp_error_code *err);
633 	QDF_STATUS (*sptrlto_get_spectral_config)
634 					(struct wlan_objmgr_pdev *pdev,
635 					 struct spectral_config *sptrl_config,
636 					 enum spectral_scan_mode smode);
637 	QDF_STATUS (*sptrlto_start_spectral_scan)
638 					(struct wlan_objmgr_pdev *pdev,
639 					 uint8_t vdev_id,
640 					 const enum spectral_scan_mode smode,
641 					 enum spectral_cp_error_code *err);
642 	QDF_STATUS (*sptrlto_stop_spectral_scan)
643 					(struct wlan_objmgr_pdev *pdev,
644 					 const enum spectral_scan_mode smode,
645 					 enum spectral_cp_error_code *err);
646 	bool (*sptrlto_is_spectral_active)(struct wlan_objmgr_pdev *pdev,
647 					   const enum spectral_scan_mode smode);
648 	bool (*sptrlto_is_spectral_enabled)(struct wlan_objmgr_pdev *pdev,
649 					    enum spectral_scan_mode smode);
650 	QDF_STATUS (*sptrlto_set_debug_level)(struct wlan_objmgr_pdev *pdev,
651 					      u_int32_t debug_level);
652 	u_int32_t (*sptrlto_get_debug_level)(struct wlan_objmgr_pdev *pdev);
653 	QDF_STATUS (*sptrlto_get_spectral_capinfo)
654 						(struct wlan_objmgr_pdev *pdev,
655 						 struct spectral_caps *scaps);
656 	QDF_STATUS (*sptrlto_get_spectral_diagstats)
657 					(struct wlan_objmgr_pdev *pdev,
658 					 struct spectral_diag_stats *stats);
659 	QDF_STATUS (*sptrlto_register_spectral_wmi_ops)(
660 					struct wlan_objmgr_psoc *psoc,
661 					struct spectral_wmi_ops *wmi_ops);
662 	QDF_STATUS (*sptrlto_register_spectral_tgt_ops)(
663 					struct wlan_objmgr_psoc *psoc,
664 					struct spectral_tgt_ops *tgt_ops);
665 	void (*sptrlto_register_netlink_cb)(
666 		struct wlan_objmgr_pdev *pdev,
667 		struct spectral_nl_cb *nl_cb);
668 	bool (*sptrlto_use_nl_bcast)(struct wlan_objmgr_pdev *pdev);
669 	void (*sptrlto_deregister_netlink_cb)(struct wlan_objmgr_pdev *pdev);
670 	int (*sptrlto_process_spectral_report)(
671 		struct wlan_objmgr_pdev *pdev,
672 		void *payload);
673 	QDF_STATUS (*sptrlto_set_dma_debug)(
674 		struct wlan_objmgr_pdev *pdev,
675 		enum spectral_dma_debug dma_debug_type,
676 		bool dma_debug_enable);
677 	bool (*sptrlto_direct_dma_support)(struct wlan_objmgr_pdev *pdev);
678 	QDF_STATUS (*sptrlto_check_and_do_dbr_ring_debug)(
679 		struct wlan_objmgr_pdev *pdev);
680 	QDF_STATUS (*sptrlto_check_and_do_dbr_buff_debug)(
681 		struct wlan_objmgr_pdev *pdev);
682 	QDF_STATUS (*sptrlto_register_events)(struct wlan_objmgr_psoc *psoc);
683 	QDF_STATUS (*sptrlto_unregister_events)(struct wlan_objmgr_psoc *psoc);
684 };
685 #endif /* WLAN_CONV_SPECTRAL_ENABLE */
686 
687 #ifdef WLAN_IOT_SIM_SUPPORT
688 /**
689  * struct wlan_lmac_if_iot_sim_tx_ops - iot_sim south bound Tx operations
690  * @iot_sim_send_cmd: To send wmi simulation command
691  **/
692 struct wlan_lmac_if_iot_sim_tx_ops {
693 	QDF_STATUS (*iot_sim_send_cmd)(struct wlan_objmgr_pdev *pdev,
694 				       struct simulation_test_params *param);
695 };
696 #endif
697 
698 #ifdef WIFI_POS_CONVERGED
699 /*
700  * struct wlan_lmac_if_wifi_pos_tx_ops - structure of firmware tx function
701  * pointers for wifi_pos component
702  * @data_req_tx: function pointer to send wifi_pos req to firmware
703  * @wifi_pos_register_events: function pointer to register wifi_pos events
704  * @wifi_pos_deregister_events: function pointer to deregister wifi_pos events
705  * @wifi_pos_convert_pdev_id_host_to_target: function pointer to get target
706  * pdev_id from host pdev_id.
707  * @wifi_pos_convert_pdev_id_target_to_host: function pointer to get host
708  * pdev_id from target pdev_id.
709  */
710 struct wlan_lmac_if_wifi_pos_tx_ops {
711 	QDF_STATUS (*data_req_tx)(struct wlan_objmgr_pdev *pdev,
712 				  struct oem_data_req *req);
713 	QDF_STATUS (*wifi_pos_register_events)(struct wlan_objmgr_psoc *psoc);
714 	QDF_STATUS (*wifi_pos_deregister_events)(struct wlan_objmgr_psoc *psoc);
715 	QDF_STATUS (*wifi_pos_convert_pdev_id_host_to_target)(
716 			struct wlan_objmgr_psoc *psoc, uint32_t host_pdev_id,
717 			uint32_t *target_pdev_id);
718 	QDF_STATUS (*wifi_pos_convert_pdev_id_target_to_host)(
719 			struct wlan_objmgr_psoc *psoc, uint32_t target_pdev_id,
720 			uint32_t *host_pdev_id);
721 };
722 #endif
723 
724 #ifdef DIRECT_BUF_RX_ENABLE
725 /**
726  * struct wlan_lmac_if_direct_buf_rx_tx_ops - structire of direct buf rx txops
727  * @direct_buf_rx_module_register: Registration API callback for modules
728  *                                 to register with direct buf rx framework
729  * @direct_buf_rx_module_unregister: Unregistration API to clean up module
730  *                                   specific resources in DBR
731  * @direct_buf_rx_register_events: Registration of WMI events for direct
732  *                                 buffer rx framework
733  * @direct_buf_rx_unregister_events: Unregistraton of WMI events for direct
734  *                                   buffer rx framework
735  * @direct_buf_rx_print_ring_stat: Print ring status per module per pdev
736  *
737  * @direct_buf_rx_get_ring_params: Get ring parameters for module_id
738  * @direct_buf_rx_start_ring_debug: Start DBR ring debug
739  * @direct_buf_rx_stop_ring_debug: Stop DBR ring debug
740  * @direct_buf_rx_start_buffer_poisoning: Start DBR buffer poisoning
741  * @direct_buf_rx_stop_buffer_poisoning: Stop DBR buffer poisoning
742  */
743 struct wlan_lmac_if_direct_buf_rx_tx_ops {
744 	QDF_STATUS (*direct_buf_rx_module_register)(
745 			struct wlan_objmgr_pdev *pdev, uint8_t mod_id,
746 			struct dbr_module_config *dbr_config,
747 			bool (*dbr_rsp_handler)
748 			     (struct wlan_objmgr_pdev *pdev,
749 			      struct direct_buf_rx_data *dbr_data));
750 	QDF_STATUS (*direct_buf_rx_module_unregister)(
751 			struct wlan_objmgr_pdev *pdev, uint8_t mod_id);
752 	QDF_STATUS (*direct_buf_rx_register_events)(
753 			struct wlan_objmgr_psoc *psoc);
754 	QDF_STATUS (*direct_buf_rx_unregister_events)(
755 			struct wlan_objmgr_psoc *psoc);
756 	QDF_STATUS (*direct_buf_rx_print_ring_stat)(
757 			struct wlan_objmgr_pdev *pdev);
758 	QDF_STATUS (*direct_buf_rx_get_ring_params)
759 		(struct wlan_objmgr_pdev *pdev,
760 		 struct module_ring_params *param,
761 		 uint8_t module_id, uint8_t srng_id);
762 	QDF_STATUS (*direct_buf_rx_start_ring_debug)(
763 		struct wlan_objmgr_pdev *pdev, uint8_t mod_id,
764 		uint32_t num_ring_debug_entries);
765 	QDF_STATUS (*direct_buf_rx_stop_ring_debug)(
766 		struct wlan_objmgr_pdev *pdev, uint8_t mod_id);
767 	QDF_STATUS (*direct_buf_rx_start_buffer_poisoning)(
768 		struct wlan_objmgr_pdev *pdev, uint8_t mod_id, uint32_t value);
769 	QDF_STATUS (*direct_buf_rx_stop_buffer_poisoning)(
770 		struct wlan_objmgr_pdev *pdev, uint8_t mod_id);
771 };
772 #endif /* DIRECT_BUF_RX_ENABLE */
773 
774 #ifdef FEATURE_WLAN_TDLS
775 /* fwd declarations for tdls tx ops */
776 struct tdls_info;
777 struct tdls_peer_update_state;
778 struct tdls_channel_switch_params;
779 struct sta_uapsd_trig_params;
780 /**
781  * struct wlan_lmac_if_tdls_tx_ops - south bound tx function pointers for tdls
782  * @update_fw_state: function to update tdls firmware state
783  * @update_peer_state: function to update tdls peer state
784  * @set_offchan_mode: function to set tdls offchannel mode
785  * @tdls_reg_ev_handler: function to register for tdls events
786  * @tdls_unreg_ev_handler: function to unregister for tdls events
787  *
788  * tdls module uses these functions to avail ol/da lmac services
789  */
790 struct wlan_lmac_if_tdls_tx_ops {
791 	QDF_STATUS (*update_fw_state)(struct wlan_objmgr_psoc *psoc,
792 				     struct tdls_info *req);
793 	QDF_STATUS (*update_peer_state)(struct wlan_objmgr_psoc *psoc,
794 				       struct tdls_peer_update_state *param);
795 	QDF_STATUS (*set_offchan_mode)(struct wlan_objmgr_psoc *psoc,
796 				      struct tdls_channel_switch_params *param);
797 	QDF_STATUS (*tdls_reg_ev_handler)(struct wlan_objmgr_psoc *psoc,
798 					 void *arg);
799 	QDF_STATUS (*tdls_unreg_ev_handler) (struct wlan_objmgr_psoc *psoc,
800 					    void *arg);
801 };
802 
803 /* fwd declarations for tdls rx ops */
804 struct tdls_event_info;
805 /**
806  * struct wlan_lmac_if_tdls_rx_ops  - south bound rx function pointers for tdls
807  * @tdls_ev_handler: function to handler tdls event
808  *
809  * lmac modules uses this API to post scan events to tdls module
810  */
811 struct wlan_lmac_if_tdls_rx_ops {
812 	QDF_STATUS (*tdls_ev_handler)(struct wlan_objmgr_psoc *psoc,
813 				     struct tdls_event_info *info);
814 };
815 #endif
816 
817 /**
818  * struct wlan_lmac_if_ftm_rx_ops  - south bound rx function pointers for FTM
819  * @ftm_ev_handler: function to handle FTM event
820  *
821  * lmac modules uses this API to post FTM events to FTM module
822  */
823 struct wlan_lmac_if_ftm_rx_ops {
824 	QDF_STATUS (*ftm_ev_handler)(struct wlan_objmgr_pdev *pdev,
825 					uint8_t *event_buf, uint32_t len);
826 };
827 
828 /**
829  * struct wlan_lmac_reg_if_tx_ops - structure of tx function
830  *                  pointers for regulatory component
831  * @register_master_handler: pointer to register event handler
832  * @unregister_master_handler:  pointer to unregister event handler
833  * @register_11d_new_cc_handler: pointer to register 11d cc event handler
834  * @unregister_11d_new_cc_handler:  pointer to unregister 11d cc event handler
835  * @send_ctl_info: call-back function to send CTL info to firmware
836  */
837 struct wlan_lmac_if_reg_tx_ops {
838 	QDF_STATUS (*register_master_handler)(struct wlan_objmgr_psoc *psoc,
839 					      void *arg);
840 	QDF_STATUS (*unregister_master_handler)(struct wlan_objmgr_psoc *psoc,
841 						void *arg);
842 
843 	QDF_STATUS (*set_country_code)(struct wlan_objmgr_psoc *psoc,
844 						void *arg);
845 	QDF_STATUS (*fill_umac_legacy_chanlist)(struct wlan_objmgr_pdev *pdev,
846 			struct regulatory_channel *cur_chan_list);
847 	QDF_STATUS (*register_11d_new_cc_handler)(
848 			struct wlan_objmgr_psoc *psoc, void *arg);
849 	QDF_STATUS (*unregister_11d_new_cc_handler)(
850 			struct wlan_objmgr_psoc *psoc, void *arg);
851 	QDF_STATUS (*start_11d_scan)(struct wlan_objmgr_psoc *psoc,
852 			struct reg_start_11d_scan_req *reg_start_11d_scan_req);
853 	QDF_STATUS (*stop_11d_scan)(struct wlan_objmgr_psoc *psoc,
854 			struct reg_stop_11d_scan_req *reg_stop_11d_scan_req);
855 	bool (*is_there_serv_ready_extn)(struct wlan_objmgr_psoc *psoc);
856 	QDF_STATUS (*set_user_country_code)(struct wlan_objmgr_psoc *psoc,
857 					    uint8_t pdev_id,
858 					    struct cc_regdmn_s *rd);
859 	QDF_STATUS (*set_country_failed)(struct wlan_objmgr_pdev *pdev);
860 	QDF_STATUS (*register_ch_avoid_event_handler)(
861 			struct wlan_objmgr_psoc *psoc, void *arg);
862 	QDF_STATUS (*unregister_ch_avoid_event_handler)(
863 			struct wlan_objmgr_psoc *psoc, void *arg);
864 	QDF_STATUS (*send_ctl_info)(struct wlan_objmgr_psoc *psoc,
865 				    struct reg_ctl_params *params);
866 	QDF_STATUS (*get_phy_id_from_pdev_id)(struct wlan_objmgr_psoc *psoc,
867 					      uint8_t pdev_id, uint8_t *phy_id);
868 	QDF_STATUS (*get_pdev_id_from_phy_id)(struct wlan_objmgr_psoc *psoc,
869 					      uint8_t phy_id, uint8_t *pdev_id);
870 };
871 
872 /**
873  * struct wlan_lmac_if_dfs_tx_ops - Function pointer to call offload/lmac
874  *                                  functions from DFS module.
875  * @dfs_enable:                         Enable DFS.
876  * @dfs_get_caps:                       Get DFS capabilities.
877  * @dfs_disable:                        Disable DFS
878  * @dfs_gettsf64:                       Get tsf64 value.
879  * @dfs_set_use_cac_prssi:              Set use_cac_prssi value.
880  * @dfs_get_dfsdomain:                  Get DFS domain.
881  * @dfs_is_countryCode_CHINA:           Check is country code CHINA.
882  * @dfs_get_thresholds:                 Get thresholds.
883  * @dfs_get_ext_busy:                   Get ext_busy.
884  * @dfs_get_target_type:                Get target type.
885  * @dfs_is_countryCode_KOREA_ROC3:      Check is county code Korea.
886  * @dfs_get_ah_devid:                   Get ah devid.
887  * @dfs_get_phymode_info:               Get phymode info.
888  * @dfs_reg_ev_handler:                 Register dfs event handler.
889  * @dfs_process_emulate_bang_radar_cmd: Process emulate bang radar test command.
890  * @dfs_agile_ch_cfg_cmd:               Send Agile Channel Configuration command
891  * @dfs_ocac_abort_cmd:                 Send Off-Channel CAC abort command.
892  * @dfs_is_pdev_5ghz:                   Check if the given pdev is 5GHz.
893  * @dfs_set_phyerr_filter_offload:      Config phyerr filter offload.
894  * @dfs_send_offload_enable_cmd:        Send dfs offload enable command to fw.
895  * @dfs_host_dfs_check_support:         To check Host DFS confirmation feature
896  *                                      support.
897  * @dfs_send_avg_radar_params_to_fw:    Send average radar parameters to FW.
898  * @dfs_send_usenol_pdev_param:         Send usenol pdev param to FW.
899  * @dfs_send_subchan_marking_pdev_param: Send subchan marking pdev param to FW.
900  * @dfs_check_mode_switch_state:        Find if HW mode switch is in progress.
901  */
902 
903 struct wlan_lmac_if_dfs_tx_ops {
904 	QDF_STATUS (*dfs_enable)(struct wlan_objmgr_pdev *pdev,
905 			int *is_fastclk,
906 			struct wlan_dfs_phyerr_param *param,
907 			uint32_t dfsdomain);
908 	QDF_STATUS (*dfs_get_caps)(struct wlan_objmgr_pdev *pdev,
909 			struct wlan_dfs_caps *dfs_caps);
910 	QDF_STATUS (*dfs_disable)(struct wlan_objmgr_pdev *pdev,
911 			int no_cac);
912 	QDF_STATUS (*dfs_gettsf64)(struct wlan_objmgr_pdev *pdev,
913 			uint64_t *tsf64);
914 	QDF_STATUS (*dfs_set_use_cac_prssi)(struct wlan_objmgr_pdev *pdev);
915 	QDF_STATUS (*dfs_get_thresholds)(struct wlan_objmgr_pdev *pdev,
916 			struct wlan_dfs_phyerr_param *param);
917 	QDF_STATUS (*dfs_get_ext_busy)(struct wlan_objmgr_pdev *pdev,
918 			int *dfs_ext_chan_busy);
919 	QDF_STATUS (*dfs_get_target_type)(struct wlan_objmgr_pdev *pdev,
920 			uint32_t *target_type);
921 	QDF_STATUS (*dfs_get_ah_devid)(struct wlan_objmgr_pdev *pdev,
922 			uint16_t *devid);
923 	QDF_STATUS (*dfs_get_phymode_info)(struct wlan_objmgr_pdev *pdev,
924 			uint32_t chan_mode,
925 			uint32_t *mode_info,
926 			bool is_2gvht_en);
927 	QDF_STATUS (*dfs_reg_ev_handler)(struct wlan_objmgr_psoc *psoc);
928 	QDF_STATUS (*dfs_process_emulate_bang_radar_cmd)(
929 			struct wlan_objmgr_pdev *pdev,
930 			struct dfs_emulate_bang_radar_test_cmd *dfs_unit_test);
931 	QDF_STATUS (*dfs_agile_ch_cfg_cmd)(
932 			struct wlan_objmgr_pdev *pdev,
933 			struct dfs_agile_cac_params *adfs_params);
934 	QDF_STATUS (*dfs_ocac_abort_cmd)(struct wlan_objmgr_pdev *pdev);
935 	QDF_STATUS (*dfs_is_pdev_5ghz)(struct wlan_objmgr_pdev *pdev,
936 			bool *is_5ghz);
937 	QDF_STATUS (*dfs_set_phyerr_filter_offload)(
938 			struct wlan_objmgr_pdev *pdev,
939 			bool dfs_phyerr_filter_offload);
940 	bool (*dfs_is_tgt_offload)(struct wlan_objmgr_psoc *psoc);
941 	QDF_STATUS (*dfs_send_offload_enable_cmd)(
942 			struct wlan_objmgr_pdev *pdev,
943 			bool enable);
944 	QDF_STATUS (*dfs_host_dfs_check_support)(struct wlan_objmgr_pdev *pdev,
945 						 bool *enabled);
946 	QDF_STATUS (*dfs_send_avg_radar_params_to_fw)(
947 			struct wlan_objmgr_pdev *pdev,
948 			struct dfs_radar_found_params *params);
949 	QDF_STATUS (*dfs_send_usenol_pdev_param)(struct wlan_objmgr_pdev *pdev,
950 						 bool usenol);
951 	QDF_STATUS (*dfs_send_subchan_marking_pdev_param)(
952 			struct wlan_objmgr_pdev *pdev,
953 			bool subchanmark);
954 	QDF_STATUS (*dfs_check_mode_switch_state)(
955 			struct wlan_objmgr_pdev *pdev,
956 			bool *is_hw_mode_switch_in_progress);
957 };
958 
959 /**
960  * struct wlan_lmac_if_target_tx_ops - Function pointers to call target
961  *                                     functions from other modules.
962  * @tgt_is_tgt_type_ar900b:  To check AR900B target type.
963  * @tgt_is_tgt_type_ipq4019: To check IPQ4019 target type.
964  * @tgt_is_tgt_type_qca9984: To check QCA9984 target type.
965  * @tgt_is_tgt_type_qca9888: To check QCA9888 target type.
966  * @tgt_is_tgt_type_adrastea: To check QCS40X target type.
967  * @tgt_is_tgt_type_qcn9000: To check QCN9000 (Pine) target type.
968  * @tgt_get_tgt_type:        Get target type
969  * @tgt_get_tgt_version:     Get target version
970  * @tgt_get_tgt_revision:    Get target revision
971  */
972 struct wlan_lmac_if_target_tx_ops {
973 	bool (*tgt_is_tgt_type_ar900b)(uint32_t);
974 	bool (*tgt_is_tgt_type_ipq4019)(uint32_t);
975 	bool (*tgt_is_tgt_type_qca9984)(uint32_t);
976 	bool (*tgt_is_tgt_type_qca9888)(uint32_t);
977 	bool (*tgt_is_tgt_type_adrastea)(uint32_t);
978 	bool (*tgt_is_tgt_type_qcn9000)(uint32_t);
979 	uint32_t (*tgt_get_tgt_type)(struct wlan_objmgr_psoc *psoc);
980 	uint32_t (*tgt_get_tgt_version)(struct wlan_objmgr_psoc *psoc);
981 	uint32_t (*tgt_get_tgt_revision)(struct wlan_objmgr_psoc *psoc);
982 };
983 
984 #ifdef WLAN_OFFCHAN_TXRX_ENABLE
985 /**
986  * struct wlan_lmac_if_offchan_txrx_ops - Function pointers to check target
987  *                                     capabilities related to offchan txrx.
988  * @offchan_data_tid_support: To check if target supports separate tid for
989  *                                     offchan data tx.
990  */
991 struct wlan_lmac_if_offchan_txrx_ops {
992 	bool (*offchan_data_tid_support)(struct wlan_objmgr_pdev *pdev);
993 };
994 #endif
995 
996 #ifdef WLAN_SUPPORT_GREEN_AP
997 struct wlan_green_ap_egap_params;
998 /**
999  * struct wlan_lmac_if_green_ap_tx_ops - structure of tx function
1000  *                  pointers for green ap component
1001  * @enable_egap: function pointer to send enable egap indication to fw
1002  * @ps_on_off_send:  function pointer to send enable/disable green ap ps to fw
1003  */
1004 struct wlan_lmac_if_green_ap_tx_ops {
1005 	QDF_STATUS (*enable_egap)(struct wlan_objmgr_pdev *pdev,
1006 				struct wlan_green_ap_egap_params *egap_params);
1007 	QDF_STATUS (*ps_on_off_send)(struct wlan_objmgr_pdev *pdev,
1008 				     bool value, uint8_t pdev_id);
1009 	QDF_STATUS (*reset_dev)(struct wlan_objmgr_pdev *pdev);
1010 	uint16_t (*get_current_channel)(struct wlan_objmgr_pdev *pdev);
1011 	uint64_t (*get_current_channel_flags)(struct wlan_objmgr_pdev *pdev);
1012 	QDF_STATUS (*get_capab)(struct  wlan_objmgr_pdev *pdev);
1013 };
1014 #endif
1015 
1016 #ifdef FEATURE_COEX
1017 struct coex_config_params;
1018 
1019 /**
1020  * struct wlan_lmac_if_coex_tx_ops - south bound tx function pointers for coex
1021  * @coex_config_send: function pointer to send coex config to fw
1022  */
1023 struct wlan_lmac_if_coex_tx_ops {
1024 	QDF_STATUS (*coex_config_send)(struct wlan_objmgr_pdev *pdev,
1025 				       struct coex_config_params *param);
1026 };
1027 #endif
1028 
1029 /**
1030  * struct wlan_lmac_if_tx_ops - south bound tx function pointers
1031  * @mgmt_txrx_tx_ops: mgmt txrx tx ops
1032  * @scan: scan tx ops
1033  * @dfs_tx_ops: dfs tx ops.
1034  * @green_ap_tx_ops: green_ap tx_ops
1035  * @cp_stats_tx_ops: cp stats tx_ops
1036  * @coex_ops: coex tx_ops
1037  *
1038  * Callback function tabled to be registered with umac.
1039  * umac will use the functional table to send events/frames to wmi
1040  */
1041 
1042 struct wlan_lmac_if_tx_ops {
1043 	/* Components to declare function pointers required by the module
1044 	 * in component specific structure.
1045 	 * The component specific ops structure can be declared in this file
1046 	 * only
1047 	 */
1048 	 struct wlan_lmac_if_mgmt_txrx_tx_ops mgmt_txrx_tx_ops;
1049 	 struct wlan_lmac_if_scan_tx_ops scan;
1050 #ifdef CONVERGED_P2P_ENABLE
1051 	struct wlan_lmac_if_p2p_tx_ops p2p;
1052 #endif
1053 #ifdef WLAN_IOT_SIM_SUPPORT
1054 	struct wlan_lmac_if_iot_sim_tx_ops iot_sim_tx_ops;
1055 #endif
1056 #ifdef QCA_SUPPORT_SON
1057 	struct wlan_lmac_if_son_tx_ops son_tx_ops;
1058 #endif
1059 
1060 #ifdef WLAN_ATF_ENABLE
1061 	struct wlan_lmac_if_atf_tx_ops atf_tx_ops;
1062 #endif
1063 #ifdef QCA_SUPPORT_CP_STATS
1064 	struct wlan_lmac_if_cp_stats_tx_ops cp_stats_tx_ops;
1065 #endif
1066 #ifdef DCS_INTERFERENCE_DETECTION
1067 	struct wlan_target_if_dcs_tx_ops dcs_tx_ops;
1068 #endif
1069 #ifdef WLAN_SA_API_ENABLE
1070 	struct wlan_lmac_if_sa_api_tx_ops sa_api_tx_ops;
1071 #endif
1072 
1073 #ifdef WLAN_CFR_ENABLE
1074 	struct wlan_lmac_if_cfr_tx_ops cfr_tx_ops;
1075 #endif
1076 
1077 #ifdef WLAN_CONV_SPECTRAL_ENABLE
1078 	struct wlan_lmac_if_sptrl_tx_ops sptrl_tx_ops;
1079 #endif
1080 
1081 #ifdef WLAN_CONV_CRYPTO_SUPPORTED
1082 	struct wlan_lmac_if_crypto_tx_ops crypto_tx_ops;
1083 #endif
1084 
1085 #ifdef WIFI_POS_CONVERGED
1086 	struct wlan_lmac_if_wifi_pos_tx_ops wifi_pos_tx_ops;
1087 #endif
1088 	struct wlan_lmac_if_reg_tx_ops reg_ops;
1089 	struct wlan_lmac_if_dfs_tx_ops dfs_tx_ops;
1090 
1091 #ifdef FEATURE_WLAN_TDLS
1092 	struct wlan_lmac_if_tdls_tx_ops tdls_tx_ops;
1093 #endif
1094 
1095 #ifdef WLAN_SUPPORT_FILS
1096 	struct wlan_lmac_if_fd_tx_ops fd_tx_ops;
1097 #endif
1098 	 struct wlan_lmac_if_mlme_tx_ops mops;
1099 	 struct wlan_lmac_if_target_tx_ops target_tx_ops;
1100 
1101 #ifdef WLAN_OFFCHAN_TXRX_ENABLE
1102 	struct wlan_lmac_if_offchan_txrx_ops offchan_txrx_ops;
1103 #endif
1104 
1105 #ifdef DIRECT_BUF_RX_ENABLE
1106 	struct wlan_lmac_if_direct_buf_rx_tx_ops dbr_tx_ops;
1107 #endif
1108 
1109 #ifdef WLAN_SUPPORT_GREEN_AP
1110 	 struct wlan_lmac_if_green_ap_tx_ops green_ap_tx_ops;
1111 #endif
1112 
1113 	struct wlan_lmac_if_ftm_tx_ops ftm_tx_ops;
1114 
1115 #ifdef FEATURE_COEX
1116 	struct wlan_lmac_if_coex_tx_ops coex_ops;
1117 #endif
1118 };
1119 
1120 /**
1121  * struct wlan_lmac_if_mgmt_txrx_rx_ops - structure of rx function
1122  *                  pointers for mgmt txrx component
1123  * @mgmt_tx_completion_handler: function pointer to give tx completions
1124  *                              to mgmt txrx comp.
1125  * @mgmt_rx_frame_handler: function pointer to give rx frame to mgmt txrx comp.
1126  * @mgmt_txrx_get_nbuf_from_desc_id: function pointer to get nbuf from desc id
1127  * @mgmt_txrx_get_peer_from_desc_id: function pointer to get peer from desc id
1128  * @mgmt_txrx_get_vdev_id_from_desc_id: function pointer to get vdev id from
1129  *                                      desc id
1130  */
1131 struct wlan_lmac_if_mgmt_txrx_rx_ops {
1132 	QDF_STATUS (*mgmt_tx_completion_handler)(
1133 			struct wlan_objmgr_pdev *pdev,
1134 			uint32_t desc_id, uint32_t status,
1135 			void *tx_compl_params);
1136 	QDF_STATUS (*mgmt_rx_frame_handler)(
1137 			struct wlan_objmgr_psoc *psoc,
1138 			qdf_nbuf_t buf,
1139 			struct mgmt_rx_event_params *mgmt_rx_params);
1140 	qdf_nbuf_t (*mgmt_txrx_get_nbuf_from_desc_id)(
1141 			struct wlan_objmgr_pdev *pdev,
1142 			uint32_t desc_id);
1143 	struct wlan_objmgr_peer * (*mgmt_txrx_get_peer_from_desc_id)(
1144 			struct wlan_objmgr_pdev *pdev, uint32_t desc_id);
1145 	uint8_t (*mgmt_txrx_get_vdev_id_from_desc_id)(
1146 			struct wlan_objmgr_pdev *pdev,
1147 			uint32_t desc_id);
1148 	uint32_t (*mgmt_txrx_get_free_desc_pool_count)(
1149 			struct wlan_objmgr_pdev *pdev);
1150 };
1151 
1152 struct wlan_lmac_if_reg_rx_ops {
1153 	QDF_STATUS (*master_list_handler)(struct cur_regulatory_info
1154 					  *reg_info);
1155 	QDF_STATUS (*reg_11d_new_cc_handler)(struct wlan_objmgr_psoc *psoc,
1156 			struct reg_11d_new_country *reg_11d_new_cc);
1157 	QDF_STATUS (*reg_set_regdb_offloaded)(struct wlan_objmgr_psoc *psoc,
1158 			bool val);
1159 	QDF_STATUS (*reg_set_11d_offloaded)(struct wlan_objmgr_psoc *psoc,
1160 			bool val);
1161 	QDF_STATUS (*reg_set_6ghz_supported)(struct wlan_objmgr_psoc *psoc,
1162 					     bool val);
1163 	QDF_STATUS (*reg_set_5dot9_ghz_supported)(struct wlan_objmgr_psoc
1164 						  *psoc, bool val);
1165 	QDF_STATUS (*get_dfs_region)(struct wlan_objmgr_pdev *pdev,
1166 			enum dfs_reg *dfs_reg);
1167 	QDF_STATUS (*reg_ch_avoid_event_handler)(struct wlan_objmgr_psoc *psoc,
1168 			struct ch_avoid_ind_type *ch_avoid_ind);
1169 	uint8_t (*reg_freq_to_chan)(struct wlan_objmgr_pdev *pdev,
1170 				    qdf_freq_t freq);
1171 	QDF_STATUS (*reg_set_chan_144)(struct wlan_objmgr_pdev *pdev,
1172 			bool enable_ch_144);
1173 	bool (*reg_get_chan_144)(struct wlan_objmgr_pdev *pdev);
1174 	QDF_STATUS (*reg_program_default_cc)(struct wlan_objmgr_pdev *pdev,
1175 			uint16_t regdmn);
1176 	QDF_STATUS (*reg_get_current_regdomain)(struct wlan_objmgr_pdev *pdev,
1177 			struct cur_regdmn_info *cur_regdmn);
1178 	QDF_STATUS (*reg_enable_dfs_channels)(struct wlan_objmgr_pdev *pdev,
1179 					      bool dfs_enable);
1180 	QDF_STATUS (*reg_modify_pdev_chan_range)(struct
1181 						 wlan_objmgr_pdev *pdev);
1182 	QDF_STATUS
1183 	(*reg_update_pdev_wireless_modes)(struct wlan_objmgr_pdev *pdev,
1184 					  uint32_t wireless_modes);
1185 	bool
1186 	(*reg_is_range_only6g)(qdf_freq_t low_freq, qdf_freq_t high_freq);
1187 	QDF_STATUS (*reg_disable_chan_coex)(struct wlan_objmgr_pdev *pdev,
1188 					    uint8_t unii_5g_bitmap);
1189 	bool (*reg_ignore_fw_reg_offload_ind)(struct wlan_objmgr_psoc *psoc);
1190 	QDF_STATUS (*reg_get_unii_5g_bitmap)(struct wlan_objmgr_pdev *pdev,
1191 					     uint8_t *bitmap);
1192 };
1193 
1194 #ifdef CONVERGED_P2P_ENABLE
1195 
1196 /* forward declarations for p2p rx ops */
1197 struct p2p_noa_info;
1198 struct p2p_lo_event;
1199 struct p2p_set_mac_filter_evt;
1200 
1201 /**
1202  * struct wlan_lmac_if_p2p_rx_ops - structure of rx function pointers
1203  * for P2P component
1204  * @lo_ev_handler:    function pointer to give listen offload event
1205  * @noa_ev_handler:   function pointer to give noa event
1206  * @add_mac_addr_filter_evt_handler: function pointer to process add mac addr
1207  *    rx filter event
1208  */
1209 struct wlan_lmac_if_p2p_rx_ops {
1210 #ifdef FEATURE_P2P_LISTEN_OFFLOAD
1211 	QDF_STATUS (*lo_ev_handler)(struct wlan_objmgr_psoc *psoc,
1212 		struct p2p_lo_event *event_info);
1213 #endif
1214 	QDF_STATUS (*noa_ev_handler)(struct wlan_objmgr_psoc *psoc,
1215 		struct p2p_noa_info *event_info);
1216 	QDF_STATUS (*add_mac_addr_filter_evt_handler)(
1217 		struct wlan_objmgr_psoc *psoc,
1218 		struct p2p_set_mac_filter_evt *event_info);
1219 
1220 };
1221 #endif
1222 
1223 #ifdef WLAN_ATF_ENABLE
1224 
1225 /**
1226  * struct wlan_lmac_if_atf_rx_ops - ATF south bound rx function pointers
1227  * @atf_get_atf_commit:                Get ATF commit state
1228  * @atf_get_fmcap:                     Get firmware capability for ATF
1229  * @atf_get_obss_scale:                Get OBSS scale
1230  * @atf_get_mode:                      Get mode of ATF
1231  * @atf_get_msdu_desc:                 Get msdu desc for ATF
1232  * @atf_get_max_vdevs:                 Get maximum vdevs for a Radio
1233  * @atf_get_peers:                     Get number of peers for a radio
1234  * @atf_get_tput_based:                Get throughput based enabled/disabled
1235  * @atf_get_logging:                   Get logging enabled/disabled
1236  * @atf_update_buf_held:               Set Num buf held by subgroup
1237  * @atf_get_ssidgroup:                 Get ssid group state
1238  * @atf_get_vdev_ac_blk_cnt:           Get AC block count for vdev
1239  * @atf_get_peer_blk_txbitmap:         Get peer tx traffic AC bitmap
1240  * @atf_get_vdev_blk_txtraffic:        Get vdev tx traffic block state
1241  * @atf_get_sched:                     Get ATF scheduled policy
1242  * @atf_get_tx_tokens:                 Get Tx tokens
1243  * @atf_buf_distribute:                Distribute Buffers
1244  * @atf_get_tx_tokens_common:          Get common tx tokens
1245  * @atf_get_shadow_alloted_tx_tokens:  Get shadow alloted tx tokens
1246  * @atf_get_peer_stats:                Get atf peer stats
1247  * @atf_adjust_subgroup_txtokens:      Adjust tokens based on actual duration
1248  * @atf_account_subgroup_txtokens:     Estimate tx time & update subgroup tokens
1249  * @atf_subgroup_free_buf:             On tx completion, update num buf held
1250  * @atf_update_subgroup_tidstate:      TID state (Paused/unpaused) of node
1251  * @atf_get_subgroup_airtime:          Get subgroup airtime
1252  * @atf_get_token_allocated:           Get atf token allocated
1253  * @atf_get_token_utilized:            Get atf token utilized
1254  * @atf_set_sched:                     Set ATF schedule policy
1255  * @atf_set_fmcap:                     Set firmware capability for ATF
1256  * @atf_set_obss_scale:                Set ATF obss scale
1257  * @atf_set_msdu_desc:                 Set msdu desc
1258  * @atf_set_max_vdevs:                 Set maximum vdevs number
1259  * @atf_set_peers:                     Set peers number
1260  * @atf_set_peer_stats:                Set peer stats
1261  * @atf_set_vdev_blk_txtraffic:        Set Block/unblock vdev tx traffic
1262  * @atf_peer_blk_txtraffic:            Block peer tx traffic
1263  * @atf_peer_unblk_txtraffic:          Unblock peer tx traffic
1264  * @atf_set_token_allocated:           Set atf token allocated
1265  * @atf_set_token_utilized:            Set atf token utilized
1266  * @atf_process_ppdu_stats:            Process PPDU stats to get ATF stats
1267  * @atf_is_stats_enabled:              Check ATF stats enabled or not
1268  */
1269 struct wlan_lmac_if_atf_rx_ops {
1270 	uint8_t (*atf_get_atf_commit)(struct wlan_objmgr_pdev *pdev);
1271 	uint32_t (*atf_get_fmcap)(struct wlan_objmgr_psoc *psoc);
1272 	uint32_t (*atf_get_obss_scale)(struct wlan_objmgr_pdev *pdev);
1273 	uint32_t (*atf_get_mode)(struct wlan_objmgr_psoc *psoc);
1274 	uint32_t (*atf_get_msdu_desc)(struct wlan_objmgr_psoc *psoc);
1275 	uint32_t (*atf_get_max_vdevs)(struct wlan_objmgr_psoc *psoc);
1276 	uint32_t (*atf_get_peers)(struct wlan_objmgr_psoc *psoc);
1277 	uint32_t (*atf_get_tput_based)(struct wlan_objmgr_pdev *pdev);
1278 	uint32_t (*atf_get_logging)(struct wlan_objmgr_pdev *pdev);
1279 	void*   (*atf_update_buf_held)(struct wlan_objmgr_peer *peer,
1280 				       int8_t ac);
1281 	uint32_t (*atf_get_ssidgroup)(struct wlan_objmgr_pdev *pdev);
1282 	uint32_t (*atf_get_vdev_ac_blk_cnt)(struct wlan_objmgr_vdev *vdev);
1283 	uint8_t (*atf_get_peer_blk_txbitmap)(struct wlan_objmgr_peer *peer);
1284 	uint8_t (*atf_get_vdev_blk_txtraffic)(struct wlan_objmgr_vdev *vdev);
1285 	uint32_t (*atf_get_sched)(struct wlan_objmgr_pdev *pdev);
1286 	uint32_t (*atf_get_tx_tokens)(struct wlan_objmgr_peer *peer);
1287 	uint32_t (*atf_buf_distribute)(struct wlan_objmgr_pdev *pdev,
1288 				       struct wlan_objmgr_peer *peer,
1289 				       int8_t ac);
1290 	uint32_t (*atf_get_txtokens_common)(struct wlan_objmgr_pdev *pdev);
1291 	uint32_t (*atf_get_shadow_alloted_tx_tokens)(
1292 						struct wlan_objmgr_pdev *pdev);
1293 	void (*atf_get_peer_stats)(struct wlan_objmgr_peer *peer,
1294 				   struct atf_stats *stats);
1295 	QDF_STATUS
1296 	(*atf_adjust_subgroup_txtokens)(struct wlan_objmgr_peer *pr,
1297 					uint8_t ac, uint32_t actual_duration,
1298 					uint32_t est_duration);
1299 	QDF_STATUS
1300 	(*atf_account_subgroup_txtokens)(struct wlan_objmgr_peer *pr,
1301 					 uint8_t ac,
1302 					 uint32_t duration);
1303 	QDF_STATUS
1304 	(*atf_subgroup_free_buf)(uint16_t buf_acc_size, void *bf_atf_sg);
1305 	QDF_STATUS
1306 	(*atf_update_subgroup_tidstate)(struct wlan_objmgr_peer *peer,
1307 					uint8_t atf_nodepaused);
1308 	uint8_t (*atf_get_subgroup_airtime)(struct wlan_objmgr_peer *peer,
1309 					    uint8_t ac);
1310 	uint16_t (*atf_get_token_allocated)(struct wlan_objmgr_peer *peer);
1311 	uint16_t (*atf_get_token_utilized)(struct wlan_objmgr_peer *peer);
1312 	void (*atf_set_sched)(struct wlan_objmgr_pdev *pdev, uint32_t value);
1313 	void (*atf_set_fmcap)(struct wlan_objmgr_psoc *psoc, uint32_t value);
1314 	void (*atf_set_obss_scale)(struct wlan_objmgr_pdev *pdev,
1315 				   uint32_t value);
1316 	void (*atf_set_msdu_desc)(struct wlan_objmgr_psoc *psoc,
1317 				  uint32_t value);
1318 	void (*atf_set_max_vdevs)(struct wlan_objmgr_psoc *psoc,
1319 				  uint32_t value);
1320 	void (*atf_set_peers)(struct wlan_objmgr_psoc *psoc, uint32_t value);
1321 	void (*atf_set_peer_stats)(struct wlan_objmgr_peer *peer,
1322 				   struct atf_stats *stats);
1323 	void (*atf_set_vdev_blk_txtraffic)(struct wlan_objmgr_vdev *vdev,
1324 					   uint8_t value);
1325 	void (*atf_peer_blk_txtraffic)(struct wlan_objmgr_peer *peer,
1326 				       int8_t ac_id);
1327 	void (*atf_peer_unblk_txtraffic)(struct wlan_objmgr_peer *peer,
1328 					 int8_t ac_id);
1329 	void (*atf_set_token_allocated)(struct wlan_objmgr_peer *peer,
1330 					uint16_t value);
1331 	void (*atf_set_token_utilized)(struct wlan_objmgr_peer *peer,
1332 				       uint16_t value);
1333 	void (*atf_process_ppdu_stats)(struct wlan_objmgr_pdev *pdev,
1334 				       qdf_nbuf_t msg);
1335 	uint8_t (*atf_is_stats_enabled)(struct wlan_objmgr_pdev *pdev);
1336 };
1337 #endif
1338 
1339 #ifdef WLAN_SUPPORT_FILS
1340 /**
1341  * struct wlan_lmac_if_fd_rx_ops - FILS Discovery specific Rx function pointers
1342  * @fd_is_fils_enable:      FILS enabled or not
1343  * @fd_alloc:               Allocate FD buffer
1344  * @fd_stop:                Stop and free deferred FD buffer
1345  * @fd_free:                Free FD frame buffer
1346  * @fd_get_valid_fd_period: Get valid FD period
1347  * @fd_swfda_handler:       SWFDA event handler
1348  * @fd_offload:             Offload FD frame
1349  * @fd_tmpl_update:         Update the FD frame template
1350  */
1351 struct wlan_lmac_if_fd_rx_ops {
1352 	uint8_t (*fd_is_fils_enable)(struct wlan_objmgr_vdev *vdev);
1353 	void (*fd_alloc)(struct wlan_objmgr_vdev *vdev);
1354 	void (*fd_stop)(struct wlan_objmgr_vdev *vdev);
1355 	void (*fd_free)(struct wlan_objmgr_vdev *vdev);
1356 	uint32_t (*fd_get_valid_fd_period)(struct wlan_objmgr_vdev *vdev,
1357 					   uint8_t *is_modified);
1358 	QDF_STATUS (*fd_swfda_handler)(struct wlan_objmgr_vdev *vdev);
1359 	QDF_STATUS (*fd_offload)(struct wlan_objmgr_vdev *vdev,
1360 				 uint32_t vdev_id);
1361 	QDF_STATUS (*fd_tmpl_update)(struct wlan_objmgr_vdev *vdev);
1362 };
1363 #endif
1364 
1365 #ifdef WLAN_SA_API_ENABLE
1366 
1367 /**
1368  * struct wlan_lmac_if_sa_api_rx_ops - SA API south bound rx function pointers
1369  */
1370 struct wlan_lmac_if_sa_api_rx_ops {
1371 	uint32_t (*sa_api_get_sa_supported)(struct wlan_objmgr_psoc *psoc);
1372 	uint32_t (*sa_api_get_validate_sw)(struct wlan_objmgr_psoc *psoc);
1373 	void (*sa_api_enable_sa)(struct wlan_objmgr_psoc *psoc, uint32_t value);
1374 	uint32_t (*sa_api_get_sa_enable)(struct wlan_objmgr_psoc *psoc);
1375 	void (*sa_api_peer_assoc_hanldler)(struct wlan_objmgr_pdev *pdev,
1376 			struct wlan_objmgr_peer *peer, struct sa_rate_cap *);
1377 	uint32_t (*sa_api_update_tx_feedback)(struct wlan_objmgr_pdev *pdev,
1378 			struct wlan_objmgr_peer *peer,
1379 			struct sa_tx_feedback *feedback);
1380 	uint32_t (*sa_api_update_rx_feedback)(struct wlan_objmgr_pdev *pdev,
1381 			struct wlan_objmgr_peer *peer,
1382 			struct sa_rx_feedback *feedback);
1383 	uint32_t (*sa_api_ucfg_set_param)(struct wlan_objmgr_pdev *pdev,
1384 			char *val);
1385 	uint32_t (*sa_api_ucfg_get_param)(struct wlan_objmgr_pdev *pdev,
1386 			char *val);
1387 	uint32_t (*sa_api_is_tx_feedback_enabled)
1388 			(struct wlan_objmgr_pdev *pdev);
1389 	uint32_t (*sa_api_is_rx_feedback_enabled)
1390 			(struct wlan_objmgr_pdev *pdev);
1391 	uint32_t (*sa_api_convert_rate_2g)(uint32_t rate);
1392 	uint32_t (*sa_api_convert_rate_5g)(uint32_t rate);
1393 	uint32_t (*sa_api_get_sa_mode)(struct wlan_objmgr_pdev *pdev);
1394 	uint32_t (*sa_api_get_beacon_txantenna)(struct wlan_objmgr_pdev *pdev);
1395 	uint32_t (*sa_api_cwm_action)(struct wlan_objmgr_pdev *pdev);
1396 };
1397 #endif
1398 
1399 #ifdef WLAN_CFR_ENABLE
1400 
1401 /**
1402  * struct wlan_lmac_if_cfr_rx_ops - CFR south bound rx function pointers
1403  * @cfr_support_set: Set the CFR support based on FW advert
1404  * @cfr_info_send: Send cfr info to upper layers
1405  * @cfr_capture_count_support_set: Set the capture_count support based on FW
1406  * advert
1407  * @cfr_mo_marking_support_set: Set MO marking supported based on FW advert
1408  */
1409 struct wlan_lmac_if_cfr_rx_ops {
1410 	void (*cfr_support_set)(struct wlan_objmgr_psoc *psoc, uint32_t value);
1411 	uint32_t (*cfr_info_send)(struct wlan_objmgr_pdev *pdev, void *head,
1412 				  size_t hlen, void *data, size_t dlen,
1413 				  void *tail, size_t tlen);
1414 	QDF_STATUS (*cfr_capture_count_support_set)(
1415 			struct wlan_objmgr_psoc *psoc, uint32_t value);
1416 	QDF_STATUS (*cfr_mo_marking_support_set)(struct wlan_objmgr_psoc *psoc,
1417 						 uint32_t value);
1418 };
1419 #endif
1420 
1421 #ifdef WLAN_CONV_SPECTRAL_ENABLE
1422 /**
1423  * struct wlan_lmac_if_sptrl_rx_ops - Spectral south bound Rx operations
1424  *
1425  * @sptrlro_get_pdev_target_handle: Get Spectral handle for pdev target
1426  * private data
1427  * @sptrlro_get_psoc_target_handle: Get Spectral handle for psoc target
1428  * private data
1429  * @sptrlro_vdev_get_chan_freq_seg2: Get secondary 80 center frequency
1430  * @sptrlro_spectral_is_feature_disabled: Check if spectral feature is disabled
1431  */
1432 struct wlan_lmac_if_sptrl_rx_ops {
1433 	void * (*sptrlro_get_pdev_target_handle)(struct wlan_objmgr_pdev *pdev);
1434 	void * (*sptrlro_get_psoc_target_handle)(struct wlan_objmgr_psoc *psoc);
1435 	int16_t (*sptrlro_vdev_get_chan_freq)(struct wlan_objmgr_vdev *vdev);
1436 	int16_t (*sptrlro_vdev_get_chan_freq_seg2)
1437 					(struct wlan_objmgr_vdev *vdev);
1438 	enum phy_ch_width (*sptrlro_vdev_get_ch_width)(
1439 			struct wlan_objmgr_vdev *vdev);
1440 	int (*sptrlro_vdev_get_sec20chan_freq_mhz)(
1441 			struct wlan_objmgr_vdev *vdev,
1442 			uint16_t *sec20chan_freq);
1443 	bool (*sptrlro_spectral_is_feature_disabled)(
1444 			struct wlan_objmgr_psoc *psoc);
1445 };
1446 #endif /* WLAN_CONV_SPECTRAL_ENABLE */
1447 
1448 #ifdef WLAN_IOT_SIM_SUPPORT
1449 struct iot_sim_cbacks;
1450 /**
1451  * wlan_lmac_if_iot_sim_rx_ops: iot_sim rx operations
1452  * iot_sim_cmd_handler: Applies iot_sim rule in outgoing and incoming frames
1453  * iot_sim_register_cb: callback registration with iot_sim
1454  **/
1455 struct wlan_lmac_if_iot_sim_rx_ops {
1456 	QDF_STATUS (*iot_sim_cmd_handler)(struct wlan_objmgr_vdev *vdev,
1457 					  qdf_nbuf_t n_buf,
1458 					  struct beacon_tmpl_params *bcn_param,
1459 					  bool tx,
1460 					  struct mgmt_rx_event_params *param);
1461 	QDF_STATUS (*iot_sim_register_cb)(struct wlan_objmgr_pdev *pdev,
1462 					  struct iot_sim_cbacks *cb);
1463 };
1464 #endif
1465 
1466 #ifdef WIFI_POS_CONVERGED
1467 /**
1468  * struct wlan_lmac_if_wifi_pos_rx_ops - structure of rx function
1469  * pointers for wifi_pos component
1470  * @oem_rsp_event_rx: callback for WMI_OEM_RESPONSE_EVENTID
1471  */
1472 struct wlan_lmac_if_wifi_pos_rx_ops {
1473 	int (*oem_rsp_event_rx)(struct wlan_objmgr_psoc *psoc,
1474 				struct oem_data_rsp *oem_rsp);
1475 };
1476 #endif
1477 
1478 /**
1479  * struct wlan_lmac_if_dfs_rx_ops - Function pointers to call dfs functions
1480  *                                  from lmac/offload.
1481  * @dfs_get_radars:                   Calls init radar table functions.
1482  * @dfs_process_phyerr:               Process phyerr.
1483  * @dfs_destroy_object:               Destroys the DFS object.
1484  * @dfs_radar_enable:                 Enables the radar.
1485  * @dfs_is_radar_enabled:             Check if the radar is enabled.
1486  * @dfs_control:                      Used to process ioctls related to DFS.
1487  * @dfs_is_precac_timer_running:      Check whether precac timer is running.
1488  * @dfs_find_vht80_chan_for_precac:   Find VHT80 channel for precac.
1489  * @dfs_cancel_precac_timer:          Cancel the precac timer.
1490  * @dfs_override_precac_timeout:      Override the default precac timeout.
1491  * @dfs_set_precac_enable:            Set precac enable flag.
1492  * @dfs_get_legacy_precac_enable:     Get the precac enable flag for
1493  *                                    partial offload (legacy) chipsets.
1494  * @dfs_set_precac_intermediate_chan: Set intermediate channel for precac.
1495  * @dfs_get_precac_intermediate_chan: Get intermediate channel for precac.
1496  * @dfs_precac_preferred_chan:        Configure preferred channel during
1497  *                                    precac.
1498  * dfs_get_precac_chan_state:         Get precac status for given channel.
1499  * dfs_start_precac_timer:            Start precac timer.
1500  * @dfs_get_override_precac_timeout:  Get precac timeout.
1501  * @dfs_set_current_channel:          Set DFS current channel.
1502  * @dfs_process_radar_ind:            Process radar found indication.
1503  * @dfs_dfs_cac_complete_ind:         Process cac complete indication.
1504  * @dfs_agile_precac_start:           Initiate Agile PreCAC run.
1505  * @dfs_set_agile_precac_state:       Set agile precac state.
1506  * @dfs_reset_adfs_config:            Reset agile dfs variables.
1507  * @dfs_dfs_ocac_complete_ind:        Process offchan cac complete indication.
1508  * @dfs_stop:                         Clear dfs timers.
1509  * @dfs_reinit_timers:                Reinitialize DFS timers.
1510  * @dfs_enable_stadfs:                Enable/Disable STADFS capability.
1511  * @dfs_is_stadfs_enabled:            Get STADFS capability value.
1512  * @dfs_process_phyerr_filter_offload:Process radar event.
1513  * @dfs_is_phyerr_filter_offload:     Check whether phyerr filter is offload.
1514  * @dfs_action_on_status:             Trigger the action to be taken based on
1515  *                                    on host dfs status received from fw.
1516  * @dfs_override_status_timeout:      Override the value of host dfs status
1517  *                                    wait timeout.
1518  * @dfs_get_override_status_timeout:  Get the value of host dfs status wait
1519  *                                    timeout.
1520  * @dfs_reset_spoof_test:             Checks if radar detection is enabled.
1521  * @dfs_is_disable_radar_marking_set: Check if dis_radar_marking param is set.
1522  * @dfs_allow_hw_pulses:              Set or unset dfs_allow_hw_pulses which
1523  *                                    allow or disallow HW pulses.
1524  * @dfs_is_hw_pulses_allowed:         Check if HW pulses are allowed or not.
1525  * @dfs_set_fw_adfs_support:          Set the agile DFS FW support in DFS.
1526  * @dfs_reset_dfs_prevchan:           Reset DFS previous channel structure.
1527  * @dfs_init_tmp_psoc_nol:            Init temporary PSOC NOL structure.
1528  * @dfs_deinit_tmp_psoc_nol:          Deinit temporary PSOC NOL structure.
1529  * @dfs_save_dfs_nol_in_psoc:         Copy DFS NOL data to the PSOC copy.
1530  * @dfs_reinit_nol_from_psoc_copy:    Reinit DFS NOL from the PSOC NOL copy.
1531  * @dfs_reinit_precac_lists:          Reinit precac lists from other pdev.
1532  * @dfs_complete_deferred_tasks:      Process mode switch completion in DFS.
1533  * @dfs_is_agile_rcac_enabled:        Checks if Agile RCAC is enabled.
1534  * @dfs_agile_sm_deliver_evt:         API to post events to DFS Agile  SM.
1535  * @dfs_set_postnol_freq:             API to set frequency to switch, post NOL.
1536  * @dfs_set_postnol_mode:             API to set phymode to switch to, post NOL.
1537  * @dfs_set_postnol_cfreq2            API to set secondary center frequency to
1538  *                                    switch to, post NOL.
1539  * @dfs_get_postnol_freq:             API to get frequency to switch, post NOL.
1540  * @dfs_get_postnol_mode:             API to get phymode to switch to, post NOL.
1541  * @dfs_get_postnol_cfreq2:           API to get secondary center frequency to
1542  *                                    switch to, post NOL.
1543  */
1544 struct wlan_lmac_if_dfs_rx_ops {
1545 	QDF_STATUS (*dfs_get_radars)(struct wlan_objmgr_pdev *pdev);
1546 	QDF_STATUS (*dfs_process_phyerr)(struct wlan_objmgr_pdev *pdev,
1547 			void *buf,
1548 			uint16_t datalen,
1549 			uint8_t r_rssi,
1550 			uint8_t r_ext_rssi,
1551 			uint32_t r_rs_tstamp,
1552 			uint64_t r_fulltsf);
1553 	QDF_STATUS (*dfs_destroy_object)(struct wlan_objmgr_pdev *pdev);
1554 	QDF_STATUS (*dfs_radar_enable)(
1555 			struct wlan_objmgr_pdev *pdev,
1556 			int no_cac,
1557 			uint32_t opmode,
1558 			bool enable);
1559 	void (*dfs_is_radar_enabled)(struct wlan_objmgr_pdev *pdev,
1560 				     int *ignore_dfs);
1561 	QDF_STATUS (*dfs_control)(struct wlan_objmgr_pdev *pdev,
1562 				  u_int id,
1563 				  void *indata,
1564 				  uint32_t insize,
1565 				  void *outdata,
1566 				  uint32_t *outsize,
1567 				  int *error);
1568 	QDF_STATUS (*dfs_is_precac_timer_running)(struct wlan_objmgr_pdev *pdev,
1569 						  bool *is_precac_timer_running
1570 						  );
1571 #ifdef CONFIG_CHAN_NUM_API
1572 	QDF_STATUS
1573 	    (*dfs_find_vht80_chan_for_precac)(struct wlan_objmgr_pdev *pdev,
1574 					      uint32_t chan_mode,
1575 					      uint8_t ch_freq_seg1,
1576 					      uint32_t *cfreq1,
1577 					      uint32_t *cfreq2,
1578 					      uint32_t *phy_mode,
1579 					      bool *dfs_set_cfreq2,
1580 					      bool *set_agile);
1581 #endif
1582 #ifdef CONFIG_CHAN_FREQ_API
1583 	QDF_STATUS
1584 	    (*dfs_find_vht80_chan_for_precac_for_freq)(struct wlan_objmgr_pdev
1585 						       *pdev,
1586 						       uint32_t chan_mode,
1587 						       uint16_t ch_freq_seg1,
1588 						       uint32_t *cfreq1,
1589 						       uint32_t *cfreq2,
1590 						       uint32_t *phy_mode,
1591 						       bool *dfs_set_cfreq2,
1592 						       bool *set_agile);
1593 #endif
1594 	QDF_STATUS (*dfs_agile_precac_start)(struct wlan_objmgr_pdev *pdev);
1595 	QDF_STATUS (*dfs_set_agile_precac_state)(struct wlan_objmgr_pdev *pdev,
1596 						 int agile_precac_state);
1597 	QDF_STATUS (*dfs_reset_adfs_config)(struct wlan_objmgr_psoc *psoc);
1598 	QDF_STATUS
1599 	(*dfs_dfs_ocac_complete_ind)(struct wlan_objmgr_pdev *pdev,
1600 				     struct vdev_adfs_complete_status *ocac_st);
1601 	QDF_STATUS (*dfs_start_precac_timer)(struct wlan_objmgr_pdev *pdev);
1602 	QDF_STATUS (*dfs_cancel_precac_timer)(struct wlan_objmgr_pdev *pdev);
1603 	QDF_STATUS (*dfs_override_precac_timeout)(
1604 			struct wlan_objmgr_pdev *pdev,
1605 			int precac_timeout);
1606 	QDF_STATUS (*dfs_set_precac_enable)(struct wlan_objmgr_pdev *pdev,
1607 			uint32_t value);
1608 	QDF_STATUS
1609 	(*dfs_get_legacy_precac_enable)(struct wlan_objmgr_pdev *pdev,
1610 					bool *buff);
1611 	QDF_STATUS (*dfs_get_agile_precac_enable)(struct wlan_objmgr_pdev *pdev,
1612 						  bool *buff);
1613 #ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT
1614 	QDF_STATUS (*dfs_set_precac_intermediate_chan)(struct wlan_objmgr_pdev *pdev,
1615 						       uint32_t value);
1616 	QDF_STATUS (*dfs_get_precac_intermediate_chan)(struct wlan_objmgr_pdev *pdev,
1617 						       int *buff);
1618 #ifdef CONFIG_CHAN_NUM_API
1619 	bool (*dfs_decide_precac_preferred_chan)(struct wlan_objmgr_pdev *pdev,
1620 						 uint8_t *pref_chan,
1621 						 enum wlan_phymode mode);
1622 #endif
1623 #ifdef CONFIG_CHAN_FREQ_API
1624 	bool (*dfs_decide_precac_preferred_chan_for_freq)(struct
1625 						    wlan_objmgr_pdev *pdev,
1626 						    uint16_t *pref_chan_freq,
1627 						    enum wlan_phymode mode);
1628 #endif
1629 
1630 #ifdef CONFIG_CHAN_NUM_API
1631 	enum precac_chan_state (*dfs_get_precac_chan_state)(struct wlan_objmgr_pdev *pdev,
1632 							    uint8_t precac_chan);
1633 #endif
1634 
1635 #ifdef CONFIG_CHAN_FREQ_API
1636 	enum precac_chan_state (*dfs_get_precac_chan_state_for_freq)(struct
1637 						      wlan_objmgr_pdev *pdev,
1638 						      uint16_t pcac_freq);
1639 #endif
1640 #endif
1641 	QDF_STATUS (*dfs_get_override_precac_timeout)(
1642 			struct wlan_objmgr_pdev *pdev,
1643 			int *precac_timeout);
1644 #ifdef CONFIG_CHAN_NUM_API
1645 	QDF_STATUS (*dfs_set_current_channel)(struct wlan_objmgr_pdev *pdev,
1646 			uint16_t ic_freq,
1647 			uint64_t ic_flags,
1648 			uint16_t ic_flagext,
1649 			uint8_t ic_ieee,
1650 			uint8_t ic_vhtop_ch_freq_seg1,
1651 			uint8_t ic_vhtop_ch_freq_seg2);
1652 #endif
1653 #ifdef CONFIG_CHAN_FREQ_API
1654 	QDF_STATUS
1655 	    (*dfs_set_current_channel_for_freq)(struct wlan_objmgr_pdev *pdev,
1656 						uint16_t ic_freq,
1657 						uint64_t ic_flags,
1658 						uint16_t ic_flagext,
1659 						uint8_t ic_ieee,
1660 						uint8_t ic_vhtop_ch_freq_seg1,
1661 						uint8_t ic_vhtop_ch_freq_seg2,
1662 						uint16_t dfs_ch_mhz_freq_seg1,
1663 						uint16_t dfs_ch_mhz_freq_seg2,
1664 						bool *is_channel_updated);
1665 #endif
1666 #ifdef DFS_COMPONENT_ENABLE
1667 	QDF_STATUS (*dfs_process_radar_ind)(struct wlan_objmgr_pdev *pdev,
1668 			struct radar_found_info *radar_found);
1669 	QDF_STATUS (*dfs_dfs_cac_complete_ind)(struct wlan_objmgr_pdev *pdev,
1670 			uint32_t vdev_id);
1671 #endif
1672 	QDF_STATUS (*dfs_stop)(struct wlan_objmgr_pdev *pdev);
1673 	QDF_STATUS (*dfs_reinit_timers)(struct wlan_objmgr_pdev *pdev);
1674 	void (*dfs_enable_stadfs)(struct wlan_objmgr_pdev *pdev, bool val);
1675 	bool (*dfs_is_stadfs_enabled)(struct wlan_objmgr_pdev *pdev);
1676 	QDF_STATUS (*dfs_process_phyerr_filter_offload)(
1677 			struct wlan_objmgr_pdev *pdev,
1678 			struct radar_event_info *wlan_radar_info);
1679 	QDF_STATUS (*dfs_is_phyerr_filter_offload)(
1680 			struct wlan_objmgr_psoc *psoc,
1681 			bool *is_phyerr_filter_offload);
1682 	QDF_STATUS (*dfs_action_on_status)(struct wlan_objmgr_pdev *pdev,
1683 			u_int32_t *dfs_status_check);
1684 	QDF_STATUS (*dfs_override_status_timeout)(
1685 			struct wlan_objmgr_pdev *pdev,
1686 			int status_timeout);
1687 	QDF_STATUS (*dfs_get_override_status_timeout)(
1688 			struct wlan_objmgr_pdev *pdev,
1689 			int *status_timeout);
1690 	QDF_STATUS (*dfs_reset_spoof_test)(struct wlan_objmgr_pdev *pdev);
1691 	QDF_STATUS (*dfs_is_disable_radar_marking_set)(struct wlan_objmgr_pdev
1692 						 *pdev,
1693 						 bool *disable_radar_marking);
1694 	QDF_STATUS (*dfs_set_nol_subchannel_marking)(
1695 			struct wlan_objmgr_pdev *pdev,
1696 			bool value);
1697 	QDF_STATUS (*dfs_get_nol_subchannel_marking)(
1698 			struct wlan_objmgr_pdev *pdev,
1699 			bool *value);
1700 	QDF_STATUS (*dfs_set_bw_reduction)(struct wlan_objmgr_pdev *pdev,
1701 			bool value);
1702 	QDF_STATUS (*dfs_is_bw_reduction_needed)(struct wlan_objmgr_pdev *pdev,
1703 			bool *bw_reduce);
1704 	void (*dfs_allow_hw_pulses)(struct wlan_objmgr_pdev *pdev,
1705 				    bool allow_hw_pulses);
1706 	bool (*dfs_is_hw_pulses_allowed)(struct wlan_objmgr_pdev *pdev);
1707 	void (*dfs_set_fw_adfs_support)(struct wlan_objmgr_pdev *pdev,
1708 					bool fw_adfs_support_160,
1709 					bool fw_adfs_support_non_160);
1710 	void (*dfs_reset_dfs_prevchan)(struct wlan_objmgr_pdev *pdev);
1711 	void (*dfs_init_tmp_psoc_nol)(struct wlan_objmgr_pdev *pdev,
1712 				      uint8_t num_radios);
1713 	void (*dfs_deinit_tmp_psoc_nol)(struct wlan_objmgr_pdev *pdev);
1714 	void (*dfs_save_dfs_nol_in_psoc)(struct wlan_objmgr_pdev *pdev,
1715 					 uint8_t pdev_id);
1716 	void (*dfs_reinit_nol_from_psoc_copy)(struct wlan_objmgr_pdev *pdev,
1717 					      uint8_t pdev_id,
1718 					      uint16_t low_5ghz_freq,
1719 					      uint16_t high_5ghz_freq);
1720 	void (*dfs_reinit_precac_lists)(struct wlan_objmgr_pdev *src_pdev,
1721 					struct wlan_objmgr_pdev *dest_pdev,
1722 					uint16_t low_5g_freq,
1723 					uint16_t high_5g_freq);
1724 	void (*dfs_complete_deferred_tasks)(struct wlan_objmgr_pdev *pdev);
1725 #ifdef QCA_SUPPORT_ADFS_RCAC
1726 	QDF_STATUS (*dfs_set_rcac_enable)(struct wlan_objmgr_pdev *pdev,
1727 					  bool rcac_en);
1728 	QDF_STATUS (*dfs_get_rcac_enable)(struct wlan_objmgr_pdev *pdev,
1729 					  bool *rcac_en);
1730 	QDF_STATUS (*dfs_set_rcac_freq)(struct wlan_objmgr_pdev *pdev,
1731 					qdf_freq_t rcac_freq);
1732 	QDF_STATUS (*dfs_get_rcac_freq)(struct wlan_objmgr_pdev *pdev,
1733 					qdf_freq_t *rcac_freq);
1734 	bool (*dfs_is_agile_rcac_enabled)(struct wlan_objmgr_pdev *pdev);
1735 #endif
1736 #ifdef QCA_SUPPORT_AGILE_DFS
1737 	void (*dfs_agile_sm_deliver_evt)(struct wlan_objmgr_pdev *pdev,
1738 					 enum dfs_agile_sm_evt event);
1739 #endif
1740 #ifdef QCA_SUPPORT_DFS_CHAN_POSTNOL
1741 	QDF_STATUS (*dfs_set_postnol_freq)(struct wlan_objmgr_pdev *pdev,
1742 					   qdf_freq_t postnol_freq);
1743 	QDF_STATUS (*dfs_set_postnol_mode)(struct wlan_objmgr_pdev *pdev,
1744 					   uint8_t postnol_mode);
1745 	QDF_STATUS (*dfs_set_postnol_cfreq2)(struct wlan_objmgr_pdev *pdev,
1746 					     qdf_freq_t postnol_cfreq2);
1747 	QDF_STATUS (*dfs_get_postnol_freq)(struct wlan_objmgr_pdev *pdev,
1748 					   qdf_freq_t *postnol_freq);
1749 	QDF_STATUS (*dfs_get_postnol_mode)(struct wlan_objmgr_pdev *pdev,
1750 					   uint8_t *postnol_mode);
1751 	QDF_STATUS (*dfs_get_postnol_cfreq2)(struct wlan_objmgr_pdev *pdev,
1752 					     qdf_freq_t *postnol_cfreq2);
1753 #endif
1754 };
1755 
1756 /**
1757  * struct wlan_lmac_if_mlme_rx_ops: Function pointer to call MLME functions
1758  * @vdev_mgr_start_response: function to handle start response
1759  * @vdev_mgr_stop_response: function to handle stop response
1760  * @vdev_mgr_delete_response: function to handle delete response
1761  * @vdev_mgr_offload_bcn_tx_status_event_handle: function to handle offload
1762  * beacon tx
1763  * @vdev_mgr_tbttoffset_update_handle: function to handle tbtt offset event
1764  * @vdev_mgr_peer_delete_all_response: function to handle vdev delete all peer
1765  * event
1766  * @psoc_get_wakelock_info: function to get wakelock info
1767  * @psoc_get_vdev_response_timer_info: function to get vdev response timer
1768  * structure for a specific vdev id
1769  * @vdev_mgr_multi_vdev_restart_resp: function to handle mvr response
1770  */
1771 struct wlan_lmac_if_mlme_rx_ops {
1772 	QDF_STATUS (*vdev_mgr_start_response)(
1773 					struct wlan_objmgr_psoc *psoc,
1774 					struct vdev_start_response *rsp);
1775 	QDF_STATUS (*vdev_mgr_stop_response)(
1776 					struct wlan_objmgr_psoc *psoc,
1777 					struct vdev_stop_response *rsp);
1778 	QDF_STATUS (*vdev_mgr_delete_response)(
1779 					struct wlan_objmgr_psoc *psoc,
1780 					struct vdev_delete_response *rsp);
1781 	QDF_STATUS (*vdev_mgr_offload_bcn_tx_status_event_handle)(
1782 							uint32_t vdev_id,
1783 							uint32_t tx_status);
1784 	QDF_STATUS (*vdev_mgr_tbttoffset_update_handle)(
1785 						uint32_t num_vdevs,
1786 						bool is_ext);
1787 	QDF_STATUS (*vdev_mgr_peer_delete_all_response)(
1788 					struct wlan_objmgr_psoc *psoc,
1789 					struct peer_delete_all_response *rsp);
1790 	QDF_STATUS (*vdev_mgr_multi_vdev_restart_resp)(
1791 					struct wlan_objmgr_psoc *psoc,
1792 					struct multi_vdev_restart_resp *rsp);
1793 #ifdef FEATURE_VDEV_OPS_WAKELOCK
1794 	struct psoc_mlme_wakelock *(*psoc_get_wakelock_info)(
1795 				    struct wlan_objmgr_psoc *psoc);
1796 #endif
1797 	struct vdev_response_timer *(*psoc_get_vdev_response_timer_info)(
1798 						struct wlan_objmgr_psoc *psoc,
1799 						uint8_t vdev_id);
1800 };
1801 
1802 #ifdef WLAN_SUPPORT_GREEN_AP
1803 struct wlan_lmac_if_green_ap_rx_ops {
1804 	bool (*is_ps_enabled)(struct wlan_objmgr_pdev *pdev);
1805 	bool (*is_dbg_print_enabled)(struct wlan_objmgr_pdev *pdev);
1806 	QDF_STATUS (*ps_get)(struct wlan_objmgr_pdev *pdev, uint8_t *value);
1807 	QDF_STATUS (*ps_set)(struct wlan_objmgr_pdev *pdev, uint8_t value);
1808 	void (*suspend_handle)(struct wlan_objmgr_pdev *pdev);
1809 };
1810 #endif
1811 
1812 /**
1813  * struct wlan_lmac_if_rx_ops - south bound rx function pointers
1814  * @mgmt_txrx_tx_ops: mgmt txrx rx ops
1815  * @scan: scan rx ops
1816  * @dfs_rx_ops: dfs rx ops.
1817  * @cp_stats_rx_ops: cp stats rx ops
1818  * @cfr_rx_ops: cfr rx ops
1819  *
1820  * Callback function tabled to be registered with lmac/wmi.
1821  * lmac will use the functional table to send events/frames to umac
1822  */
1823 struct wlan_lmac_if_rx_ops {
1824 	/* Components to declare function pointers required by the module
1825 	 * in component specific structure.
1826 	 * The component specific ops structure can be declared in this file
1827 	 * only
1828 	 */
1829 	 struct wlan_lmac_if_mgmt_txrx_rx_ops mgmt_txrx_rx_ops;
1830 	 struct wlan_lmac_if_scan_rx_ops scan;
1831 
1832 #ifdef CONVERGED_P2P_ENABLE
1833 	struct wlan_lmac_if_p2p_rx_ops p2p;
1834 #endif
1835 #ifdef WLAN_IOT_SIM_SUPPORT
1836 	struct wlan_lmac_if_iot_sim_rx_ops iot_sim_rx_ops;
1837 #endif
1838 #ifdef WLAN_ATF_ENABLE
1839 	struct wlan_lmac_if_atf_rx_ops atf_rx_ops;
1840 #endif
1841 #ifdef QCA_SUPPORT_CP_STATS
1842 	struct wlan_lmac_if_cp_stats_rx_ops cp_stats_rx_ops;
1843 #endif
1844 #ifdef DCS_INTERFERENCE_DETECTION
1845 	struct wlan_target_if_dcs_rx_ops dcs_rx_ops;
1846 #endif
1847 #ifdef WLAN_SA_API_ENABLE
1848 	struct wlan_lmac_if_sa_api_rx_ops sa_api_rx_ops;
1849 #endif
1850 
1851 #ifdef WLAN_CFR_ENABLE
1852 	struct wlan_lmac_if_cfr_rx_ops cfr_rx_ops;
1853 #endif
1854 
1855 #ifdef WLAN_CONV_SPECTRAL_ENABLE
1856 	struct wlan_lmac_if_sptrl_rx_ops sptrl_rx_ops;
1857 #endif
1858 
1859 #ifdef WLAN_CONV_CRYPTO_SUPPORTED
1860 	struct wlan_lmac_if_crypto_rx_ops crypto_rx_ops;
1861 #endif
1862 #ifdef WIFI_POS_CONVERGED
1863 	struct wlan_lmac_if_wifi_pos_rx_ops wifi_pos_rx_ops;
1864 #endif
1865 	struct wlan_lmac_if_reg_rx_ops reg_rx_ops;
1866 	struct wlan_lmac_if_dfs_rx_ops dfs_rx_ops;
1867 #ifdef FEATURE_WLAN_TDLS
1868 	struct wlan_lmac_if_tdls_rx_ops tdls_rx_ops;
1869 #endif
1870 
1871 #ifdef WLAN_SUPPORT_FILS
1872 	struct wlan_lmac_if_fd_rx_ops fd_rx_ops;
1873 #endif
1874 
1875 	struct wlan_lmac_if_mlme_rx_ops mops;
1876 
1877 #ifdef WLAN_SUPPORT_GREEN_AP
1878 	struct wlan_lmac_if_green_ap_rx_ops green_ap_rx_ops;
1879 #endif
1880 
1881 	struct wlan_lmac_if_ftm_rx_ops ftm_rx_ops;
1882 };
1883 
1884 /* Function pointer to call legacy tx_ops registration in OL/WMA.
1885  */
1886 extern QDF_STATUS (*wlan_lmac_if_umac_tx_ops_register)
1887 				(struct wlan_lmac_if_tx_ops *tx_ops);
1888 #endif /* _WLAN_LMAC_IF_DEF_H_ */
1889