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