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