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