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