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