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_pdev_open( 849 struct wlan_objmgr_pdev *pdev) 850 { 851 return wlan_green_ap_pdev_open(pdev); 852 } 853 static QDF_STATUS dispatcher_green_ap_deinit(void) 854 { 855 return wlan_green_ap_deinit(); 856 } 857 #else 858 static QDF_STATUS dispatcher_green_ap_init(void) 859 { 860 return QDF_STATUS_SUCCESS; 861 } 862 static QDF_STATUS dispatcher_green_ap_pdev_open( 863 struct wlan_objmgr_pdev *pdev) 864 { 865 return QDF_STATUS_SUCCESS; 866 } 867 868 static QDF_STATUS dispatcher_green_ap_deinit(void) 869 { 870 return QDF_STATUS_SUCCESS; 871 } 872 #endif 873 874 #ifdef WLAN_SUPPORT_FILS 875 static QDF_STATUS dispatcher_fd_init(void) 876 { 877 return wlan_fd_init(); 878 } 879 880 static QDF_STATUS dispatcher_fd_deinit(void) 881 { 882 return wlan_fd_deinit(); 883 } 884 885 static QDF_STATUS fd_psoc_enable(struct wlan_objmgr_psoc *psoc) 886 { 887 return wlan_fd_enable(psoc); 888 } 889 890 static QDF_STATUS fd_psoc_disable(struct wlan_objmgr_psoc *psoc) 891 { 892 return wlan_fd_disable(psoc); 893 } 894 #else 895 static QDF_STATUS dispatcher_fd_init(void) 896 { 897 return QDF_STATUS_SUCCESS; 898 } 899 900 static QDF_STATUS dispatcher_fd_deinit(void) 901 { 902 return QDF_STATUS_SUCCESS; 903 } 904 905 static QDF_STATUS fd_psoc_enable(struct wlan_objmgr_psoc *psoc) 906 { 907 return QDF_STATUS_SUCCESS; 908 } 909 910 static QDF_STATUS fd_psoc_disable(struct wlan_objmgr_psoc *psoc) 911 { 912 return QDF_STATUS_SUCCESS; 913 } 914 #endif /* WLAN_SUPPORT_FILS */ 915 916 QDF_STATUS dispatcher_init(void) 917 { 918 if (QDF_STATUS_SUCCESS != wlan_objmgr_global_obj_init()) 919 goto out; 920 921 if (QDF_STATUS_SUCCESS != wlan_mgmt_txrx_init()) 922 goto mgmt_txrx_init_fail; 923 924 if (QDF_STATUS_SUCCESS != ucfg_scan_init()) 925 goto ucfg_scan_init_fail; 926 927 if (QDF_STATUS_SUCCESS != p2p_init()) 928 goto p2p_init_fail; 929 930 if (QDF_STATUS_SUCCESS != tdls_init()) 931 goto tdls_init_fail; 932 933 if (QDF_STATUS_SUCCESS != wlan_serialization_init()) 934 goto serialization_init_fail; 935 936 if (QDF_STATUS_SUCCESS != dispatcher_init_crypto()) 937 goto crypto_init_fail; 938 939 if (QDF_STATUS_SUCCESS != dispatcher_policy_mgr_init()) 940 goto policy_mgr_init_fail; 941 942 if (QDF_STATUS_SUCCESS != dispatcher_init_cp_stats()) 943 goto cp_stats_init_fail; 944 945 if (QDF_STATUS_SUCCESS != dispatcher_init_atf()) 946 goto atf_init_fail; 947 948 if (QDF_STATUS_SUCCESS != dispatcher_init_sa_api()) 949 goto sa_api_init_fail; 950 951 if (QDF_STATUS_SUCCESS != dispatcher_init_wifi_pos()) 952 goto wifi_pos_init_fail; 953 954 if (QDF_STATUS_SUCCESS != dispatcher_init_nan()) 955 goto nan_init_fail; 956 957 if (QDF_STATUS_SUCCESS != dispatcher_init_dfs()) 958 goto dfs_init_fail; 959 960 if (QDF_STATUS_SUCCESS != dispatcher_regulatory_init()) 961 goto regulatory_init_fail; 962 963 if (QDF_STATUS_SUCCESS != dispatcher_offchan_txrx_init()) 964 goto offchan_init_fail; 965 966 if (QDF_STATUS_SUCCESS != dispatcher_init_son()) 967 goto son_init_fail; 968 969 if (QDF_STATUS_SUCCESS != dispatcher_splitmac_init()) 970 goto splitmac_init_fail; 971 972 if (QDF_STATUS_SUCCESS != dispatcher_spectral_init()) 973 goto spectral_init_fail; 974 975 if (QDF_STATUS_SUCCESS != dispatcher_fd_init()) 976 goto fd_init_fail; 977 978 if (QDF_STATUS_SUCCESS != dispatcher_green_ap_init()) 979 goto green_ap_init_fail; 980 981 if (QDF_STATUS_SUCCESS != dispatcher_ftm_init()) 982 goto ftm_init_fail; 983 984 if (QDF_IS_STATUS_ERROR(cfg_dispatcher_init())) 985 goto cfg_init_fail; 986 987 if (QDF_STATUS_SUCCESS != wlan_vdev_mlme_init()) 988 goto vdev_mlme_init_fail; 989 990 /* 991 * scheduler INIT has to be the last as each component's 992 * initialization has to happen first and then at the end 993 * scheduler needs to start accepting the service. 994 */ 995 if (QDF_STATUS_SUCCESS != scheduler_init()) 996 goto scheduler_init_fail; 997 998 return QDF_STATUS_SUCCESS; 999 1000 scheduler_init_fail: 1001 wlan_vdev_mlme_deinit(); 1002 vdev_mlme_init_fail: 1003 cfg_dispatcher_deinit(); 1004 cfg_init_fail: 1005 dispatcher_ftm_deinit(); 1006 ftm_init_fail: 1007 dispatcher_green_ap_deinit(); 1008 green_ap_init_fail: 1009 dispatcher_fd_deinit(); 1010 fd_init_fail: 1011 dispatcher_spectral_deinit(); 1012 spectral_init_fail: 1013 dispatcher_splitmac_deinit(); 1014 splitmac_init_fail: 1015 dispatcher_deinit_son(); 1016 son_init_fail: 1017 dispatcher_offchan_txrx_deinit(); 1018 offchan_init_fail: 1019 dispatcher_regulatory_deinit(); 1020 regulatory_init_fail: 1021 dispatcher_deinit_dfs(); 1022 dfs_init_fail: 1023 dispatcher_deinit_nan(); 1024 nan_init_fail: 1025 dispatcher_deinit_wifi_pos(); 1026 wifi_pos_init_fail: 1027 dispatcher_deinit_sa_api(); 1028 sa_api_init_fail: 1029 dispatcher_deinit_atf(); 1030 atf_init_fail: 1031 dispatcher_deinit_cp_stats(); 1032 cp_stats_init_fail: 1033 dispatcher_policy_mgr_deinit(); 1034 policy_mgr_init_fail: 1035 dispatcher_deinit_crypto(); 1036 crypto_init_fail: 1037 wlan_serialization_deinit(); 1038 serialization_init_fail: 1039 tdls_deinit(); 1040 tdls_init_fail: 1041 p2p_deinit(); 1042 p2p_init_fail: 1043 ucfg_scan_deinit(); 1044 ucfg_scan_init_fail: 1045 wlan_mgmt_txrx_deinit(); 1046 mgmt_txrx_init_fail: 1047 wlan_objmgr_global_obj_deinit(); 1048 1049 out: 1050 return QDF_STATUS_E_FAILURE; 1051 } 1052 qdf_export_symbol(dispatcher_init); 1053 1054 QDF_STATUS dispatcher_deinit(void) 1055 { 1056 QDF_STATUS status; 1057 1058 QDF_BUG(QDF_STATUS_SUCCESS == scheduler_deinit()); 1059 1060 QDF_BUG(QDF_STATUS_SUCCESS == wlan_vdev_mlme_deinit()); 1061 1062 status = cfg_dispatcher_deinit(); 1063 QDF_BUG(QDF_IS_STATUS_SUCCESS(status)); 1064 1065 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_ftm_deinit()); 1066 1067 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_green_ap_deinit()); 1068 1069 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_fd_deinit()); 1070 1071 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_spectral_deinit()); 1072 1073 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_splitmac_deinit()); 1074 1075 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_son()); 1076 1077 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_offchan_txrx_deinit()); 1078 1079 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_regulatory_deinit()); 1080 1081 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_dfs()); 1082 1083 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_nan()); 1084 1085 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_wifi_pos()); 1086 1087 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_sa_api()); 1088 1089 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_atf()); 1090 1091 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_cp_stats()); 1092 1093 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_policy_mgr_deinit()); 1094 1095 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_deinit_crypto()); 1096 1097 QDF_BUG(QDF_STATUS_SUCCESS == wlan_serialization_deinit()); 1098 1099 QDF_BUG(QDF_STATUS_SUCCESS == tdls_deinit()); 1100 1101 QDF_BUG(QDF_STATUS_SUCCESS == p2p_deinit()); 1102 1103 QDF_BUG(QDF_STATUS_SUCCESS == ucfg_scan_deinit()); 1104 1105 QDF_BUG(QDF_STATUS_SUCCESS == wlan_mgmt_txrx_deinit()); 1106 1107 QDF_BUG(QDF_STATUS_SUCCESS == wlan_objmgr_global_obj_deinit()); 1108 1109 return QDF_STATUS_SUCCESS; 1110 } 1111 qdf_export_symbol(dispatcher_deinit); 1112 1113 QDF_STATUS dispatcher_enable(void) 1114 { 1115 QDF_STATUS status; 1116 1117 status = scheduler_enable(); 1118 1119 return status; 1120 } 1121 qdf_export_symbol(dispatcher_enable); 1122 1123 QDF_STATUS dispatcher_disable(void) 1124 { 1125 QDF_BUG(QDF_IS_STATUS_SUCCESS(scheduler_disable())); 1126 1127 return QDF_STATUS_SUCCESS; 1128 } 1129 qdf_export_symbol(dispatcher_disable); 1130 1131 QDF_STATUS dispatcher_psoc_open(struct wlan_objmgr_psoc *psoc) 1132 { 1133 if (QDF_STATUS_SUCCESS != wlan_mgmt_txrx_psoc_open(psoc)) 1134 goto out; 1135 1136 if (QDF_STATUS_SUCCESS != ucfg_scan_psoc_open(psoc)) 1137 goto scan_psoc_open_fail; 1138 1139 if (QDF_STATUS_SUCCESS != p2p_psoc_open(psoc)) 1140 goto p2p_psoc_open_fail; 1141 1142 if (QDF_STATUS_SUCCESS != tdls_psoc_open(psoc)) 1143 goto tdls_psoc_open_fail; 1144 1145 if (QDF_STATUS_SUCCESS != wlan_serialization_psoc_open(psoc)) 1146 goto serialization_psoc_open_fail; 1147 1148 if (QDF_STATUS_SUCCESS != cp_stats_psoc_open(psoc)) 1149 goto cp_stats_psoc_open_fail; 1150 1151 if (QDF_STATUS_SUCCESS != atf_psoc_open(psoc)) 1152 goto atf_psoc_open_fail; 1153 1154 if (QDF_STATUS_SUCCESS != dispatcher_policy_mgr_psoc_open(psoc)) 1155 goto policy_mgr_psoc_open_fail; 1156 1157 if (QDF_STATUS_SUCCESS != dispatcher_regulatory_psoc_open(psoc)) 1158 goto regulatory_psoc_open_fail; 1159 1160 if (QDF_STATUS_SUCCESS != son_psoc_open(psoc)) 1161 goto psoc_son_fail; 1162 1163 if (QDF_STATUS_SUCCESS != dispatcher_ftm_psoc_open(psoc)) 1164 goto ftm_psoc_open_fail; 1165 1166 return QDF_STATUS_SUCCESS; 1167 1168 ftm_psoc_open_fail: 1169 son_psoc_close(psoc); 1170 psoc_son_fail: 1171 regulatory_psoc_close(psoc); 1172 regulatory_psoc_open_fail: 1173 dispatcher_policy_mgr_psoc_close(psoc); 1174 policy_mgr_psoc_open_fail: 1175 atf_psoc_close(psoc); 1176 atf_psoc_open_fail: 1177 cp_stats_psoc_close(psoc); 1178 cp_stats_psoc_open_fail: 1179 wlan_serialization_psoc_close(psoc); 1180 serialization_psoc_open_fail: 1181 tdls_psoc_close(psoc); 1182 tdls_psoc_open_fail: 1183 p2p_psoc_close(psoc); 1184 p2p_psoc_open_fail: 1185 ucfg_scan_psoc_close(psoc); 1186 scan_psoc_open_fail: 1187 wlan_mgmt_txrx_psoc_close(psoc); 1188 1189 out: 1190 return QDF_STATUS_E_FAILURE; 1191 } 1192 qdf_export_symbol(dispatcher_psoc_open); 1193 1194 QDF_STATUS dispatcher_psoc_close(struct wlan_objmgr_psoc *psoc) 1195 { 1196 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_ftm_psoc_close(psoc)); 1197 1198 QDF_BUG(QDF_STATUS_SUCCESS == son_psoc_close(psoc)); 1199 1200 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_regulatory_psoc_close(psoc)); 1201 1202 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_policy_mgr_psoc_close(psoc)); 1203 1204 QDF_BUG(QDF_STATUS_SUCCESS == atf_psoc_close(psoc)); 1205 1206 QDF_BUG(QDF_STATUS_SUCCESS == cp_stats_psoc_close(psoc)); 1207 1208 QDF_BUG(QDF_STATUS_SUCCESS == wlan_serialization_psoc_close(psoc)); 1209 1210 QDF_BUG(QDF_STATUS_SUCCESS == tdls_psoc_close(psoc)); 1211 1212 QDF_BUG(QDF_STATUS_SUCCESS == p2p_psoc_close(psoc)); 1213 1214 QDF_BUG(QDF_STATUS_SUCCESS == ucfg_scan_psoc_close(psoc)); 1215 1216 QDF_BUG(QDF_STATUS_SUCCESS == wlan_mgmt_txrx_psoc_close(psoc)); 1217 1218 return QDF_STATUS_SUCCESS; 1219 } 1220 qdf_export_symbol(dispatcher_psoc_close); 1221 1222 QDF_STATUS dispatcher_psoc_enable(struct wlan_objmgr_psoc *psoc) 1223 { 1224 if (QDF_STATUS_SUCCESS != ucfg_scan_psoc_enable(psoc)) 1225 goto out; 1226 1227 if (QDF_STATUS_SUCCESS != p2p_psoc_enable(psoc)) 1228 goto p2p_psoc_enable_fail; 1229 1230 if (QDF_STATUS_SUCCESS != tdls_psoc_enable(psoc)) 1231 goto tdls_psoc_enable_fail; 1232 1233 if (QDF_STATUS_SUCCESS != dispatcher_policy_mgr_psoc_enable(psoc)) 1234 goto policy_mgr_psoc_enable_fail; 1235 1236 if (QDF_STATUS_SUCCESS != sa_api_psoc_enable(psoc)) 1237 goto sa_api_psoc_enable_fail; 1238 1239 if (QDF_STATUS_SUCCESS != cp_stats_psoc_enable(psoc)) 1240 goto cp_stats_psoc_enable_fail; 1241 1242 if (QDF_STATUS_SUCCESS != atf_psoc_enable(psoc)) 1243 goto atf_psoc_enable_fail; 1244 1245 if (QDF_STATUS_SUCCESS != dispatcher_wifi_pos_enable(psoc)) 1246 goto wifi_pos_psoc_enable_fail; 1247 1248 if (QDF_STATUS_SUCCESS != dispatcher_nan_psoc_enable(psoc)) 1249 goto nan_psoc_enable_fail; 1250 1251 if (QDF_STATUS_SUCCESS != dispatcher_dfs_psoc_enable(psoc)) 1252 goto wifi_dfs_psoc_enable_fail; 1253 1254 if (QDF_STATUS_SUCCESS != fd_psoc_enable(psoc)) 1255 goto fd_psoc_enable_fail; 1256 1257 if (QDF_STATUS_SUCCESS != dispatcher_dbr_psoc_enable(psoc)) 1258 goto dbr_psoc_enable_fail; 1259 1260 return QDF_STATUS_SUCCESS; 1261 1262 dbr_psoc_enable_fail: 1263 fd_psoc_disable(psoc); 1264 fd_psoc_enable_fail: 1265 dispatcher_dfs_psoc_disable(psoc); 1266 wifi_dfs_psoc_enable_fail: 1267 dispatcher_nan_psoc_disable(psoc); 1268 nan_psoc_enable_fail: 1269 dispatcher_wifi_pos_disable(psoc); 1270 wifi_pos_psoc_enable_fail: 1271 atf_psoc_disable(psoc); 1272 atf_psoc_enable_fail: 1273 cp_stats_psoc_disable(psoc); 1274 cp_stats_psoc_enable_fail: 1275 sa_api_psoc_disable(psoc); 1276 sa_api_psoc_enable_fail: 1277 dispatcher_policy_mgr_psoc_disable(psoc); 1278 policy_mgr_psoc_enable_fail: 1279 tdls_psoc_disable(psoc); 1280 tdls_psoc_enable_fail: 1281 p2p_psoc_disable(psoc); 1282 p2p_psoc_enable_fail: 1283 ucfg_scan_psoc_disable(psoc); 1284 1285 out: 1286 return QDF_STATUS_E_FAILURE; 1287 } 1288 qdf_export_symbol(dispatcher_psoc_enable); 1289 1290 QDF_STATUS dispatcher_psoc_disable(struct wlan_objmgr_psoc *psoc) 1291 { 1292 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_dbr_psoc_disable(psoc)); 1293 1294 QDF_BUG(QDF_STATUS_SUCCESS == fd_psoc_disable(psoc)); 1295 1296 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_dfs_psoc_disable(psoc)); 1297 1298 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_nan_psoc_disable(psoc)); 1299 1300 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_wifi_pos_disable(psoc)); 1301 1302 QDF_BUG(QDF_STATUS_SUCCESS == atf_psoc_disable(psoc)); 1303 1304 QDF_BUG(QDF_STATUS_SUCCESS == cp_stats_psoc_disable(psoc)); 1305 1306 QDF_BUG(QDF_STATUS_SUCCESS == sa_api_psoc_disable(psoc)); 1307 1308 QDF_BUG(QDF_STATUS_SUCCESS == 1309 dispatcher_policy_mgr_psoc_disable(psoc)); 1310 1311 QDF_BUG(QDF_STATUS_SUCCESS == tdls_psoc_disable(psoc)); 1312 1313 QDF_BUG(QDF_STATUS_SUCCESS == p2p_psoc_disable(psoc)); 1314 1315 QDF_BUG(QDF_STATUS_SUCCESS == ucfg_scan_psoc_disable(psoc)); 1316 1317 return QDF_STATUS_SUCCESS; 1318 } 1319 qdf_export_symbol(dispatcher_psoc_disable); 1320 1321 QDF_STATUS dispatcher_pdev_open(struct wlan_objmgr_pdev *pdev) 1322 { 1323 if (QDF_STATUS_SUCCESS != dispatcher_regulatory_pdev_open(pdev)) 1324 goto out; 1325 1326 if (QDF_STATUS_SUCCESS != dispatcher_spectral_pdev_open(pdev)) 1327 goto spectral_pdev_open_fail; 1328 1329 if (QDF_STATUS_SUCCESS != wlan_mgmt_txrx_pdev_open(pdev)) 1330 goto out; 1331 if (QDF_IS_STATUS_ERROR(dispatcher_green_ap_pdev_open(pdev))) 1332 goto out; 1333 1334 return QDF_STATUS_SUCCESS; 1335 1336 spectral_pdev_open_fail: 1337 dispatcher_regulatory_pdev_close(pdev); 1338 1339 out: 1340 return QDF_STATUS_E_FAILURE; 1341 } 1342 qdf_export_symbol(dispatcher_pdev_open); 1343 1344 QDF_STATUS dispatcher_pdev_close(struct wlan_objmgr_pdev *pdev) 1345 { 1346 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_regulatory_pdev_close(pdev)); 1347 1348 QDF_BUG(QDF_STATUS_SUCCESS == dispatcher_spectral_pdev_close(pdev)); 1349 1350 QDF_BUG(QDF_STATUS_SUCCESS == wlan_mgmt_txrx_pdev_close(pdev)); 1351 1352 return QDF_STATUS_SUCCESS; 1353 } 1354 qdf_export_symbol(dispatcher_pdev_close); 1355