xref: /wlan-dirver/qca-wifi-host-cmn/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c (revision 901120c066e139c7f8a2c8e4820561fdd83c67ef)
1 /*
2  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * 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 	rx_ops->reg_rx_ops.reg_set_eirp_preferred_support =
382 				tgt_reg_set_eirp_preferred_support;
383 	rx_ops->reg_rx_ops.reg_get_eirp_preferred_support =
384 				tgt_reg_get_eirp_preferred_support;
385 }
386 #else
387 static inline void wlan_lmac_if_register_afc_handlers(
388 					struct wlan_lmac_if_rx_ops *rx_ops)
389 {
390 }
391 #endif
392 
393 #else
394 static inline void wlan_lmac_if_register_master_list_ext_handler(
395 					struct wlan_lmac_if_rx_ops *rx_ops)
396 {
397 }
398 
399 static inline void wlan_lmac_if_register_afc_handlers(
400 					struct wlan_lmac_if_rx_ops *rx_ops)
401 {
402 }
403 
404 static inline void wlan_lmac_if_register_super_chan_display(
405 					struct wlan_lmac_if_rx_ops *rx_ops)
406 {
407 }
408 #endif
409 
410 #if defined(CONFIG_BAND_6GHZ)
411 static void wlan_lmac_if_register_6g_edge_chan_supp(
412 					struct wlan_lmac_if_rx_ops *rx_ops)
413 {
414 	rx_ops->reg_rx_ops.reg_set_lower_6g_edge_ch_supp =
415 		tgt_reg_set_lower_6g_edge_ch_supp;
416 
417 	rx_ops->reg_rx_ops.reg_set_disable_upper_6g_edge_ch_supp =
418 		tgt_reg_set_disable_upper_6g_edge_ch_supp;
419 }
420 #else
421 static inline void wlan_lmac_if_register_6g_edge_chan_supp(
422 					struct wlan_lmac_if_rx_ops *rx_ops)
423 {
424 }
425 #endif
426 
427 #ifdef WLAN_REG_PARTIAL_OFFLOAD
428 /**
429  * wlan_lmac_if_umac_reg_rx_ops_register_po() - Function to register Reg RX ops
430  * for Partial Offload
431  * rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops
432  *
433  * Return: void
434  */
435 static void wlan_lmac_if_umac_reg_rx_ops_register_po(
436 					struct wlan_lmac_if_rx_ops *rx_ops)
437 {
438 	rx_ops->reg_rx_ops.reg_program_default_cc =
439 		ucfg_reg_program_default_cc;
440 
441 	rx_ops->reg_rx_ops.reg_get_current_regdomain =
442 		wlan_reg_get_curr_regdomain;
443 }
444 #else
445 static void wlan_lmac_if_umac_reg_rx_ops_register_po(
446 					struct wlan_lmac_if_rx_ops *rx_ops)
447 {
448 }
449 #endif
450 
451 static void wlan_lmac_if_umac_reg_rx_ops_register(
452 	struct wlan_lmac_if_rx_ops *rx_ops)
453 {
454 	rx_ops->reg_rx_ops.master_list_handler =
455 		tgt_reg_process_master_chan_list;
456 
457 	wlan_lmac_if_register_master_list_ext_handler(rx_ops);
458 
459 	rx_ops->reg_rx_ops.reg_11d_new_cc_handler =
460 		tgt_reg_process_11d_new_country;
461 
462 	rx_ops->reg_rx_ops.reg_set_regdb_offloaded =
463 		tgt_reg_set_regdb_offloaded;
464 
465 	rx_ops->reg_rx_ops.reg_set_11d_offloaded =
466 		tgt_reg_set_11d_offloaded;
467 
468 	rx_ops->reg_rx_ops.reg_set_6ghz_supported =
469 		tgt_reg_set_6ghz_supported;
470 
471 	rx_ops->reg_rx_ops.reg_set_5dot9_ghz_supported =
472 		tgt_reg_set_5dot9_ghz_supported;
473 
474 	rx_ops->reg_rx_ops.get_dfs_region =
475 		wlan_reg_get_dfs_region;
476 
477 	rx_ops->reg_rx_ops.reg_ch_avoid_event_handler =
478 		tgt_reg_process_ch_avoid_event;
479 
480 	rx_ops->reg_rx_ops.reg_freq_to_chan =
481 		wlan_reg_freq_to_chan;
482 
483 	rx_ops->reg_rx_ops.reg_set_chan_144 =
484 		ucfg_reg_modify_chan_144;
485 
486 	rx_ops->reg_rx_ops.reg_get_chan_144 =
487 		ucfg_reg_get_en_chan_144;
488 
489 	wlan_lmac_if_umac_reg_rx_ops_register_po(rx_ops);
490 
491 	rx_ops->reg_rx_ops.reg_enable_dfs_channels =
492 		ucfg_reg_enable_dfs_channels;
493 
494 	rx_ops->reg_rx_ops.reg_modify_pdev_chan_range =
495 		wlan_reg_modify_pdev_chan_range;
496 
497 	rx_ops->reg_rx_ops.reg_update_pdev_wireless_modes =
498 		wlan_reg_update_pdev_wireless_modes;
499 
500 	rx_ops->reg_rx_ops.reg_is_range_only6g =
501 		wlan_reg_is_range_only6g;
502 
503 	rx_ops->reg_rx_ops.reg_is_range_overlap_6g =
504 		wlan_reg_is_range_overlap_6g;
505 
506 	rx_ops->reg_rx_ops.reg_ignore_fw_reg_offload_ind =
507 		tgt_reg_ignore_fw_reg_offload_ind;
508 
509 	rx_ops->reg_rx_ops.reg_disable_chan_coex =
510 		wlan_reg_disable_chan_coex;
511 
512 	rx_ops->reg_rx_ops.reg_get_unii_5g_bitmap =
513 		ucfg_reg_get_unii_5g_bitmap;
514 
515 	rx_ops->reg_rx_ops.reg_set_ext_tpc_supported =
516 		tgt_reg_set_ext_tpc_supported;
517 
518 	wlan_lmac_if_register_6g_edge_chan_supp(rx_ops);
519 
520 	wlan_lmac_if_register_afc_handlers(rx_ops);
521 
522 	wlan_lmac_if_register_super_chan_display(rx_ops);
523 }
524 
525 #ifdef CONVERGED_P2P_ENABLE
526 #ifdef WLAN_FEATURE_MCC_QUOTA
527 static inline void
528 wlan_lmac_if_umac_rx_ops_register_p2p_mcc_quota(struct wlan_lmac_if_rx_ops *rx_ops)
529 {
530 	rx_ops->p2p.mcc_quota_ev_handler = tgt_p2p_mcc_quota_event_cb;
531 }
532 #else
533 static inline void wlan_lmac_if_umac_rx_ops_register_p2p_mcc_quota(
534 				struct wlan_lmac_if_rx_ops *rx_ops)
535 {
536 }
537 #endif
538 
539 #ifdef FEATURE_P2P_LISTEN_OFFLOAD
540 static inline void
541 wlan_lmac_if_umac_rx_ops_register_p2p_listen_offload(struct wlan_lmac_if_rx_ops *rx_ops)
542 {
543 	rx_ops->p2p.lo_ev_handler = tgt_p2p_lo_event_cb;
544 }
545 #else
546 static inline void
547 wlan_lmac_if_umac_rx_ops_register_p2p_listen_offload(struct wlan_lmac_if_rx_ops *rx_ops)
548 {
549 }
550 #endif
551 
552 static void wlan_lmac_if_umac_rx_ops_register_p2p(
553 				struct wlan_lmac_if_rx_ops *rx_ops)
554 {
555 	wlan_lmac_if_umac_rx_ops_register_p2p_listen_offload(rx_ops);
556 	rx_ops->p2p.noa_ev_handler = tgt_p2p_noa_event_cb;
557 	rx_ops->p2p.add_mac_addr_filter_evt_handler =
558 		tgt_p2p_add_mac_addr_status_event_cb;
559 	wlan_lmac_if_umac_rx_ops_register_p2p_mcc_quota(rx_ops);
560 }
561 #else
562 static void wlan_lmac_if_umac_rx_ops_register_p2p(
563 				struct wlan_lmac_if_rx_ops *rx_ops)
564 {
565 }
566 #endif
567 
568 /*
569  * register_precac_auto_chan_rx_ops_freq() - Register auto chan switch rx ops
570  * for frequency based channel APIs.
571  * rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops
572  */
573 #ifdef DFS_COMPONENT_ENABLE
574 #if defined(WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT) && defined(CONFIG_CHAN_FREQ_API)
575 static inline void
576 register_precac_auto_chan_rx_ops_freq(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
577 {
578 	if (!rx_ops)
579 		return;
580 	rx_ops->dfs_get_precac_chan_state_for_freq =
581 		ucfg_dfs_get_precac_chan_state_for_freq;
582 }
583 #else
584 static inline void
585 register_precac_auto_chan_rx_ops_freq(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
586 {
587 }
588 #endif
589 #endif
590 
591 #ifdef DFS_COMPONENT_ENABLE
592 #ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT
593 static inline void
594 register_precac_auto_chan_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
595 {
596 	if (!rx_ops)
597 		return;
598 	rx_ops->dfs_set_precac_intermediate_chan =
599 		ucfg_dfs_set_precac_intermediate_chan;
600 	rx_ops->dfs_get_precac_intermediate_chan =
601 		ucfg_dfs_get_precac_intermediate_chan;
602 }
603 #else
604 static inline void
605 register_precac_auto_chan_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
606 {
607 }
608 #endif
609 
610 /*
611  * register_dfs_rx_ops_for_freq() - Register DFS rx ops for frequency based
612  * channel APIs.
613  * rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops.
614  */
615 #ifdef CONFIG_CHAN_FREQ_API
616 static void register_dfs_rx_ops_for_freq(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
617 {
618 	if (!rx_ops)
619 		return;
620 	rx_ops->dfs_set_current_channel_for_freq =
621 		tgt_dfs_set_current_channel_for_freq;
622 }
623 #endif
624 
625 /*
626  * register_rcac_dfs_rx_ops() - Register DFS RX-Ops for RCAC specific
627  * APIs.
628  * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops.
629  */
630 #ifdef QCA_SUPPORT_ADFS_RCAC
631 static void register_rcac_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
632 {
633 	if (!rx_ops)
634 		return;
635 	rx_ops->dfs_set_rcac_enable = ucfg_dfs_set_rcac_enable;
636 	rx_ops->dfs_get_rcac_enable = ucfg_dfs_get_rcac_enable;
637 	rx_ops->dfs_set_rcac_freq = ucfg_dfs_set_rcac_freq;
638 	rx_ops->dfs_get_rcac_freq = ucfg_dfs_get_rcac_freq;
639 	rx_ops->dfs_is_agile_rcac_enabled = ucfg_dfs_is_agile_rcac_enabled;
640 }
641 #else
642 static inline void
643 register_rcac_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
644 {
645 }
646 #endif
647 
648 /*
649  * register_agile_dfs_rx_ops() - Register Rx-Ops for Agile Specific APIs
650  * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops.
651  */
652 #ifdef QCA_SUPPORT_AGILE_DFS
653 static void register_agile_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
654 {
655 	if (!rx_ops)
656 		return;
657 	rx_ops->dfs_agile_sm_deliver_evt = utils_dfs_agile_sm_deliver_evt;
658 }
659 #else
660 static inline void
661 register_agile_dfs_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
662 {
663 }
664 #endif
665 
666 #ifdef QCA_SUPPORT_DFS_CHAN_POSTNOL
667 /* register_dfs_chan_postnol_rx_ops() - Register DFS Rx-Ops for postNOL
668  * channel change APIs.
669  * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops.
670  */
671 static void
672 register_dfs_chan_postnol_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
673 {
674 	if (!rx_ops)
675 		return;
676 
677 	rx_ops->dfs_set_postnol_freq = ucfg_dfs_set_postnol_freq;
678 	rx_ops->dfs_set_postnol_mode = ucfg_dfs_set_postnol_mode;
679 	rx_ops->dfs_set_postnol_cfreq2 = ucfg_dfs_set_postnol_cfreq2;
680 	rx_ops->dfs_get_postnol_freq = ucfg_dfs_get_postnol_freq;
681 	rx_ops->dfs_get_postnol_mode = ucfg_dfs_get_postnol_mode;
682 	rx_ops->dfs_get_postnol_cfreq2 = ucfg_dfs_get_postnol_cfreq2;
683 }
684 #else
685 static inline void
686 register_dfs_chan_postnol_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
687 {
688 }
689 #endif
690 
691 #ifdef QCA_DFS_BW_EXPAND
692 /* register_dfs_bw_expand_rx_ops() - Register DFS Rx-Ops for BW Expand
693  * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops.
694  */
695 static void
696 register_dfs_bw_expand_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
697 {
698 	if (!rx_ops)
699 		return;
700 
701 	rx_ops->dfs_set_bw_expand = ucfg_dfs_set_bw_expand;
702 	rx_ops->dfs_get_bw_expand = ucfg_dfs_get_bw_expand;
703 }
704 #else
705 static inline void
706 register_dfs_bw_expand_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
707 {
708 }
709 #endif
710 
711 #ifdef QCA_DFS_BW_PUNCTURE
712 /* register_dfs_puncture_rx_ops() - Register DFS Rx-Ops for DFS puncture.
713  * @rx_ops: Pointer to wlan_lmac_if_dfs_rx_ops.
714  */
715 static void
716 register_dfs_puncture_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
717 {
718 	if (!rx_ops)
719 		return;
720 
721 	rx_ops->dfs_set_dfs_puncture = ucfg_dfs_set_dfs_puncture;
722 	rx_ops->dfs_get_dfs_puncture = ucfg_dfs_get_dfs_puncture;
723 }
724 #else
725 static inline void
726 register_dfs_puncture_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
727 {
728 }
729 #endif
730 
731 #ifdef WLAN_MGMT_RX_REO_SUPPORT
732 static QDF_STATUS
733 wlan_lmac_if_mgmt_rx_reo_rx_ops_register(
734 	struct wlan_lmac_if_mgmt_txrx_rx_ops *mgmt_txrx_rx_ops)
735 {
736 	struct wlan_lmac_if_mgmt_rx_reo_rx_ops *mgmt_rx_reo_rx_ops;
737 
738 	mgmt_rx_reo_rx_ops = &mgmt_txrx_rx_ops->mgmt_rx_reo_rx_ops;
739 	mgmt_rx_reo_rx_ops->fw_consumed_event_handler =
740 			tgt_mgmt_rx_reo_fw_consumed_event_handler;
741 	mgmt_rx_reo_rx_ops->host_drop_handler =
742 			tgt_mgmt_rx_reo_host_drop_handler;
743 
744 	return QDF_STATUS_SUCCESS;
745 }
746 #else
747 static QDF_STATUS
748 wlan_lmac_if_mgmt_rx_reo_rx_ops_register(
749 	struct wlan_lmac_if_mgmt_txrx_rx_ops *mgmt_txrx_rx_ops)
750 {
751 	return QDF_STATUS_SUCCESS;
752 }
753 #endif
754 
755 static QDF_STATUS
756 wlan_lmac_if_mgmt_txrx_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
757 {
758 	struct wlan_lmac_if_mgmt_txrx_rx_ops *mgmt_txrx_rx_ops;
759 
760 	if (!rx_ops) {
761 		qdf_print("lmac if rx ops pointer is NULL");
762 		return QDF_STATUS_E_NULL_VALUE;
763 	}
764 
765 	/* mgmt txrx rx ops */
766 	mgmt_txrx_rx_ops = &rx_ops->mgmt_txrx_rx_ops;
767 
768 	mgmt_txrx_rx_ops->mgmt_tx_completion_handler =
769 			tgt_mgmt_txrx_tx_completion_handler;
770 	mgmt_txrx_rx_ops->mgmt_rx_frame_handler =
771 			tgt_mgmt_txrx_rx_frame_handler;
772 	mgmt_txrx_rx_ops->mgmt_txrx_get_nbuf_from_desc_id =
773 			tgt_mgmt_txrx_get_nbuf_from_desc_id;
774 	mgmt_txrx_rx_ops->mgmt_txrx_get_peer_from_desc_id =
775 			tgt_mgmt_txrx_get_peer_from_desc_id;
776 	mgmt_txrx_rx_ops->mgmt_txrx_get_vdev_id_from_desc_id =
777 			tgt_mgmt_txrx_get_vdev_id_from_desc_id;
778 	mgmt_txrx_rx_ops->mgmt_txrx_get_free_desc_pool_count =
779 			tgt_mgmt_txrx_get_free_desc_pool_count;
780 	mgmt_txrx_rx_ops->mgmt_rx_frame_entry =
781 			tgt_mgmt_txrx_rx_frame_entry;
782 
783 	return wlan_lmac_if_mgmt_rx_reo_rx_ops_register(mgmt_txrx_rx_ops);
784 }
785 
786 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
787 static void dfs_action_on_status_assign(
788 		struct wlan_lmac_if_dfs_rx_ops *dfs_rx_ops)
789 {
790 	dfs_rx_ops->dfs_action_on_status = tgt_dfs_action_on_status_from_fw;
791 }
792 #else
793 static inline void dfs_action_on_status_assign(
794 		struct wlan_lmac_if_dfs_rx_ops *dfs_rx_ops)
795 {
796 }
797 #endif
798 
799 static QDF_STATUS
800 wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
801 {
802 	struct wlan_lmac_if_dfs_rx_ops *dfs_rx_ops;
803 
804 	dfs_rx_ops = &rx_ops->dfs_rx_ops;
805 
806 	dfs_rx_ops->dfs_get_radars = tgt_dfs_get_radars;
807 	dfs_rx_ops->dfs_process_phyerr = tgt_dfs_process_phyerr;
808 	dfs_rx_ops->dfs_destroy_object = tgt_dfs_destroy_object;
809 	dfs_rx_ops->dfs_radar_enable = tgt_dfs_radar_enable;
810 	dfs_rx_ops->dfs_is_radar_enabled = tgt_dfs_is_radar_enabled;
811 	dfs_rx_ops->dfs_control = tgt_dfs_control;
812 	dfs_rx_ops->dfs_is_precac_timer_running =
813 		tgt_dfs_is_precac_timer_running;
814 	dfs_rx_ops->dfs_agile_precac_start =
815 		tgt_dfs_agile_precac_start;
816 	dfs_rx_ops->dfs_set_agile_precac_state =
817 		tgt_dfs_set_agile_precac_state;
818 	dfs_rx_ops->dfs_start_precac_timer = utils_dfs_start_precac_timer;
819 	dfs_rx_ops->dfs_cancel_precac_timer = utils_dfs_cancel_precac_timer;
820 	dfs_rx_ops->dfs_reset_adfs_config = ucfg_dfs_reset_agile_config;
821 	dfs_rx_ops->dfs_override_precac_timeout =
822 		ucfg_dfs_override_precac_timeout;
823 	dfs_rx_ops->dfs_set_precac_enable = ucfg_dfs_set_precac_enable;
824 	dfs_rx_ops->dfs_get_agile_precac_enable =
825 		ucfg_dfs_get_agile_precac_enable;
826 	dfs_rx_ops->dfs_get_override_precac_timeout =
827 		ucfg_dfs_get_override_precac_timeout;
828 	dfs_rx_ops->dfs_process_radar_ind = tgt_dfs_process_radar_ind;
829 	dfs_rx_ops->dfs_dfs_cac_complete_ind = tgt_dfs_cac_complete;
830 	dfs_rx_ops->dfs_dfs_ocac_complete_ind = tgt_dfs_ocac_complete;
831 	dfs_rx_ops->dfs_stop = tgt_dfs_stop;
832 	dfs_rx_ops->dfs_reinit_timers = ucfg_dfs_reinit_timers;
833 	dfs_rx_ops->dfs_enable_stadfs = tgt_dfs_enable_stadfs;
834 	dfs_rx_ops->dfs_is_stadfs_enabled = tgt_dfs_is_stadfs_enabled;
835 	dfs_rx_ops->dfs_process_phyerr_filter_offload =
836 		tgt_dfs_process_phyerr_filter_offload;
837 	dfs_rx_ops->dfs_is_phyerr_filter_offload =
838 		tgt_dfs_is_phyerr_filter_offload;
839 
840 	dfs_action_on_status_assign(dfs_rx_ops);
841 
842 	dfs_rx_ops->dfs_override_status_timeout =
843 		ucfg_dfs_set_override_status_timeout;
844 	dfs_rx_ops->dfs_get_override_status_timeout =
845 		ucfg_dfs_get_override_status_timeout;
846 	dfs_rx_ops->dfs_reset_spoof_test =
847 		tgt_dfs_reset_spoof_test;
848 	dfs_rx_ops->dfs_is_disable_radar_marking_set =
849 		utils_dfs_get_disable_radar_marking;
850 	dfs_rx_ops->dfs_set_nol_subchannel_marking =
851 		ucfg_dfs_set_nol_subchannel_marking;
852 	dfs_rx_ops->dfs_get_nol_subchannel_marking =
853 		ucfg_dfs_get_nol_subchannel_marking;
854 	dfs_rx_ops->dfs_set_bw_reduction =
855 		utils_dfs_bw_reduce;
856 	dfs_rx_ops->dfs_is_bw_reduction_needed =
857 		utils_dfs_is_bw_reduce;
858 	dfs_rx_ops->dfs_allow_hw_pulses =
859 		ucfg_dfs_allow_hw_pulses;
860 	dfs_rx_ops->dfs_is_hw_pulses_allowed =
861 		ucfg_dfs_is_hw_pulses_allowed;
862 	dfs_rx_ops->dfs_set_fw_adfs_support =
863 		tgt_dfs_set_fw_adfs_support;
864 	dfs_rx_ops->dfs_reset_dfs_prevchan =
865 		utils_dfs_reset_dfs_prevchan;
866 	dfs_rx_ops->dfs_init_tmp_psoc_nol =
867 		tgt_dfs_init_tmp_psoc_nol;
868 	dfs_rx_ops->dfs_deinit_tmp_psoc_nol =
869 		tgt_dfs_deinit_tmp_psoc_nol;
870 	dfs_rx_ops->dfs_save_dfs_nol_in_psoc =
871 		tgt_dfs_save_dfs_nol_in_psoc;
872 	dfs_rx_ops->dfs_reinit_nol_from_psoc_copy =
873 		tgt_dfs_reinit_nol_from_psoc_copy;
874 	dfs_rx_ops->dfs_reinit_precac_lists =
875 		tgt_dfs_reinit_precac_lists;
876 	dfs_rx_ops->dfs_complete_deferred_tasks =
877 		tgt_dfs_complete_deferred_tasks;
878 	register_precac_auto_chan_rx_ops(dfs_rx_ops);
879 	register_precac_auto_chan_rx_ops_freq(dfs_rx_ops);
880 	register_dfs_rx_ops_for_freq(dfs_rx_ops);
881 	register_rcac_dfs_rx_ops(dfs_rx_ops);
882 	register_agile_dfs_rx_ops(dfs_rx_ops);
883 	register_dfs_chan_postnol_rx_ops(dfs_rx_ops);
884 	register_dfs_bw_expand_rx_ops(dfs_rx_ops);
885 	register_dfs_puncture_rx_ops(dfs_rx_ops);
886 
887 	return QDF_STATUS_SUCCESS;
888 }
889 #else
890 static QDF_STATUS
891 wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
892 {
893 	return QDF_STATUS_SUCCESS;
894 }
895 #endif
896 
897 #ifdef FEATURE_WLAN_TDLS
898 static QDF_STATUS
899 wlan_lmac_if_umac_tdls_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
900 {
901 	rx_ops->tdls_rx_ops.tdls_ev_handler = tgt_tdls_event_handler;
902 
903 	return QDF_STATUS_SUCCESS;
904 }
905 #else
906 static QDF_STATUS
907 wlan_lmac_if_umac_tdls_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
908 {
909 	return QDF_STATUS_SUCCESS;
910 }
911 #endif
912 
913 #ifdef WLAN_SUPPORT_GREEN_AP
914 static QDF_STATUS
915 wlan_lmac_if_umac_green_ap_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
916 {
917 	rx_ops->green_ap_rx_ops.is_ps_enabled = wlan_green_ap_is_ps_enabled;
918 	rx_ops->green_ap_rx_ops.is_dbg_print_enabled =
919 					ucfg_green_ap_get_debug_prints;
920 	rx_ops->green_ap_rx_ops.ps_set = ucfg_green_ap_set_ps_config;
921 	rx_ops->green_ap_rx_ops.ps_get = ucfg_green_ap_get_ps_config;
922 	rx_ops->green_ap_rx_ops.suspend_handle = wlan_green_ap_suspend_handle;
923 
924 	return QDF_STATUS_SUCCESS;
925 }
926 #else
927 static QDF_STATUS
928 wlan_lmac_if_umac_green_ap_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
929 {
930 	return QDF_STATUS_SUCCESS;
931 }
932 #endif
933 
934 #ifdef QCA_WIFI_FTM
935 static QDF_STATUS
936 wlan_lmac_if_umac_ftm_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
937 {
938 	struct wlan_lmac_if_ftm_rx_ops *ftm_rx_ops;
939 
940 	ftm_rx_ops = &rx_ops->ftm_rx_ops;
941 
942 	ftm_rx_ops->ftm_ev_handler = wlan_ftm_process_utf_event;
943 
944 	return QDF_STATUS_SUCCESS;
945 }
946 #else
947 static QDF_STATUS
948 wlan_lmac_if_umac_ftm_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
949 {
950 	return QDF_STATUS_SUCCESS;
951 }
952 #endif
953 
954 #ifdef WLAN_FEATURE_11BE_MLO
955 /**
956  * wlan_lmac_if_mlo_mgr_rx_ops_register() - API to register mlo mgr Rx Ops
957  * @rx_ops: pointer to lmac rx ops
958  *
959  * This API will be used to register function pointers for FW events
960  *
961  * Return: void
962  */
963 static void
964 wlan_lmac_if_mlo_mgr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
965 {
966 	/* register handler for received mlo related events */
967 	rx_ops->mlo_rx_ops.process_link_set_active_resp =
968 		mlo_process_link_set_active_resp;
969 }
970 #else
971 static void
972 wlan_lmac_if_mlo_mgr_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
973 {
974 }
975 #endif /* WLAN_FEATURE_11BE_MLO */
976 
977 #if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
978 static
979 void wlan_lmac_if_twt_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
980 {
981 	tgt_twt_register_rx_ops(rx_ops);
982 }
983 #else
984 static
985 void wlan_lmac_if_twt_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
986 {
987 }
988 #endif /* WLAN_SUPPORT_TWT && WLAN_TWT_CONV_SUPPORTED */
989 
990 #ifdef WLAN_FEATURE_DBAM_CONFIG
991 static void
992 wlan_lmac_if_dbam_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
993 {
994 	rx_ops->dbam_rx_ops.dbam_resp_event = target_if_dbam_process_event;
995 }
996 #else
997 static void
998 wlan_lmac_if_dbam_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
999 {
1000 }
1001 #endif /* WLAN_FEATURE_DBAM_CONFIG */
1002 
1003 /**
1004  * wlan_lmac_if_umac_rx_ops_register() - UMAC rx handler register
1005  * @rx_ops: Pointer to rx_ops structure to be populated
1006  *
1007  * Register umac RX callabacks which will be called by DA/OL/WMA/WMI
1008  *
1009  * Return: QDF_STATUS_SUCCESS - in case of success
1010  */
1011 QDF_STATUS
1012 wlan_lmac_if_umac_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
1013 {
1014 	/* Component specific public api's to be called to register
1015 	 * respective callbacks
1016 	 * Ex: rx_ops->fp = function;
1017 	 */
1018 
1019 	if (!rx_ops) {
1020 		qdf_print("lmac if rx ops pointer is NULL");
1021 		return QDF_STATUS_E_INVAL;
1022 	}
1023 
1024 	wlan_lmac_if_mgmt_txrx_rx_ops_register(rx_ops);
1025 
1026 	/* scan rx ops */
1027 	rx_ops->scan.scan_ev_handler = tgt_scan_event_handler;
1028 	rx_ops->scan.scan_set_max_active_scans = tgt_scan_set_max_active_scans;
1029 
1030 	wlan_lmac_if_atf_rx_ops_register(rx_ops);
1031 
1032 	wlan_lmac_if_cp_stats_rx_ops_register(rx_ops);
1033 
1034 	wlan_target_if_dcs_rx_ops_register(rx_ops);
1035 
1036 	wlan_lmac_if_sa_api_rx_ops_register(rx_ops);
1037 
1038 	wlan_lmac_if_cfr_rx_ops_register(rx_ops);
1039 
1040 	wlan_lmac_if_crypto_rx_ops_register(rx_ops);
1041 	/* wifi_pos rx ops */
1042 	wlan_lmac_if_umac_rx_ops_register_wifi_pos(rx_ops);
1043 
1044 	/* tdls rx ops */
1045 	wlan_lmac_if_umac_tdls_rx_ops_register(rx_ops);
1046 
1047 	wlan_lmac_if_umac_reg_rx_ops_register(rx_ops);
1048 
1049 	/* p2p rx ops */
1050 	wlan_lmac_if_umac_rx_ops_register_p2p(rx_ops);
1051 
1052 	/* DFS rx_ops */
1053 	wlan_lmac_if_umac_dfs_rx_ops_register(rx_ops);
1054 
1055 	wlan_lmac_if_umac_green_ap_rx_ops_register(rx_ops);
1056 
1057 	/* FTM rx_ops */
1058 	wlan_lmac_if_umac_ftm_rx_ops_register(rx_ops);
1059 
1060 	/* FILS Discovery */
1061 	wlan_lmac_if_fd_rx_ops_register(rx_ops);
1062 
1063 	/* MLME rx_ops */
1064 	tgt_vdev_mgr_rx_ops_register(rx_ops);
1065 
1066 	wlan_lmac_if_mlo_mgr_rx_ops_register(rx_ops);
1067 
1068 	wlan_lmac_if_twt_rx_ops_register(rx_ops);
1069 
1070 	wlan_lmac_if_dbam_rx_ops_register(rx_ops);
1071 
1072 	return QDF_STATUS_SUCCESS;
1073 }
1074 
1075 /**
1076  * wlan_lmac_if_set_umac_txops_registration_cb() - tx registration
1077  * callback assignment
1078  * @dev_type: Dev type can be either Direct attach or Offload
1079  * @handler: handler to be called for LMAC tx ops registration
1080  *
1081  * API to assign appropriate tx registration callback handler based on the
1082  * device type(Offload or Direct attach)
1083  *
1084  * Return: QDF_STATUS_SUCCESS - in case of success
1085  */
1086 QDF_STATUS wlan_lmac_if_set_umac_txops_registration_cb(QDF_STATUS (*handler)
1087 				(struct wlan_lmac_if_tx_ops *))
1088 {
1089 	wlan_lmac_if_umac_tx_ops_register = handler;
1090 	return QDF_STATUS_SUCCESS;
1091 }
1092 qdf_export_symbol(wlan_lmac_if_set_umac_txops_registration_cb);
1093 
1094 /**
1095  * wlan_lmac_if_set_umac_crypto_rxpn_ops_registration_cb() - crypto rxpn
1096  * registration callback assignment
1097  * @dev_type: Dev type can be either Direct attach or Offload
1098  * @handler: handler to be called for LMAC crypto rxpn ops registration
1099  *
1100  * API to assign appropriate crypto rxpn registration callback handler
1101  * based on the device type
1102  *
1103  * Return: QDF_STATUS_SUCCESS - in case of success
1104  */
1105 QDF_STATUS wlan_lmac_if_set_umac_crypto_rxpn_ops_registration_cb(
1106 		QDF_STATUS (*handler)(struct wlan_lmac_if_rx_ops *))
1107 {
1108 	wlan_lmac_if_umac_crypto_rxpn_ops_register = handler;
1109 	return QDF_STATUS_SUCCESS;
1110 }
1111 qdf_export_symbol(wlan_lmac_if_set_umac_crypto_rxpn_ops_registration_cb);
1112