qcacmn: Initialize the interface module

Initialize the interface module.

Change-Id: Ia62d17c7f92f001f00ee5cff7cf0a6d1dc4f08ce
CRs-Fixed: 2776686
This commit is contained in:
Sandeep Puligilla
2020-09-14 17:06:55 -07:00
committed by snandini
parent 6f01abdb21
commit d57e7836dc
3 changed files with 95 additions and 0 deletions

View File

@@ -74,6 +74,20 @@ struct wlan_if_mgr_obj {
};
/*
* wlan_if_mgr_init() - Interface manager module initialization API
*
* Return: QDF_STATUS
*/
QDF_STATUS wlan_if_mgr_init(void);
/**
* wlan_if_mgr_deinit() - interface manager module deinitialization API
*
* Return: QDF_STATUS
*/
QDF_STATUS wlan_if_mgr_deinit(void);
/**
* wlan_if_mgr_psoc_created_notification() - interface mgr psoc create handler
* @psoc: psoc object

View File

@@ -19,6 +19,54 @@
*/
#include "wlan_if_mgr_main.h"
QDF_STATUS wlan_if_mgr_init(void)
{
QDF_STATUS status;
status = wlan_objmgr_register_psoc_create_handler(WLAN_UMAC_COMP_IF_MGR,
wlan_if_mgr_psoc_created_notification, NULL);
if (QDF_IS_STATUS_ERROR(status)) {
ifmgr_err("Failed to register psoc create handler");
goto fail_create_psoc;
}
status = wlan_objmgr_register_psoc_destroy_handler(
WLAN_UMAC_COMP_IF_MGR,
wlan_if_mgr_psoc_destroyed_notification, NULL);
if (QDF_IS_STATUS_ERROR(status)) {
ifmgr_err("Failed to create psoc delete handler");
goto fail_psoc_destroy;
}
ifmgr_debug("interface mgr psoc create and delete handler registered with objmgr");
fail_psoc_destroy:
wlan_objmgr_unregister_psoc_create_handler(WLAN_UMAC_COMP_IF_MGR,
wlan_if_mgr_psoc_created_notification, NULL);
fail_create_psoc:
return status;
}
QDF_STATUS wlan_if_mgr_deinit(void)
{
QDF_STATUS status;
status = wlan_objmgr_unregister_psoc_create_handler(
WLAN_UMAC_COMP_IF_MGR,
wlan_if_mgr_psoc_created_notification, NULL);
if (QDF_IS_STATUS_ERROR(status))
ifmgr_err("Failed to deregister psoc create handler");
status = wlan_objmgr_unregister_psoc_destroy_handler(
WLAN_UMAC_COMP_IF_MGR,
wlan_if_mgr_psoc_destroyed_notification, NULL);
if (QDF_IS_STATUS_ERROR(status))
ifmgr_err("Failed to deregister psoc delete handler");
ifmgr_debug("interface mgr psoc create and delete handler deregistered with objmgr");
return status;
}
QDF_STATUS wlan_if_mgr_psoc_created_notification(struct wlan_objmgr_psoc *psoc,
void *arg_list)
{