From b7b2fea07238148d608b256b41848cb89ed0327d Mon Sep 17 00:00:00 2001 From: Arunk Khandavalli Date: Tue, 14 Mar 2017 21:25:05 +0530 Subject: qcacld-3.0: cds_sched close should not invoked as part of startup failure cds_sched_open is invoked as part of hdd_wlan_start_modules and in case of failure the cds_sched_close depending on the driver_State should be closed as part of hdd_wlan_start_modules failure. When the driver loads during the low memory condtion and if there is any failure in the hif_open or cds_open start_modules returns failure and as part of the failure cleanup cds_sched_close is getting invoked which is waiting on completion for couple of events which will not be set. To mitigate the issue donnot invoke the cds_sched_close clean up during the startup. Change-Id: I51c67e7c723a06a8270c424f7e16ea45c6cd4012 CRs-Fixed: 2019986 --- core/cds/src/cds_sched.c | 1 + core/hdd/src/wlan_hdd_main.c | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c index efc32766242b..0fdab613f6fd 100644 --- a/core/cds/src/cds_sched.c +++ b/core/cds/src/cds_sched.c @@ -591,6 +591,7 @@ pkt_freeqalloc_failure: #endif /* De-initialize all the message queues */ cds_sched_deinit_mqs(pSchedContext); + gp_cds_sched_context = NULL; return QDF_STATUS_E_RESOURCES; diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index dadc7a7bd7b3..5fe40468a5be 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -8757,10 +8757,12 @@ err_stop_modules: hdd_wlan_stop_modules(hdd_ctx); err_exit_nl_srv: - status = cds_sched_close(hdd_ctx->pcds_context); - if (!QDF_IS_STATUS_SUCCESS(status)) { - hdd_err("Failed to close CDS Scheduler"); - QDF_ASSERT(QDF_IS_STATUS_SUCCESS(status)); + if (DRIVER_MODULES_CLOSED == hdd_ctx->driver_status) { + status = cds_sched_close(hdd_ctx->pcds_context); + if (!QDF_IS_STATUS_SUCCESS(status)) { + hdd_err("Failed to close CDS Scheduler"); + QDF_ASSERT(QDF_IS_STATUS_SUCCESS(status)); + } } hdd_green_ap_deinit(hdd_ctx); -- cgit v1.2.3