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