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