diff --git a/init_deinit/dispatcher/inc/dispatcher_init_deinit.h b/init_deinit/dispatcher/inc/dispatcher_init_deinit.h index 97bbab7158a1..6575ad61d730 100644 --- a/init_deinit/dispatcher/inc/dispatcher_init_deinit.h +++ b/init_deinit/dispatcher/inc/dispatcher_init_deinit.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2017 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 @@ -25,6 +25,9 @@ #define __DISPATCHER_INIT_H #include +#include +#include +#include /** * dispatcher_init(): API to init all new components @@ -60,6 +63,7 @@ QDF_STATUS dispatcher_deinit(void); /** * dispatcher_psoc_open(): API to trigger PSOC open for all new components + * @psoc: psoc context * * This API calls all new components PSOC OPEN APIs. This is invoked from * HDD/OS_If layer during: @@ -73,10 +77,11 @@ QDF_STATUS dispatcher_deinit(void); * * Return: none */ -QDF_STATUS dispatcher_psoc_open(void); +QDF_STATUS dispatcher_psoc_open(struct wlan_objmgr_psoc *psoc); /** * dispatcher_psoc_close(): API to trigger PSOC close for all new components + * @psoc: psoc context * * This API calls all new components PSOC CLOSE APIs. This is invoked from * HDD/OS_If layer during: @@ -89,11 +94,12 @@ QDF_STATUS dispatcher_psoc_open(void); * * Return: none */ -QDF_STATUS dispatcher_psoc_close(void); +QDF_STATUS dispatcher_psoc_close(struct wlan_objmgr_psoc *psoc); /** * dispatcher_psoc_enable(): API to trigger PSOC enable(start) for all new - * components + * components + * @psoc: psoc context * * This API calls all new components PSOC enable(start) APIs. This is invoked * from HDD/OS_If layer during: @@ -107,11 +113,12 @@ QDF_STATUS dispatcher_psoc_close(void); * * Return: none */ -QDF_STATUS dispatcher_psoc_enable(void); +QDF_STATUS dispatcher_psoc_enable(struct wlan_objmgr_psoc *psoc); /** * dispatcher_psoc_disable(): API to trigger PSOC disable(stop) for all new - * components + * components + * @psoc: psoc context * * This API calls all new components PSOC disable(stop) APIs. This is invoked * from HDD/OS_If layer during: @@ -126,6 +133,6 @@ QDF_STATUS dispatcher_psoc_enable(void); * * Return: none */ -QDF_STATUS dispatcher_psoc_disable(void); +QDF_STATUS dispatcher_psoc_disable(struct wlan_objmgr_psoc *psoc); #endif /* End of !defined(__DISPATCHER_INIT_H) */ diff --git a/init_deinit/dispatcher/src/dispatcher_init_deinit.c b/init_deinit/dispatcher/src/dispatcher_init_deinit.c index b3ac972cc3b9..6a4c53595429 100644 --- a/init_deinit/dispatcher/src/dispatcher_init_deinit.c +++ b/init_deinit/dispatcher/src/dispatcher_init_deinit.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2017 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 @@ -18,6 +18,7 @@ #include #include +#include #include #ifdef NAPIER_CODE #include @@ -33,16 +34,6 @@ * thier actual handlers are ready */ -static QDF_STATUS obj_manager_init(void) -{ - return QDF_STATUS_SUCCESS; -} - -static QDF_STATUS obj_manager_deinit(void) -{ - return QDF_STATUS_SUCCESS; -} - static QDF_STATUS scm_init(void) { return QDF_STATUS_SUCCESS; @@ -74,65 +65,65 @@ static QDF_STATUS tdls_deinit(void) return QDF_STATUS_SUCCESS; } -static QDF_STATUS scm_psoc_open(void) +static QDF_STATUS scm_psoc_open(struct wlan_objmgr_psoc *psoc) { return QDF_STATUS_SUCCESS; } -static QDF_STATUS scm_psoc_close(void) +static QDF_STATUS scm_psoc_close(struct wlan_objmgr_psoc *psoc) { return QDF_STATUS_SUCCESS; } -static QDF_STATUS p2p_psoc_open(void) +static QDF_STATUS p2p_psoc_open(struct wlan_objmgr_psoc *psoc) { return QDF_STATUS_SUCCESS; } -static QDF_STATUS p2p_psoc_close(void) +static QDF_STATUS p2p_psoc_close(struct wlan_objmgr_psoc *psoc) { return QDF_STATUS_SUCCESS; } -static QDF_STATUS tdls_psoc_open(void) +static QDF_STATUS tdls_psoc_open(struct wlan_objmgr_psoc *psoc) { return QDF_STATUS_SUCCESS; } -static QDF_STATUS tdls_psoc_close(void) +static QDF_STATUS tdls_psoc_close(struct wlan_objmgr_psoc *psoc) { return QDF_STATUS_SUCCESS; } -static QDF_STATUS scm_psoc_enable(void) +static QDF_STATUS scm_psoc_enable(struct wlan_objmgr_psoc *psoc) { return QDF_STATUS_SUCCESS; } -static QDF_STATUS scm_psoc_disable(void) +static QDF_STATUS scm_psoc_disable(struct wlan_objmgr_psoc *psoc) { return QDF_STATUS_SUCCESS; } -static QDF_STATUS p2p_psoc_enable(void) +static QDF_STATUS p2p_psoc_enable(struct wlan_objmgr_psoc *psoc) { return QDF_STATUS_SUCCESS; } -static QDF_STATUS p2p_psoc_disable(void) +static QDF_STATUS p2p_psoc_disable(struct wlan_objmgr_psoc *psoc) { return QDF_STATUS_SUCCESS; } -static QDF_STATUS tdls_psoc_enable(void) +static QDF_STATUS tdls_psoc_enable(struct wlan_objmgr_psoc *psoc) { return QDF_STATUS_SUCCESS; } -static QDF_STATUS tdls_psoc_disable(void) +static QDF_STATUS tdls_psoc_disable(struct wlan_objmgr_psoc *psoc) { return QDF_STATUS_SUCCESS; } @@ -151,7 +142,7 @@ static QDF_STATUS scheduler_deinit(void) QDF_STATUS dispatcher_init(void) { - if (QDF_STATUS_SUCCESS != obj_manager_init()) + if (QDF_STATUS_SUCCESS != wlan_objmgr_global_obj_init()) goto out; if (QDF_STATUS_SUCCESS != scm_init()) @@ -175,7 +166,7 @@ tdls_init_fail: p2p_init_fail: scm_deinit(); scm_init_fail: - obj_manager_deinit(); + wlan_objmgr_global_obj_deinit(); out: return QDF_STATUS_E_FAILURE; @@ -191,73 +182,73 @@ QDF_STATUS dispatcher_deinit(void) QDF_BUG(QDF_STATUS_SUCCESS == scm_deinit()); - QDF_BUG(QDF_STATUS_SUCCESS == obj_manager_deinit()); + QDF_BUG(QDF_STATUS_SUCCESS == wlan_objmgr_global_obj_deinit()); return QDF_STATUS_SUCCESS; } -QDF_STATUS dispatcher_psoc_open(void) +QDF_STATUS dispatcher_psoc_open(struct wlan_objmgr_psoc *psoc) { - if (QDF_STATUS_SUCCESS != scm_psoc_open()) + if (QDF_STATUS_SUCCESS != scm_psoc_open(psoc)) goto out; - if (QDF_STATUS_SUCCESS != p2p_psoc_open()) + if (QDF_STATUS_SUCCESS != p2p_psoc_open(psoc)) goto p2p_psoc_open_fail; - if (QDF_STATUS_SUCCESS != tdls_psoc_open()) + if (QDF_STATUS_SUCCESS != tdls_psoc_open(psoc)) goto tdls_psoc_open_fail; return QDF_STATUS_SUCCESS; tdls_psoc_open_fail: - p2p_psoc_close(); + p2p_psoc_close(psoc); p2p_psoc_open_fail: - scm_psoc_close(); + scm_psoc_close(psoc); out: return QDF_STATUS_E_FAILURE; } -QDF_STATUS dispatcher_psoc_close(void) +QDF_STATUS dispatcher_psoc_close(struct wlan_objmgr_psoc *psoc) { - QDF_BUG(QDF_STATUS_SUCCESS == tdls_psoc_close()); + QDF_BUG(QDF_STATUS_SUCCESS == tdls_psoc_close(psoc)); - QDF_BUG(QDF_STATUS_SUCCESS == p2p_psoc_close()); + QDF_BUG(QDF_STATUS_SUCCESS == p2p_psoc_close(psoc)); - QDF_BUG(QDF_STATUS_SUCCESS == scm_psoc_close()); + QDF_BUG(QDF_STATUS_SUCCESS == scm_psoc_close(psoc)); return QDF_STATUS_SUCCESS; } -QDF_STATUS dispatcher_psoc_enable(void) +QDF_STATUS dispatcher_psoc_enable(struct wlan_objmgr_psoc *psoc) { - if (QDF_STATUS_SUCCESS != scm_psoc_enable()) + if (QDF_STATUS_SUCCESS != scm_psoc_enable(psoc)) goto out; - if (QDF_STATUS_SUCCESS != p2p_psoc_enable()) + if (QDF_STATUS_SUCCESS != p2p_psoc_enable(psoc)) goto p2p_psoc_enable_fail; - if (QDF_STATUS_SUCCESS != tdls_psoc_enable()) + if (QDF_STATUS_SUCCESS != tdls_psoc_enable(psoc)) goto tdls_psoc_enable_fail; return QDF_STATUS_SUCCESS; tdls_psoc_enable_fail: - p2p_psoc_disable(); + p2p_psoc_disable(psoc); p2p_psoc_enable_fail: - scm_psoc_disable(); + scm_psoc_disable(psoc); out: return QDF_STATUS_E_FAILURE; } -QDF_STATUS dispatcher_psoc_disable(void) +QDF_STATUS dispatcher_psoc_disable(struct wlan_objmgr_psoc *psoc) { - QDF_BUG(QDF_STATUS_SUCCESS == tdls_psoc_disable()); + QDF_BUG(QDF_STATUS_SUCCESS == tdls_psoc_disable(psoc)); - QDF_BUG(QDF_STATUS_SUCCESS == p2p_psoc_disable()); + QDF_BUG(QDF_STATUS_SUCCESS == p2p_psoc_disable(psoc)); - QDF_BUG(QDF_STATUS_SUCCESS == scm_psoc_disable()); + QDF_BUG(QDF_STATUS_SUCCESS == scm_psoc_disable(psoc)); return QDF_STATUS_SUCCESS; }