xref: /wlan-dirver/qca-wifi-host-cmn/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c (revision 8b3dca18206e1a0461492f082fa6e270b092c035)
1 /*
2  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #include "qdf_mem.h"
21 #include <qdf_module.h>
22 #include "wlan_lmac_if_def.h"
23 #include "wlan_lmac_if_api.h"
24 #include "wlan_mgmt_txrx_tgt_api.h"
25 #include "wlan_scan_tgt_api.h"
26 #include <wlan_reg_services_api.h>
27 #include <wlan_reg_ucfg_api.h>
28 #ifdef WLAN_ATF_ENABLE
29 #include "wlan_atf_tgt_api.h"
30 #endif
31 #ifdef WLAN_SA_API_ENABLE
32 #include "wlan_sa_api_tgt_api.h"
33 #endif
34 #ifdef WIFI_POS_CONVERGED
35 #include "target_if_wifi_pos.h"
36 #include "target_if_wifi_pos_rx_ops.h"
37 #endif /* WIFI_POS_CONVERGED */
38 #include "wlan_reg_tgt_api.h"
39 #ifdef CONVERGED_P2P_ENABLE
40 #include "wlan_p2p_tgt_api.h"
41 #endif
42 #ifdef FEATURE_WLAN_TDLS
43 #include "wlan_tdls_tgt_api.h"
44 #endif
45 
46 #include "wlan_crypto_global_api.h"
47 #ifdef DFS_COMPONENT_ENABLE
48 #include <wlan_dfs_tgt_api.h>
49 #include <wlan_objmgr_vdev_obj.h>
50 #include <wlan_dfs_utils_api.h>
51 #if defined(QCA_SUPPORT_DFS_CHAN_POSTNOL) || defined(QCA_DFS_BW_EXPAND)
52 #include <dfs_postnol_ucfg.h>
53 #endif
54 #endif
55 
56 #ifdef WLAN_SUPPORT_GREEN_AP
57 #include <wlan_green_ap_api.h>
58 #include <wlan_green_ap_ucfg_api.h>
59 #endif
60 #include <wlan_ftm_ucfg_api.h>
61 
62 #ifdef WLAN_SUPPORT_FILS
63 #include <wlan_fd_tgt_api.h>
64 #endif
65 
66 #ifdef QCA_SUPPORT_CP_STATS
67 #include <wlan_cp_stats_tgt_api.h>
68 #include <wlan_cp_stats_utils_api.h>
69 #endif /* QCA_SUPPORT_CP_STATS */
70 #include <wlan_vdev_mgr_tgt_if_rx_api.h>
71 
72 #ifdef WLAN_CFR_ENABLE
73 #include "wlan_cfr_tgt_api.h"
74 #endif
75 
76 #ifdef WIFI_POS_CONVERGED
77 #include "wifi_pos_api.h"
78 #endif
79 
80 #include "wlan_mgmt_txrx_rx_reo_tgt_api.h"
81 
82 #ifdef WLAN_FEATURE_11BE_MLO
83 #include "wlan_mlo_mgr_cmn.h"
84 #endif
85 
86 #include <wlan_twt_tgt_if_rx_api.h>
87 #ifdef WLAN_FEATURE_MCC_QUOTA
88 #include <wlan_p2p_mcc_quota_tgt_api.h>
89 #endif
90 
91 #ifdef WLAN_FEATURE_DBAM_CONFIG
92 #include "target_if_coex.h"
93 #endif
94 #if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
95 #include <wifi_pos_pasn_api.h>
96 #endif
97 
98 #include "target_if.h"
99 
100 /* Function pointer for OL/WMA specific UMAC tx_ops
101  * registration.
102  */
103 QDF_STATUS (*wlan_lmac_if_umac_tx_ops_register)
104 				(struct wlan_lmac_if_tx_ops *tx_ops);
105 qdf_export_symbol(wlan_lmac_if_umac_tx_ops_register);
106 
107 /* Function pointer to call legacy crypto rxpn registration in OL */
108 QDF_STATUS (*wlan_lmac_if_umac_crypto_rxpn_ops_register)
109 				(struct wlan_lmac_if_rx_ops *rx_ops);
110 qdf_export_symbol(wlan_lmac_if_umac_crypto_rxpn_ops_register);
111 
112 static void
113 tgt_vdev_mgr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
114 {
115 	tgt_vdev_mgr_register_rx_ops(rx_ops);
116 }
117 
118 #ifdef QCA_SUPPORT_CP_STATS
119 #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
120 /**
121  * wlan_target_if_cp_stats_rx_ops_register() - register cp_stats rx ops
122  * @rx_ops: lmac rx_ops
123  *
124  * Return: none
125  */
126 static void
127 wlan_target_if_cp_stats_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
128 {
129 	rx_ops->cp_stats_rx_ops.twt_get_session_param_resp =
130 			tgt_cp_stats_twt_get_session_evt_handler;
131 }
132 #else
133 static void
134 wlan_target_if_cp_stats_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
135 {
136 }
137 #endif
138 
139 /**
140  * wlan_lmac_if_cp_stats_rx_ops_register() - API to register cp stats Rx Ops
141  * @rx_ops:	pointer to lmac rx ops
142  *
143  * This API will be used to register function pointers for FW events
144  *
145  * Return: void
146  */
147 static void
148 wlan_lmac_if_cp_stats_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
149 {
150 	wlan_target_if_cp_stats_rx_ops_register(rx_ops);
151 	tgt_cp_stats_register_rx_ops(rx_ops);
152 }
153 #else
154 static void
155 wlan_lmac_if_cp_stats_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
156 {
157 }
158 #endif /* QCA_SUPPORT_CP_STATS */
159 
160 #ifdef DCS_INTERFERENCE_DETECTION
161 /**
162  * wlan_target_if_dcs_rx_ops_register() - API to register dcs Rx Ops
163  * @rx_ops:	pointer to lmac rx ops
164  *
165  * This API will be used to register function pointers for FW events
166  *
167  * Return: void
168  */
169 static void
170 wlan_target_if_dcs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
171 {
172 	rx_ops->dcs_rx_ops.process_dcs_event = tgt_dcs_process_event;
173 }
174 #else
175 static void
176 wlan_target_if_dcs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
177 {
178 }
179 #endif /* DCS_INTERFERENCE_DETECTION */
180 
181 #ifdef WLAN_ATF_ENABLE
182 /**
183  * wlan_lmac_if_atf_rx_ops_register() - Function to register ATF RX ops.
184  */
185 static void
186 wlan_lmac_if_atf_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
187 {
188 	struct wlan_lmac_if_atf_rx_ops *atf_rx_ops = &rx_ops->atf_rx_ops;
189 
190 	/* ATF rx ops */
191 	atf_rx_ops->atf_get_fmcap = tgt_atf_get_fmcap;
192 	atf_rx_ops->atf_get_mode = tgt_atf_get_mode;
193 	atf_rx_ops->atf_get_msdu_desc = tgt_atf_get_msdu_desc;
194 	atf_rx_ops->atf_get_max_vdevs = tgt_atf_get_max_vdevs;
195 	atf_rx_ops->atf_get_peers = tgt_atf_get_peers;
196 	atf_rx_ops->atf_get_tput_based = tgt_atf_get_tput_based;
197 	atf_rx_ops->atf_get_logging = tgt_atf_get_logging;
198 	atf_rx_ops->atf_get_ssidgroup = tgt_atf_get_ssidgroup;
199 	atf_rx_ops->atf_get_vdev_ac_blk_cnt = tgt_atf_get_vdev_ac_blk_cnt;
200 	atf_rx_ops->atf_get_peer_blk_txbitmap = tgt_atf_get_peer_blk_txbitmap;
201 	atf_rx_ops->atf_get_vdev_blk_txtraffic = tgt_atf_get_vdev_blk_txtraffic;
202 	atf_rx_ops->atf_get_sched = tgt_atf_get_sched;
203 	atf_rx_ops->atf_get_peer_stats = tgt_atf_get_peer_stats;
204 	atf_rx_ops->atf_get_token_allocated = tgt_atf_get_token_allocated;
205 	atf_rx_ops->atf_get_token_utilized = tgt_atf_get_token_utilized;
206 
207 	atf_rx_ops->atf_set_sched = tgt_atf_set_sched;
208 	atf_rx_ops->atf_set_fmcap = tgt_atf_set_fmcap;
209 	atf_rx_ops->atf_set_msdu_desc = tgt_atf_set_msdu_desc;
210 	atf_rx_ops->atf_set_max_vdevs = tgt_atf_set_max_vdevs;
211 	atf_rx_ops->atf_set_peers = tgt_atf_set_peers;
212 	atf_rx_ops->atf_set_peer_stats = tgt_atf_set_peer_stats;
213 	atf_rx_ops->atf_set_vdev_blk_txtraffic = tgt_atf_set_vdev_blk_txtraffic;
214 	atf_rx_ops->atf_peer_blk_txtraffic = tgt_atf_peer_blk_txtraffic;
215 	atf_rx_ops->atf_peer_unblk_txtraffic = tgt_atf_peer_unblk_txtraffic;
216 	atf_rx_ops->atf_set_token_allocated = tgt_atf_set_token_allocated;
217 	atf_rx_ops->atf_set_token_utilized = tgt_atf_set_token_utilized;
218 	atf_rx_ops->atf_process_tx_ppdu_stats = tgt_atf_process_tx_ppdu_stats;
219 	atf_rx_ops->atf_process_rx_ppdu_stats = tgt_atf_process_rx_ppdu_stats;
220 	atf_rx_ops->atf_is_stats_enabled = tgt_atf_is_stats_enabled;
221 }
222 #else
223 static void
224 wlan_lmac_if_atf_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
225 {
226 }
227 #endif
228 
229 #ifdef WLAN_SUPPORT_FILS
230 static void
231 wlan_lmac_if_fd_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
232 {
233 	struct wlan_lmac_if_fd_rx_ops *fd_rx_ops = &rx_ops->fd_rx_ops;
234 
235 	fd_rx_ops->fd_is_fils_enable = tgt_fd_is_fils_enable;
236 	fd_rx_ops->fd_alloc = tgt_fd_alloc;
237 	fd_rx_ops->fd_stop = tgt_fd_stop;
238 	fd_rx_ops->fd_free = tgt_fd_free;
239 	fd_rx_ops->fd_get_valid_fd_period = tgt_fd_get_valid_fd_period;
240 	fd_rx_ops->fd_swfda_handler = tgt_fd_swfda_handler;
241 	fd_rx_ops->fd_offload = tgt_fd_offload;
242 	fd_rx_ops->fd_tmpl_update = tgt_fd_tmpl_update;
243 }
244 #else
245 static void
246 wlan_lmac_if_fd_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
247 {
248 }
249 #endif
250 
251 #ifdef WLAN_SA_API_ENABLE
252 /**
253  * wlan_lmac_if_sa_api_rx_ops_register() - Function to register SA_API RX ops.
254  */
255 static void
256 wlan_lmac_if_sa_api_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
257 {
258 	struct wlan_lmac_if_sa_api_rx_ops *sa_api_rx_ops = &rx_ops->sa_api_rx_ops;
259 
260 	/* SA API rx ops */
261 	sa_api_rx_ops->sa_api_get_sa_supported = tgt_sa_api_get_sa_supported;
262 	sa_api_rx_ops->sa_api_get_validate_sw  = tgt_sa_api_get_validate_sw;
263 	sa_api_rx_ops->sa_api_enable_sa        = tgt_sa_api_enable_sa;
264 	sa_api_rx_ops->sa_api_get_sa_enable    = tgt_sa_api_get_sa_enable;
265 
266 	sa_api_rx_ops->sa_api_peer_assoc_hanldler = tgt_sa_api_peer_assoc_hanldler;
267 	sa_api_rx_ops->sa_api_update_tx_feedback = tgt_sa_api_update_tx_feedback;
268 	sa_api_rx_ops->sa_api_update_rx_feedback = tgt_sa_api_update_rx_feedback;
269 
270 	sa_api_rx_ops->sa_api_ucfg_set_param = tgt_sa_api_ucfg_set_param;
271 	sa_api_rx_ops->sa_api_ucfg_get_param = tgt_sa_api_ucfg_get_param;
272 
273 	sa_api_rx_ops->sa_api_is_tx_feedback_enabled = tgt_sa_api_is_tx_feedback_enabled;
274 	sa_api_rx_ops->sa_api_is_rx_feedback_enabled = tgt_sa_api_is_rx_feedback_enabled;
275 
276 	sa_api_rx_ops->sa_api_convert_rate_2g = tgt_sa_api_convert_rate_2g;
277 	sa_api_rx_ops->sa_api_convert_rate_5g = tgt_sa_api_convert_rate_5g;
278 	sa_api_rx_ops->sa_api_get_sa_mode = tgt_sa_api_get_sa_mode;
279 
280 	sa_api_rx_ops->sa_api_get_beacon_txantenna = tgt_sa_api_get_beacon_txantenna;
281 	sa_api_rx_ops->sa_api_cwm_action = tgt_sa_api_cwm_action;
282 }
283 #else
284 static void
285 wlan_lmac_if_sa_api_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
286 {
287 }
288 #endif
289 
290 #ifdef WLAN_CFR_ENABLE
291 /**
292  * wlan_lmac_if_cfr_rx_ops_register() - Function to register CFR RX ops
293  */
294 static void
295 wlan_lmac_if_cfr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
296 {
297 	struct wlan_lmac_if_cfr_rx_ops *cfr_rx_ops = &rx_ops->cfr_rx_ops;
298 
299 	/* CFR rx ops */
300 	cfr_rx_ops->cfr_support_set = tgt_cfr_support_set;
301 	cfr_rx_ops->cfr_info_send  = tgt_cfr_info_send;
302 	cfr_rx_ops->cfr_capture_count_support_set =
303 		tgt_cfr_capture_count_support_set;
304 	cfr_rx_ops->cfr_mo_marking_support_set = tgt_cfr_mo_marking_support_set;
305 	cfr_rx_ops->cfr_aoa_for_rcc_support_set =
306 		tgt_cfr_aoa_for_rcc_support_set;
307 }
308 #else
309 static void
310 wlan_lmac_if_cfr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
311 {
312 }
313 #endif
314 
315 static void
316 wlan_lmac_if_crypto_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
317 {
318 	wlan_crypto_register_crypto_rx_ops(&rx_ops->crypto_rx_ops);
319 	if (wlan_lmac_if_umac_crypto_rxpn_ops_register)
320 		wlan_lmac_if_umac_crypto_rxpn_ops_register(rx_ops);
321 }
322 
323 #if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
324 static void
325 wlan_lmac_if_wifi_pos_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
326 {
327 	struct wlan_lmac_if_wifi_pos_rx_ops *wifi_pos_rx_ops =
328 		&rx_ops->wifi_pos_rx_ops;
329 
330 	wifi_pos_rx_ops->wifi_pos_ranging_peer_create_cb =
331 			wifi_pos_handle_ranging_peer_create;
332 	wifi_pos_rx_ops->wifi_pos_ranging_peer_create_rsp_cb =
333 			wifi_pos_handle_ranging_peer_create_rsp;
334 	wifi_pos_rx_ops->wifi_pos_ranging_peer_delete_cb =
335 			wifi_pos_handle_ranging_peer_delete;
336 	wifi_pos_rx_ops->wifi_pos_vdev_delete_all_ranging_peers_rsp_cb =
337 			wifi_pos_vdev_delete_all_ranging_peers_rsp;
338 }
339 #else
340 static inline void
341 wlan_lmac_if_wifi_pos_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
342 {}
343 #endif
344 
345 #ifdef WIFI_POS_CONVERGED
346 static void
347 wlan_lmac_if_umac_rx_ops_register_wifi_pos(struct wlan_lmac_if_rx_ops *rx_ops)
348 {
349 	wifi_pos_register_rx_ops(rx_ops);
350 	wlan_lmac_if_wifi_pos_rx_ops(rx_ops);
351 }
352 #else
353 static void wlan_lmac_if_umac_rx_ops_register_wifi_pos(
354 				struct wlan_lmac_if_rx_ops *rx_ops)
355 {
356 }
357 #endif /* WIFI_POS_CONVERGED */
358 
359 #ifdef CONFIG_BAND_6GHZ
360 static void wlan_lmac_if_register_master_list_ext_handler(
361 					struct wlan_lmac_if_rx_ops *rx_ops)
362 {
363 	rx_ops->reg_rx_ops.master_list_ext_handler =
364 		tgt_reg_process_master_chan_list_ext;
365 }
366 
367 static void wlan_lmac_if_register_super_chan_display(
368 					struct wlan_lmac_if_rx_ops *rx_ops)
369 {
370 	rx_ops->reg_rx_ops.reg_display_super_chan_list =
371 		wlan_reg_display_super_chan_list;
372 }
373 
374 #ifdef CONFIG_AFC_SUPPORT
375 static void wlan_lmac_if_register_afc_handlers(
376 					struct wlan_lmac_if_rx_ops *rx_ops)
377 {
378 	rx_ops->reg_rx_ops.afc_event_handler = tgt_reg_process_afc_event;
379 	rx_ops->reg_rx_ops.reg_set_afc_dev_type = tgt_reg_set_afc_dev_type;
380 	rx_ops->reg_rx_ops.reg_get_afc_dev_type = tgt_reg_get_afc_dev_type;
381 }
382 #else
383 static inline void wlan_lmac_if_register_afc_handlers(
384 					struct wlan_lmac_if_rx_ops *rx_ops)
385 {
386 }
387 #endif
388 
389 #else
390 static inline void wlan_lmac_if_register_master_list_ext_handler(
391 					struct wlan_lmac_if_rx_ops *rx_ops)
392 {
393 }
394 
395 static inline void wlan_lmac_if_register_afc_handlers(
396 					struct wlan_lmac_if_rx_ops *rx_ops)
397 {
398 }
399 
400 static inline void wlan_lmac_if_register_super_chan_display(
401 					struct wlan_lmac_if_rx_ops *rx_ops)
402 {
403 }
404 #endif
405 
406 #if defined(CONFIG_BAND_6GHZ)
407 static void wlan_lmac_if_register_6g_edge_chan_supp(
408 					struct wlan_lmac_if_rx_ops *rx_ops)
409 {
410 	rx_ops->reg_rx_ops.reg_set_lower_6g_edge_ch_supp =
411 		tgt_reg_set_lower_6g_edge_ch_supp;
412 
413 	rx_ops->reg_rx_ops.reg_set_disable_upper_6g_edge_ch_supp =
414 		tgt_reg_set_disable_upper_6g_edge_ch_supp;
415 }
416 #else
417 static inline void wlan_lmac_if_register_6g_edge_chan_supp(
418 					struct wlan_lmac_if_rx_ops *rx_ops)
419 {
420 }
421 #endif
422 
423 #ifdef WLAN_REG_PARTIAL_OFFLOAD
424 /**
425  * wlan_lmac_if_umac_reg_rx_ops_register_po() - Function to register Reg RX ops
426  * for Partial Offload
427  * rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops
428  *
429  * Return: void
430  */
431 static void wlan_lmac_if_umac_reg_rx_ops_register_po(
432 					struct wlan_lmac_if_rx_ops *rx_ops)
433 {
434 	rx_ops->reg_rx_ops.reg_program_default_cc =
435 		ucfg_reg_program_default_cc;
436 
437 	rx_ops->reg_rx_ops.reg_get_current_regdomain =
438 		wlan_reg_get_curr_regdomain;
439 }
440 #else
441 static void wlan_lmac_if_umac_reg_rx_ops_register_po(
442 					struct wlan_lmac_if_rx_ops *rx_ops)
443 {
444 }
445 #endif
446 
447 static void wlan_lmac_if_umac_reg_rx_ops_register(
448 	struct wlan_lmac_if_rx_ops *rx_ops)
449 {
450 	rx_ops->reg_rx_ops.master_list_handler =
451 		tgt_reg_process_master_chan_list;
452 
453 	wlan_lmac_if_register_master_list_ext_handler(rx_ops);
454 
455 	rx_ops->reg_rx_ops.reg_11d_new_cc_handler =
456 		tgt_reg_process_11d_new_country;
457 
458 	rx_ops->reg_rx_ops.reg_set_regdb_offloaded =
459 		tgt_reg_set_regdb_offloaded;
460 
461 	rx_ops->reg_rx_ops.reg_set_11d_offloaded =
462 		tgt_reg_set_11d_offloaded;
463 
464 	rx_ops->reg_rx_ops.reg_set_6ghz_supported =
465 		tgt_reg_set_6ghz_supported;
466 
467 	rx_ops->reg_rx_ops.reg_set_5dot9_ghz_supported =
468 		tgt_reg_set_5dot9_ghz_supported;
469 
470 	rx_ops->reg_rx_ops.get_dfs_region =
471 		wlan_reg_get_dfs_region;
472 
473 	rx_ops->reg_rx_ops.reg_ch_avoid_event_handler =
474 		tgt_reg_process_ch_avoid_event;
475 
476 	rx_ops->reg_rx_ops.reg_freq_to_chan =
477 		wlan_reg_freq_to_chan;
478 
479 	rx_ops->reg_rx_ops.reg_set_chan_144 =
480 		ucfg_reg_modify_chan_144;
481 
482 	rx_ops->reg_rx_ops.reg_get_chan_144 =
483 		ucfg_reg_get_en_chan_144;
484 
485 	wlan_lmac_if_umac_reg_rx_ops_register_po(rx_ops);
486 
487 	rx_ops->reg_rx_ops.reg_enable_dfs_channels =
488 		ucfg_reg_enable_dfs_channels;
489 
490 	rx_ops->reg_rx_ops.reg_modify_pdev_chan_range =
491 		wlan_reg_modify_pdev_chan_range;
492 
493 	rx_ops->reg_rx_ops.reg_update_pdev_wireless_modes =
494 		wlan_reg_update_pdev_wireless_modes;
495 
496 	rx_ops->reg_rx_ops.reg_is_range_only6g =
497 		wlan_reg_is_range_only6g;
498 
499 	rx_ops->reg_rx_ops.reg_is_range_overlap_6g =
500 		wlan_reg_is_range_overlap_6g;
501 
502 	rx_ops->reg_rx_ops.reg_ignore_fw_reg_offload_ind =
503 		tgt_reg_ignore_fw_reg_offload_ind;
504 
505 	rx_ops->reg_rx_ops.reg_disable_chan_coex =
506 		wlan_reg_disable_chan_coex;
507 
508 	rx_ops->reg_rx_ops.reg_get_unii_5g_bitmap =
509 		ucfg_reg_get_unii_5g_bitmap;
510 
511 	rx_ops->reg_rx_ops.reg_set_ext_tpc_supported =
512 		tgt_reg_set_ext_tpc_supported;
513 
514 	wlan_lmac_if_register_6g_edge_chan_supp(rx_ops);
515 
516 	wlan_lmac_if_register_afc_handlers(rx_ops);
517 
518 	wlan_lmac_if_register_super_chan_display(rx_ops);
519 }
520 
521 #ifdef CONVERGED_P2P_ENABLE
522 #ifdef WLAN_FEATURE_MCC_QUOTA
523 static inline void
524 wlan_lmac_if_umac_rx_ops_register_p2p_mcc_quota(struct wlan_lmac_if_rx_ops *rx_ops)
525 {
526 	rx_ops->p2p.mcc_quota_ev_handler = tgt_p2p_mcc_quota_event_cb;
527 }
528 #else
529 static inline void wlan_lmac_if_umac_rx_ops_register_p2p_mcc_quota(
530 				struct wlan_lmac_if_rx_ops *rx_ops)
531 {
532 }
533 #endif
534 
535 #ifdef FEATURE_P2P_LISTEN_OFFLOAD
536 static inline void
537 wlan_lmac_if_umac_rx_ops_register_p2p_listen_offload(struct wlan_lmac_if_rx_ops *rx_ops)
538 {
539 	rx_ops->p2p.lo_ev_handler = tgt_p2p_lo_event_cb;
540 }
541 #else
542 static inline void
543 wlan_lmac_if_umac_rx_ops_register_p2p_listen_offload(struct wlan_lmac_if_rx_ops *rx_ops)
544 {
545 }
546 #endif
547 
548 static void wlan_lmac_if_umac_rx_ops_register_p2p(
549 				struct wlan_lmac_if_rx_ops *rx_ops)
550 {
551 	wlan_lmac_if_umac_rx_ops_register_p2p_listen_offload(rx_ops);
552 	rx_ops->p2p.noa_ev_handler = tgt_p2p_noa_event_cb;
553 	rx_ops->p2p.add_mac_addr_filter_evt_handler =
554 		tgt_p2p_add_mac_addr_status_event_cb;
555 	wlan_lmac_if_umac_rx_ops_register_p2p_mcc_quota(rx_ops);
556 }
557 #else
558 static void wlan_lmac_if_umac_rx_ops_register_p2p(
559 				struct wlan_lmac_if_rx_ops *rx_ops)
560 {
561 }
562 #endif
563 
564 /*
565  * register_precac_auto_chan_rx_ops_freq() - Register auto chan switch rx ops
566  * for frequency based channel APIs.
567  * rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops
568  */
569 #ifdef DFS_COMPONENT_ENABLE
570 #if defined(WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT) && defined(CONFIG_CHAN_FREQ_API)
571 static inline void
572 register_precac_auto_chan_rx_ops_freq(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
573 {
574 	if (!rx_ops)
575 		return;
576 	rx_ops->dfs_get_precac_chan_state_for_freq =
577 		ucfg_dfs_get_precac_chan_state_for_freq;
578 }
579 #else
580 static inline void
581 register_precac_auto_chan_rx_ops_freq(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
582 {
583 }
584 #endif
585 #endif
586 
587 #ifdef DFS_COMPONENT_ENABLE
588 #ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT
589 static inline void
590 register_precac_auto_chan_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
591 {
592 	if (!rx_ops)
593 		return;
594 	rx_ops->dfs_set_precac_intermediate_chan =
595 		ucfg_dfs_set_precac_intermediate_chan;
596 	rx_ops->dfs_get_precac_intermediate_chan =
597 		ucfg_dfs_get_precac_intermediate_chan;
598 }
599 #else
600 static inline void
601 register_precac_auto_chan_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
602 {
603 }
604 #endif
605 
606 /*
607  * register_dfs_rx_ops_for_freq() - Register DFS rx ops for frequency based
608  * channel APIs.
609  * rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops.
610  */
611 #ifdef CONFIG_CHAN_FREQ_API
612 static void register_dfs_rx_ops_for_freq(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
613 {
614 	if (!rx_ops)
615 		return;
616 	rx_ops->dfs_set_current_channel_for_freq =
617 		tgt_dfs_set_current_channel_for_freq;
618 }
619 #endif
620 
621 /*
622  * register_rcac_dfs_rx_ops() - Register DFS RX-Ops for RCAC specific
623  * APIs.
624  * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops.
625  */
626 #ifdef QCA_SUPPORT_ADFS_RCAC
627 static void register_rcac_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
628 {
629 	if (!rx_ops)
630 		return;
631 	rx_ops->dfs_set_rcac_enable = ucfg_dfs_set_rcac_enable;
632 	rx_ops->dfs_get_rcac_enable = ucfg_dfs_get_rcac_enable;
633 	rx_ops->dfs_set_rcac_freq = ucfg_dfs_set_rcac_freq;
634 	rx_ops->dfs_get_rcac_freq = ucfg_dfs_get_rcac_freq;
635 	rx_ops->dfs_is_agile_rcac_enabled = ucfg_dfs_is_agile_rcac_enabled;
636 }
637 #else
638 static inline void
639 register_rcac_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
640 {
641 }
642 #endif
643 
644 /*
645  * register_agile_dfs_rx_ops() - Register Rx-Ops for Agile Specific APIs
646  * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops.
647  */
648 #ifdef QCA_SUPPORT_AGILE_DFS
649 static void register_agile_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
650 {
651 	if (!rx_ops)
652 		return;
653 	rx_ops->dfs_agile_sm_deliver_evt = utils_dfs_agile_sm_deliver_evt;
654 }
655 #else
656 static inline void
657 register_agile_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
658 {
659 }
660 #endif
661 
662 #ifdef QCA_SUPPORT_DFS_CHAN_POSTNOL
663 /* register_dfs_chan_postnol_rx_ops() - Register DFS Rx-Ops for postNOL
664  * channel change APIs.
665  * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops.
666  */
667 static void
668 register_dfs_chan_postnol_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
669 {
670 	if (!rx_ops)
671 		return;
672 
673 	rx_ops->dfs_set_postnol_freq = ucfg_dfs_set_postnol_freq;
674 	rx_ops->dfs_set_postnol_mode = ucfg_dfs_set_postnol_mode;
675 	rx_ops->dfs_set_postnol_cfreq2 = ucfg_dfs_set_postnol_cfreq2;
676 	rx_ops->dfs_get_postnol_freq = ucfg_dfs_get_postnol_freq;
677 	rx_ops->dfs_get_postnol_mode = ucfg_dfs_get_postnol_mode;
678 	rx_ops->dfs_get_postnol_cfreq2 = ucfg_dfs_get_postnol_cfreq2;
679 }
680 #else
681 static inline void
682 register_dfs_chan_postnol_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
683 {
684 }
685 #endif
686 
687 #ifdef QCA_DFS_BW_EXPAND
688 /* register_dfs_bw_expand_rx_ops() - Register DFS Rx-Ops for BW Expand
689  * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops.
690  */
691 static void
692 register_dfs_bw_expand_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
693 {
694 	if (!rx_ops)
695 		return;
696 
697 	rx_ops->dfs_set_bw_expand = ucfg_dfs_set_bw_expand;
698 	rx_ops->dfs_get_bw_expand = ucfg_dfs_get_bw_expand;
699 }
700 #else
701 static inline void
702 register_dfs_bw_expand_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
703 {
704 }
705 #endif
706 
707 #ifdef QCA_DFS_BW_PUNCTURE
708 /* register_dfs_puncture_rx_ops() - Register DFS Rx-Ops for DFS puncture.
709  * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops.
710  */
711 static void
712 register_dfs_puncture_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
713 {
714 	if (!rx_ops)
715 		return;
716 
717 	rx_ops->dfs_set_dfs_puncture = ucfg_dfs_set_dfs_puncture;
718 	rx_ops->dfs_get_dfs_puncture = ucfg_dfs_get_dfs_puncture;
719 }
720 #else
721 static inline void
722 register_dfs_puncture_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
723 {
724 }
725 #endif
726 
727 #ifdef WLAN_MGMT_RX_REO_SUPPORT
728 static QDF_STATUS
729 wlan_lmac_if_mgmt_rx_reo_rx_ops_register(
730 	struct wlan_lmac_if_mgmt_txrx_rx_ops *mgmt_txrx_rx_ops)
731 {
732 	struct wlan_lmac_if_mgmt_rx_reo_rx_ops *mgmt_rx_reo_rx_ops;
733 
734 	mgmt_rx_reo_rx_ops = &mgmt_txrx_rx_ops->mgmt_rx_reo_rx_ops;
735 	mgmt_rx_reo_rx_ops->fw_consumed_event_handler =
736 			tgt_mgmt_rx_reo_fw_consumed_event_handler;
737 	mgmt_rx_reo_rx_ops->host_drop_handler =
738 			tgt_mgmt_rx_reo_host_drop_handler;
739 
740 	return QDF_STATUS_SUCCESS;
741 }
742 #else
743 static QDF_STATUS
744 wlan_lmac_if_mgmt_rx_reo_rx_ops_register(
745 	struct wlan_lmac_if_mgmt_txrx_rx_ops *mgmt_txrx_rx_ops)
746 {
747 	return QDF_STATUS_SUCCESS;
748 }
749 #endif
750 
751 static QDF_STATUS
752 wlan_lmac_if_mgmt_txrx_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
753 {
754 	struct wlan_lmac_if_mgmt_txrx_rx_ops *mgmt_txrx_rx_ops;
755 
756 	if (!rx_ops) {
757 		qdf_print("lmac if rx ops pointer is NULL");
758 		return QDF_STATUS_E_NULL_VALUE;
759 	}
760 
761 	/* mgmt txrx rx ops */
762 	mgmt_txrx_rx_ops = &rx_ops->mgmt_txrx_rx_ops;
763 
764 	mgmt_txrx_rx_ops->mgmt_tx_completion_handler =
765 			tgt_mgmt_txrx_tx_completion_handler;
766 	mgmt_txrx_rx_ops->mgmt_rx_frame_handler =
767 			tgt_mgmt_txrx_rx_frame_handler;
768 	mgmt_txrx_rx_ops->mgmt_txrx_get_nbuf_from_desc_id =
769 			tgt_mgmt_txrx_get_nbuf_from_desc_id;
770 	mgmt_txrx_rx_ops->mgmt_txrx_get_peer_from_desc_id =
771 			tgt_mgmt_txrx_get_peer_from_desc_id;
772 	mgmt_txrx_rx_ops->mgmt_txrx_get_vdev_id_from_desc_id =
773 			tgt_mgmt_txrx_get_vdev_id_from_desc_id;
774 	mgmt_txrx_rx_ops->mgmt_txrx_get_free_desc_pool_count =
775 			tgt_mgmt_txrx_get_free_desc_pool_count;
776 	mgmt_txrx_rx_ops->mgmt_rx_frame_entry =
777 			tgt_mgmt_txrx_rx_frame_entry;
778 
779 	return wlan_lmac_if_mgmt_rx_reo_rx_ops_register(mgmt_txrx_rx_ops);
780 }
781 
782 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
783 static void dfs_action_on_status_assign(
784 		struct wlan_lmac_if_dfs_rx_ops *dfs_rx_ops)
785 {
786 	dfs_rx_ops->dfs_action_on_status = tgt_dfs_action_on_status_from_fw;
787 }
788 #else
789 static inline void dfs_action_on_status_assign(
790 		struct wlan_lmac_if_dfs_rx_ops *dfs_rx_ops)
791 {
792 }
793 #endif
794 
795 static QDF_STATUS
796 wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
797 {
798 	struct wlan_lmac_if_dfs_rx_ops *dfs_rx_ops;
799 
800 	dfs_rx_ops = &rx_ops->dfs_rx_ops;
801 
802 	dfs_rx_ops->dfs_get_radars = tgt_dfs_get_radars;
803 	dfs_rx_ops->dfs_process_phyerr = tgt_dfs_process_phyerr;
804 	dfs_rx_ops->dfs_destroy_object = tgt_dfs_destroy_object;
805 	dfs_rx_ops->dfs_radar_enable = tgt_dfs_radar_enable;
806 	dfs_rx_ops->dfs_is_radar_enabled = tgt_dfs_is_radar_enabled;
807 	dfs_rx_ops->dfs_control = tgt_dfs_control;
808 	dfs_rx_ops->dfs_is_precac_timer_running =
809 		tgt_dfs_is_precac_timer_running;
810 	dfs_rx_ops->dfs_agile_precac_start =
811 		tgt_dfs_agile_precac_start;
812 	dfs_rx_ops->dfs_set_agile_precac_state =
813 		tgt_dfs_set_agile_precac_state;
814 	dfs_rx_ops->dfs_start_precac_timer = utils_dfs_start_precac_timer;
815 	dfs_rx_ops->dfs_cancel_precac_timer = utils_dfs_cancel_precac_timer;
816 	dfs_rx_ops->dfs_reset_adfs_config = ucfg_dfs_reset_agile_config;
817 	dfs_rx_ops->dfs_override_precac_timeout =
818 		ucfg_dfs_override_precac_timeout;
819 	dfs_rx_ops->dfs_set_precac_enable = ucfg_dfs_set_precac_enable;
820 	dfs_rx_ops->dfs_get_agile_precac_enable =
821 		ucfg_dfs_get_agile_precac_enable;
822 	dfs_rx_ops->dfs_get_override_precac_timeout =
823 		ucfg_dfs_get_override_precac_timeout;
824 	dfs_rx_ops->dfs_process_radar_ind = tgt_dfs_process_radar_ind;
825 	dfs_rx_ops->dfs_dfs_cac_complete_ind = tgt_dfs_cac_complete;
826 	dfs_rx_ops->dfs_dfs_ocac_complete_ind = tgt_dfs_ocac_complete;
827 	dfs_rx_ops->dfs_stop = tgt_dfs_stop;
828 	dfs_rx_ops->dfs_reinit_timers = ucfg_dfs_reinit_timers;
829 	dfs_rx_ops->dfs_enable_stadfs = tgt_dfs_enable_stadfs;
830 	dfs_rx_ops->dfs_is_stadfs_enabled = tgt_dfs_is_stadfs_enabled;
831 	dfs_rx_ops->dfs_process_phyerr_filter_offload =
832 		tgt_dfs_process_phyerr_filter_offload;
833 	dfs_rx_ops->dfs_is_phyerr_filter_offload =
834 		tgt_dfs_is_phyerr_filter_offload;
835 
836 	dfs_action_on_status_assign(dfs_rx_ops);
837 
838 	dfs_rx_ops->dfs_override_status_timeout =
839 		ucfg_dfs_set_override_status_timeout;
840 	dfs_rx_ops->dfs_get_override_status_timeout =
841 		ucfg_dfs_get_override_status_timeout;
842 	dfs_rx_ops->dfs_reset_spoof_test =
843 		tgt_dfs_reset_spoof_test;
844 	dfs_rx_ops->dfs_is_disable_radar_marking_set =
845 		utils_dfs_get_disable_radar_marking;
846 	dfs_rx_ops->dfs_set_nol_subchannel_marking =
847 		ucfg_dfs_set_nol_subchannel_marking;
848 	dfs_rx_ops->dfs_get_nol_subchannel_marking =
849 		ucfg_dfs_get_nol_subchannel_marking;
850 	dfs_rx_ops->dfs_set_bw_reduction =
851 		utils_dfs_bw_reduce;
852 	dfs_rx_ops->dfs_is_bw_reduction_needed =
853 		utils_dfs_is_bw_reduce;
854 	dfs_rx_ops->dfs_allow_hw_pulses =
855 		ucfg_dfs_allow_hw_pulses;
856 	dfs_rx_ops->dfs_is_hw_pulses_allowed =
857 		ucfg_dfs_is_hw_pulses_allowed;
858 	dfs_rx_ops->dfs_set_fw_adfs_support =
859 		tgt_dfs_set_fw_adfs_support;
860 	dfs_rx_ops->dfs_reset_dfs_prevchan =
861 		utils_dfs_reset_dfs_prevchan;
862 	dfs_rx_ops->dfs_init_tmp_psoc_nol =
863 		tgt_dfs_init_tmp_psoc_nol;
864 	dfs_rx_ops->dfs_deinit_tmp_psoc_nol =
865 		tgt_dfs_deinit_tmp_psoc_nol;
866 	dfs_rx_ops->dfs_save_dfs_nol_in_psoc =
867 		tgt_dfs_save_dfs_nol_in_psoc;
868 	dfs_rx_ops->dfs_reinit_nol_from_psoc_copy =
869 		tgt_dfs_reinit_nol_from_psoc_copy;
870 	dfs_rx_ops->dfs_reinit_precac_lists =
871 		tgt_dfs_reinit_precac_lists;
872 	dfs_rx_ops->dfs_complete_deferred_tasks =
873 		tgt_dfs_complete_deferred_tasks;
874 	register_precac_auto_chan_rx_ops(dfs_rx_ops);
875 	register_precac_auto_chan_rx_ops_freq(dfs_rx_ops);
876 	register_dfs_rx_ops_for_freq(dfs_rx_ops);
877 	register_rcac_dfs_rx_ops(dfs_rx_ops);
878 	register_agile_dfs_rx_ops(dfs_rx_ops);
879 	register_dfs_chan_postnol_rx_ops(dfs_rx_ops);
880 	register_dfs_bw_expand_rx_ops(dfs_rx_ops);
881 	register_dfs_puncture_rx_ops(dfs_rx_ops);
882 
883 	return QDF_STATUS_SUCCESS;
884 }
885 #else
886 static QDF_STATUS
887 wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
888 {
889 	return QDF_STATUS_SUCCESS;
890 }
891 #endif
892 
893 #ifdef FEATURE_WLAN_TDLS
894 static QDF_STATUS
895 wlan_lmac_if_umac_tdls_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
896 {
897 	rx_ops->tdls_rx_ops.tdls_ev_handler = tgt_tdls_event_handler;
898 
899 	return QDF_STATUS_SUCCESS;
900 }
901 #else
902 static QDF_STATUS
903 wlan_lmac_if_umac_tdls_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
904 {
905 	return QDF_STATUS_SUCCESS;
906 }
907 #endif
908 
909 #ifdef WLAN_SUPPORT_GREEN_AP
910 static QDF_STATUS
911 wlan_lmac_if_umac_green_ap_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
912 {
913 	rx_ops->green_ap_rx_ops.is_ps_enabled = wlan_green_ap_is_ps_enabled;
914 	rx_ops->green_ap_rx_ops.is_dbg_print_enabled =
915 					ucfg_green_ap_get_debug_prints;
916 	rx_ops->green_ap_rx_ops.ps_set = ucfg_green_ap_set_ps_config;
917 	rx_ops->green_ap_rx_ops.ps_get = ucfg_green_ap_get_ps_config;
918 	rx_ops->green_ap_rx_ops.suspend_handle = wlan_green_ap_suspend_handle;
919 
920 	return QDF_STATUS_SUCCESS;
921 }
922 #else
923 static QDF_STATUS
924 wlan_lmac_if_umac_green_ap_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
925 {
926 	return QDF_STATUS_SUCCESS;
927 }
928 #endif
929 
930 #ifdef QCA_WIFI_FTM
931 static QDF_STATUS
932 wlan_lmac_if_umac_ftm_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
933 {
934 	struct wlan_lmac_if_ftm_rx_ops *ftm_rx_ops;
935 
936 	ftm_rx_ops = &rx_ops->ftm_rx_ops;
937 
938 	ftm_rx_ops->ftm_ev_handler = wlan_ftm_process_utf_event;
939 
940 	return QDF_STATUS_SUCCESS;
941 }
942 #else
943 static QDF_STATUS
944 wlan_lmac_if_umac_ftm_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
945 {
946 	return QDF_STATUS_SUCCESS;
947 }
948 #endif
949 
950 #ifdef WLAN_FEATURE_11BE_MLO
951 /**
952  * wlan_lmac_if_mlo_mgr_rx_ops_register() - API to register mlo mgr Rx Ops
953  * @rx_ops: pointer to lmac rx ops
954  *
955  * This API will be used to register function pointers for FW events
956  *
957  * Return: void
958  */
959 static void
960 wlan_lmac_if_mlo_mgr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
961 {
962 	/* register handler for received mlo related events */
963 	rx_ops->mlo_rx_ops.process_link_set_active_resp =
964 		mlo_process_link_set_active_resp;
965 }
966 #else
967 static void
968 wlan_lmac_if_mlo_mgr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
969 {
970 }
971 #endif /* WLAN_FEATURE_11BE_MLO */
972 
973 #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
974 static
975 void wlan_lmac_if_twt_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
976 {
977 	tgt_twt_register_rx_ops(rx_ops);
978 }
979 #else
980 static
981 void wlan_lmac_if_twt_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
982 {
983 }
984 #endif /* WLAN_SUPPORT_TWT && WLAN_TWT_CONV_SUPPORTED */
985 
986 #ifdef WLAN_FEATURE_DBAM_CONFIG
987 static void
988 wlan_lmac_if_dbam_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
989 {
990 	rx_ops->dbam_rx_ops.dbam_resp_event = target_if_dbam_process_event;
991 }
992 #else
993 static void
994 wlan_lmac_if_dbam_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
995 {
996 }
997 #endif /* WLAN_FEATURE_DBAM_CONFIG */
998 
999 /**
1000  * wlan_lmac_if_umac_rx_ops_register() - UMAC rx handler register
1001  * @rx_ops: Pointer to rx_ops structure to be populated
1002  *
1003  * Register umac RX callabacks which will be called by DA/OL/WMA/WMI
1004  *
1005  * Return: QDF_STATUS_SUCCESS - in case of success
1006  */
1007 QDF_STATUS
1008 wlan_lmac_if_umac_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
1009 {
1010 	/* Component specific public api's to be called to register
1011 	 * respective callbacks
1012 	 * Ex: rx_ops->fp = function;
1013 	 */
1014 
1015 	if (!rx_ops) {
1016 		qdf_print("lmac if rx ops pointer is NULL");
1017 		return QDF_STATUS_E_INVAL;
1018 	}
1019 
1020 	wlan_lmac_if_mgmt_txrx_rx_ops_register(rx_ops);
1021 
1022 	/* scan rx ops */
1023 	rx_ops->scan.scan_ev_handler = tgt_scan_event_handler;
1024 	rx_ops->scan.scan_set_max_active_scans = tgt_scan_set_max_active_scans;
1025 
1026 	wlan_lmac_if_atf_rx_ops_register(rx_ops);
1027 
1028 	wlan_lmac_if_cp_stats_rx_ops_register(rx_ops);
1029 
1030 	wlan_target_if_dcs_rx_ops_register(rx_ops);
1031 
1032 	wlan_lmac_if_sa_api_rx_ops_register(rx_ops);
1033 
1034 	wlan_lmac_if_cfr_rx_ops_register(rx_ops);
1035 
1036 	wlan_lmac_if_crypto_rx_ops_register(rx_ops);
1037 	/* wifi_pos rx ops */
1038 	wlan_lmac_if_umac_rx_ops_register_wifi_pos(rx_ops);
1039 
1040 	/* tdls rx ops */
1041 	wlan_lmac_if_umac_tdls_rx_ops_register(rx_ops);
1042 
1043 	wlan_lmac_if_umac_reg_rx_ops_register(rx_ops);
1044 
1045 	/* p2p rx ops */
1046 	wlan_lmac_if_umac_rx_ops_register_p2p(rx_ops);
1047 
1048 	/* DFS rx_ops */
1049 	wlan_lmac_if_umac_dfs_rx_ops_register(rx_ops);
1050 
1051 	wlan_lmac_if_umac_green_ap_rx_ops_register(rx_ops);
1052 
1053 	/* FTM rx_ops */
1054 	wlan_lmac_if_umac_ftm_rx_ops_register(rx_ops);
1055 
1056 	/* FILS Discovery */
1057 	wlan_lmac_if_fd_rx_ops_register(rx_ops);
1058 
1059 	/* MLME rx_ops */
1060 	tgt_vdev_mgr_rx_ops_register(rx_ops);
1061 
1062 	wlan_lmac_if_mlo_mgr_rx_ops_register(rx_ops);
1063 
1064 	wlan_lmac_if_twt_rx_ops_register(rx_ops);
1065 
1066 	wlan_lmac_if_dbam_rx_ops_register(rx_ops);
1067 
1068 	return QDF_STATUS_SUCCESS;
1069 }
1070 
1071 /**
1072  * wlan_lmac_if_set_umac_txops_registration_cb() - tx registration
1073  * callback assignment
1074  * @dev_type: Dev type can be either Direct attach or Offload
1075  * @handler: handler to be called for LMAC tx ops registration
1076  *
1077  * API to assign appropriate tx registration callback handler based on the
1078  * device type(Offload or Direct attach)
1079  *
1080  * Return: QDF_STATUS_SUCCESS - in case of success
1081  */
1082 QDF_STATUS wlan_lmac_if_set_umac_txops_registration_cb(QDF_STATUS (*handler)
1083 				(struct wlan_lmac_if_tx_ops *))
1084 {
1085 	wlan_lmac_if_umac_tx_ops_register = handler;
1086 	return QDF_STATUS_SUCCESS;
1087 }
1088 qdf_export_symbol(wlan_lmac_if_set_umac_txops_registration_cb);
1089 
1090 /**
1091  * wlan_lmac_if_set_umac_crypto_rxpn_ops_registration_cb() - crypto rxpn
1092  * registration callback assignment
1093  * @dev_type: Dev type can be either Direct attach or Offload
1094  * @handler: handler to be called for LMAC crypto rxpn ops registration
1095  *
1096  * API to assign appropriate crypto rxpn registration callback handler
1097  * based on the device type
1098  *
1099  * Return: QDF_STATUS_SUCCESS - in case of success
1100  */
1101 QDF_STATUS wlan_lmac_if_set_umac_crypto_rxpn_ops_registration_cb(
1102 		QDF_STATUS (*handler)(struct wlan_lmac_if_rx_ops *))
1103 {
1104 	wlan_lmac_if_umac_crypto_rxpn_ops_register = handler;
1105 	return QDF_STATUS_SUCCESS;
1106 }
1107 qdf_export_symbol(wlan_lmac_if_set_umac_crypto_rxpn_ops_registration_cb);
1108