1 /* 2 * Copyright (c) 2021, The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 */ 17 18 /* 19 * DOC: contains MLO manager containing init/deinit public api's 20 */ 21 #ifndef _WLAN_MLO_MGR_MAIN_H_ 22 #define _WLAN_MLO_MGR_MAIN_H_ 23 24 #include <qdf_atomic.h> 25 #include <wlan_objmgr_psoc_obj.h> 26 #include <wlan_objmgr_pdev_obj.h> 27 #include <wlan_objmgr_vdev_obj.h> 28 29 #ifdef WLAN_FEATURE_11BE_MLO 30 #include <wlan_mlo_mgr_public_structs.h> 31 32 /** 33 * wlan_mlo_mgr_init() - Initialize the MLO data structures 34 * 35 * Return: QDF_STATUS 36 */ 37 QDF_STATUS wlan_mlo_mgr_init(void); 38 39 /** 40 * wlan_mlo_mgr_deinit() - De-init the MLO data structures 41 * 42 * Return: QDF_STATUS 43 */ 44 QDF_STATUS wlan_mlo_mgr_deinit(void); 45 46 /** 47 * wlan_mlo_mgr_vdev_created_notification() - mlo mgr vdev create handler 48 * @vdev: vdev object 49 * @arg_list: Argument list 50 * 51 * This function is called as part of vdev creation. This will initialize 52 * the MLO dev context if the interface type is ML. 53 * 54 * Return: QDF_STATUS 55 */ 56 QDF_STATUS wlan_mlo_mgr_vdev_created_notification(struct wlan_objmgr_vdev *vdev, 57 void *arg_list); 58 59 /** 60 * wlan_mlo_mgr_vdev_destroyed_notification() - mlo mgr vdev delete handler 61 * @vdev: vdev object 62 * @arg_list: Argument list 63 * 64 * This function is called as part of vdev delete. This will de-initialize 65 * the MLO dev context if the interface type is ML. 66 * 67 * Return: QDF_STATUS 68 */ 69 QDF_STATUS wlan_mlo_mgr_vdev_destroyed_notification(struct wlan_objmgr_vdev *vdev, 70 void *arg_list); 71 72 #ifdef WLAN_MLO_USE_SPINLOCK 73 /** 74 * ml_link_lock_create - Create MLO link mutex/spinlock 75 * @mlo_ctx: MLO manager global context 76 * 77 * Creates mutex/spinlock 78 * 79 * Return: void 80 */ 81 static inline 82 void ml_link_lock_create(struct mlo_mgr_context *mlo_ctx) 83 { 84 qdf_spinlock_create(&mlo_ctx->ml_dev_list_lock); 85 } 86 87 /** 88 * ml_link_lock_destroy - Destroy ml link mutex/spinlock 89 * @mlo_ctx: MLO manager global context 90 * 91 * Destroy mutex/spinlock 92 * 93 * Return: void 94 */ 95 static inline void 96 ml_link_lock_destroy(struct mlo_mgr_context *mlo_ctx) 97 { 98 qdf_spinlock_destroy(&mlo_ctx->ml_dev_list_lock); 99 } 100 101 /** 102 * ml_link_lock_acquire - acquire ml link mutex/spinlock 103 * @mlo_ctx: MLO manager global context 104 * 105 * acquire mutex/spinlock 106 * 107 * return: void 108 */ 109 static inline 110 void ml_link_lock_acquire(struct mlo_mgr_context *mlo_ctx) 111 { 112 qdf_spin_lock_bh(&mlo_ctx->ml_dev_list_lock); 113 } 114 115 /** 116 * ml_link_lock_release - release MLO dev mutex/spinlock 117 * @mlo_ctx: MLO manager global context 118 * 119 * release mutex/spinlock 120 * 121 * return: void 122 */ 123 static inline 124 void ml_link_lock_release(struct mlo_mgr_context *mlo_ctx) 125 { 126 qdf_spin_unlock_bh(&mlo_ctx->ml_dev_list_lock); 127 } 128 129 /** 130 * mlo_dev_lock_create - Create MLO device mutex/spinlock 131 * @mldev: ML device context 132 * 133 * Creates mutex/spinlock 134 * 135 * Return: void 136 */ 137 static inline void 138 mlo_dev_lock_create(struct wlan_mlo_dev_context *mldev) 139 { 140 qdf_spinlock_create(&mldev->mlo_dev_lock); 141 } 142 143 /** 144 * mlo_dev_lock_destroy - Destroy CM SM mutex/spinlock 145 * @mldev: ML device context 146 * 147 * Destroy mutex/spinlock 148 * 149 * Return: void 150 */ 151 static inline void 152 mlo_dev_lock_destroy(struct wlan_mlo_dev_context *mldev) 153 { 154 qdf_spinlock_destroy(&mldev->mlo_dev_lock); 155 } 156 157 /** 158 * mlo_dev_lock_acquire - acquire CM SM mutex/spinlock 159 * @mldev: ML device context 160 * 161 * acquire mutex/spinlock 162 * 163 * return: void 164 */ 165 static inline 166 void mlo_dev_lock_acquire(struct wlan_mlo_dev_context *mldev) 167 { 168 qdf_spin_lock_bh(&mldev->mlo_dev_lock); 169 } 170 171 /** 172 * mlo_dev_lock_release - release MLO dev mutex/spinlock 173 * @mldev: ML device context 174 * 175 * release mutex/spinlock 176 * 177 * return: void 178 */ 179 static inline 180 void mlo_dev_lock_release(struct wlan_mlo_dev_context *mldev) 181 { 182 qdf_spin_unlock_bh(&mldev->mlo_dev_lock); 183 } 184 185 /** 186 * ml_aid_lock_create - Create MLO aid mutex/spinlock 187 * @mlo_ctx: MLO manager global context 188 * 189 * Creates mutex/spinlock 190 * 191 * Return: void 192 */ 193 static inline 194 void ml_aid_lock_create(struct mlo_mgr_context *mlo_ctx) 195 { 196 qdf_spinlock_create(&mlo_ctx->aid_lock); 197 } 198 199 /** 200 * ml_aid_lock_destroy - Destroy ml aid mutex/spinlock 201 * @mlo_ctx: MLO manager global context 202 * 203 * Destroy mutex/spinlock 204 * 205 * Return: void 206 */ 207 static inline void 208 ml_aid_lock_destroy(struct mlo_mgr_context *mlo_ctx) 209 { 210 qdf_spinlock_destroy(&mlo_ctx->aid_lock); 211 } 212 213 /** 214 * ml_aid_lock_acquire - acquire ml aid mutex/spinlock 215 * @mlo_ctx: MLO manager global context 216 * 217 * acquire mutex/spinlock 218 * 219 * return: void 220 */ 221 static inline 222 void ml_aid_lock_acquire(struct mlo_mgr_context *mlo_ctx) 223 { 224 qdf_spin_lock_bh(&mlo_ctx->aid_lock); 225 } 226 227 /** 228 * ml_aid_lock_release - release MLO aid mutex/spinlock 229 * @mlo_ctx: MLO manager global context 230 * 231 * release mutex/spinlock 232 * 233 * return: void 234 */ 235 static inline 236 void ml_aid_lock_release(struct mlo_mgr_context *mlo_ctx) 237 { 238 qdf_spin_unlock_bh(&mlo_ctx->aid_lock); 239 } 240 241 /** 242 * ml_peerid_lock_create - Create MLO peer mutex/spinlock 243 * @mlo_ctx: MLO manager global context 244 * 245 * Creates mutex/spinlock 246 * 247 * Return: void 248 */ 249 static inline 250 void ml_peerid_lock_create(struct mlo_mgr_context *mlo_ctx) 251 { 252 qdf_spinlock_create(&mlo_ctx->ml_peerid_lock); 253 } 254 255 /** 256 * ml_peerid_lock_destroy - Destroy ml peerid mutex/spinlock 257 * @mlo_ctx: MLO manager global context 258 * 259 * Destroy mutex/spinlock 260 * 261 * Return: void 262 */ 263 static inline void 264 ml_peerid_lock_destroy(struct mlo_mgr_context *mlo_ctx) 265 { 266 qdf_spinlock_destroy(&mlo_ctx->ml_peerid_lock); 267 } 268 269 /** 270 * ml_peerid_lock_acquire - acquire ml peerid mutex/spinlock 271 * @mlo_ctx: MLO manager global context 272 * 273 * acquire mutex/spinlock 274 * 275 * return: void 276 */ 277 static inline 278 void ml_peerid_lock_acquire(struct mlo_mgr_context *mlo_ctx) 279 { 280 qdf_spin_lock_bh(&mlo_ctx->ml_peerid_lock); 281 } 282 283 /** 284 * ml_peerid_lock_release - release MLO peerid mutex/spinlock 285 * @mlo_ctx: MLO manager global context 286 * 287 * release mutex/spinlock 288 * 289 * return: void 290 */ 291 static inline 292 void ml_peerid_lock_release(struct mlo_mgr_context *mlo_ctx) 293 { 294 qdf_spin_unlock_bh(&mlo_ctx->ml_peerid_lock); 295 } 296 297 /** 298 * mlo_peer_lock_create - Create MLO peer mutex/spinlock 299 * @mlpeer: ML peer 300 * 301 * Creates mutex/spinlock 302 * 303 * Return: void 304 */ 305 static inline void 306 mlo_peer_lock_create(struct wlan_mlo_peer_context *mlpeer) 307 { 308 qdf_spinlock_create(&mlpeer->mlo_peer_lock); 309 } 310 311 /** 312 * mlo_peer_lock_destroy - Destroy MLO peer mutex/spinlock 313 * @mlpeer: ML peer 314 * 315 * Destroy mutex/spinlock 316 * 317 * Return: void 318 */ 319 static inline void 320 mlo_peer_lock_destroy(struct wlan_mlo_peer_context *mlpeer) 321 { 322 qdf_spinlock_destroy(&mlpeer->mlo_peer_lock); 323 } 324 325 /** 326 * mlo_peer_lock_acquire - acquire mlo peer mutex/spinlock 327 * @mlpeer: MLO peer context 328 * 329 * acquire mutex/spinlock 330 * 331 * return: void 332 */ 333 static inline 334 void mlo_peer_lock_acquire(struct wlan_mlo_peer_context *mlpeer) 335 { 336 qdf_spin_lock_bh(&mlpeer->mlo_peer_lock); 337 } 338 339 /** 340 * mlo_peer_lock_release - release MLO peer mutex/spinlock 341 * @mlpeer: MLO peer context 342 * 343 * release mutex/spinlock 344 * 345 * return: void 346 */ 347 static inline 348 void mlo_peer_lock_release(struct wlan_mlo_peer_context *mlpeer) 349 { 350 qdf_spin_unlock_bh(&mlpeer->mlo_peer_lock); 351 } 352 353 /** 354 * ml_peerlist_lock_create - Create MLO peer list mutex/spinlock 355 * @ml_peerlist: ML peer list context 356 * 357 * Creates mutex/spinlock 358 * 359 * Return: void 360 */ 361 static inline void 362 ml_peerlist_lock_create(struct wlan_mlo_peer_list *ml_peerlist) 363 { 364 qdf_spinlock_create(&ml_peerlist->peer_list_lock); 365 } 366 367 /** 368 * ml_peerlist_lock_destroy - Destroy MLO peer list mutex/spinlock 369 * @ml_peerlist: ML peer list context 370 * 371 * Destroy mutex/spinlock 372 * 373 * Return: void 374 */ 375 static inline void 376 ml_peerlist_lock_destroy(struct wlan_mlo_peer_list *ml_peerlist) 377 { 378 qdf_spinlock_destroy(&ml_peerlist->peer_list_lock); 379 } 380 381 /** 382 * ml_peerlist_lock_acquire - acquire ML peer list mutex/spinlock 383 * @ml_peerlist: ML peer list context 384 * 385 * acquire mutex/spinlock 386 * 387 * return: void 388 */ 389 static inline 390 void ml_peerlist_lock_acquire(struct wlan_mlo_peer_list *ml_peerlist) 391 { 392 qdf_spin_lock_bh(&ml_peerlist->peer_list_lock); 393 } 394 395 /** 396 * ml_peerlist_lock_release - release ML peer list mutex/spinlock 397 * @ml_peerlist: ML peer list context 398 * 399 * release mutex/spinlock 400 * 401 * return: void 402 */ 403 static inline 404 void ml_peerlist_lock_release(struct wlan_mlo_peer_list *ml_peerlist) 405 { 406 qdf_spin_unlock_bh(&ml_peerlist->peer_list_lock); 407 } 408 409 /** 410 * copied_conn_req_lock_create - Create original connect req mutex/spinlock 411 * @sta_ctx: MLO STA related information 412 * 413 * Create mutex/spinlock 414 * 415 * return: void 416 */ 417 static inline 418 void copied_conn_req_lock_create(struct wlan_mlo_sta *sta_ctx) 419 { 420 qdf_spinlock_create(&sta_ctx->copied_conn_req_lock); 421 } 422 423 /** 424 * copied_conn_req_lock_destroy - Destroy original connect req mutex/spinlock 425 * @sta_ctx: MLO STA related information 426 * 427 * Destroy mutex/spinlock 428 * 429 * return: void 430 */ 431 static inline 432 void copied_conn_req_lock_destroy(struct wlan_mlo_sta *sta_ctx) 433 { 434 qdf_spinlock_destroy(&sta_ctx->copied_conn_req_lock); 435 } 436 437 /** 438 * copied_conn_req_lock_acquire - Acquire original connect req mutex/spinlock 439 * @sta_ctx: MLO STA related information 440 * 441 * Acquire mutex/spinlock 442 * 443 * return: void 444 */ 445 static inline 446 void copied_conn_req_lock_acquire(struct wlan_mlo_sta *sta_ctx) 447 { 448 qdf_spin_lock_bh(&sta_ctx->copied_conn_req_lock); 449 } 450 451 /** 452 * copied_conn_req_lock_release - Release original connect req mutex/spinlock 453 * @sta_ctx: MLO STA related information 454 * 455 * Release mutex/spinlock 456 * 457 * return: void 458 */ 459 static inline 460 void copied_conn_req_lock_release(struct wlan_mlo_sta *sta_ctx) 461 { 462 qdf_spin_unlock_bh(&sta_ctx->copied_conn_req_lock); 463 } 464 465 /** 466 * tsf_recalculation_lock_create - Create TSF recalculation mutex/spinlock 467 * @mldev: ML device context 468 * 469 * Creates mutex/spinlock 470 * 471 * Return: void 472 */ 473 static inline void 474 tsf_recalculation_lock_create(struct wlan_mlo_dev_context *mldev) 475 { 476 qdf_spinlock_create(&mldev->tsf_recalculation_lock); 477 } 478 479 /** 480 * tsf_recalculation_lock_destroy - Destroy TSF recalculation mutex/spinlock 481 * @mldev: ML device context 482 * 483 * Destroy mutex/spinlock 484 * 485 * Return: void 486 */ 487 static inline void 488 tsf_recalculation_lock_destroy(struct wlan_mlo_dev_context *mldev) 489 { 490 qdf_spinlock_destroy(&mldev->tsf_recalculation_lock); 491 } 492 493 /** 494 * tsf_recalculation_lock_acquire - Acquire TSF recalculation mutex/spinlock 495 * @mldev: ML device context 496 * 497 * Acquire mutex/spinlock 498 * 499 * return: void 500 */ 501 static inline 502 void tsf_recalculation_lock_acquire(struct wlan_mlo_dev_context *mldev) 503 { 504 qdf_spin_lock_bh(&mldev->tsf_recalculation_lock); 505 } 506 507 /** 508 * tsf_recalculation_lock_release - Release TSF recalculation mutex/spinlock 509 * @mldev: ML device context 510 * 511 * release mutex/spinlock 512 * 513 * return: void 514 */ 515 static inline 516 void tsf_recalculation_lock_release(struct wlan_mlo_dev_context *mldev) 517 { 518 qdf_spin_unlock_bh(&mldev->tsf_recalculation_lock); 519 } 520 #else /* WLAN_MLO_USE_SPINLOCK */ 521 static inline 522 void ml_link_lock_create(struct mlo_mgr_context *mlo_ctx) 523 { 524 qdf_mutex_create(&mlo_ctx->ml_dev_list_lock); 525 } 526 527 static inline void 528 ml_link_lock_destroy(struct mlo_mgr_context *mlo_ctx) 529 { 530 qdf_mutex_destroy(&mlo_ctx->ml_dev_list_lock); 531 } 532 533 static inline 534 void ml_link_lock_acquire(struct mlo_mgr_context *mlo_ctx) 535 { 536 qdf_mutex_acquire(&mlo_ctx->ml_dev_list_lock); 537 } 538 539 static inline 540 void ml_link_lock_release(struct mlo_mgr_context *mlo_ctx) 541 { 542 qdf_mutex_release(&mlo_ctx->ml_dev_list_lock); 543 } 544 545 static inline 546 void mlo_dev_lock_create(struct wlan_mlo_dev_context *mldev) 547 { 548 qdf_mutex_create(&mldev->mlo_dev_lock); 549 } 550 551 static inline 552 void mlo_dev_lock_destroy(struct wlan_mlo_dev_context *mldev) 553 { 554 qdf_mutex_destroy(&mldev->mlo_dev_lock); 555 } 556 557 static inline void mlo_dev_lock_acquire(struct wlan_mlo_dev_context *mldev) 558 { 559 qdf_mutex_acquire(&mldev->mlo_dev_lock); 560 } 561 562 static inline void mlo_dev_lock_release(struct wlan_mlo_dev_context *mldev) 563 { 564 qdf_mutex_release(&mldev->mlo_dev_lock); 565 } 566 567 static inline 568 void ml_aid_lock_create(struct mlo_mgr_context *mlo_ctx) 569 { 570 qdf_mutex_create(&mlo_ctx->aid_lock); 571 } 572 573 static inline void 574 ml_aid_lock_destroy(struct mlo_mgr_context *mlo_ctx) 575 { 576 qdf_mutex_destroy(&mlo_ctx->aid_lock); 577 } 578 579 static inline 580 void ml_aid_lock_acquire(struct mlo_mgr_context *mlo_ctx) 581 { 582 qdf_mutex_acquire(&mlo_ctx->aid_lock); 583 } 584 585 static inline 586 void ml_aid_lock_release(struct mlo_mgr_context *mlo_ctx) 587 { 588 qdf_mutex_release(&mlo_ctx->aid_lock); 589 } 590 591 static inline 592 void ml_peerid_lock_create(struct mlo_mgr_context *mlo_ctx) 593 { 594 qdf_mutex_create(&mlo_ctx->ml_peerid_lock); 595 } 596 597 static inline void 598 ml_peerid_lock_destroy(struct mlo_mgr_context *mlo_ctx) 599 { 600 qdf_mutex_destroy(&mlo_ctx->ml_peerid_lock); 601 } 602 603 static inline 604 void ml_peerid_lock_acquire(struct mlo_mgr_context *mlo_ctx) 605 { 606 qdf_mutex_acquire(&mlo_ctx->ml_peerid_lock); 607 } 608 609 static inline 610 void ml_peerid_lock_release(struct mlo_mgr_context *mlo_ctx) 611 { 612 qdf_mutex_release(&mlo_ctx->ml_peerid_lock); 613 } 614 615 static inline void 616 mlo_peer_lock_create(struct wlan_mlo_peer_context *mlpeer) 617 { 618 qdf_mutex_create(&mlpeer->mlo_peer_lock); 619 } 620 621 static inline void 622 mlo_peer_lock_destroy(struct wlan_mlo_peer_context *mlpeer) 623 { 624 qdf_mutex_destroy(&mlpeer->mlo_peer_lock); 625 } 626 627 static inline 628 void mlo_peer_lock_acquire(struct wlan_mlo_peer_context *mlpeer) 629 { 630 qdf_mutex_acquire(&mlpeer->mlo_peer_lock); 631 } 632 633 static inline 634 void mlo_peer_lock_release(struct wlan_mlo_peer_context *mlpeer) 635 { 636 qdf_mutex_release(&mlpeer->mlo_peer_lock); 637 } 638 639 static inline void 640 ml_peerlist_lock_create(struct wlan_mlo_peer_list *ml_peerlist) 641 { 642 qdf_mutex_create(&ml_peerlist->peer_list_lock); 643 } 644 645 static inline void 646 ml_peerlist_lock_destroy(struct wlan_mlo_peer_list *ml_peerlist) 647 { 648 qdf_mutex_destroy(&ml_peerlist->peer_list_lock); 649 } 650 651 static inline 652 void ml_peerlist_lock_acquire(struct wlan_mlo_peer_list *ml_peerlist) 653 { 654 qdf_mutex_acquire(&ml_peerlist->peer_list_lock); 655 } 656 657 static inline 658 void ml_peerlist_lock_release(struct wlan_mlo_peer_list *ml_peerlist) 659 { 660 qdf_mutex_release(&ml_peerlist->peer_list_lock); 661 } 662 663 static inline 664 void copied_conn_req_lock_create(struct wlan_mlo_sta *sta_ctx) 665 { 666 qdf_mutex_create(&sta_ctx->copied_conn_req_lock); 667 } 668 669 static inline 670 void copied_conn_req_lock_destroy(struct wlan_mlo_sta *sta_ctx) 671 { 672 qdf_mutex_destroy(&sta_ctx->copied_conn_req_lock); 673 } 674 675 static inline 676 void copied_conn_req_lock_acquire(struct wlan_mlo_sta *sta_ctx) 677 { 678 qdf_mutex_acquire(&sta_ctx->copied_conn_req_lock); 679 } 680 681 static inline 682 void copied_conn_req_lock_release(struct wlan_mlo_sta *sta_ctx) 683 { 684 qdf_mutex_release(&sta_ctx->copied_conn_req_lock); 685 } 686 687 /** 688 * tsf_recalculation_lock_create - Create TSF recalculation mutex/spinlock 689 * @mldev: ML device context 690 * 691 * Creates mutex/spinlock 692 * 693 * Return: void 694 */ 695 static inline void 696 tsf_recalculation_lock_create(struct wlan_mlo_dev_context *mldev) 697 { 698 qdf_mutex_create(&mldev->tsf_recalculation_lock); 699 } 700 701 /** 702 * tsf_recalculation_lock_destroy - Destroy TSF recalculation mutex/spinlock 703 * @mldev: ML device context 704 * 705 * Destroy mutex/spinlock 706 * 707 * Return: void 708 */ 709 static inline void 710 tsf_recalculation_lock_destroy(struct wlan_mlo_dev_context *mldev) 711 { 712 qdf_mutex_destroy(&mldev->tsf_recalculation_lock); 713 } 714 715 /** 716 * tsf_recalculation_lock_acquire - Acquire TSF recalculation mutex/spinlock 717 * @mldev: ML device context 718 * 719 * Acquire mutex/spinlock 720 * 721 * return: void 722 */ 723 static inline 724 void tsf_recalculation_lock_acquire(struct wlan_mlo_dev_context *mldev) 725 { 726 qdf_mutex_acquire(&mldev->tsf_recalculation_lock); 727 } 728 729 /** 730 * tsf_recalculation_lock_release - Release TSF recalculation mutex/spinlock 731 * @mldev: ML device context 732 * 733 * release mutex/spinlock 734 * 735 * return: void 736 */ 737 static inline 738 void tsf_recalculation_lock_release(struct wlan_mlo_dev_context *mldev) 739 { 740 qdf_mutex_release(&mldev->tsf_recalculation_lock); 741 } 742 #endif /* WLAN_MLO_USE_SPINLOCK */ 743 744 /** 745 * wlan_mlo_mgr_psoc_enable() - MLO psoc enable handler 746 * @psoc: psoc pointer 747 * 748 * API to execute operations on psoc enable 749 * 750 * Return: QDF_STATUS 751 */ 752 QDF_STATUS wlan_mlo_mgr_psoc_enable(struct wlan_objmgr_psoc *psoc); 753 754 /** 755 * wlan_mlo_mgr_psoc_disable() - MLO psoc disable handler 756 * @psoc: psoc pointer 757 * 758 * API to execute operations on psoc disable 759 * 760 * Return: QDF_STATUS 761 */ 762 QDF_STATUS wlan_mlo_mgr_psoc_disable(struct wlan_objmgr_psoc *psoc); 763 764 /** 765 * wlan_mlo_mgr_update_mld_addr() - Update MLD MAC address 766 * @old_mac: Old MLD MAC address 767 * @new_mac: New MLD MAC address 768 * 769 * API to update MLD MAC address once ML dev context is created. 770 * 771 * Return: QDF_STATUS 772 */ 773 QDF_STATUS wlan_mlo_mgr_update_mld_addr(struct qdf_mac_addr *old_mac, 774 struct qdf_mac_addr *new_mac); 775 776 /** 777 * wlan_mlo_is_mld_ctx_exist() - check whether MLD exist with MLD MAC address 778 * @mldaddr: MLD MAC address 779 * 780 * API to check whether MLD is present with MLD MAC address. 781 * 782 * Return: true, if it is present 783 * false, if it is not present 784 */ 785 bool wlan_mlo_is_mld_ctx_exist(struct qdf_mac_addr *mldaddr); 786 787 /** 788 * wlan_mlo_get_mld_ctx_by_mldaddr() - Get mld device context using mld 789 * MAC address 790 * 791 * @mldaddr: MAC address of the MLD device 792 * 793 * API to get mld device context using the mld mac address 794 * 795 * Return: Pointer to mlo device context 796 */ 797 struct wlan_mlo_dev_context 798 *wlan_mlo_get_mld_ctx_by_mldaddr(struct qdf_mac_addr *mldaddr); 799 800 /** 801 * wlan_mlo_check_valid_config() - Check vap config is valid for mld 802 * 803 * @ml_dev: Pointer to structure of mlo device context 804 * @pdev: Reference pdev to check against MLD list 805 * @opmode: Operating mode of vdev (SAP/STA etc..) 806 * 807 * API to check if vaps config is valid 808 * 809 * Return: QDF_STATUS 810 */ 811 QDF_STATUS wlan_mlo_check_valid_config(struct wlan_mlo_dev_context *ml_dev, 812 struct wlan_objmgr_pdev *pdev, 813 enum QDF_OPMODE opmode); 814 815 #else 816 static inline QDF_STATUS wlan_mlo_mgr_init(void) 817 { 818 return QDF_STATUS_SUCCESS; 819 } 820 821 static inline QDF_STATUS wlan_mlo_mgr_deinit(void) 822 { 823 return QDF_STATUS_SUCCESS; 824 } 825 826 static inline QDF_STATUS 827 wlan_mlo_mgr_update_mld_addr(struct qdf_mac_addr *old_mac, 828 struct qdf_mac_addr *new_mac) 829 { 830 return QDF_STATUS_SUCCESS; 831 } 832 #endif 833 #endif 834