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 any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16  */
17 
18 #include "cfg_dispatcher.h"
19 #include <qdf_types.h>
20 #include <qdf_trace.h>
21 #include <qdf_threads.h>
22 #include <qdf_module.h>
23 #include <dispatcher_init_deinit.h>
24 #include <scheduler_api.h>
25 #include <wlan_scan_ucfg_api.h>
26 #include <wlan_ftm_init_deinit_api.h>
27 #include <wlan_mgmt_txrx_utils_api.h>
28 #include <wlan_serialization_api.h>
29 #include "wlan_psoc_mlme_api.h"
30 #include <include/wlan_mlme_cmn.h>
31 #include "cdp_txrx_cmn.h"
32 #ifdef WLAN_ATF_ENABLE
33 #include <wlan_atf_utils_api.h>
34 #endif
35 #ifdef QCA_SUPPORT_SON
36 #include <wlan_son_pub.h>
37 #endif
38 #ifdef WLAN_SA_API_ENABLE
39 #include <wlan_sa_api_utils_api.h>
40 #endif
41 #ifdef WIFI_POS_CONVERGED
42 #include "wifi_pos_api.h"
43 #endif /* WIFI_POS_CONVERGED */
44 #include <wlan_reg_services_api.h>
45 #include "wlan_crypto_main.h"
46 #ifdef DFS_COMPONENT_ENABLE
47 #include <wlan_dfs_init_deinit_api.h>
48 #endif
49 
50 #ifdef WLAN_OFFCHAN_TXRX_ENABLE
51 #include <wlan_offchan_txrx_api.h>
52 #endif
53 
54 #ifdef WLAN_SUPPORT_SPLITMAC
55 #include <wlan_splitmac.h>
56 #endif
57 #ifdef WLAN_CONV_SPECTRAL_ENABLE
58 #include <wlan_spectral_utils_api.h>
59 #endif
60 #ifdef WLAN_SUPPORT_FILS
61 #include <wlan_fd_utils_api.h>
62 #endif
63 
64 #ifdef WLAN_SUPPORT_GREEN_AP
65 #include <wlan_green_ap_api.h>
66 #endif
67 
68 #ifdef QCA_SUPPORT_CP_STATS
69 #include <wlan_cp_stats_utils_api.h>
70 #endif
71 
72 #ifdef WLAN_CFR_ENABLE
73 #include <wlan_cfr_utils_api.h>
74 #endif
75 
76 #ifdef FEATURE_COEX
77 #include <wlan_coex_utils_api.h>
78 #endif
79 
80 #ifdef DCS_INTERFERENCE_DETECTION
81 #include <wlan_dcs_init_deinit_api.h>
82 #endif
83 #include <wlan_if_mgr_main.h>
84 #include <wlan_mlo_mgr_main.h>
85 #include <wlan_gpio_api.h>
86 
87 #include <wlan_twt_api.h>
88 
89 #ifdef WLAN_FEATURE_COAP
90 #include <wlan_coap_main.h>
91 #endif
92 
93 /**
94  * DOC: This file provides various init/deinit trigger point for new
95  * components.
96  */
97 
98 /* All new components needs to replace their dummy init/deinit
99  * psoc_open, psco_close, psoc_enable and psoc_disable APIs once
100  * their actual handlers are ready
101  */
102 
103 struct dispatcher_spectral_ops ops_spectral;
104 
105 #ifdef WLAN_WIFI_RADAR_ENABLE
dispatcher_init_wifi_radar(void)106 static QDF_STATUS dispatcher_init_wifi_radar(void)
107 {
108 	return wlan_wifi_radar_init();
109 }
110 
dispatcher_deinit_wifi_radar(void)111 static QDF_STATUS dispatcher_deinit_wifi_radar(void)
112 {
113 	return wlan_wifi_radar_deinit();
114 }
115 
dispatcher_wifi_radar_pdev_open(struct wlan_objmgr_pdev * pdev)116 static QDF_STATUS dispatcher_wifi_radar_pdev_open
117 		(struct wlan_objmgr_pdev *pdev)
118 {
119 	return wlan_wifi_radar_pdev_open(pdev);
120 }
121 
dispatcher_wifi_radar_pdev_close(struct wlan_objmgr_pdev * pdev)122 static QDF_STATUS dispatcher_wifi_radar_pdev_close
123 		(struct wlan_objmgr_pdev *pdev)
124 {
125 	return wlan_wifi_radar_pdev_close(pdev);
126 }
127 #else
dispatcher_init_wifi_radar(void)128 static QDF_STATUS dispatcher_init_wifi_radar(void)
129 {
130 	return QDF_STATUS_SUCCESS;
131 }
132 
dispatcher_deinit_wifi_radar(void)133 static QDF_STATUS dispatcher_deinit_wifi_radar(void)
134 {
135 	return QDF_STATUS_SUCCESS;
136 }
137 
dispatcher_wifi_radar_pdev_open(struct wlan_objmgr_pdev * pdev)138 static QDF_STATUS dispatcher_wifi_radar_pdev_open
139 			(struct wlan_objmgr_pdev *pdev)
140 {
141 	return QDF_STATUS_SUCCESS;
142 }
143 
dispatcher_wifi_radar_pdev_close(struct wlan_objmgr_pdev * pdev)144 static QDF_STATUS dispatcher_wifi_radar_pdev_close
145 			(struct wlan_objmgr_pdev *pdev)
146 {
147 	return QDF_STATUS_SUCCESS;
148 }
149 #endif
150 
151 #ifdef WLAN_CFR_ENABLE
dispatcher_init_cfr(void)152 static QDF_STATUS dispatcher_init_cfr(void)
153 {
154 	return wlan_cfr_init();
155 }
156 
dispatcher_deinit_cfr(void)157 static QDF_STATUS dispatcher_deinit_cfr(void)
158 {
159 	return wlan_cfr_deinit();
160 }
161 
dispatcher_cfr_pdev_open(struct wlan_objmgr_pdev * pdev)162 static QDF_STATUS dispatcher_cfr_pdev_open(struct wlan_objmgr_pdev *pdev)
163 {
164 	return wlan_cfr_pdev_open(pdev);
165 }
166 
dispatcher_cfr_pdev_close(struct wlan_objmgr_pdev * pdev)167 static QDF_STATUS dispatcher_cfr_pdev_close(struct wlan_objmgr_pdev *pdev)
168 {
169 	return wlan_cfr_pdev_close(pdev);
170 }
171 #else
dispatcher_init_cfr(void)172 static QDF_STATUS dispatcher_init_cfr(void)
173 {
174 	return QDF_STATUS_SUCCESS;
175 }
176 
dispatcher_deinit_cfr(void)177 static QDF_STATUS dispatcher_deinit_cfr(void)
178 {
179 	return QDF_STATUS_SUCCESS;
180 }
181 
dispatcher_cfr_pdev_open(struct wlan_objmgr_pdev * pdev)182 static QDF_STATUS dispatcher_cfr_pdev_open(struct wlan_objmgr_pdev *pdev)
183 {
184 	return QDF_STATUS_SUCCESS;
185 }
186 
dispatcher_cfr_pdev_close(struct wlan_objmgr_pdev * pdev)187 static QDF_STATUS dispatcher_cfr_pdev_close(struct wlan_objmgr_pdev *pdev)
188 {
189 	return QDF_STATUS_SUCCESS;
190 }
191 
192 #endif
193 
194 #ifdef QCA_SUPPORT_CP_STATS
dispatcher_init_cp_stats(void)195 static QDF_STATUS dispatcher_init_cp_stats(void)
196 {
197 	return wlan_cp_stats_init();
198 }
199 
dispatcher_deinit_cp_stats(void)200 static QDF_STATUS dispatcher_deinit_cp_stats(void)
201 {
202 	return wlan_cp_stats_deinit();
203 }
204 
cp_stats_psoc_open(struct wlan_objmgr_psoc * psoc)205 static QDF_STATUS cp_stats_psoc_open(struct wlan_objmgr_psoc *psoc)
206 {
207 	return wlan_cp_stats_open(psoc);
208 }
209 
cp_stats_psoc_close(struct wlan_objmgr_psoc * psoc)210 static QDF_STATUS cp_stats_psoc_close(struct wlan_objmgr_psoc *psoc)
211 {
212 	return wlan_cp_stats_close(psoc);
213 }
214 
cp_stats_psoc_enable(struct wlan_objmgr_psoc * psoc)215 static QDF_STATUS cp_stats_psoc_enable(struct wlan_objmgr_psoc *psoc)
216 {
217 	return wlan_cp_stats_enable(psoc);
218 }
219 
cp_stats_psoc_disable(struct wlan_objmgr_psoc * psoc)220 static QDF_STATUS cp_stats_psoc_disable(struct wlan_objmgr_psoc *psoc)
221 {
222 	return wlan_cp_stats_disable(psoc);
223 }
224 #else
dispatcher_init_cp_stats(void)225 static QDF_STATUS dispatcher_init_cp_stats(void)
226 {
227 	return QDF_STATUS_SUCCESS;
228 }
229 
dispatcher_deinit_cp_stats(void)230 static QDF_STATUS dispatcher_deinit_cp_stats(void)
231 {
232 	return QDF_STATUS_SUCCESS;
233 }
234 
cp_stats_psoc_open(struct wlan_objmgr_psoc * psoc)235 static QDF_STATUS cp_stats_psoc_open(struct wlan_objmgr_psoc *psoc)
236 {
237 	return QDF_STATUS_SUCCESS;
238 }
239 
cp_stats_psoc_close(struct wlan_objmgr_psoc * psoc)240 static QDF_STATUS cp_stats_psoc_close(struct wlan_objmgr_psoc *psoc)
241 {
242 	return QDF_STATUS_SUCCESS;
243 }
244 
cp_stats_psoc_enable(struct wlan_objmgr_psoc * psoc)245 static QDF_STATUS cp_stats_psoc_enable(struct wlan_objmgr_psoc *psoc)
246 {
247 	return QDF_STATUS_SUCCESS;
248 }
249 
cp_stats_psoc_disable(struct wlan_objmgr_psoc * psoc)250 static QDF_STATUS cp_stats_psoc_disable(struct wlan_objmgr_psoc *psoc)
251 {
252 	return QDF_STATUS_SUCCESS;
253 }
254 #endif
255 
256 #ifdef DCS_INTERFERENCE_DETECTION
dispatcher_init_dcs(void)257 static QDF_STATUS dispatcher_init_dcs(void)
258 {
259 	return wlan_dcs_init();
260 }
261 
dispatcher_deinit_dcs(void)262 static QDF_STATUS dispatcher_deinit_dcs(void)
263 {
264 	return wlan_dcs_deinit();
265 }
266 
dcs_psoc_enable(struct wlan_objmgr_psoc * psoc)267 static QDF_STATUS dcs_psoc_enable(struct wlan_objmgr_psoc *psoc)
268 {
269 	return wlan_dcs_enable(psoc);
270 }
271 
dcs_psoc_disable(struct wlan_objmgr_psoc * psoc)272 static QDF_STATUS dcs_psoc_disable(struct wlan_objmgr_psoc *psoc)
273 {
274 	return wlan_dcs_disable(psoc);
275 }
276 
dcs_psoc_open(struct wlan_objmgr_psoc * psoc)277 static QDF_STATUS dcs_psoc_open(struct wlan_objmgr_psoc *psoc)
278 {
279 	return wlan_dcs_psoc_open(psoc);
280 }
281 
dcs_psoc_close(struct wlan_objmgr_psoc * psoc)282 static QDF_STATUS dcs_psoc_close(struct wlan_objmgr_psoc *psoc)
283 {
284 	return QDF_STATUS_SUCCESS;
285 }
286 #else
dispatcher_init_dcs(void)287 static QDF_STATUS dispatcher_init_dcs(void)
288 {
289 	return QDF_STATUS_SUCCESS;
290 }
291 
dispatcher_deinit_dcs(void)292 static QDF_STATUS dispatcher_deinit_dcs(void)
293 {
294 	return QDF_STATUS_SUCCESS;
295 }
296 
dcs_psoc_enable(struct wlan_objmgr_psoc * psoc)297 static QDF_STATUS dcs_psoc_enable(struct wlan_objmgr_psoc *psoc)
298 {
299 	return QDF_STATUS_SUCCESS;
300 }
301 
dcs_psoc_disable(struct wlan_objmgr_psoc * psoc)302 static QDF_STATUS dcs_psoc_disable(struct wlan_objmgr_psoc *psoc)
303 {
304 	return QDF_STATUS_SUCCESS;
305 }
306 
dcs_psoc_open(struct wlan_objmgr_psoc * psoc)307 static QDF_STATUS dcs_psoc_open(struct wlan_objmgr_psoc *psoc)
308 {
309 	return QDF_STATUS_SUCCESS;
310 }
311 
dcs_psoc_close(struct wlan_objmgr_psoc * psoc)312 static QDF_STATUS dcs_psoc_close(struct wlan_objmgr_psoc *psoc)
313 {
314 	return QDF_STATUS_SUCCESS;
315 }
316 #endif
317 
318 #if defined QCA_SUPPORT_SON && QCA_SUPPORT_SON >= 1
dispatcher_init_son(void)319 static QDF_STATUS dispatcher_init_son(void)
320 {
321 	return wlan_son_init();
322 }
son_psoc_open(struct wlan_objmgr_psoc * psoc)323 static QDF_STATUS son_psoc_open(struct wlan_objmgr_psoc *psoc)
324 {
325 	return wlan_son_psoc_open(psoc);
326 }
dispatcher_deinit_son(void)327 static QDF_STATUS dispatcher_deinit_son(void)
328 {
329 	return wlan_son_deinit();
330 }
331 
son_psoc_close(struct wlan_objmgr_psoc * psoc)332 static QDF_STATUS son_psoc_close(struct wlan_objmgr_psoc *psoc)
333 {
334 	return wlan_son_psoc_close(psoc);
335 }
336 #else
dispatcher_init_son(void)337 static QDF_STATUS dispatcher_init_son(void)
338 {
339 	return QDF_STATUS_SUCCESS;
340 }
341 
dispatcher_deinit_son(void)342 static QDF_STATUS dispatcher_deinit_son(void)
343 {
344 	return QDF_STATUS_SUCCESS;
345 }
346 
son_psoc_open(struct wlan_objmgr_psoc * psoc)347 static QDF_STATUS son_psoc_open(struct wlan_objmgr_psoc *psoc)
348 {
349 	return QDF_STATUS_SUCCESS;
350 }
351 
son_psoc_close(struct wlan_objmgr_psoc * psoc)352 static QDF_STATUS son_psoc_close(struct wlan_objmgr_psoc *psoc)
353 {
354 	return QDF_STATUS_SUCCESS;
355 }
356 
357 #endif /* END of QCA_SUPPORT_SON */
358 
dispatcher_regulatory_init(void)359 static QDF_STATUS dispatcher_regulatory_init(void)
360 {
361 	return wlan_regulatory_init();
362 }
363 
dispatcher_regulatory_deinit(void)364 static QDF_STATUS dispatcher_regulatory_deinit(void)
365 {
366 	return wlan_regulatory_deinit();
367 }
368 
dispatcher_regulatory_psoc_open(struct wlan_objmgr_psoc * psoc)369 static QDF_STATUS dispatcher_regulatory_psoc_open(struct wlan_objmgr_psoc
370 						  *psoc)
371 {
372 	return regulatory_psoc_open(psoc);
373 }
374 
dispatcher_regulatory_psoc_close(struct wlan_objmgr_psoc * psoc)375 static QDF_STATUS dispatcher_regulatory_psoc_close(struct wlan_objmgr_psoc
376 						   *psoc)
377 {
378 	return regulatory_psoc_close(psoc);
379 }
380 
381 #ifdef WLAN_CONV_SPECTRAL_ENABLE
382 #ifdef SPECTRAL_MODULIZED_ENABLE
383 QDF_STATUS
dispatcher_register_spectral_ops_handler(struct dispatcher_spectral_ops * sops)384 dispatcher_register_spectral_ops_handler(struct dispatcher_spectral_ops *sops)
385 {
386 	qdf_mem_copy(&ops_spectral, sops,
387 		     qdf_min(sizeof(*sops), sizeof(ops_spectral)));
388 
389 	return QDF_STATUS_SUCCESS;
390 }
391 
392 qdf_export_symbol(dispatcher_register_spectral_ops_handler);
393 
dispatcher_spectral_pdev_open(struct wlan_objmgr_pdev * pdev)394 static QDF_STATUS dispatcher_spectral_pdev_open(struct wlan_objmgr_pdev *pdev)
395 {
396 	return ops_spectral.spectral_pdev_open_handler(pdev);
397 }
398 
dispatcher_spectral_pdev_close(struct wlan_objmgr_pdev * pdev)399 static QDF_STATUS dispatcher_spectral_pdev_close(struct wlan_objmgr_pdev *pdev)
400 {
401 	return QDF_STATUS_SUCCESS;
402 }
403 
spectral_psoc_open(struct wlan_objmgr_psoc * psoc)404 static QDF_STATUS spectral_psoc_open(struct wlan_objmgr_psoc *psoc)
405 {
406 	return ops_spectral.spectral_psoc_open_handler(psoc);
407 }
408 
spectral_psoc_close(struct wlan_objmgr_psoc * psoc)409 static QDF_STATUS spectral_psoc_close(struct wlan_objmgr_psoc *psoc)
410 {
411 	return ops_spectral.spectral_psoc_close_handler(psoc);
412 }
413 
spectral_psoc_enable(struct wlan_objmgr_psoc * psoc)414 static QDF_STATUS spectral_psoc_enable(struct wlan_objmgr_psoc *psoc)
415 {
416 	return ops_spectral.spectral_psoc_enable_handler(psoc);
417 }
418 
spectral_psoc_disable(struct wlan_objmgr_psoc * psoc)419 static QDF_STATUS spectral_psoc_disable(struct wlan_objmgr_psoc *psoc)
420 {
421 	return ops_spectral.spectral_psoc_disable_handler(psoc);
422 }
423 #else
dispatcher_spectral_pdev_open(struct wlan_objmgr_pdev * pdev)424 static QDF_STATUS dispatcher_spectral_pdev_open(struct wlan_objmgr_pdev
425 						  *pdev)
426 {
427 	return QDF_STATUS_SUCCESS;
428 }
429 
dispatcher_spectral_pdev_close(struct wlan_objmgr_pdev * pdev)430 static QDF_STATUS dispatcher_spectral_pdev_close(struct wlan_objmgr_pdev *pdev)
431 {
432 	return QDF_STATUS_SUCCESS;
433 }
434 
spectral_psoc_open(struct wlan_objmgr_psoc * psoc)435 static QDF_STATUS spectral_psoc_open(struct wlan_objmgr_psoc *psoc)
436 {
437 	return wlan_spectral_psoc_open(psoc);
438 }
439 
spectral_psoc_close(struct wlan_objmgr_psoc * psoc)440 static QDF_STATUS spectral_psoc_close(struct wlan_objmgr_psoc *psoc)
441 {
442 	return wlan_spectral_psoc_close(psoc);
443 }
444 
spectral_psoc_enable(struct wlan_objmgr_psoc * psoc)445 static QDF_STATUS spectral_psoc_enable(struct wlan_objmgr_psoc *psoc)
446 {
447 	return wlan_spectral_psoc_enable(psoc);
448 }
449 
spectral_psoc_disable(struct wlan_objmgr_psoc * psoc)450 static QDF_STATUS spectral_psoc_disable(struct wlan_objmgr_psoc *psoc)
451 {
452 	return wlan_spectral_psoc_disable(psoc);
453 }
454 #endif
455 #else
dispatcher_spectral_pdev_open(struct wlan_objmgr_pdev * pdev)456 static QDF_STATUS dispatcher_spectral_pdev_open(struct wlan_objmgr_pdev
457 						  *pdev)
458 {
459 	return QDF_STATUS_SUCCESS;
460 }
461 
dispatcher_spectral_pdev_close(struct wlan_objmgr_pdev * pdev)462 static QDF_STATUS dispatcher_spectral_pdev_close(struct wlan_objmgr_pdev *pdev)
463 {
464 	return QDF_STATUS_SUCCESS;
465 }
466 
spectral_psoc_open(struct wlan_objmgr_psoc * psoc)467 static QDF_STATUS spectral_psoc_open(struct wlan_objmgr_psoc *psoc)
468 {
469 	return QDF_STATUS_SUCCESS;
470 }
471 
spectral_psoc_close(struct wlan_objmgr_psoc * psoc)472 static QDF_STATUS spectral_psoc_close(struct wlan_objmgr_psoc *psoc)
473 {
474 	return QDF_STATUS_SUCCESS;
475 }
476 
spectral_psoc_enable(struct wlan_objmgr_psoc * psoc)477 static QDF_STATUS spectral_psoc_enable(struct wlan_objmgr_psoc *psoc)
478 {
479 	return QDF_STATUS_SUCCESS;
480 }
481 
spectral_psoc_disable(struct wlan_objmgr_psoc * psoc)482 static QDF_STATUS spectral_psoc_disable(struct wlan_objmgr_psoc *psoc)
483 {
484 	return QDF_STATUS_SUCCESS;
485 }
486 #endif
487 
dispatcher_regulatory_pdev_open(struct wlan_objmgr_pdev * pdev)488 static QDF_STATUS dispatcher_regulatory_pdev_open(struct wlan_objmgr_pdev
489 						  *pdev)
490 {
491 	return regulatory_pdev_open(pdev);
492 }
493 
dispatcher_regulatory_pdev_close(struct wlan_objmgr_pdev * pdev)494 static QDF_STATUS dispatcher_regulatory_pdev_close(struct wlan_objmgr_pdev
495 						  *pdev)
496 {
497 	return regulatory_pdev_close(pdev);
498 }
499 
500 #ifdef WLAN_SA_API_ENABLE
dispatcher_init_sa_api(void)501 static QDF_STATUS dispatcher_init_sa_api(void)
502 {
503 	return wlan_sa_api_init();
504 }
505 
dispatcher_deinit_sa_api(void)506 static QDF_STATUS dispatcher_deinit_sa_api(void)
507 {
508 	return wlan_sa_api_deinit();
509 }
510 
sa_api_psoc_enable(struct wlan_objmgr_psoc * psoc)511 static QDF_STATUS sa_api_psoc_enable(struct wlan_objmgr_psoc *psoc)
512 {
513 	return wlan_sa_api_enable(psoc);
514 }
515 
sa_api_psoc_disable(struct wlan_objmgr_psoc * psoc)516 static QDF_STATUS sa_api_psoc_disable(struct wlan_objmgr_psoc *psoc)
517 {
518 	return wlan_sa_api_disable(psoc);
519 }
520 #else
dispatcher_init_sa_api(void)521 static QDF_STATUS dispatcher_init_sa_api(void)
522 {
523 	return QDF_STATUS_SUCCESS;
524 }
525 
dispatcher_deinit_sa_api(void)526 static QDF_STATUS dispatcher_deinit_sa_api(void)
527 {
528 	return QDF_STATUS_SUCCESS;
529 }
530 
sa_api_psoc_enable(struct wlan_objmgr_psoc * psoc)531 static QDF_STATUS sa_api_psoc_enable(struct wlan_objmgr_psoc *psoc)
532 {
533 	return QDF_STATUS_SUCCESS;
534 }
535 
sa_api_psoc_disable(struct wlan_objmgr_psoc * psoc)536 static QDF_STATUS sa_api_psoc_disable(struct wlan_objmgr_psoc *psoc)
537 {
538 	return QDF_STATUS_SUCCESS;
539 }
540 #endif /* END of WLAN_SA_API_ENABLE */
541 
542 
543 #ifdef WLAN_ATF_ENABLE
dispatcher_init_atf(void)544 static QDF_STATUS dispatcher_init_atf(void)
545 {
546 	return wlan_atf_init();
547 }
548 
dispatcher_deinit_atf(void)549 static QDF_STATUS dispatcher_deinit_atf(void)
550 {
551 	return wlan_atf_deinit();
552 }
553 
atf_psoc_open(struct wlan_objmgr_psoc * psoc)554 static QDF_STATUS atf_psoc_open(struct wlan_objmgr_psoc *psoc)
555 {
556 	return wlan_atf_open(psoc);
557 }
558 
atf_psoc_close(struct wlan_objmgr_psoc * psoc)559 static QDF_STATUS atf_psoc_close(struct wlan_objmgr_psoc *psoc)
560 {
561 	return wlan_atf_close(psoc);
562 }
563 
atf_psoc_enable(struct wlan_objmgr_psoc * psoc)564 static QDF_STATUS atf_psoc_enable(struct wlan_objmgr_psoc *psoc)
565 {
566 	return wlan_atf_enable(psoc);
567 }
568 
atf_psoc_disable(struct wlan_objmgr_psoc * psoc)569 static QDF_STATUS atf_psoc_disable(struct wlan_objmgr_psoc *psoc)
570 {
571 	return wlan_atf_disable(psoc);
572 }
573 #else
dispatcher_init_atf(void)574 static QDF_STATUS dispatcher_init_atf(void)
575 {
576 	return QDF_STATUS_SUCCESS;
577 }
578 
dispatcher_deinit_atf(void)579 static QDF_STATUS dispatcher_deinit_atf(void)
580 {
581 	return QDF_STATUS_SUCCESS;
582 }
583 
atf_psoc_open(struct wlan_objmgr_psoc * psoc)584 static QDF_STATUS atf_psoc_open(struct wlan_objmgr_psoc *psoc)
585 {
586 	return QDF_STATUS_SUCCESS;
587 }
588 
atf_psoc_close(struct wlan_objmgr_psoc * psoc)589 static QDF_STATUS atf_psoc_close(struct wlan_objmgr_psoc *psoc)
590 {
591 	return QDF_STATUS_SUCCESS;
592 }
593 
atf_psoc_enable(struct wlan_objmgr_psoc * psoc)594 static QDF_STATUS atf_psoc_enable(struct wlan_objmgr_psoc *psoc)
595 {
596 	return QDF_STATUS_SUCCESS;
597 }
598 
atf_psoc_disable(struct wlan_objmgr_psoc * psoc)599 static QDF_STATUS atf_psoc_disable(struct wlan_objmgr_psoc *psoc)
600 {
601 	return QDF_STATUS_SUCCESS;
602 }
603 #endif /* END of WLAN_ATF_ENABLE */
604 
dispatcher_init_crypto(void)605 static QDF_STATUS dispatcher_init_crypto(void)
606 {
607 	return wlan_crypto_init();
608 }
609 
dispatcher_deinit_crypto(void)610 static QDF_STATUS dispatcher_deinit_crypto(void)
611 {
612 	return wlan_crypto_deinit();
613 }
614 
dispatcher_crypto_psoc_enable(struct wlan_objmgr_psoc * psoc)615 static QDF_STATUS dispatcher_crypto_psoc_enable(struct wlan_objmgr_psoc *psoc)
616 {
617 	return wlan_crypto_psoc_enable(psoc);
618 }
619 
dispatcher_crypto_psoc_disable(struct wlan_objmgr_psoc * psoc)620 static QDF_STATUS dispatcher_crypto_psoc_disable(struct wlan_objmgr_psoc *psoc)
621 {
622 	return wlan_crypto_psoc_disable(psoc);
623 }
624 
625 #ifdef WIFI_POS_CONVERGED
dispatcher_init_wifi_pos(void)626 static QDF_STATUS dispatcher_init_wifi_pos(void)
627 {
628 	return wifi_pos_init();
629 }
630 
dispatcher_deinit_wifi_pos(void)631 static QDF_STATUS dispatcher_deinit_wifi_pos(void)
632 {
633 	return wifi_pos_deinit();
634 }
635 
dispatcher_wifi_pos_enable(struct wlan_objmgr_psoc * psoc)636 static QDF_STATUS dispatcher_wifi_pos_enable(struct wlan_objmgr_psoc *psoc)
637 {
638 	return wifi_pos_psoc_enable(psoc);
639 }
640 
dispatcher_wifi_pos_disable(struct wlan_objmgr_psoc * psoc)641 static QDF_STATUS dispatcher_wifi_pos_disable(struct wlan_objmgr_psoc *psoc)
642 {
643 	return wifi_pos_psoc_disable(psoc);
644 }
645 #else
dispatcher_init_wifi_pos(void)646 static QDF_STATUS dispatcher_init_wifi_pos(void)
647 {
648 	return QDF_STATUS_SUCCESS;
649 }
650 
dispatcher_deinit_wifi_pos(void)651 static QDF_STATUS dispatcher_deinit_wifi_pos(void)
652 {
653 	return QDF_STATUS_SUCCESS;
654 }
655 
dispatcher_wifi_pos_enable(struct wlan_objmgr_psoc * psoc)656 static QDF_STATUS dispatcher_wifi_pos_enable(struct wlan_objmgr_psoc *psoc)
657 {
658 	return QDF_STATUS_SUCCESS;
659 }
660 
dispatcher_wifi_pos_disable(struct wlan_objmgr_psoc * psoc)661 static QDF_STATUS dispatcher_wifi_pos_disable(struct wlan_objmgr_psoc *psoc)
662 {
663 	return QDF_STATUS_SUCCESS;
664 }
665 #endif
666 
667 #ifdef DFS_COMPONENT_ENABLE
dispatcher_init_dfs(void)668 static QDF_STATUS dispatcher_init_dfs(void)
669 {
670 	return dfs_init();
671 }
672 
dispatcher_deinit_dfs(void)673 static QDF_STATUS dispatcher_deinit_dfs(void)
674 {
675 	return dfs_deinit();
676 }
677 
dispatcher_dfs_psoc_enable(struct wlan_objmgr_psoc * psoc)678 static QDF_STATUS dispatcher_dfs_psoc_enable(struct wlan_objmgr_psoc *psoc)
679 {
680 	return wifi_dfs_psoc_enable(psoc);
681 }
682 
dispatcher_dfs_psoc_disable(struct wlan_objmgr_psoc * psoc)683 static QDF_STATUS dispatcher_dfs_psoc_disable(struct wlan_objmgr_psoc *psoc)
684 {
685 	return wifi_dfs_psoc_disable(psoc);
686 }
687 #else
dispatcher_init_dfs(void)688 static QDF_STATUS dispatcher_init_dfs(void)
689 {
690 	return QDF_STATUS_SUCCESS;
691 }
692 
dispatcher_deinit_dfs(void)693 static QDF_STATUS dispatcher_deinit_dfs(void)
694 {
695 	return QDF_STATUS_SUCCESS;
696 }
697 
dispatcher_dfs_psoc_enable(struct wlan_objmgr_psoc * psoc)698 static QDF_STATUS dispatcher_dfs_psoc_enable(struct wlan_objmgr_psoc *psoc)
699 {
700 	return QDF_STATUS_SUCCESS;
701 }
702 
dispatcher_dfs_psoc_disable(struct wlan_objmgr_psoc * psoc)703 static QDF_STATUS dispatcher_dfs_psoc_disable(struct wlan_objmgr_psoc *psoc)
704 {
705 	return QDF_STATUS_SUCCESS;
706 }
707 #endif
708 
709 #if defined(WLAN_SUPPORT_TWT)
dispatcher_twt_psoc_enable(struct wlan_objmgr_psoc * psoc)710 static QDF_STATUS dispatcher_twt_psoc_enable(struct wlan_objmgr_psoc *psoc)
711 {
712 	return twt_psoc_enable(psoc);
713 }
714 
dispatcher_twt_psoc_disable(struct wlan_objmgr_psoc * psoc)715 static QDF_STATUS dispatcher_twt_psoc_disable(struct wlan_objmgr_psoc *psoc)
716 {
717 	return twt_psoc_disable(psoc);
718 }
719 
dispatcher_twt_init(void)720 static QDF_STATUS dispatcher_twt_init(void)
721 {
722 	return wlan_twt_init();
723 }
724 
dispatcher_twt_deinit(void)725 static QDF_STATUS dispatcher_twt_deinit(void)
726 {
727 	return wlan_twt_deinit();
728 }
729 
730 #else
dispatcher_twt_psoc_enable(struct wlan_objmgr_psoc * psoc)731 static QDF_STATUS dispatcher_twt_psoc_enable(struct wlan_objmgr_psoc *psoc)
732 {
733 	return QDF_STATUS_SUCCESS;
734 }
735 
dispatcher_twt_psoc_disable(struct wlan_objmgr_psoc * psoc)736 static QDF_STATUS dispatcher_twt_psoc_disable(struct wlan_objmgr_psoc *psoc)
737 {
738 	return QDF_STATUS_SUCCESS;
739 }
740 
dispatcher_twt_init(void)741 static QDF_STATUS dispatcher_twt_init(void)
742 {
743 	return QDF_STATUS_SUCCESS;
744 }
745 
dispatcher_twt_deinit(void)746 static QDF_STATUS dispatcher_twt_deinit(void)
747 {
748 	return QDF_STATUS_SUCCESS;
749 }
750 #endif
751 
752 #ifdef WLAN_OFFCHAN_TXRX_ENABLE
dispatcher_offchan_txrx_init(void)753 static QDF_STATUS dispatcher_offchan_txrx_init(void)
754 {
755 	return wlan_offchan_txrx_init();
756 }
757 
dispatcher_offchan_txrx_deinit(void)758 static QDF_STATUS dispatcher_offchan_txrx_deinit(void)
759 {
760 	return wlan_offchan_txrx_deinit();
761 }
762 #else
dispatcher_offchan_txrx_init(void)763 static QDF_STATUS dispatcher_offchan_txrx_init(void)
764 {
765 	return QDF_STATUS_SUCCESS;
766 }
767 
dispatcher_offchan_txrx_deinit(void)768 static QDF_STATUS dispatcher_offchan_txrx_deinit(void)
769 {
770 	return QDF_STATUS_SUCCESS;
771 }
772 #endif /*WLAN_OFFCHAN_TXRX_ENABLE*/
773 
774 #ifdef WLAN_SUPPORT_SPLITMAC
dispatcher_splitmac_init(void)775 static QDF_STATUS dispatcher_splitmac_init(void)
776 {
777 	return wlan_splitmac_init();
778 }
779 
dispatcher_splitmac_deinit(void)780 static QDF_STATUS dispatcher_splitmac_deinit(void)
781 {
782 	return wlan_splitmac_deinit();
783 }
784 #else
dispatcher_splitmac_init(void)785 static QDF_STATUS dispatcher_splitmac_init(void)
786 {
787 	return QDF_STATUS_SUCCESS;
788 }
789 
dispatcher_splitmac_deinit(void)790 static QDF_STATUS dispatcher_splitmac_deinit(void)
791 {
792 	return QDF_STATUS_SUCCESS;
793 }
794 #endif  /* WLAN_SUPPORT_SPLITMAC */
795 
796 #ifdef WLAN_CONV_SPECTRAL_ENABLE
797 #ifndef SPECTRAL_MODULIZED_ENABLE
dispatcher_spectral_init(void)798 static QDF_STATUS dispatcher_spectral_init(void)
799 {
800 	return wlan_spectral_init();
801 }
802 
dispatcher_spectral_deinit(void)803 static QDF_STATUS dispatcher_spectral_deinit(void)
804 {
805 	return wlan_spectral_deinit();
806 }
807 #else
dispatcher_spectral_init(void)808 static QDF_STATUS dispatcher_spectral_init(void)
809 {
810 	return QDF_STATUS_SUCCESS;
811 }
812 
dispatcher_spectral_deinit(void)813 static QDF_STATUS dispatcher_spectral_deinit(void)
814 {
815 	return QDF_STATUS_SUCCESS;
816 }
817 #endif
818 #else
dispatcher_spectral_init(void)819 static QDF_STATUS dispatcher_spectral_init(void)
820 {
821 	return QDF_STATUS_SUCCESS;
822 }
823 
dispatcher_spectral_deinit(void)824 static QDF_STATUS dispatcher_spectral_deinit(void)
825 {
826 	return QDF_STATUS_SUCCESS;
827 }
828 #endif
829 
830 #ifdef DIRECT_BUF_RX_ENABLE
dispatcher_dbr_psoc_enable(struct wlan_objmgr_psoc * psoc)831 static QDF_STATUS dispatcher_dbr_psoc_enable(struct wlan_objmgr_psoc *psoc)
832 {
833 	struct wlan_lmac_if_tx_ops *tx_ops;
834 
835 	tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
836 	if (!tx_ops) {
837 		qdf_err("tx_ops is NULL");
838 		return QDF_STATUS_E_FAILURE;
839 	}
840 
841 	if (tx_ops->dbr_tx_ops.direct_buf_rx_register_events)
842 		return tx_ops->dbr_tx_ops.direct_buf_rx_register_events(psoc);
843 
844 	return QDF_STATUS_SUCCESS;
845 }
846 
dispatcher_dbr_psoc_disable(struct wlan_objmgr_psoc * psoc)847 static QDF_STATUS dispatcher_dbr_psoc_disable(struct wlan_objmgr_psoc *psoc)
848 {
849 	struct wlan_lmac_if_tx_ops *tx_ops;
850 
851 	tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
852 	if (!tx_ops) {
853 		qdf_err("tx_ops is NULL");
854 		return QDF_STATUS_E_FAILURE;
855 	}
856 
857 	if (tx_ops->dbr_tx_ops.direct_buf_rx_unregister_events)
858 		return tx_ops->dbr_tx_ops.direct_buf_rx_unregister_events(psoc);
859 
860 	return QDF_STATUS_SUCCESS;
861 }
862 #else
dispatcher_dbr_psoc_enable(struct wlan_objmgr_psoc * psoc)863 static QDF_STATUS dispatcher_dbr_psoc_enable(struct wlan_objmgr_psoc *psoc)
864 {
865 	return QDF_STATUS_SUCCESS;
866 }
867 
dispatcher_dbr_psoc_disable(struct wlan_objmgr_psoc * psoc)868 static QDF_STATUS dispatcher_dbr_psoc_disable(struct wlan_objmgr_psoc *psoc)
869 {
870 	return QDF_STATUS_SUCCESS;
871 }
872 #endif /* DIRECT_BUF_RX_ENABLE */
873 
874 #ifdef WLAN_SUPPORT_GREEN_AP
dispatcher_green_ap_init(void)875 static QDF_STATUS dispatcher_green_ap_init(void)
876 {
877 	return wlan_green_ap_init();
878 }
879 
dispatcher_green_ap_pdev_open(struct wlan_objmgr_pdev * pdev)880 static QDF_STATUS dispatcher_green_ap_pdev_open(
881 				struct wlan_objmgr_pdev *pdev)
882 {
883 	return wlan_green_ap_pdev_open(pdev);
884 }
885 
886 /* Only added this for symmetry */
dispatcher_green_ap_pdev_close(struct wlan_objmgr_pdev * pdev)887 static QDF_STATUS dispatcher_green_ap_pdev_close(struct wlan_objmgr_pdev *pdev)
888 {
889 	return QDF_STATUS_SUCCESS;
890 }
891 
dispatcher_green_ap_deinit(void)892 static QDF_STATUS dispatcher_green_ap_deinit(void)
893 {
894 	return wlan_green_ap_deinit();
895 }
896 #else
dispatcher_green_ap_init(void)897 static QDF_STATUS dispatcher_green_ap_init(void)
898 {
899 	return QDF_STATUS_SUCCESS;
900 }
dispatcher_green_ap_pdev_open(struct wlan_objmgr_pdev * pdev)901 static QDF_STATUS dispatcher_green_ap_pdev_open(
902 				struct wlan_objmgr_pdev *pdev)
903 {
904 	return QDF_STATUS_SUCCESS;
905 }
906 
907 /* Only added this for symmetry */
dispatcher_green_ap_pdev_close(struct wlan_objmgr_pdev * pdev)908 static QDF_STATUS dispatcher_green_ap_pdev_close(struct wlan_objmgr_pdev *pdev)
909 {
910 	return QDF_STATUS_SUCCESS;
911 }
912 
dispatcher_green_ap_deinit(void)913 static QDF_STATUS dispatcher_green_ap_deinit(void)
914 {
915 	return QDF_STATUS_SUCCESS;
916 }
917 #endif
918 
919 #ifdef WLAN_SUPPORT_FILS
dispatcher_fd_init(void)920 static QDF_STATUS dispatcher_fd_init(void)
921 {
922 	return wlan_fd_init();
923 }
924 
dispatcher_fd_deinit(void)925 static QDF_STATUS dispatcher_fd_deinit(void)
926 {
927 	return wlan_fd_deinit();
928 }
929 
fd_psoc_enable(struct wlan_objmgr_psoc * psoc)930 static QDF_STATUS fd_psoc_enable(struct wlan_objmgr_psoc *psoc)
931 {
932 	return wlan_fd_enable(psoc);
933 }
934 
fd_psoc_disable(struct wlan_objmgr_psoc * psoc)935 static QDF_STATUS fd_psoc_disable(struct wlan_objmgr_psoc *psoc)
936 {
937 	return wlan_fd_disable(psoc);
938 }
939 #else
dispatcher_fd_init(void)940 static QDF_STATUS dispatcher_fd_init(void)
941 {
942 	return QDF_STATUS_SUCCESS;
943 }
944 
dispatcher_fd_deinit(void)945 static QDF_STATUS dispatcher_fd_deinit(void)
946 {
947 	return QDF_STATUS_SUCCESS;
948 }
949 
fd_psoc_enable(struct wlan_objmgr_psoc * psoc)950 static QDF_STATUS fd_psoc_enable(struct wlan_objmgr_psoc *psoc)
951 {
952 	return QDF_STATUS_SUCCESS;
953 }
954 
fd_psoc_disable(struct wlan_objmgr_psoc * psoc)955 static QDF_STATUS fd_psoc_disable(struct wlan_objmgr_psoc *psoc)
956 {
957 	return QDF_STATUS_SUCCESS;
958 }
959 #endif /* WLAN_SUPPORT_FILS */
960 
dispatcher_if_mgr_init(void)961 static QDF_STATUS dispatcher_if_mgr_init(void)
962 {
963 	return wlan_if_mgr_init();
964 }
965 
dispatcher_if_mgr_deinit(void)966 static QDF_STATUS dispatcher_if_mgr_deinit(void)
967 {
968 	return wlan_if_mgr_deinit();
969 }
970 
971 #ifdef FEATURE_COEX
dispatcher_coex_init(void)972 static QDF_STATUS dispatcher_coex_init(void)
973 {
974 	return wlan_coex_init();
975 }
976 
dispatcher_coex_deinit(void)977 static QDF_STATUS dispatcher_coex_deinit(void)
978 {
979 	return wlan_coex_deinit();
980 }
981 
dispatcher_coex_psoc_open(struct wlan_objmgr_psoc * psoc)982 static QDF_STATUS dispatcher_coex_psoc_open(struct wlan_objmgr_psoc *psoc)
983 {
984 	return wlan_coex_psoc_open(psoc);
985 }
986 
dispatcher_coex_psoc_close(struct wlan_objmgr_psoc * psoc)987 static QDF_STATUS dispatcher_coex_psoc_close(struct wlan_objmgr_psoc *psoc)
988 {
989 	return wlan_coex_psoc_close(psoc);
990 }
991 #else
dispatcher_coex_init(void)992 static inline QDF_STATUS dispatcher_coex_init(void)
993 {
994 	return QDF_STATUS_SUCCESS;
995 }
996 
dispatcher_coex_deinit(void)997 static inline QDF_STATUS dispatcher_coex_deinit(void)
998 {
999 	return QDF_STATUS_SUCCESS;
1000 }
1001 
1002 static inline QDF_STATUS
dispatcher_coex_psoc_open(struct wlan_objmgr_psoc * psoc)1003 dispatcher_coex_psoc_open(struct wlan_objmgr_psoc *psoc)
1004 {
1005 	return QDF_STATUS_SUCCESS;
1006 }
1007 
1008 static inline QDF_STATUS
dispatcher_coex_psoc_close(struct wlan_objmgr_psoc * psoc)1009 dispatcher_coex_psoc_close(struct wlan_objmgr_psoc *psoc)
1010 {
1011 	return QDF_STATUS_SUCCESS;
1012 }
1013 #endif /* FEATURE_COEX */
1014 
1015 #ifdef WLAN_FEATURE_DBAM_CONFIG
dbam_psoc_enable(struct wlan_objmgr_psoc * psoc)1016 static QDF_STATUS dbam_psoc_enable(struct wlan_objmgr_psoc *psoc)
1017 {
1018 	return wlan_dbam_psoc_enable(psoc);
1019 }
1020 
dbam_psoc_disable(struct wlan_objmgr_psoc * psoc)1021 static QDF_STATUS dbam_psoc_disable(struct wlan_objmgr_psoc *psoc)
1022 {
1023 	return wlan_dbam_psoc_disable(psoc);
1024 }
1025 #else
dbam_psoc_enable(struct wlan_objmgr_psoc * psoc)1026 static QDF_STATUS dbam_psoc_enable(struct wlan_objmgr_psoc *psoc)
1027 {
1028 	return QDF_STATUS_SUCCESS;
1029 }
1030 
dbam_psoc_disable(struct wlan_objmgr_psoc * psoc)1031 static QDF_STATUS dbam_psoc_disable(struct wlan_objmgr_psoc *psoc)
1032 {
1033 	return QDF_STATUS_SUCCESS;
1034 }
1035 #endif /* WLAN_FEATURE_DBAM_CONFIG */
1036 
1037 #ifdef WLAN_FEATURE_11BE_MLO
mlo_mgr_psoc_enable(struct wlan_objmgr_psoc * psoc)1038 static QDF_STATUS mlo_mgr_psoc_enable(struct wlan_objmgr_psoc *psoc)
1039 {
1040 	return wlan_mlo_mgr_psoc_enable(psoc);
1041 }
1042 
mlo_mgr_psoc_disable(struct wlan_objmgr_psoc * psoc)1043 static QDF_STATUS mlo_mgr_psoc_disable(struct wlan_objmgr_psoc *psoc)
1044 {
1045 	return wlan_mlo_mgr_psoc_disable(psoc);
1046 }
1047 #else
mlo_mgr_psoc_enable(struct wlan_objmgr_psoc * psoc)1048 static QDF_STATUS mlo_mgr_psoc_enable(struct wlan_objmgr_psoc *psoc)
1049 {
1050 	return QDF_STATUS_SUCCESS;
1051 }
1052 
mlo_mgr_psoc_disable(struct wlan_objmgr_psoc * psoc)1053 static QDF_STATUS mlo_mgr_psoc_disable(struct wlan_objmgr_psoc *psoc)
1054 {
1055 	return QDF_STATUS_SUCCESS;
1056 }
1057 #endif
1058 
1059 #ifdef WLAN_FEATURE_COAP
dispatcher_coap_init(void)1060 static QDF_STATUS dispatcher_coap_init(void)
1061 {
1062 	return wlan_coap_init();
1063 }
1064 
dispatcher_coap_deinit(void)1065 static QDF_STATUS dispatcher_coap_deinit(void)
1066 {
1067 	return wlan_coap_deinit();
1068 }
1069 
coap_psoc_enable(struct wlan_objmgr_psoc * psoc)1070 static QDF_STATUS coap_psoc_enable(struct wlan_objmgr_psoc *psoc)
1071 {
1072 	return wlan_coap_enable(psoc);
1073 }
1074 
coap_psoc_disable(struct wlan_objmgr_psoc * psoc)1075 static QDF_STATUS coap_psoc_disable(struct wlan_objmgr_psoc *psoc)
1076 {
1077 	return wlan_coap_disable(psoc);
1078 }
1079 #else
dispatcher_coap_init(void)1080 static QDF_STATUS dispatcher_coap_init(void)
1081 {
1082 	return QDF_STATUS_SUCCESS;
1083 }
1084 
dispatcher_coap_deinit(void)1085 static QDF_STATUS dispatcher_coap_deinit(void)
1086 {
1087 	return QDF_STATUS_SUCCESS;
1088 }
1089 
coap_psoc_enable(struct wlan_objmgr_psoc * psoc)1090 static QDF_STATUS coap_psoc_enable(struct wlan_objmgr_psoc *psoc)
1091 {
1092 	return QDF_STATUS_SUCCESS;
1093 }
1094 
coap_psoc_disable(struct wlan_objmgr_psoc * psoc)1095 static QDF_STATUS coap_psoc_disable(struct wlan_objmgr_psoc *psoc)
1096 {
1097 	return QDF_STATUS_SUCCESS;
1098 }
1099 #endif
1100 
dispatcher_init(void)1101 QDF_STATUS dispatcher_init(void)
1102 {
1103 	if (QDF_STATUS_SUCCESS != wlan_objmgr_global_obj_init())
1104 		goto out;
1105 
1106 	if (QDF_STATUS_SUCCESS != cdp_global_ctx_init())
1107 		goto global_init_fail;
1108 
1109 	if (QDF_STATUS_SUCCESS != wlan_mlo_mgr_init())
1110 		goto mgmt_mlo_mgr_fail;
1111 
1112 	if (QDF_STATUS_SUCCESS != wlan_mgmt_txrx_init())
1113 		goto mgmt_txrx_init_fail;
1114 
1115 	if (QDF_STATUS_SUCCESS != ucfg_scan_init())
1116 		goto ucfg_scan_init_fail;
1117 
1118 	if (QDF_STATUS_SUCCESS != wlan_serialization_init())
1119 		goto serialization_init_fail;
1120 
1121 	if (QDF_STATUS_SUCCESS != dispatcher_init_crypto())
1122 		goto crypto_init_fail;
1123 
1124 	if (QDF_STATUS_SUCCESS != dispatcher_init_cp_stats())
1125 		goto cp_stats_init_fail;
1126 
1127 	if (QDF_STATUS_SUCCESS != dispatcher_init_dcs())
1128 		goto dcs_init_fail;
1129 
1130 	if (QDF_STATUS_SUCCESS != dispatcher_init_atf())
1131 		goto atf_init_fail;
1132 
1133 	if (QDF_STATUS_SUCCESS != dispatcher_init_sa_api())
1134 		goto sa_api_init_fail;
1135 
1136 	if (QDF_STATUS_SUCCESS != dispatcher_init_wifi_pos())
1137 		goto wifi_pos_init_fail;
1138 
1139 	if (QDF_STATUS_SUCCESS != dispatcher_init_dfs())
1140 		goto dfs_init_fail;
1141 
1142 	if (QDF_STATUS_SUCCESS != dispatcher_regulatory_init())
1143 		goto regulatory_init_fail;
1144 
1145 	if (QDF_STATUS_SUCCESS != dispatcher_offchan_txrx_init())
1146 		goto offchan_init_fail;
1147 
1148 	if (QDF_STATUS_SUCCESS != dispatcher_init_son())
1149 		goto son_init_fail;
1150 
1151 	if (QDF_STATUS_SUCCESS != dispatcher_splitmac_init())
1152 		goto splitmac_init_fail;
1153 
1154 	if (QDF_STATUS_SUCCESS != dispatcher_fd_init())
1155 		goto fd_init_fail;
1156 
1157 	if (QDF_STATUS_SUCCESS != dispatcher_green_ap_init())
1158 		goto green_ap_init_fail;
1159 
1160 	if (QDF_STATUS_SUCCESS != dispatcher_ftm_init())
1161 		goto ftm_init_fail;
1162 
1163 	if (QDF_IS_STATUS_ERROR(cfg_dispatcher_init()))
1164 		goto cfg_init_fail;
1165 
1166 	if (QDF_STATUS_SUCCESS != dispatcher_spectral_init())
1167 		goto spectral_init_fail;
1168 
1169 	if (QDF_STATUS_SUCCESS != wlan_cmn_mlme_init())
1170 		goto cmn_mlme_init_fail;
1171 
1172 	if (QDF_STATUS_SUCCESS != dispatcher_init_cfr())
1173 		goto cfr_init_fail;
1174 
1175 	if (QDF_STATUS_SUCCESS != dispatcher_init_wifi_radar())
1176 		goto wifi_radar_init_fail;
1177 
1178 	if (QDF_STATUS_SUCCESS != dispatcher_coex_init())
1179 		goto coex_init_fail;
1180 
1181 	if (QDF_STATUS_SUCCESS != dispatcher_if_mgr_init())
1182 		goto ifmgr_init_fail;
1183 
1184 	if (QDF_STATUS_SUCCESS != wlan_gpio_init())
1185 		goto gpio_init_fail;
1186 
1187 	if (QDF_STATUS_SUCCESS != dispatcher_twt_init())
1188 		goto twt_init_fail;
1189 
1190 	if (QDF_STATUS_SUCCESS != dispatcher_coap_init())
1191 		goto coap_init_fail;
1192 
1193 	/*
1194 	 * scheduler INIT has to be the last as each component's
1195 	 * initialization has to happen first and then at the end
1196 	 * scheduler needs to start accepting the service.
1197 	 */
1198 	if (QDF_STATUS_SUCCESS != scheduler_init())
1199 		goto scheduler_init_fail;
1200 
1201 	return QDF_STATUS_SUCCESS;
1202 
1203 scheduler_init_fail:
1204 	dispatcher_coap_deinit();
1205 coap_init_fail:
1206 	dispatcher_twt_deinit();
1207 twt_init_fail:
1208 	wlan_gpio_deinit();
1209 gpio_init_fail:
1210 	dispatcher_if_mgr_deinit();
1211 ifmgr_init_fail:
1212 	dispatcher_coex_deinit();
1213 coex_init_fail:
1214 	dispatcher_deinit_wifi_radar();
1215 wifi_radar_init_fail:
1216 	dispatcher_deinit_cfr();
1217 cfr_init_fail:
1218 	wlan_cmn_mlme_deinit();
1219 cmn_mlme_init_fail:
1220 	dispatcher_spectral_deinit();
1221 spectral_init_fail:
1222 	cfg_dispatcher_deinit();
1223 cfg_init_fail:
1224 	dispatcher_ftm_deinit();
1225 ftm_init_fail:
1226 	dispatcher_green_ap_deinit();
1227 green_ap_init_fail:
1228 	dispatcher_fd_deinit();
1229 fd_init_fail:
1230 	dispatcher_splitmac_deinit();
1231 splitmac_init_fail:
1232 	dispatcher_deinit_son();
1233 son_init_fail:
1234 	dispatcher_offchan_txrx_deinit();
1235 offchan_init_fail:
1236 	dispatcher_regulatory_deinit();
1237 regulatory_init_fail:
1238 	dispatcher_deinit_dfs();
1239 dfs_init_fail:
1240 	dispatcher_deinit_wifi_pos();
1241 wifi_pos_init_fail:
1242 	dispatcher_deinit_sa_api();
1243 sa_api_init_fail:
1244 	dispatcher_deinit_atf();
1245 atf_init_fail:
1246 	dispatcher_deinit_dcs();
1247 dcs_init_fail:
1248 	dispatcher_deinit_cp_stats();
1249 cp_stats_init_fail:
1250 	dispatcher_deinit_crypto();
1251 crypto_init_fail:
1252 	wlan_serialization_deinit();
1253 serialization_init_fail:
1254 	ucfg_scan_deinit();
1255 ucfg_scan_init_fail:
1256 	wlan_mgmt_txrx_deinit();
1257 mgmt_txrx_init_fail:
1258 	wlan_objmgr_global_obj_deinit();
1259 mgmt_mlo_mgr_fail:
1260 	wlan_mlo_mgr_deinit();
1261 global_init_fail:
1262 	cdp_global_ctx_deinit();
1263 
1264 out:
1265 	return QDF_STATUS_E_FAILURE;
1266 }
1267 qdf_export_symbol(dispatcher_init);
1268 
dispatcher_deinit(void)1269 QDF_STATUS dispatcher_deinit(void)
1270 {
1271 	QDF_STATUS status;
1272 
1273 	QDF_BUG(QDF_STATUS_SUCCESS == scheduler_deinit());
1274 
1275 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_coap_deinit());
1276 
1277 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_twt_deinit());
1278 
1279 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_gpio_deinit());
1280 
1281 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_if_mgr_deinit());
1282 
1283 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_coex_deinit());
1284 
1285 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_wifi_radar());
1286 
1287 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_cfr());
1288 
1289 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_cmn_mlme_deinit());
1290 
1291 	status = cfg_dispatcher_deinit();
1292 	QDF_BUG(QDF_IS_STATUS_SUCCESS(status));
1293 
1294 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_ftm_deinit());
1295 
1296 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_green_ap_deinit());
1297 
1298 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_fd_deinit());
1299 
1300 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_spectral_deinit());
1301 
1302 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_splitmac_deinit());
1303 
1304 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_son());
1305 
1306 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_offchan_txrx_deinit());
1307 
1308 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_regulatory_deinit());
1309 
1310 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_dfs());
1311 
1312 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_wifi_pos());
1313 
1314 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_sa_api());
1315 
1316 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_atf());
1317 
1318 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_cp_stats());
1319 
1320 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_dcs());
1321 
1322 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_crypto());
1323 
1324 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_serialization_deinit());
1325 
1326 	QDF_BUG(QDF_STATUS_SUCCESS == ucfg_scan_deinit());
1327 
1328 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_mgmt_txrx_deinit());
1329 
1330 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_mlo_mgr_deinit());
1331 
1332 	QDF_BUG(QDF_STATUS_SUCCESS == cdp_global_ctx_deinit());
1333 
1334 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_objmgr_global_obj_deinit());
1335 
1336 	return QDF_STATUS_SUCCESS;
1337 }
1338 qdf_export_symbol(dispatcher_deinit);
1339 
dispatcher_enable(void)1340 QDF_STATUS dispatcher_enable(void)
1341 {
1342 	QDF_STATUS status;
1343 
1344 	status = scheduler_enable();
1345 
1346 	return status;
1347 }
1348 qdf_export_symbol(dispatcher_enable);
1349 
dispatcher_disable(void)1350 QDF_STATUS dispatcher_disable(void)
1351 {
1352 	QDF_BUG(QDF_IS_STATUS_SUCCESS(scheduler_disable()));
1353 
1354 	return QDF_STATUS_SUCCESS;
1355 }
1356 qdf_export_symbol(dispatcher_disable);
1357 
dispatcher_psoc_open(struct wlan_objmgr_psoc * psoc)1358 QDF_STATUS dispatcher_psoc_open(struct wlan_objmgr_psoc *psoc)
1359 {
1360 	QDF_STATUS status;
1361 
1362 	if (QDF_STATUS_SUCCESS != wlan_mgmt_txrx_psoc_open(psoc))
1363 		goto out;
1364 
1365 	if (QDF_STATUS_SUCCESS != ucfg_scan_psoc_open(psoc))
1366 		goto scan_psoc_open_fail;
1367 
1368 	if (QDF_STATUS_SUCCESS != cp_stats_psoc_open(psoc))
1369 		goto cp_stats_psoc_open_fail;
1370 
1371 	if (QDF_STATUS_SUCCESS != atf_psoc_open(psoc))
1372 		goto atf_psoc_open_fail;
1373 
1374 	if (QDF_STATUS_SUCCESS != dispatcher_regulatory_psoc_open(psoc))
1375 		goto regulatory_psoc_open_fail;
1376 
1377 	if (QDF_STATUS_SUCCESS != son_psoc_open(psoc))
1378 		goto psoc_son_fail;
1379 
1380 	if (QDF_STATUS_SUCCESS != dispatcher_ftm_psoc_open(psoc))
1381 		goto ftm_psoc_open_fail;
1382 
1383 	if (QDF_STATUS_SUCCESS != dispatcher_coex_psoc_open(psoc))
1384 		goto coex_psoc_open_fail;
1385 
1386 	if (QDF_STATUS_SUCCESS != dcs_psoc_open(psoc))
1387 		goto dcs_psoc_open_fail;
1388 
1389 	status = spectral_psoc_open(psoc);
1390 	if (status != QDF_STATUS_SUCCESS && status != QDF_STATUS_COMP_DISABLED)
1391 		goto spectral_psoc_open_fail;
1392 
1393 	if (QDF_IS_STATUS_ERROR(mlme_psoc_open(psoc)))
1394 		goto mlme_psoc_open_fail;
1395 
1396 	return QDF_STATUS_SUCCESS;
1397 
1398 mlme_psoc_open_fail:
1399 	spectral_psoc_close(psoc);
1400 spectral_psoc_open_fail:
1401 	dcs_psoc_close(psoc);
1402 dcs_psoc_open_fail:
1403 	dispatcher_coex_psoc_close(psoc);
1404 coex_psoc_open_fail:
1405 	dispatcher_ftm_psoc_close(psoc);
1406 ftm_psoc_open_fail:
1407 	son_psoc_close(psoc);
1408 psoc_son_fail:
1409 	regulatory_psoc_close(psoc);
1410 regulatory_psoc_open_fail:
1411 	atf_psoc_close(psoc);
1412 atf_psoc_open_fail:
1413 	cp_stats_psoc_close(psoc);
1414 cp_stats_psoc_open_fail:
1415 	ucfg_scan_psoc_close(psoc);
1416 scan_psoc_open_fail:
1417 	wlan_mgmt_txrx_psoc_close(psoc);
1418 
1419 out:
1420 	return QDF_STATUS_E_FAILURE;
1421 }
1422 qdf_export_symbol(dispatcher_psoc_open);
1423 
dispatcher_psoc_close(struct wlan_objmgr_psoc * psoc)1424 QDF_STATUS dispatcher_psoc_close(struct wlan_objmgr_psoc *psoc)
1425 {
1426 	QDF_STATUS status;
1427 
1428 	QDF_BUG(QDF_STATUS_SUCCESS == mlme_psoc_close(psoc));
1429 
1430 	QDF_BUG(QDF_STATUS_SUCCESS == dcs_psoc_close(psoc));
1431 
1432 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_coex_psoc_close(psoc));
1433 
1434 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_ftm_psoc_close(psoc));
1435 
1436 	QDF_BUG(QDF_STATUS_SUCCESS == son_psoc_close(psoc));
1437 
1438 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_regulatory_psoc_close(psoc));
1439 
1440 	QDF_BUG(QDF_STATUS_SUCCESS == atf_psoc_close(psoc));
1441 
1442 	QDF_BUG(QDF_STATUS_SUCCESS == cp_stats_psoc_close(psoc));
1443 
1444 	QDF_BUG(QDF_STATUS_SUCCESS == ucfg_scan_psoc_close(psoc));
1445 
1446 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_mgmt_txrx_psoc_close(psoc));
1447 
1448 	status = spectral_psoc_close(psoc);
1449 	QDF_BUG((status == QDF_STATUS_SUCCESS) ||
1450 		(status == QDF_STATUS_COMP_DISABLED));
1451 
1452 	return QDF_STATUS_SUCCESS;
1453 }
1454 qdf_export_symbol(dispatcher_psoc_close);
1455 
dispatcher_psoc_enable(struct wlan_objmgr_psoc * psoc)1456 QDF_STATUS dispatcher_psoc_enable(struct wlan_objmgr_psoc *psoc)
1457 {
1458 	QDF_STATUS status;
1459 
1460 	if (QDF_STATUS_SUCCESS != wlan_serialization_psoc_enable(psoc))
1461 		goto out;
1462 
1463 	if (QDF_STATUS_SUCCESS != ucfg_scan_psoc_enable(psoc))
1464 		goto serialization_psoc_enable_fail;
1465 
1466 	if (QDF_STATUS_SUCCESS != sa_api_psoc_enable(psoc))
1467 		goto sa_api_psoc_enable_fail;
1468 
1469 	if (QDF_STATUS_SUCCESS != cp_stats_psoc_enable(psoc))
1470 		goto cp_stats_psoc_enable_fail;
1471 
1472 	if (QDF_STATUS_SUCCESS != dcs_psoc_enable(psoc))
1473 		goto dcs_psoc_enable_fail;
1474 
1475 	if (QDF_STATUS_SUCCESS != atf_psoc_enable(psoc))
1476 		goto atf_psoc_enable_fail;
1477 
1478 	if (QDF_STATUS_SUCCESS != dispatcher_wifi_pos_enable(psoc))
1479 		goto wifi_pos_psoc_enable_fail;
1480 
1481 	if (QDF_STATUS_SUCCESS != dispatcher_dfs_psoc_enable(psoc))
1482 		goto wifi_dfs_psoc_enable_fail;
1483 
1484 	if (QDF_STATUS_SUCCESS != fd_psoc_enable(psoc))
1485 		goto fd_psoc_enable_fail;
1486 
1487 	if (QDF_STATUS_SUCCESS != dispatcher_dbr_psoc_enable(psoc))
1488 		goto dbr_psoc_enable_fail;
1489 
1490 	if (QDF_STATUS_SUCCESS != dispatcher_crypto_psoc_enable(psoc))
1491 		goto crypto_psoc_enable_fail;
1492 
1493 	if (QDF_STATUS_SUCCESS != wlan_mlme_psoc_enable(psoc))
1494 		goto mlme_psoc_enable_fail;
1495 
1496 	status = spectral_psoc_enable(psoc);
1497 	if (status != QDF_STATUS_SUCCESS && status != QDF_STATUS_COMP_DISABLED)
1498 		goto spectral_psoc_enable_fail;
1499 
1500 	if (QDF_STATUS_SUCCESS != wlan_mgmt_txrx_psoc_enable(psoc))
1501 		goto mgmt_txrx_psoc_enable_fail;
1502 
1503 	if (QDF_STATUS_SUCCESS != mlo_mgr_psoc_enable(psoc))
1504 		goto mlo_mgr_psoc_enable_fail;
1505 
1506 	if (QDF_STATUS_SUCCESS != dispatcher_twt_psoc_enable(psoc))
1507 		goto twt_psoc_enable_fail;
1508 
1509 	if (QDF_STATUS_SUCCESS != dbam_psoc_enable(psoc))
1510 		goto dbam_psoc_enable_fail;
1511 
1512 	if (QDF_STATUS_SUCCESS != coap_psoc_enable(psoc))
1513 		goto coap_psoc_enable_fail;
1514 
1515 	return QDF_STATUS_SUCCESS;
1516 
1517 coap_psoc_enable_fail:
1518 	dbam_psoc_disable(psoc);
1519 dbam_psoc_enable_fail:
1520 	dispatcher_twt_psoc_disable(psoc);
1521 twt_psoc_enable_fail:
1522 	mlo_mgr_psoc_disable(psoc);
1523 mlo_mgr_psoc_enable_fail:
1524 	wlan_mgmt_txrx_psoc_disable(psoc);
1525 mgmt_txrx_psoc_enable_fail:
1526 	spectral_psoc_disable(psoc);
1527 spectral_psoc_enable_fail:
1528 	wlan_mlme_psoc_disable(psoc);
1529 mlme_psoc_enable_fail:
1530 	dispatcher_crypto_psoc_disable(psoc);
1531 crypto_psoc_enable_fail:
1532 	dispatcher_dbr_psoc_disable(psoc);
1533 dbr_psoc_enable_fail:
1534 	fd_psoc_disable(psoc);
1535 fd_psoc_enable_fail:
1536 	dispatcher_dfs_psoc_disable(psoc);
1537 wifi_dfs_psoc_enable_fail:
1538 	dispatcher_wifi_pos_disable(psoc);
1539 wifi_pos_psoc_enable_fail:
1540 	atf_psoc_disable(psoc);
1541 atf_psoc_enable_fail:
1542 	dcs_psoc_disable(psoc);
1543 dcs_psoc_enable_fail:
1544 	cp_stats_psoc_disable(psoc);
1545 cp_stats_psoc_enable_fail:
1546 	sa_api_psoc_disable(psoc);
1547 sa_api_psoc_enable_fail:
1548 	ucfg_scan_psoc_disable(psoc);
1549 serialization_psoc_enable_fail:
1550 	wlan_serialization_psoc_disable(psoc);
1551 out:
1552 	return QDF_STATUS_E_FAILURE;
1553 }
1554 qdf_export_symbol(dispatcher_psoc_enable);
1555 
dispatcher_psoc_disable(struct wlan_objmgr_psoc * psoc)1556 QDF_STATUS dispatcher_psoc_disable(struct wlan_objmgr_psoc *psoc)
1557 {
1558 	QDF_STATUS status;
1559 
1560 	QDF_BUG(QDF_STATUS_SUCCESS == coap_psoc_disable(psoc));
1561 
1562 	QDF_BUG(QDF_STATUS_SUCCESS == dbam_psoc_disable(psoc));
1563 
1564 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_twt_psoc_disable(psoc));
1565 
1566 	QDF_BUG(QDF_STATUS_SUCCESS == mlo_mgr_psoc_disable(psoc));
1567 
1568 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_mgmt_txrx_psoc_disable(psoc));
1569 
1570 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_mlme_psoc_disable(psoc));
1571 
1572 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_crypto_psoc_disable(psoc));
1573 
1574 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_dbr_psoc_disable(psoc));
1575 
1576 	QDF_BUG(QDF_STATUS_SUCCESS == fd_psoc_disable(psoc));
1577 
1578 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_dfs_psoc_disable(psoc));
1579 
1580 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_wifi_pos_disable(psoc));
1581 
1582 	QDF_BUG(QDF_STATUS_SUCCESS == atf_psoc_disable(psoc));
1583 
1584 	QDF_BUG(QDF_STATUS_SUCCESS == cp_stats_psoc_disable(psoc));
1585 
1586 	QDF_BUG(QDF_STATUS_SUCCESS == sa_api_psoc_disable(psoc));
1587 
1588 	QDF_BUG(QDF_STATUS_SUCCESS == ucfg_scan_psoc_disable(psoc));
1589 
1590 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_serialization_psoc_disable(psoc));
1591 
1592 	status = spectral_psoc_disable(psoc);
1593 	QDF_BUG((status == QDF_STATUS_SUCCESS) ||
1594 		(status == QDF_STATUS_COMP_DISABLED));
1595 
1596 	return QDF_STATUS_SUCCESS;
1597 }
1598 qdf_export_symbol(dispatcher_psoc_disable);
1599 
dispatcher_pdev_open(struct wlan_objmgr_pdev * pdev)1600 QDF_STATUS dispatcher_pdev_open(struct wlan_objmgr_pdev *pdev)
1601 {
1602 	QDF_STATUS status;
1603 
1604 	if (QDF_STATUS_SUCCESS != dispatcher_regulatory_pdev_open(pdev))
1605 		goto regulatory_pdev_open_fail;
1606 
1607 	status = dispatcher_spectral_pdev_open(pdev);
1608 	if (status != QDF_STATUS_SUCCESS && status != QDF_STATUS_COMP_DISABLED)
1609 		goto spectral_pdev_open_fail;
1610 
1611 	status = dispatcher_cfr_pdev_open(pdev);
1612 	if (status != QDF_STATUS_SUCCESS && status != QDF_STATUS_COMP_DISABLED)
1613 		goto cfr_pdev_open_fail;
1614 
1615 	status = dispatcher_wifi_radar_pdev_open(pdev);
1616 	if (status != QDF_STATUS_SUCCESS && status != QDF_STATUS_COMP_DISABLED)
1617 		goto wifi_radar_pdev_open_fail;
1618 
1619 	if (QDF_STATUS_SUCCESS != wlan_mgmt_txrx_pdev_open(pdev))
1620 		goto mgmt_txrx_pdev_open_fail;
1621 
1622 	if (QDF_IS_STATUS_ERROR(dispatcher_green_ap_pdev_open(pdev)))
1623 		goto green_ap_pdev_open_fail;
1624 
1625 	return QDF_STATUS_SUCCESS;
1626 
1627 green_ap_pdev_open_fail:
1628 	wlan_mgmt_txrx_pdev_close(pdev);
1629 mgmt_txrx_pdev_open_fail:
1630 	dispatcher_wifi_radar_pdev_close(pdev);
1631 wifi_radar_pdev_open_fail:
1632 	dispatcher_cfr_pdev_close(pdev);
1633 cfr_pdev_open_fail:
1634 	dispatcher_spectral_pdev_close(pdev);
1635 spectral_pdev_open_fail:
1636 	dispatcher_regulatory_pdev_close(pdev);
1637 regulatory_pdev_open_fail:
1638 
1639 	return QDF_STATUS_E_FAILURE;
1640 }
1641 qdf_export_symbol(dispatcher_pdev_open);
1642 
dispatcher_pdev_close(struct wlan_objmgr_pdev * pdev)1643 QDF_STATUS dispatcher_pdev_close(struct wlan_objmgr_pdev *pdev)
1644 {
1645 	QDF_STATUS status;
1646 
1647 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_green_ap_pdev_close(pdev));
1648 
1649 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_mgmt_txrx_pdev_close(pdev));
1650 
1651 	status = dispatcher_wifi_radar_pdev_close(pdev);
1652 	QDF_BUG((QDF_STATUS_SUCCESS == status) ||
1653 		(QDF_STATUS_COMP_DISABLED == status));
1654 
1655 	status = dispatcher_cfr_pdev_close(pdev);
1656 	QDF_BUG((QDF_STATUS_SUCCESS == status) ||
1657 		(QDF_STATUS_COMP_DISABLED == status));
1658 
1659 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_spectral_pdev_close(pdev));
1660 
1661 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_regulatory_pdev_close(pdev));
1662 
1663 	return QDF_STATUS_SUCCESS;
1664 }
1665 qdf_export_symbol(dispatcher_pdev_close);
1666