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