xref: /wlan-dirver/qca-wifi-host-cmn/umac/global_umac_dispatcher/lmac_if/src/wlan_lmac_if.c (revision 87a8e4458319c60b618522e263ed900e36aab528)
1 /*
2  * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
3  *
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 #endif /* WIFI_POS_CONVERGED */
37 #ifdef WLAN_FEATURE_NAN_CONVERGENCE
38 #include "target_if_nan.h"
39 #endif /* WLAN_FEATURE_NAN_CONVERGENCE */
40 #include "wlan_reg_tgt_api.h"
41 #ifdef CONVERGED_P2P_ENABLE
42 #include "wlan_p2p_tgt_api.h"
43 #endif
44 #ifdef CONVERGED_TDLS_ENABLE
45 #include "wlan_tdls_tgt_api.h"
46 #endif
47 
48 #ifdef WLAN_CONV_CRYPTO_SUPPORTED
49 #include "wlan_crypto_global_api.h"
50 #endif
51 #ifdef DFS_COMPONENT_ENABLE
52 #include <wlan_dfs_tgt_api.h>
53 #include <wlan_dfs_utils_api.h>
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 #endif /* QCA_SUPPORT_CP_STATS */
69 
70 /* Function pointer for OL/WMA specific UMAC tx_ops
71  * registration.
72  */
73 QDF_STATUS (*wlan_lmac_if_umac_tx_ops_register)
74 				(struct wlan_lmac_if_tx_ops *tx_ops);
75 qdf_export_symbol(wlan_lmac_if_umac_tx_ops_register);
76 
77 #ifdef QCA_SUPPORT_CP_STATS
78 /**
79  * wlan_lmac_if_cp_stats_rx_ops_register() - API to register cp stats Rx Ops
80  * @rx_ops:	pointer to lmac rx ops
81  *
82  * This API will be used to register function pointers for FW events
83  *
84  * Return: void
85  */
86 static void
87 wlan_lmac_if_cp_stats_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
88 {
89 	tgt_cp_stats_register_rx_ops(rx_ops);
90 }
91 #else
92 static void
93 wlan_lmac_if_cp_stats_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
94 {
95 }
96 #endif /* QCA_SUPPORT_CP_STATS */
97 
98 #ifdef WLAN_ATF_ENABLE
99 /**
100  * wlan_lmac_if_atf_rx_ops_register() - Function to register ATF RX ops.
101  */
102 static void
103 wlan_lmac_if_atf_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
104 {
105 	struct wlan_lmac_if_atf_rx_ops *atf_rx_ops = &rx_ops->atf_rx_ops;
106 
107 	/* ATF rx ops */
108 	atf_rx_ops->atf_get_atf_commit = tgt_atf_get_atf_commit;
109 	atf_rx_ops->atf_get_fmcap = tgt_atf_get_fmcap;
110 	atf_rx_ops->atf_get_obss_scale = tgt_atf_get_obss_scale;
111 	atf_rx_ops->atf_get_mode = tgt_atf_get_mode;
112 	atf_rx_ops->atf_get_msdu_desc = tgt_atf_get_msdu_desc;
113 	atf_rx_ops->atf_get_max_vdevs = tgt_atf_get_max_vdevs;
114 	atf_rx_ops->atf_get_peers = tgt_atf_get_peers;
115 	atf_rx_ops->atf_get_tput_based = tgt_atf_get_tput_based;
116 	atf_rx_ops->atf_get_logging = tgt_atf_get_logging;
117 	atf_rx_ops->atf_update_buf_held = tgt_atf_update_buf_held;
118 	atf_rx_ops->atf_get_ssidgroup = tgt_atf_get_ssidgroup;
119 	atf_rx_ops->atf_get_vdev_ac_blk_cnt = tgt_atf_get_vdev_ac_blk_cnt;
120 	atf_rx_ops->atf_get_peer_blk_txbitmap = tgt_atf_get_peer_blk_txbitmap;
121 	atf_rx_ops->atf_get_vdev_blk_txtraffic = tgt_atf_get_vdev_blk_txtraffic;
122 	atf_rx_ops->atf_get_sched = tgt_atf_get_sched;
123 	atf_rx_ops->atf_get_tx_tokens = tgt_atf_get_tx_tokens;
124 	atf_rx_ops->atf_account_subgroup_txtokens =
125 					tgt_atf_account_subgroup_txtokens;
126 	atf_rx_ops->atf_adjust_subgroup_txtokens =
127 					tgt_atf_adjust_subgroup_txtokens;
128 	atf_rx_ops->atf_get_subgroup_airtime = tgt_atf_get_subgroup_airtime;
129 	atf_rx_ops->atf_subgroup_free_buf = tgt_atf_subgroup_free_buf;
130 	atf_rx_ops->atf_update_subgroup_tidstate =
131 					tgt_atf_update_subgroup_tidstate;
132 	atf_rx_ops->atf_buf_distribute = tgt_atf_buf_distribute;
133 	atf_rx_ops->atf_get_shadow_alloted_tx_tokens =
134 					tgt_atf_get_shadow_alloted_tx_tokens;
135 	atf_rx_ops->atf_get_txtokens_common = tgt_atf_get_txtokens_common;
136 	atf_rx_ops->atf_get_peer_stats = tgt_atf_get_peer_stats;
137 	atf_rx_ops->atf_get_token_allocated = tgt_atf_get_token_allocated;
138 	atf_rx_ops->atf_get_token_utilized = tgt_atf_get_token_utilized;
139 
140 	atf_rx_ops->atf_set_sched = tgt_atf_set_sched;
141 	atf_rx_ops->atf_set_fmcap = tgt_atf_set_fmcap;
142 	atf_rx_ops->atf_set_obss_scale = tgt_atf_set_obss_scale;
143 	atf_rx_ops->atf_set_msdu_desc = tgt_atf_set_msdu_desc;
144 	atf_rx_ops->atf_set_max_vdevs = tgt_atf_set_max_vdevs;
145 	atf_rx_ops->atf_set_peers = tgt_atf_set_peers;
146 	atf_rx_ops->atf_set_peer_stats = tgt_atf_set_peer_stats;
147 	atf_rx_ops->atf_set_vdev_blk_txtraffic = tgt_atf_set_vdev_blk_txtraffic;
148 	atf_rx_ops->atf_peer_blk_txtraffic = tgt_atf_peer_blk_txtraffic;
149 	atf_rx_ops->atf_peer_unblk_txtraffic = tgt_atf_peer_unblk_txtraffic;
150 	atf_rx_ops->atf_set_token_allocated = tgt_atf_set_token_allocated;
151 	atf_rx_ops->atf_set_token_utilized = tgt_atf_set_token_utilized;
152 }
153 #else
154 static void
155 wlan_lmac_if_atf_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
156 {
157 }
158 #endif
159 
160 #ifdef WLAN_SUPPORT_FILS
161 static void
162 wlan_lmac_if_fd_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
163 {
164 	struct wlan_lmac_if_fd_rx_ops *fd_rx_ops = &rx_ops->fd_rx_ops;
165 
166 	fd_rx_ops->fd_is_fils_enable = tgt_fd_is_fils_enable;
167 	fd_rx_ops->fd_alloc = tgt_fd_alloc;
168 	fd_rx_ops->fd_stop = tgt_fd_stop;
169 	fd_rx_ops->fd_free = tgt_fd_free;
170 	fd_rx_ops->fd_get_valid_fd_period = tgt_fd_get_valid_fd_period;
171 	fd_rx_ops->fd_swfda_handler = tgt_fd_swfda_handler;
172 }
173 #else
174 static void
175 wlan_lmac_if_fd_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
176 {
177 }
178 #endif
179 
180 #ifdef WLAN_SA_API_ENABLE
181 /**
182  * wlan_lmac_if_sa_api_rx_ops_register() - Function to register SA_API RX ops.
183  */
184 static void
185 wlan_lmac_if_sa_api_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
186 {
187 	struct wlan_lmac_if_sa_api_rx_ops *sa_api_rx_ops = &rx_ops->sa_api_rx_ops;
188 
189 	/* SA API rx ops */
190 	sa_api_rx_ops->sa_api_get_sa_supported = tgt_sa_api_get_sa_supported;
191 	sa_api_rx_ops->sa_api_get_validate_sw  = tgt_sa_api_get_validate_sw;
192 	sa_api_rx_ops->sa_api_enable_sa        = tgt_sa_api_enable_sa;
193 	sa_api_rx_ops->sa_api_get_sa_enable    = tgt_sa_api_get_sa_enable;
194 
195 	sa_api_rx_ops->sa_api_peer_assoc_hanldler = tgt_sa_api_peer_assoc_hanldler;
196 	sa_api_rx_ops->sa_api_update_tx_feedback = tgt_sa_api_update_tx_feedback;
197 	sa_api_rx_ops->sa_api_update_rx_feedback = tgt_sa_api_update_rx_feedback;
198 
199 	sa_api_rx_ops->sa_api_ucfg_set_param = tgt_sa_api_ucfg_set_param;
200 	sa_api_rx_ops->sa_api_ucfg_get_param = tgt_sa_api_ucfg_get_param;
201 
202 	sa_api_rx_ops->sa_api_is_tx_feedback_enabled = tgt_sa_api_is_tx_feedback_enabled;
203 	sa_api_rx_ops->sa_api_is_rx_feedback_enabled = tgt_sa_api_is_rx_feedback_enabled;
204 
205 	sa_api_rx_ops->sa_api_convert_rate_2g = tgt_sa_api_convert_rate_2g;
206 	sa_api_rx_ops->sa_api_convert_rate_5g = tgt_sa_api_convert_rate_5g;
207 	sa_api_rx_ops->sa_api_get_sa_mode = tgt_sa_api_get_sa_mode;
208 
209 	sa_api_rx_ops->sa_api_get_beacon_txantenna = tgt_sa_api_get_beacon_txantenna;
210 	sa_api_rx_ops->sa_api_cwm_action = tgt_sa_api_cwm_action;
211 }
212 #else
213 static void
214 wlan_lmac_if_sa_api_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
215 {
216 }
217 #endif
218 
219 
220 #ifdef WLAN_CONV_CRYPTO_SUPPORTED
221 static void
222 wlan_lmac_if_crypto_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
223 {
224 	wlan_crypto_register_crypto_rx_ops(&rx_ops->crypto_rx_ops);
225 }
226 #else
227 static void
228 wlan_lmac_if_crypto_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
229 {
230 }
231 #endif
232 
233 #ifdef WIFI_POS_CONVERGED
234 static void wlan_lmac_if_umac_rx_ops_register_wifi_pos(
235 				struct wlan_lmac_if_rx_ops *rx_ops)
236 {
237 	target_if_wifi_pos_register_rx_ops(rx_ops);
238 }
239 #else
240 static void wlan_lmac_if_umac_rx_ops_register_wifi_pos(
241 				struct wlan_lmac_if_rx_ops *rx_ops)
242 {
243 }
244 #endif /* WIFI_POS_CONVERGED */
245 
246 #ifdef WLAN_FEATURE_NAN_CONVERGENCE
247 static void wlan_lmac_if_register_nan_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
248 {
249 	target_if_nan_register_rx_ops(rx_ops);
250 }
251 #else
252 static void wlan_lmac_if_register_nan_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
253 {
254 }
255 #endif /* WLAN_FEATURE_NAN_CONVERGENCE */
256 
257 static void wlan_lmac_if_umac_reg_rx_ops_register(
258 	struct wlan_lmac_if_rx_ops *rx_ops)
259 {
260 	rx_ops->reg_rx_ops.master_list_handler =
261 		tgt_reg_process_master_chan_list;
262 
263 	rx_ops->reg_rx_ops.reg_11d_new_cc_handler =
264 		tgt_reg_process_11d_new_country;
265 
266 	rx_ops->reg_rx_ops.reg_set_regdb_offloaded =
267 		tgt_reg_set_regdb_offloaded;
268 
269 	rx_ops->reg_rx_ops.reg_set_11d_offloaded =
270 		tgt_reg_set_11d_offloaded;
271 
272 	rx_ops->reg_rx_ops.get_dfs_region =
273 		wlan_reg_get_dfs_region;
274 
275 	rx_ops->reg_rx_ops.reg_ch_avoid_event_handler =
276 		tgt_reg_process_ch_avoid_event;
277 
278 	rx_ops->reg_rx_ops.reg_freq_to_chan =
279 		wlan_reg_freq_to_chan;
280 
281 	rx_ops->reg_rx_ops.reg_set_chan_144 =
282 		ucfg_reg_modify_chan_144;
283 
284 	rx_ops->reg_rx_ops.reg_get_chan_144 =
285 		ucfg_reg_get_en_chan_144;
286 
287 	rx_ops->reg_rx_ops.reg_program_default_cc =
288 		ucfg_reg_program_default_cc;
289 
290 	rx_ops->reg_rx_ops.reg_get_current_regdomain =
291 		wlan_reg_get_curr_regdomain;
292 }
293 
294 #ifdef CONVERGED_P2P_ENABLE
295 static void wlan_lmac_if_umac_rx_ops_register_p2p(
296 				struct wlan_lmac_if_rx_ops *rx_ops)
297 {
298 	rx_ops->p2p.lo_ev_handler = tgt_p2p_lo_event_cb;
299 	rx_ops->p2p.noa_ev_handler = tgt_p2p_noa_event_cb;
300 }
301 #else
302 static void wlan_lmac_if_umac_rx_ops_register_p2p(
303 				struct wlan_lmac_if_rx_ops *rx_ops)
304 {
305 }
306 #endif
307 
308 #ifdef DFS_COMPONENT_ENABLE
309 #ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT
310 static inline void
311 register_precac_auto_chan_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
312 {
313 	if (!rx_ops)
314 		return;
315 	rx_ops->dfs_set_precac_intermediate_chan =
316 		ucfg_dfs_set_precac_intermediate_chan;
317 	rx_ops->dfs_get_precac_intermediate_chan =
318 		ucfg_dfs_get_precac_intermediate_chan;
319 	rx_ops->dfs_get_precac_chan_state = ucfg_dfs_get_precac_chan_state;
320 }
321 #else
322 static inline void
323 register_precac_auto_chan_rx_ops(struct wlan_lmac_if_dfs_rx_ops *rx_ops)
324 {
325 }
326 #endif
327 
328 static QDF_STATUS
329 wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
330 {
331 	struct wlan_lmac_if_dfs_rx_ops *dfs_rx_ops;
332 
333 	dfs_rx_ops = &rx_ops->dfs_rx_ops;
334 
335 	dfs_rx_ops->dfs_get_radars = tgt_dfs_get_radars;
336 	dfs_rx_ops->dfs_process_phyerr = tgt_dfs_process_phyerr;
337 	dfs_rx_ops->dfs_destroy_object = tgt_dfs_destroy_object;
338 	dfs_rx_ops->dfs_radar_enable = tgt_dfs_radar_enable;
339 	dfs_rx_ops->dfs_is_radar_enabled = tgt_dfs_is_radar_enabled;
340 	dfs_rx_ops->dfs_control = tgt_dfs_control;
341 	dfs_rx_ops->dfs_is_precac_timer_running =
342 		tgt_dfs_is_precac_timer_running;
343 	dfs_rx_ops->dfs_find_vht80_chan_for_precac =
344 		tgt_dfs_find_vht80_chan_for_precac;
345 	dfs_rx_ops->dfs_start_precac_timer = utils_dfs_start_precac_timer;
346 	dfs_rx_ops->dfs_cancel_precac_timer = utils_dfs_cancel_precac_timer;
347 	dfs_rx_ops->dfs_override_precac_timeout =
348 		ucfg_dfs_override_precac_timeout;
349 	dfs_rx_ops->dfs_set_precac_enable = ucfg_dfs_set_precac_enable;
350 	dfs_rx_ops->dfs_get_precac_enable = ucfg_dfs_get_precac_enable;
351 	dfs_rx_ops->dfs_get_override_precac_timeout =
352 		ucfg_dfs_get_override_precac_timeout;
353 	dfs_rx_ops->dfs_set_current_channel = tgt_dfs_set_current_channel;
354 	dfs_rx_ops->dfs_process_radar_ind = tgt_dfs_process_radar_ind;
355 	dfs_rx_ops->dfs_dfs_cac_complete_ind = tgt_dfs_cac_complete;
356 	dfs_rx_ops->dfs_stop = tgt_dfs_stop;
357 	dfs_rx_ops->dfs_process_phyerr_filter_offload =
358 		tgt_dfs_process_phyerr_filter_offload;
359 	dfs_rx_ops->dfs_is_phyerr_filter_offload =
360 		tgt_dfs_is_phyerr_filter_offload;
361 	dfs_rx_ops->dfs_action_on_status = tgt_dfs_action_on_status_from_fw;
362 	dfs_rx_ops->dfs_override_status_timeout =
363 		ucfg_dfs_set_override_status_timeout;
364 	dfs_rx_ops->dfs_get_override_status_timeout =
365 		ucfg_dfs_get_override_status_timeout;
366 	dfs_rx_ops->dfs_reset_spoof_test =
367 		tgt_dfs_reset_spoof_test;
368 
369 	register_precac_auto_chan_rx_ops(dfs_rx_ops);
370 
371 	return QDF_STATUS_SUCCESS;
372 }
373 #else
374 static QDF_STATUS
375 wlan_lmac_if_umac_dfs_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
376 {
377 	return QDF_STATUS_SUCCESS;
378 }
379 #endif
380 
381 #ifdef CONVERGED_TDLS_ENABLE
382 static QDF_STATUS
383 wlan_lmac_if_umac_tdls_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
384 {
385 	rx_ops->tdls_rx_ops.tdls_ev_handler = tgt_tdls_event_handler;
386 
387 	return QDF_STATUS_SUCCESS;
388 }
389 #else
390 static QDF_STATUS
391 wlan_lmac_if_umac_tdls_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
392 {
393 	return QDF_STATUS_SUCCESS;
394 }
395 #endif
396 
397 #ifdef WLAN_SUPPORT_GREEN_AP
398 static QDF_STATUS
399 wlan_lmac_if_umac_green_ap_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
400 {
401 	rx_ops->green_ap_rx_ops.is_ps_enabled = wlan_green_ap_is_ps_enabled;
402 	rx_ops->green_ap_rx_ops.is_dbg_print_enabled =
403 					ucfg_green_ap_get_debug_prints;
404 	rx_ops->green_ap_rx_ops.ps_set = ucfg_green_ap_set_ps_config;
405 	rx_ops->green_ap_rx_ops.ps_get = ucfg_green_ap_get_ps_config;
406 	rx_ops->green_ap_rx_ops.suspend_handle = wlan_green_ap_suspend_handle;
407 
408 	return QDF_STATUS_SUCCESS;
409 }
410 #else
411 static QDF_STATUS
412 wlan_lmac_if_umac_green_ap_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
413 {
414 	return QDF_STATUS_SUCCESS;
415 }
416 #endif
417 
418 static QDF_STATUS
419 wlan_lmac_if_umac_ftm_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
420 {
421 	struct wlan_lmac_if_ftm_rx_ops *ftm_rx_ops;
422 
423 	ftm_rx_ops = &rx_ops->ftm_rx_ops;
424 
425 	ftm_rx_ops->ftm_ev_handler = wlan_ftm_process_utf_event;
426 
427 	return QDF_STATUS_SUCCESS;
428 }
429 
430 /**
431  * wlan_lmac_if_umac_rx_ops_register() - UMAC rx handler register
432  * @rx_ops: Pointer to rx_ops structure to be populated
433  *
434  * Register umac RX callabacks which will be called by DA/OL/WMA/WMI
435  *
436  * Return: QDF_STATUS_SUCCESS - in case of success
437  */
438 QDF_STATUS
439 wlan_lmac_if_umac_rx_ops_register(struct wlan_lmac_if_rx_ops *rx_ops)
440 {
441 	/* Component specific public api's to be called to register
442 	 * respective callbacks
443 	 * Ex: rx_ops->fp = function;
444 	 */
445 	struct wlan_lmac_if_mgmt_txrx_rx_ops *mgmt_txrx_rx_ops;
446 
447 	if (!rx_ops) {
448 		qdf_print("%s: lmac if rx ops pointer is NULL", __func__);
449 		return QDF_STATUS_E_INVAL;
450 	}
451 
452 	/* mgmt txrx rx ops */
453 	mgmt_txrx_rx_ops = &rx_ops->mgmt_txrx_rx_ops;
454 
455 	mgmt_txrx_rx_ops->mgmt_tx_completion_handler =
456 			tgt_mgmt_txrx_tx_completion_handler;
457 	mgmt_txrx_rx_ops->mgmt_rx_frame_handler =
458 			tgt_mgmt_txrx_rx_frame_handler;
459 	mgmt_txrx_rx_ops->mgmt_txrx_get_nbuf_from_desc_id =
460 			tgt_mgmt_txrx_get_nbuf_from_desc_id;
461 	mgmt_txrx_rx_ops->mgmt_txrx_get_peer_from_desc_id =
462 			tgt_mgmt_txrx_get_peer_from_desc_id;
463 	mgmt_txrx_rx_ops->mgmt_txrx_get_vdev_id_from_desc_id =
464 			tgt_mgmt_txrx_get_vdev_id_from_desc_id;
465 	mgmt_txrx_rx_ops->mgmt_txrx_get_free_desc_pool_count =
466 			tgt_mgmt_txrx_get_free_desc_pool_count;
467 
468 	/* scan rx ops */
469 	rx_ops->scan.scan_ev_handler = tgt_scan_event_handler;
470 	rx_ops->scan.scan_set_max_active_scans = tgt_scan_set_max_active_scans;
471 
472 	wlan_lmac_if_atf_rx_ops_register(rx_ops);
473 
474 	wlan_lmac_if_cp_stats_rx_ops_register(rx_ops);
475 
476 	wlan_lmac_if_sa_api_rx_ops_register(rx_ops);
477 
478 	wlan_lmac_if_crypto_rx_ops_register(rx_ops);
479 	/* wifi_pos rx ops */
480 	wlan_lmac_if_umac_rx_ops_register_wifi_pos(rx_ops);
481 
482 	/* tdls rx ops */
483 	wlan_lmac_if_umac_tdls_rx_ops_register(rx_ops);
484 
485 	wlan_lmac_if_register_nan_rx_ops(rx_ops);
486 
487 	wlan_lmac_if_umac_reg_rx_ops_register(rx_ops);
488 
489 	/* p2p rx ops */
490 	wlan_lmac_if_umac_rx_ops_register_p2p(rx_ops);
491 
492 	/* DFS rx_ops */
493 	wlan_lmac_if_umac_dfs_rx_ops_register(rx_ops);
494 
495 	wlan_lmac_if_umac_green_ap_rx_ops_register(rx_ops);
496 
497 	/* FTM rx_ops */
498 	wlan_lmac_if_umac_ftm_rx_ops_register(rx_ops);
499 
500 	/* FILS Discovery */
501 	wlan_lmac_if_fd_rx_ops_register(rx_ops);
502 
503 	return QDF_STATUS_SUCCESS;
504 }
505 
506 /**
507  * wlan_lmac_if_set_umac_txops_registration_cb() - tx registration
508  * callback assignment
509  * @dev_type: Dev type can be either Direct attach or Offload
510  * @handler: handler to be called for LMAC tx ops registration
511  *
512  * API to assign appropriate tx registration callback handler based on the
513  * device type(Offload or Direct attach)
514  *
515  * Return: QDF_STATUS_SUCCESS - in case of success
516  */
517 QDF_STATUS wlan_lmac_if_set_umac_txops_registration_cb(QDF_STATUS (*handler)
518 				(struct wlan_lmac_if_tx_ops *))
519 {
520 	wlan_lmac_if_umac_tx_ops_register = handler;
521 	return QDF_STATUS_SUCCESS;
522 }
523 qdf_export_symbol(wlan_lmac_if_set_umac_txops_registration_cb);
524 
525