|
@@ -318,7 +318,21 @@ QDF_STATUS policy_mgr_deinit(void)
|
|
|
|
|
|
QDF_STATUS policy_mgr_psoc_open(struct wlan_objmgr_psoc *psoc)
|
|
|
{
|
|
|
- /* placeholder for now */
|
|
|
+ struct policy_mgr_psoc_priv_obj *pm_ctx;
|
|
|
+
|
|
|
+ pm_ctx = policy_mgr_get_context(psoc);
|
|
|
+ if (!pm_ctx) {
|
|
|
+ policy_mgr_err("Invalid Context");
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!QDF_IS_STATUS_SUCCESS(qdf_mutex_create(
|
|
|
+ &pm_ctx->qdf_conc_list_lock))) {
|
|
|
+ policy_mgr_err("Failed to init qdf_conc_list_lock");
|
|
|
+ QDF_ASSERT(0);
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
return QDF_STATUS_SUCCESS;
|
|
|
}
|
|
|
|
|
@@ -332,6 +346,13 @@ QDF_STATUS policy_mgr_psoc_close(struct wlan_objmgr_psoc *psoc)
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
|
|
|
+ if (!QDF_IS_STATUS_SUCCESS(qdf_mutex_destroy(
|
|
|
+ &pm_ctx->qdf_conc_list_lock))) {
|
|
|
+ policy_mgr_err("Failed to destroy qdf_conc_list_lock");
|
|
|
+ QDF_ASSERT(0);
|
|
|
+ return QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
if (pm_ctx->hw_mode.hw_mode_list) {
|
|
|
qdf_mem_free(pm_ctx->hw_mode.hw_mode_list);
|
|
|
pm_ctx->hw_mode.hw_mode_list = NULL;
|
|
@@ -374,13 +395,6 @@ QDF_STATUS policy_mgr_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
|
|
return status;
|
|
|
}
|
|
|
|
|
|
- if (!QDF_IS_STATUS_SUCCESS(qdf_mutex_create(
|
|
|
- &pm_ctx->qdf_conc_list_lock))) {
|
|
|
- policy_mgr_err("Failed to init qdf_conc_list_lock");
|
|
|
- QDF_ASSERT(0);
|
|
|
- return status;
|
|
|
- }
|
|
|
-
|
|
|
pm_ctx->do_hw_mode_change = false;
|
|
|
pm_ctx->hw_mode_change_in_progress = POLICY_MGR_HW_MODE_NOT_IN_PROGRESS;
|
|
|
/* reset sap mandatory channels */
|
|
@@ -440,13 +454,6 @@ QDF_STATUS policy_mgr_psoc_disable(struct wlan_objmgr_psoc *psoc)
|
|
|
return QDF_STATUS_E_FAILURE;
|
|
|
}
|
|
|
|
|
|
- if (!QDF_IS_STATUS_SUCCESS(qdf_mutex_destroy(
|
|
|
- &pm_ctx->qdf_conc_list_lock))) {
|
|
|
- policy_mgr_err("Failed to destroy qdf_conc_list_lock");
|
|
|
- status = QDF_STATUS_E_FAILURE;
|
|
|
- QDF_ASSERT(0);
|
|
|
- }
|
|
|
-
|
|
|
/* destroy connection_update_done_evt */
|
|
|
if (!QDF_IS_STATUS_SUCCESS(qdf_event_destroy
|
|
|
(&pm_ctx->connection_update_done_evt))) {
|