| /* |
| * Copyright (c) 2018 The Linux Foundation. All rights reserved. |
| * |
| * Permission to use, copy, modify, and/or distribute this software for |
| * any purpose with or without fee is hereby granted, provided that the |
| * above copyright notice and this permission notice appear in all |
| * copies. |
| * |
| * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL |
| * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED |
| * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE |
| * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL |
| * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR |
| * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
| * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| * PERFORMANCE OF THIS SOFTWARE. |
| */ |
| /** |
| * DOC: define UCFG APIs exposed by the mlme component |
| */ |
| |
| #include "wlan_mlme_main.h" |
| #include "wlan_mlme_api.h" |
| #include "wlan_mlme_ucfg_api.h" |
| #include "wlan_objmgr_pdev_obj.h" |
| #include "wlan_mlme_vdev_mgr_interface.h" |
| |
| QDF_STATUS ucfg_mlme_init(void) |
| { |
| QDF_STATUS status; |
| |
| status = wlan_objmgr_register_psoc_create_handler( |
| WLAN_UMAC_COMP_MLME, |
| mlme_psoc_object_created_notification, |
| NULL); |
| if (status != QDF_STATUS_SUCCESS) { |
| mlme_err("unable to register psoc create handle"); |
| return status; |
| } |
| |
| status = wlan_objmgr_register_psoc_destroy_handler( |
| WLAN_UMAC_COMP_MLME, |
| mlme_psoc_object_destroyed_notification, |
| NULL); |
| if (status != QDF_STATUS_SUCCESS) |
| mlme_err("unable to register psoc create handle"); |
| |
| return status; |
| } |
| |
| QDF_STATUS ucfg_mlme_deinit(void) |
| { |
| QDF_STATUS status; |
| |
| status = wlan_objmgr_unregister_psoc_create_handler( |
| WLAN_UMAC_COMP_MLME, |
| mlme_psoc_object_created_notification, |
| NULL); |
| if (status != QDF_STATUS_SUCCESS) { |
| mlme_err("unable to unregister psoc create handle"); |
| return status; |
| } |
| |
| status = wlan_objmgr_unregister_psoc_destroy_handler( |
| WLAN_UMAC_COMP_MLME, |
| mlme_psoc_object_destroyed_notification, |
| NULL); |
| if (status != QDF_STATUS_SUCCESS) |
| mlme_err("unable to unregister psoc destroy handle"); |
| |
| return status; |
| } |
| |
| QDF_STATUS ucfg_mlme_psoc_open(struct wlan_objmgr_psoc *psoc) |
| { |
| QDF_STATUS status; |
| |
| status = mlme_cfg_on_psoc_enable(psoc); |
| if (!QDF_IS_STATUS_SUCCESS(status)) |
| mlme_err("Failed to initialize MLME CFG"); |
| |
| return status; |
| } |
| |
| void ucfg_mlme_psoc_close(struct wlan_objmgr_psoc *psoc) |
| { |
| /* Clear the MLME CFG Structure */ |
| } |
| |
| #ifdef CONFIG_VDEV_SM |
| QDF_STATUS ucfg_mlme_pdev_open(struct wlan_objmgr_pdev *pdev) |
| { |
| pdev->pdev_mlme.mlme_register_ops = mlme_register_vdev_mgr_ops; |
| |
| return QDF_STATUS_SUCCESS; |
| } |
| |
| QDF_STATUS ucfg_mlme_pdev_close(struct wlan_objmgr_pdev *pdev) |
| { |
| return QDF_STATUS_SUCCESS; |
| } |
| #endif |