xref: /wlan-dirver/qca-wifi-host-cmn/init_deinit/dispatcher/src/dispatcher_init_deinit.c (revision dae10a5fbc53d54c53c4ba24fa018ad8b1e7c008)
1 /*
2  * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for
5  * any purpose with or without fee is hereby granted, provided that the
6  * above copyright notice and this permission notice appear in all
7  * copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 #include "cfg_dispatcher.h"
20 #include <qdf_types.h>
21 #include <qdf_trace.h>
22 #include <qdf_threads.h>
23 #include <qdf_module.h>
24 #include <dispatcher_init_deinit.h>
25 #include <scheduler_api.h>
26 #include <wlan_scan_ucfg_api.h>
27 #include <wlan_ftm_init_deinit_api.h>
28 #include <wlan_mgmt_txrx_utils_api.h>
29 #include <wlan_serialization_api.h>
30 #include <wlan_vdev_mlme_main.h>
31 #ifdef WLAN_POLICY_MGR_ENABLE
32 #include "wlan_policy_mgr_api.h"
33 #endif
34 #ifdef WLAN_ATF_ENABLE
35 #include <wlan_atf_utils_api.h>
36 #endif
37 #ifdef QCA_SUPPORT_SON
38 #include <wlan_son_pub.h>
39 #endif
40 #ifdef WLAN_SA_API_ENABLE
41 #include <wlan_sa_api_utils_api.h>
42 #endif
43 #ifdef WIFI_POS_CONVERGED
44 #include "wifi_pos_api.h"
45 #endif /* WIFI_POS_CONVERGED */
46 #ifdef WLAN_FEATURE_NAN_CONVERGENCE
47 #include "wlan_nan_api.h"
48 #endif /* WLAN_FEATURE_NAN_CONVERGENCE */
49 #ifdef CONVERGED_P2P_ENABLE
50 #include <wlan_cfg80211_p2p.h>
51 #include <wlan_p2p_ucfg_api.h>
52 #endif
53 #include <wlan_reg_services_api.h>
54 #ifdef WLAN_CONV_CRYPTO_SUPPORTED
55 #include "wlan_crypto_main.h"
56 #endif
57 #ifdef DFS_COMPONENT_ENABLE
58 #include <wlan_dfs_init_deinit_api.h>
59 #endif
60 
61 #ifdef WLAN_OFFCHAN_TXRX_ENABLE
62 #include <wlan_offchan_txrx_api.h>
63 #endif
64 
65 #ifdef CONVERGED_TDLS_ENABLE
66 #include "wlan_tdls_ucfg_api.h"
67 #endif
68 
69 #ifdef WLAN_SUPPORT_SPLITMAC
70 #include <wlan_splitmac.h>
71 #endif
72 #ifdef WLAN_CONV_SPECTRAL_ENABLE
73 #include <wlan_spectral_utils_api.h>
74 #endif
75 #ifdef WLAN_SUPPORT_FILS
76 #include <wlan_fd_utils_api.h>
77 #endif
78 
79 #ifdef WLAN_SUPPORT_GREEN_AP
80 #include <wlan_green_ap_api.h>
81 #endif
82 
83 #ifdef QCA_SUPPORT_CP_STATS
84 #include <wlan_cp_stats_utils_api.h>
85 #endif
86 
87 /**
88  * DOC: This file provides various init/deinit trigger point for new
89  * components.
90  */
91 
92 /* All new components needs to replace their dummy init/deinit
93  * psoc_open, psco_close, psoc_enable and psoc_disable APIs once
94  * their actual handlers are ready
95  */
96 
97 spectral_pdev_open_handler dispatcher_spectral_pdev_open_handler_cb;
98 
99 #ifdef QCA_SUPPORT_CP_STATS
100 static QDF_STATUS dispatcher_init_cp_stats(void)
101 {
102 	return wlan_cp_stats_init();
103 }
104 
105 static QDF_STATUS dispatcher_deinit_cp_stats(void)
106 {
107 	return wlan_cp_stats_deinit();
108 }
109 
110 static QDF_STATUS cp_stats_psoc_open(struct wlan_objmgr_psoc *psoc)
111 {
112 	return wlan_cp_stats_open(psoc);
113 }
114 
115 static QDF_STATUS cp_stats_psoc_close(struct wlan_objmgr_psoc *psoc)
116 {
117 	return wlan_cp_stats_close(psoc);
118 }
119 
120 static QDF_STATUS cp_stats_psoc_enable(struct wlan_objmgr_psoc *psoc)
121 {
122 	return wlan_cp_stats_enable(psoc);
123 }
124 
125 static QDF_STATUS cp_stats_psoc_disable(struct wlan_objmgr_psoc *psoc)
126 {
127 	return wlan_cp_stats_disable(psoc);
128 }
129 #else
130 static QDF_STATUS dispatcher_init_cp_stats(void)
131 {
132 	return QDF_STATUS_SUCCESS;
133 }
134 
135 static QDF_STATUS dispatcher_deinit_cp_stats(void)
136 {
137 	return QDF_STATUS_SUCCESS;
138 }
139 
140 static QDF_STATUS cp_stats_psoc_open(struct wlan_objmgr_psoc *psoc)
141 {
142 	return QDF_STATUS_SUCCESS;
143 }
144 
145 static QDF_STATUS cp_stats_psoc_close(struct wlan_objmgr_psoc *psoc)
146 {
147 	return QDF_STATUS_SUCCESS;
148 }
149 
150 static QDF_STATUS cp_stats_psoc_enable(struct wlan_objmgr_psoc *psoc)
151 {
152 	return QDF_STATUS_SUCCESS;
153 }
154 
155 static QDF_STATUS cp_stats_psoc_disable(struct wlan_objmgr_psoc *psoc)
156 {
157 	return QDF_STATUS_SUCCESS;
158 }
159 #endif
160 
161 #ifdef CONVERGED_P2P_ENABLE
162 static QDF_STATUS p2p_init(void)
163 {
164 	return ucfg_p2p_init();
165 }
166 
167 static QDF_STATUS p2p_deinit(void)
168 {
169 	return ucfg_p2p_deinit();
170 }
171 
172 static QDF_STATUS p2p_psoc_open(struct wlan_objmgr_psoc *psoc)
173 {
174 	return ucfg_p2p_psoc_open(psoc);
175 }
176 
177 static QDF_STATUS p2p_psoc_close(struct wlan_objmgr_psoc *psoc)
178 {
179 	return ucfg_p2p_psoc_close(psoc);
180 }
181 
182 static QDF_STATUS p2p_psoc_enable(struct wlan_objmgr_psoc *psoc)
183 {
184 	return wlan_p2p_start(psoc);
185 }
186 
187 static QDF_STATUS p2p_psoc_disable(struct wlan_objmgr_psoc *psoc)
188 {
189 	return wlan_p2p_stop(psoc);
190 }
191 #else
192 static QDF_STATUS p2p_init(void)
193 {
194 	return QDF_STATUS_SUCCESS;
195 }
196 
197 static QDF_STATUS p2p_deinit(void)
198 {
199 	return QDF_STATUS_SUCCESS;
200 }
201 
202 static QDF_STATUS p2p_psoc_open(struct wlan_objmgr_psoc *psoc)
203 {
204 	return QDF_STATUS_SUCCESS;
205 }
206 
207 static QDF_STATUS p2p_psoc_close(struct wlan_objmgr_psoc *psoc)
208 {
209 	return QDF_STATUS_SUCCESS;
210 }
211 
212 static QDF_STATUS p2p_psoc_enable(struct wlan_objmgr_psoc *psoc)
213 {
214 	return QDF_STATUS_SUCCESS;
215 }
216 
217 static QDF_STATUS p2p_psoc_disable(struct wlan_objmgr_psoc *psoc)
218 {
219 	return QDF_STATUS_SUCCESS;
220 }
221 #endif /* END of CONVERGED_P2P_ENABLE */
222 
223 #ifdef CONVERGED_TDLS_ENABLE
224 static QDF_STATUS tdls_init(void)
225 {
226 	return ucfg_tdls_init();
227 }
228 
229 static QDF_STATUS tdls_deinit(void)
230 {
231 	return ucfg_tdls_deinit();
232 }
233 
234 static QDF_STATUS tdls_psoc_open(struct wlan_objmgr_psoc *psoc)
235 {
236 	return ucfg_tdls_psoc_open(psoc);
237 }
238 
239 static QDF_STATUS tdls_psoc_close(struct wlan_objmgr_psoc *psoc)
240 {
241 	return ucfg_tdls_psoc_close(psoc);
242 }
243 
244 static QDF_STATUS tdls_psoc_enable(struct wlan_objmgr_psoc *psoc)
245 {
246 	return ucfg_tdls_psoc_enable(psoc);
247 }
248 
249 static QDF_STATUS tdls_psoc_disable(struct wlan_objmgr_psoc *psoc)
250 {
251 	return ucfg_tdls_psoc_disable(psoc);
252 }
253 #else
254 static QDF_STATUS tdls_init(void)
255 {
256 	return QDF_STATUS_SUCCESS;
257 }
258 
259 static QDF_STATUS tdls_deinit(void)
260 {
261 	return QDF_STATUS_SUCCESS;
262 }
263 
264 static QDF_STATUS tdls_psoc_open(struct wlan_objmgr_psoc *psoc)
265 {
266 	return QDF_STATUS_SUCCESS;
267 }
268 
269 static QDF_STATUS tdls_psoc_close(struct wlan_objmgr_psoc *psoc)
270 {
271 	return QDF_STATUS_SUCCESS;
272 }
273 
274 static QDF_STATUS tdls_psoc_enable(struct wlan_objmgr_psoc *psoc)
275 {
276 	return QDF_STATUS_SUCCESS;
277 }
278 
279 
280 static QDF_STATUS tdls_psoc_disable(struct wlan_objmgr_psoc *psoc)
281 {
282 	return QDF_STATUS_SUCCESS;
283 }
284 #endif
285 
286 #if defined QCA_SUPPORT_SON && QCA_SUPPORT_SON >= 1
287 static QDF_STATUS dispatcher_init_son(void)
288 {
289 	return wlan_son_init();
290 }
291 static QDF_STATUS son_psoc_open(struct wlan_objmgr_psoc *psoc)
292 {
293 	return wlan_son_psoc_open(psoc);
294 }
295 static QDF_STATUS dispatcher_deinit_son(void)
296 {
297 	return wlan_son_deinit();
298 }
299 
300 static QDF_STATUS son_psoc_close(struct wlan_objmgr_psoc *psoc)
301 {
302 	return wlan_son_psoc_close(psoc);
303 }
304 #else
305 static QDF_STATUS dispatcher_init_son(void)
306 {
307 	return QDF_STATUS_SUCCESS;
308 }
309 
310 static QDF_STATUS dispatcher_deinit_son(void)
311 {
312 	return QDF_STATUS_SUCCESS;
313 }
314 
315 static QDF_STATUS son_psoc_open(struct wlan_objmgr_psoc *psoc)
316 {
317 	return QDF_STATUS_SUCCESS;
318 }
319 
320 static QDF_STATUS son_psoc_close(struct wlan_objmgr_psoc *psoc)
321 {
322 	return QDF_STATUS_SUCCESS;
323 }
324 
325 #endif /* END of QCA_SUPPORT_SON */
326 
327 static QDF_STATUS dispatcher_regulatory_init(void)
328 {
329 	return wlan_regulatory_init();
330 }
331 
332 static QDF_STATUS dispatcher_regulatory_deinit(void)
333 {
334 	return wlan_regulatory_deinit();
335 }
336 
337 static QDF_STATUS dispatcher_regulatory_psoc_open(struct wlan_objmgr_psoc
338 						  *psoc)
339 {
340 	return regulatory_psoc_open(psoc);
341 }
342 
343 static QDF_STATUS dispatcher_regulatory_psoc_close(struct wlan_objmgr_psoc
344 						   *psoc)
345 {
346 	return regulatory_psoc_close(psoc);
347 }
348 
349 static QDF_STATUS dispatcher_regulatory_pdev_open(struct wlan_objmgr_pdev
350 						  *pdev)
351 {
352 	return regulatory_pdev_open(pdev);
353 }
354 
355 #ifdef WLAN_CONV_SPECTRAL_ENABLE
356 #ifdef CONFIG_WIN
357 QDF_STATUS dispatcher_register_spectral_pdev_open_handler(
358 			spectral_pdev_open_handler handler)
359 {
360 	dispatcher_spectral_pdev_open_handler_cb = handler;
361 
362 	return QDF_STATUS_SUCCESS;
363 }
364 qdf_export_symbol(dispatcher_register_spectral_pdev_open_handler);
365 
366 static QDF_STATUS dispatcher_spectral_pdev_open(struct wlan_objmgr_pdev
367 						  *pdev)
368 {
369 	return dispatcher_spectral_pdev_open_handler_cb(pdev);
370 }
371 
372 static QDF_STATUS dispatcher_spectral_pdev_close(struct wlan_objmgr_pdev *pdev)
373 {
374 	return QDF_STATUS_SUCCESS;
375 }
376 #else
377 static QDF_STATUS dispatcher_spectral_pdev_open(struct wlan_objmgr_pdev
378 						  *pdev)
379 {
380 	return spectral_pdev_open(pdev);
381 }
382 
383 static QDF_STATUS dispatcher_spectral_pdev_close(struct wlan_objmgr_pdev *pdev)
384 {
385 	return QDF_STATUS_SUCCESS;
386 }
387 #endif
388 #else
389 static QDF_STATUS dispatcher_spectral_pdev_open(struct wlan_objmgr_pdev
390 						  *pdev)
391 {
392 	return QDF_STATUS_SUCCESS;
393 }
394 
395 static QDF_STATUS dispatcher_spectral_pdev_close(struct wlan_objmgr_pdev *pdev)
396 {
397 	return QDF_STATUS_SUCCESS;
398 }
399 #endif
400 
401 static QDF_STATUS dispatcher_regulatory_pdev_close(struct wlan_objmgr_pdev
402 						  *pdev)
403 {
404 	return regulatory_pdev_close(pdev);
405 }
406 
407 #ifdef WLAN_POLICY_MGR_ENABLE
408 static QDF_STATUS dispatcher_policy_mgr_init(void)
409 {
410 	return policy_mgr_init();
411 }
412 
413 static QDF_STATUS dispatcher_policy_mgr_deinit(void)
414 {
415 	return policy_mgr_deinit();
416 }
417 
418 static QDF_STATUS dispatcher_policy_mgr_psoc_open(
419 	struct wlan_objmgr_psoc *psoc)
420 {
421 	return policy_mgr_psoc_open(psoc);
422 }
423 
424 static QDF_STATUS dispatcher_policy_mgr_psoc_close(
425 	struct wlan_objmgr_psoc *psoc)
426 {
427 	return policy_mgr_psoc_close(psoc);
428 }
429 
430 static QDF_STATUS dispatcher_policy_mgr_psoc_enable(
431 	struct wlan_objmgr_psoc *psoc)
432 {
433 	return policy_mgr_psoc_enable(psoc);
434 }
435 
436 static QDF_STATUS dispatcher_policy_mgr_psoc_disable(
437 	struct wlan_objmgr_psoc *psoc)
438 {
439 	return policy_mgr_psoc_disable(psoc);
440 }
441 #else
442 static QDF_STATUS dispatcher_policy_mgr_init(void)
443 {
444 	return QDF_STATUS_SUCCESS;
445 }
446 
447 static QDF_STATUS dispatcher_policy_mgr_deinit(void)
448 {
449 	return QDF_STATUS_SUCCESS;
450 }
451 
452 static QDF_STATUS dispatcher_policy_mgr_psoc_open(
453 	struct wlan_objmgr_psoc *psoc)
454 {
455 	return QDF_STATUS_SUCCESS;
456 }
457 
458 static QDF_STATUS dispatcher_policy_mgr_psoc_close(
459 	struct wlan_objmgr_psoc *psoc)
460 {
461 	return QDF_STATUS_SUCCESS;
462 }
463 
464 static QDF_STATUS dispatcher_policy_mgr_psoc_enable(
465 	struct wlan_objmgr_psoc *psoc)
466 {
467 	return QDF_STATUS_SUCCESS;
468 }
469 
470 static QDF_STATUS dispatcher_policy_mgr_psoc_disable(
471 	struct wlan_objmgr_psoc *psoc)
472 {
473 	return QDF_STATUS_SUCCESS;
474 }
475 #endif /* END of WLAN_POLICY_MGR_ENABLE */
476 
477 #ifdef WLAN_SA_API_ENABLE
478 static QDF_STATUS dispatcher_init_sa_api(void)
479 {
480 	return wlan_sa_api_init();
481 }
482 
483 static QDF_STATUS dispatcher_deinit_sa_api(void)
484 {
485 	return wlan_sa_api_deinit();
486 }
487 
488 static QDF_STATUS sa_api_psoc_enable(struct wlan_objmgr_psoc *psoc)
489 {
490 	return wlan_sa_api_enable(psoc);
491 }
492 
493 static QDF_STATUS sa_api_psoc_disable(struct wlan_objmgr_psoc *psoc)
494 {
495 	return wlan_sa_api_disable(psoc);
496 }
497 #else
498 static QDF_STATUS dispatcher_init_sa_api(void)
499 {
500 	return QDF_STATUS_SUCCESS;
501 }
502 
503 static QDF_STATUS dispatcher_deinit_sa_api(void)
504 {
505 	return QDF_STATUS_SUCCESS;
506 }
507 
508 static QDF_STATUS sa_api_psoc_enable(struct wlan_objmgr_psoc *psoc)
509 {
510 	return QDF_STATUS_SUCCESS;
511 }
512 
513 static QDF_STATUS sa_api_psoc_disable(struct wlan_objmgr_psoc *psoc)
514 {
515 	return QDF_STATUS_SUCCESS;
516 }
517 #endif /* END of WLAN_SA_API_ENABLE */
518 
519 
520 #ifdef WLAN_ATF_ENABLE
521 static QDF_STATUS dispatcher_init_atf(void)
522 {
523 	return wlan_atf_init();
524 }
525 
526 static QDF_STATUS dispatcher_deinit_atf(void)
527 {
528 	return wlan_atf_deinit();
529 }
530 
531 static QDF_STATUS atf_psoc_open(struct wlan_objmgr_psoc *psoc)
532 {
533 	return wlan_atf_open(psoc);
534 }
535 
536 static QDF_STATUS atf_psoc_close(struct wlan_objmgr_psoc *psoc)
537 {
538 	return wlan_atf_close(psoc);
539 }
540 
541 static QDF_STATUS atf_psoc_enable(struct wlan_objmgr_psoc *psoc)
542 {
543 	return wlan_atf_enable(psoc);
544 }
545 
546 static QDF_STATUS atf_psoc_disable(struct wlan_objmgr_psoc *psoc)
547 {
548 	return wlan_atf_disable(psoc);
549 }
550 #else
551 static QDF_STATUS dispatcher_init_atf(void)
552 {
553 	return QDF_STATUS_SUCCESS;
554 }
555 
556 static QDF_STATUS dispatcher_deinit_atf(void)
557 {
558 	return QDF_STATUS_SUCCESS;
559 }
560 
561 static QDF_STATUS atf_psoc_open(struct wlan_objmgr_psoc *psoc)
562 {
563 	return QDF_STATUS_SUCCESS;
564 }
565 
566 static QDF_STATUS atf_psoc_close(struct wlan_objmgr_psoc *psoc)
567 {
568 	return QDF_STATUS_SUCCESS;
569 }
570 
571 static QDF_STATUS atf_psoc_enable(struct wlan_objmgr_psoc *psoc)
572 {
573 	return QDF_STATUS_SUCCESS;
574 }
575 
576 static QDF_STATUS atf_psoc_disable(struct wlan_objmgr_psoc *psoc)
577 {
578 	return QDF_STATUS_SUCCESS;
579 }
580 #endif /* END of WLAN_ATF_ENABLE */
581 
582 #ifdef WLAN_CONV_CRYPTO_SUPPORTED
583 static QDF_STATUS dispatcher_init_crypto(void)
584 {
585 	return wlan_crypto_init();
586 }
587 
588 static QDF_STATUS dispatcher_deinit_crypto(void)
589 {
590 	return wlan_crypto_deinit();
591 }
592 #else
593 static QDF_STATUS dispatcher_init_crypto(void)
594 {
595 	return QDF_STATUS_SUCCESS;
596 }
597 
598 static QDF_STATUS dispatcher_deinit_crypto(void)
599 {
600 	return QDF_STATUS_SUCCESS;
601 }
602 #endif /* END of WLAN_CONV_CRYPTO_SUPPORTED */
603 
604 #ifdef WIFI_POS_CONVERGED
605 static QDF_STATUS dispatcher_init_wifi_pos(void)
606 {
607 	return wifi_pos_init();
608 }
609 
610 static QDF_STATUS dispatcher_deinit_wifi_pos(void)
611 {
612 	return wifi_pos_deinit();
613 }
614 
615 static QDF_STATUS dispatcher_wifi_pos_enable(struct wlan_objmgr_psoc *psoc)
616 {
617 	return wifi_pos_psoc_enable(psoc);
618 }
619 
620 static QDF_STATUS dispatcher_wifi_pos_disable(struct wlan_objmgr_psoc *psoc)
621 {
622 	return wifi_pos_psoc_disable(psoc);
623 }
624 #else
625 static QDF_STATUS dispatcher_init_wifi_pos(void)
626 {
627 	return QDF_STATUS_SUCCESS;
628 }
629 
630 static QDF_STATUS dispatcher_deinit_wifi_pos(void)
631 {
632 	return QDF_STATUS_SUCCESS;
633 }
634 
635 static QDF_STATUS dispatcher_wifi_pos_enable(struct wlan_objmgr_psoc *psoc)
636 {
637 	return QDF_STATUS_SUCCESS;
638 }
639 
640 static QDF_STATUS dispatcher_wifi_pos_disable(struct wlan_objmgr_psoc *psoc)
641 {
642 	return QDF_STATUS_SUCCESS;
643 }
644 #endif
645 
646 #ifdef WLAN_FEATURE_NAN_CONVERGENCE
647 static QDF_STATUS dispatcher_init_nan(void)
648 {
649 	return nan_init();
650 }
651 
652 static QDF_STATUS dispatcher_deinit_nan(void)
653 {
654 	return nan_deinit();
655 }
656 
657 static QDF_STATUS dispatcher_nan_psoc_enable(struct wlan_objmgr_psoc *psoc)
658 {
659 	return nan_psoc_enable(psoc);
660 }
661 
662 static QDF_STATUS dispatcher_nan_psoc_disable(struct wlan_objmgr_psoc *psoc)
663 {
664 	return nan_psoc_disable(psoc);
665 }
666 #else
667 static QDF_STATUS dispatcher_init_nan(void)
668 {
669 	return QDF_STATUS_SUCCESS;
670 }
671 
672 static QDF_STATUS dispatcher_deinit_nan(void)
673 {
674 	return QDF_STATUS_SUCCESS;
675 }
676 
677 static QDF_STATUS dispatcher_nan_psoc_enable(struct wlan_objmgr_psoc *psoc)
678 {
679 	return QDF_STATUS_SUCCESS;
680 }
681 
682 static QDF_STATUS dispatcher_nan_psoc_disable(struct wlan_objmgr_psoc *psoc)
683 {
684 	return QDF_STATUS_SUCCESS;
685 }
686 #endif
687 
688 #ifdef DFS_COMPONENT_ENABLE
689 static QDF_STATUS dispatcher_init_dfs(void)
690 {
691 	return dfs_init();
692 }
693 
694 static QDF_STATUS dispatcher_deinit_dfs(void)
695 {
696 	return dfs_deinit();
697 }
698 
699 static QDF_STATUS dispatcher_dfs_psoc_enable(struct wlan_objmgr_psoc *psoc)
700 {
701 	return wifi_dfs_psoc_enable(psoc);
702 }
703 
704 static QDF_STATUS dispatcher_dfs_psoc_disable(struct wlan_objmgr_psoc *psoc)
705 {
706 	return wifi_dfs_psoc_disable(psoc);
707 }
708 #else
709 static QDF_STATUS dispatcher_init_dfs(void)
710 {
711 	return QDF_STATUS_SUCCESS;
712 }
713 
714 static QDF_STATUS dispatcher_deinit_dfs(void)
715 {
716 	return QDF_STATUS_SUCCESS;
717 }
718 
719 static QDF_STATUS dispatcher_dfs_psoc_enable(struct wlan_objmgr_psoc *psoc)
720 {
721 	return QDF_STATUS_SUCCESS;
722 }
723 
724 static QDF_STATUS dispatcher_dfs_psoc_disable(struct wlan_objmgr_psoc *psoc)
725 {
726 	return QDF_STATUS_SUCCESS;
727 }
728 #endif
729 
730 #ifdef WLAN_OFFCHAN_TXRX_ENABLE
731 static QDF_STATUS dispatcher_offchan_txrx_init(void)
732 {
733 	return wlan_offchan_txrx_init();
734 }
735 
736 static QDF_STATUS dispatcher_offchan_txrx_deinit(void)
737 {
738 	return wlan_offchan_txrx_deinit();
739 }
740 #else
741 static QDF_STATUS dispatcher_offchan_txrx_init(void)
742 {
743 	return QDF_STATUS_SUCCESS;
744 }
745 
746 static QDF_STATUS dispatcher_offchan_txrx_deinit(void)
747 {
748 	return QDF_STATUS_SUCCESS;
749 }
750 #endif /*WLAN_OFFCHAN_TXRX_ENABLE*/
751 
752 #ifdef WLAN_SUPPORT_SPLITMAC
753 static QDF_STATUS dispatcher_splitmac_init(void)
754 {
755 	return wlan_splitmac_init();
756 }
757 
758 static QDF_STATUS dispatcher_splitmac_deinit(void)
759 {
760 	return wlan_splitmac_deinit();
761 }
762 #else
763 static QDF_STATUS dispatcher_splitmac_init(void)
764 {
765 	return QDF_STATUS_SUCCESS;
766 }
767 
768 static QDF_STATUS dispatcher_splitmac_deinit(void)
769 {
770 	return QDF_STATUS_SUCCESS;
771 }
772 #endif  /* WLAN_SUPPORT_SPLITMAC */
773 
774 #ifdef WLAN_CONV_SPECTRAL_ENABLE
775 #ifdef CONFIG_MCL
776 static QDF_STATUS dispatcher_spectral_init(void)
777 {
778 	return wlan_spectral_init();
779 }
780 
781 static QDF_STATUS dispatcher_spectral_deinit(void)
782 {
783 	return wlan_spectral_deinit();
784 }
785 #else
786 static QDF_STATUS dispatcher_spectral_init(void)
787 {
788 	return QDF_STATUS_SUCCESS;
789 }
790 
791 static QDF_STATUS dispatcher_spectral_deinit(void)
792 {
793 	return QDF_STATUS_SUCCESS;
794 }
795 #endif
796 #else
797 static QDF_STATUS dispatcher_spectral_init(void)
798 {
799 	return QDF_STATUS_SUCCESS;
800 }
801 
802 static QDF_STATUS dispatcher_spectral_deinit(void)
803 {
804 	return QDF_STATUS_SUCCESS;
805 }
806 #endif
807 
808 #ifdef DIRECT_BUF_RX_ENABLE
809 static QDF_STATUS dispatcher_dbr_psoc_enable(struct wlan_objmgr_psoc *psoc)
810 {
811 	struct wlan_lmac_if_tx_ops *tx_ops;
812 
813 	tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
814 	if (tx_ops->dbr_tx_ops.direct_buf_rx_register_events)
815 		return tx_ops->dbr_tx_ops.direct_buf_rx_register_events(psoc);
816 
817 	return QDF_STATUS_SUCCESS;
818 }
819 
820 static QDF_STATUS dispatcher_dbr_psoc_disable(struct wlan_objmgr_psoc *psoc)
821 {
822 	struct wlan_lmac_if_tx_ops *tx_ops;
823 
824 	tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
825 	if (tx_ops->dbr_tx_ops.direct_buf_rx_unregister_events)
826 		return tx_ops->dbr_tx_ops.direct_buf_rx_unregister_events(psoc);
827 
828 	return QDF_STATUS_SUCCESS;
829 }
830 #else
831 static QDF_STATUS dispatcher_dbr_psoc_enable(struct wlan_objmgr_psoc *psoc)
832 {
833 	return QDF_STATUS_SUCCESS;
834 }
835 
836 static QDF_STATUS dispatcher_dbr_psoc_disable(struct wlan_objmgr_psoc *psoc)
837 {
838 	return QDF_STATUS_SUCCESS;
839 }
840 #endif /* DIRECT_BUF_RX_ENABLE */
841 
842 #ifdef WLAN_SUPPORT_GREEN_AP
843 static QDF_STATUS dispatcher_green_ap_init(void)
844 {
845 	return wlan_green_ap_init();
846 }
847 
848 static QDF_STATUS dispatcher_green_ap_deinit(void)
849 {
850 	return wlan_green_ap_deinit();
851 }
852 #else
853 static QDF_STATUS dispatcher_green_ap_init(void)
854 {
855 	return QDF_STATUS_SUCCESS;
856 }
857 
858 static QDF_STATUS dispatcher_green_ap_deinit(void)
859 {
860 	return QDF_STATUS_SUCCESS;
861 }
862 #endif
863 
864 #ifdef WLAN_SUPPORT_FILS
865 static QDF_STATUS dispatcher_fd_init(void)
866 {
867 	return wlan_fd_init();
868 }
869 
870 static QDF_STATUS dispatcher_fd_deinit(void)
871 {
872 	return wlan_fd_deinit();
873 }
874 
875 static QDF_STATUS fd_psoc_enable(struct wlan_objmgr_psoc *psoc)
876 {
877 	return wlan_fd_enable(psoc);
878 }
879 
880 static QDF_STATUS fd_psoc_disable(struct wlan_objmgr_psoc *psoc)
881 {
882 	return wlan_fd_disable(psoc);
883 }
884 #else
885 static QDF_STATUS dispatcher_fd_init(void)
886 {
887 	return QDF_STATUS_SUCCESS;
888 }
889 
890 static QDF_STATUS dispatcher_fd_deinit(void)
891 {
892 	return QDF_STATUS_SUCCESS;
893 }
894 
895 static QDF_STATUS fd_psoc_enable(struct wlan_objmgr_psoc *psoc)
896 {
897 	return QDF_STATUS_SUCCESS;
898 }
899 
900 static QDF_STATUS fd_psoc_disable(struct wlan_objmgr_psoc *psoc)
901 {
902 	return QDF_STATUS_SUCCESS;
903 }
904 #endif /* WLAN_SUPPORT_FILS */
905 
906 QDF_STATUS dispatcher_init(void)
907 {
908 	if (QDF_STATUS_SUCCESS != wlan_objmgr_global_obj_init())
909 		goto out;
910 
911 	if (QDF_STATUS_SUCCESS != wlan_mgmt_txrx_init())
912 		goto mgmt_txrx_init_fail;
913 
914 	if (QDF_STATUS_SUCCESS != ucfg_scan_init())
915 		goto ucfg_scan_init_fail;
916 
917 	if (QDF_STATUS_SUCCESS != p2p_init())
918 		goto p2p_init_fail;
919 
920 	if (QDF_STATUS_SUCCESS != tdls_init())
921 		goto tdls_init_fail;
922 
923 	if (QDF_STATUS_SUCCESS != wlan_serialization_init())
924 		goto serialization_init_fail;
925 
926 	if (QDF_STATUS_SUCCESS != dispatcher_init_crypto())
927 		goto crypto_init_fail;
928 
929 	if (QDF_STATUS_SUCCESS != dispatcher_policy_mgr_init())
930 		goto policy_mgr_init_fail;
931 
932 	if (QDF_STATUS_SUCCESS != dispatcher_init_cp_stats())
933 		goto cp_stats_init_fail;
934 
935 	if (QDF_STATUS_SUCCESS != dispatcher_init_atf())
936 		goto atf_init_fail;
937 
938 	if (QDF_STATUS_SUCCESS != dispatcher_init_sa_api())
939 		goto sa_api_init_fail;
940 
941 	if (QDF_STATUS_SUCCESS != dispatcher_init_wifi_pos())
942 		goto wifi_pos_init_fail;
943 
944 	if (QDF_STATUS_SUCCESS != dispatcher_init_nan())
945 		goto nan_init_fail;
946 
947 	if (QDF_STATUS_SUCCESS != dispatcher_init_dfs())
948 		goto dfs_init_fail;
949 
950 	if (QDF_STATUS_SUCCESS != dispatcher_regulatory_init())
951 		goto regulatory_init_fail;
952 
953 	if (QDF_STATUS_SUCCESS != dispatcher_offchan_txrx_init())
954 		goto offchan_init_fail;
955 
956 	if (QDF_STATUS_SUCCESS != dispatcher_init_son())
957 		goto son_init_fail;
958 
959 	if (QDF_STATUS_SUCCESS != dispatcher_splitmac_init())
960 		goto splitmac_init_fail;
961 
962 	if (QDF_STATUS_SUCCESS != dispatcher_spectral_init())
963 		goto spectral_init_fail;
964 
965 	if (QDF_STATUS_SUCCESS != dispatcher_fd_init())
966 		goto fd_init_fail;
967 
968 	if (QDF_STATUS_SUCCESS != dispatcher_green_ap_init())
969 		goto green_ap_init_fail;
970 
971 	if (QDF_STATUS_SUCCESS != dispatcher_ftm_init())
972 		goto ftm_init_fail;
973 
974 	if (QDF_IS_STATUS_ERROR(cfg_dispatcher_init()))
975 		goto cfg_init_fail;
976 
977 	if (QDF_STATUS_SUCCESS != wlan_vdev_mlme_init())
978 		goto vdev_mlme_init_fail;
979 
980 	/*
981 	 * scheduler INIT has to be the last as each component's
982 	 * initialization has to happen first and then at the end
983 	 * scheduler needs to start accepting the service.
984 	 */
985 	if (QDF_STATUS_SUCCESS != scheduler_init())
986 		goto scheduler_init_fail;
987 
988 	return QDF_STATUS_SUCCESS;
989 
990 scheduler_init_fail:
991 	wlan_vdev_mlme_deinit();
992 vdev_mlme_init_fail:
993 	cfg_dispatcher_deinit();
994 cfg_init_fail:
995 	dispatcher_ftm_deinit();
996 ftm_init_fail:
997 	dispatcher_green_ap_deinit();
998 green_ap_init_fail:
999 	dispatcher_fd_deinit();
1000 fd_init_fail:
1001 	dispatcher_spectral_deinit();
1002 spectral_init_fail:
1003 	dispatcher_splitmac_deinit();
1004 splitmac_init_fail:
1005 	dispatcher_deinit_son();
1006 son_init_fail:
1007 	dispatcher_offchan_txrx_deinit();
1008 offchan_init_fail:
1009 	dispatcher_regulatory_deinit();
1010 regulatory_init_fail:
1011 	dispatcher_deinit_dfs();
1012 dfs_init_fail:
1013 	dispatcher_deinit_nan();
1014 nan_init_fail:
1015 	dispatcher_deinit_wifi_pos();
1016 wifi_pos_init_fail:
1017 	dispatcher_deinit_sa_api();
1018 sa_api_init_fail:
1019 	dispatcher_deinit_atf();
1020 atf_init_fail:
1021 	dispatcher_deinit_cp_stats();
1022 cp_stats_init_fail:
1023 	dispatcher_policy_mgr_deinit();
1024 policy_mgr_init_fail:
1025 	dispatcher_deinit_crypto();
1026 crypto_init_fail:
1027 	wlan_serialization_deinit();
1028 serialization_init_fail:
1029 	tdls_deinit();
1030 tdls_init_fail:
1031 	p2p_deinit();
1032 p2p_init_fail:
1033 	ucfg_scan_deinit();
1034 ucfg_scan_init_fail:
1035 	wlan_mgmt_txrx_deinit();
1036 mgmt_txrx_init_fail:
1037 	wlan_objmgr_global_obj_deinit();
1038 
1039 out:
1040 	return QDF_STATUS_E_FAILURE;
1041 }
1042 qdf_export_symbol(dispatcher_init);
1043 
1044 QDF_STATUS dispatcher_deinit(void)
1045 {
1046 	QDF_STATUS status;
1047 
1048 	QDF_BUG(QDF_STATUS_SUCCESS == scheduler_deinit());
1049 
1050 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_vdev_mlme_deinit());
1051 
1052 	status = cfg_dispatcher_deinit();
1053 	QDF_BUG(QDF_IS_STATUS_SUCCESS(status));
1054 
1055 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_ftm_deinit());
1056 
1057 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_green_ap_deinit());
1058 
1059 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_fd_deinit());
1060 
1061 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_spectral_deinit());
1062 
1063 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_splitmac_deinit());
1064 
1065 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_son());
1066 
1067 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_offchan_txrx_deinit());
1068 
1069 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_regulatory_deinit());
1070 
1071 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_dfs());
1072 
1073 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_nan());
1074 
1075 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_wifi_pos());
1076 
1077 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_sa_api());
1078 
1079 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_atf());
1080 
1081 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_cp_stats());
1082 
1083 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_policy_mgr_deinit());
1084 
1085 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_crypto());
1086 
1087 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_serialization_deinit());
1088 
1089 	QDF_BUG(QDF_STATUS_SUCCESS == tdls_deinit());
1090 
1091 	QDF_BUG(QDF_STATUS_SUCCESS == p2p_deinit());
1092 
1093 	QDF_BUG(QDF_STATUS_SUCCESS == ucfg_scan_deinit());
1094 
1095 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_mgmt_txrx_deinit());
1096 
1097 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_objmgr_global_obj_deinit());
1098 
1099 	return QDF_STATUS_SUCCESS;
1100 }
1101 qdf_export_symbol(dispatcher_deinit);
1102 
1103 QDF_STATUS dispatcher_enable(void)
1104 {
1105 	QDF_STATUS status;
1106 
1107 	status = scheduler_enable();
1108 
1109 	return status;
1110 }
1111 qdf_export_symbol(dispatcher_enable);
1112 
1113 QDF_STATUS dispatcher_disable(void)
1114 {
1115 	QDF_BUG(QDF_IS_STATUS_SUCCESS(scheduler_disable()));
1116 
1117 	return QDF_STATUS_SUCCESS;
1118 }
1119 qdf_export_symbol(dispatcher_disable);
1120 
1121 QDF_STATUS dispatcher_psoc_open(struct wlan_objmgr_psoc *psoc)
1122 {
1123 	if (QDF_STATUS_SUCCESS != wlan_mgmt_txrx_psoc_open(psoc))
1124 		goto out;
1125 
1126 	if (QDF_STATUS_SUCCESS != ucfg_scan_psoc_open(psoc))
1127 		goto scan_psoc_open_fail;
1128 
1129 	if (QDF_STATUS_SUCCESS != p2p_psoc_open(psoc))
1130 		goto p2p_psoc_open_fail;
1131 
1132 	if (QDF_STATUS_SUCCESS != tdls_psoc_open(psoc))
1133 		goto tdls_psoc_open_fail;
1134 
1135 	if (QDF_STATUS_SUCCESS != wlan_serialization_psoc_open(psoc))
1136 		goto serialization_psoc_open_fail;
1137 
1138 	if (QDF_STATUS_SUCCESS != cp_stats_psoc_open(psoc))
1139 		goto cp_stats_psoc_open_fail;
1140 
1141 	if (QDF_STATUS_SUCCESS != atf_psoc_open(psoc))
1142 		goto atf_psoc_open_fail;
1143 
1144 	if (QDF_STATUS_SUCCESS != dispatcher_policy_mgr_psoc_open(psoc))
1145 		goto policy_mgr_psoc_open_fail;
1146 
1147 	if (QDF_STATUS_SUCCESS != dispatcher_regulatory_psoc_open(psoc))
1148 		goto regulatory_psoc_open_fail;
1149 
1150 	if (QDF_STATUS_SUCCESS != son_psoc_open(psoc))
1151 		goto psoc_son_fail;
1152 
1153 	if (QDF_STATUS_SUCCESS != dispatcher_ftm_psoc_open(psoc))
1154 		goto ftm_psoc_open_fail;
1155 
1156 	return QDF_STATUS_SUCCESS;
1157 
1158 ftm_psoc_open_fail:
1159 	son_psoc_close(psoc);
1160 psoc_son_fail:
1161 	regulatory_psoc_close(psoc);
1162 regulatory_psoc_open_fail:
1163 	dispatcher_policy_mgr_psoc_close(psoc);
1164 policy_mgr_psoc_open_fail:
1165 	atf_psoc_close(psoc);
1166 atf_psoc_open_fail:
1167 	cp_stats_psoc_close(psoc);
1168 cp_stats_psoc_open_fail:
1169 	wlan_serialization_psoc_close(psoc);
1170 serialization_psoc_open_fail:
1171 	tdls_psoc_close(psoc);
1172 tdls_psoc_open_fail:
1173 	p2p_psoc_close(psoc);
1174 p2p_psoc_open_fail:
1175 	ucfg_scan_psoc_close(psoc);
1176 scan_psoc_open_fail:
1177 	wlan_mgmt_txrx_psoc_close(psoc);
1178 
1179 out:
1180 	return QDF_STATUS_E_FAILURE;
1181 }
1182 qdf_export_symbol(dispatcher_psoc_open);
1183 
1184 QDF_STATUS dispatcher_psoc_close(struct wlan_objmgr_psoc *psoc)
1185 {
1186 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_ftm_psoc_close(psoc));
1187 
1188 	QDF_BUG(QDF_STATUS_SUCCESS == son_psoc_close(psoc));
1189 
1190 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_regulatory_psoc_close(psoc));
1191 
1192 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_policy_mgr_psoc_close(psoc));
1193 
1194 	QDF_BUG(QDF_STATUS_SUCCESS == atf_psoc_close(psoc));
1195 
1196 	QDF_BUG(QDF_STATUS_SUCCESS == cp_stats_psoc_close(psoc));
1197 
1198 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_serialization_psoc_close(psoc));
1199 
1200 	QDF_BUG(QDF_STATUS_SUCCESS == tdls_psoc_close(psoc));
1201 
1202 	QDF_BUG(QDF_STATUS_SUCCESS == p2p_psoc_close(psoc));
1203 
1204 	QDF_BUG(QDF_STATUS_SUCCESS == ucfg_scan_psoc_close(psoc));
1205 
1206 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_mgmt_txrx_psoc_close(psoc));
1207 
1208 	return QDF_STATUS_SUCCESS;
1209 }
1210 qdf_export_symbol(dispatcher_psoc_close);
1211 
1212 QDF_STATUS dispatcher_psoc_enable(struct wlan_objmgr_psoc *psoc)
1213 {
1214 	if (QDF_STATUS_SUCCESS != ucfg_scan_psoc_enable(psoc))
1215 		goto out;
1216 
1217 	if (QDF_STATUS_SUCCESS != p2p_psoc_enable(psoc))
1218 		goto p2p_psoc_enable_fail;
1219 
1220 	if (QDF_STATUS_SUCCESS != tdls_psoc_enable(psoc))
1221 		goto tdls_psoc_enable_fail;
1222 
1223 	if (QDF_STATUS_SUCCESS != dispatcher_policy_mgr_psoc_enable(psoc))
1224 		goto policy_mgr_psoc_enable_fail;
1225 
1226 	if (QDF_STATUS_SUCCESS != sa_api_psoc_enable(psoc))
1227 		goto sa_api_psoc_enable_fail;
1228 
1229 	if (QDF_STATUS_SUCCESS != cp_stats_psoc_enable(psoc))
1230 		goto cp_stats_psoc_enable_fail;
1231 
1232 	if (QDF_STATUS_SUCCESS != atf_psoc_enable(psoc))
1233 		goto atf_psoc_enable_fail;
1234 
1235 	if (QDF_STATUS_SUCCESS != dispatcher_wifi_pos_enable(psoc))
1236 		goto wifi_pos_psoc_enable_fail;
1237 
1238 	if (QDF_STATUS_SUCCESS != dispatcher_nan_psoc_enable(psoc))
1239 		goto nan_psoc_enable_fail;
1240 
1241 	if (QDF_STATUS_SUCCESS != dispatcher_dfs_psoc_enable(psoc))
1242 		goto wifi_dfs_psoc_enable_fail;
1243 
1244 	if (QDF_STATUS_SUCCESS != fd_psoc_enable(psoc))
1245 		goto fd_psoc_enable_fail;
1246 
1247 	if (QDF_STATUS_SUCCESS != dispatcher_dbr_psoc_enable(psoc))
1248 		goto dbr_psoc_enable_fail;
1249 
1250 	return QDF_STATUS_SUCCESS;
1251 
1252 dbr_psoc_enable_fail:
1253 	fd_psoc_disable(psoc);
1254 fd_psoc_enable_fail:
1255 	dispatcher_dfs_psoc_disable(psoc);
1256 wifi_dfs_psoc_enable_fail:
1257 	dispatcher_nan_psoc_disable(psoc);
1258 nan_psoc_enable_fail:
1259 	dispatcher_wifi_pos_disable(psoc);
1260 wifi_pos_psoc_enable_fail:
1261 	atf_psoc_disable(psoc);
1262 atf_psoc_enable_fail:
1263 	cp_stats_psoc_disable(psoc);
1264 cp_stats_psoc_enable_fail:
1265 	sa_api_psoc_disable(psoc);
1266 sa_api_psoc_enable_fail:
1267 	dispatcher_policy_mgr_psoc_disable(psoc);
1268 policy_mgr_psoc_enable_fail:
1269 	tdls_psoc_disable(psoc);
1270 tdls_psoc_enable_fail:
1271 	p2p_psoc_disable(psoc);
1272 p2p_psoc_enable_fail:
1273 	ucfg_scan_psoc_disable(psoc);
1274 
1275 out:
1276 	return QDF_STATUS_E_FAILURE;
1277 }
1278 qdf_export_symbol(dispatcher_psoc_enable);
1279 
1280 QDF_STATUS dispatcher_psoc_disable(struct wlan_objmgr_psoc *psoc)
1281 {
1282 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_dbr_psoc_disable(psoc));
1283 
1284 	QDF_BUG(QDF_STATUS_SUCCESS == fd_psoc_disable(psoc));
1285 
1286 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_dfs_psoc_disable(psoc));
1287 
1288 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_nan_psoc_disable(psoc));
1289 
1290 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_wifi_pos_disable(psoc));
1291 
1292 	QDF_BUG(QDF_STATUS_SUCCESS == atf_psoc_disable(psoc));
1293 
1294 	QDF_BUG(QDF_STATUS_SUCCESS == cp_stats_psoc_disable(psoc));
1295 
1296 	QDF_BUG(QDF_STATUS_SUCCESS == sa_api_psoc_disable(psoc));
1297 
1298 	QDF_BUG(QDF_STATUS_SUCCESS ==
1299 		dispatcher_policy_mgr_psoc_disable(psoc));
1300 
1301 	QDF_BUG(QDF_STATUS_SUCCESS == tdls_psoc_disable(psoc));
1302 
1303 	QDF_BUG(QDF_STATUS_SUCCESS == p2p_psoc_disable(psoc));
1304 
1305 	QDF_BUG(QDF_STATUS_SUCCESS == ucfg_scan_psoc_disable(psoc));
1306 
1307 	return QDF_STATUS_SUCCESS;
1308 }
1309 qdf_export_symbol(dispatcher_psoc_disable);
1310 
1311 QDF_STATUS dispatcher_pdev_open(struct wlan_objmgr_pdev *pdev)
1312 {
1313 	if (QDF_STATUS_SUCCESS != dispatcher_regulatory_pdev_open(pdev))
1314 		goto out;
1315 
1316 	if (QDF_STATUS_SUCCESS != dispatcher_spectral_pdev_open(pdev))
1317 		goto spectral_pdev_open_fail;
1318 
1319 	if (QDF_STATUS_SUCCESS != wlan_mgmt_txrx_pdev_open(pdev))
1320 		goto out;
1321 
1322 	return QDF_STATUS_SUCCESS;
1323 
1324 spectral_pdev_open_fail:
1325 	dispatcher_regulatory_pdev_close(pdev);
1326 
1327 out:
1328 	return QDF_STATUS_E_FAILURE;
1329 }
1330 qdf_export_symbol(dispatcher_pdev_open);
1331 
1332 QDF_STATUS dispatcher_pdev_close(struct wlan_objmgr_pdev *pdev)
1333 {
1334 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_regulatory_pdev_close(pdev));
1335 
1336 	QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_spectral_pdev_close(pdev));
1337 
1338 	QDF_BUG(QDF_STATUS_SUCCESS == wlan_mgmt_txrx_pdev_close(pdev));
1339 
1340 	return QDF_STATUS_SUCCESS;
1341 }
1342 qdf_export_symbol(dispatcher_pdev_close);
1343