Эх сурвалжийг харах

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
Arunk Khandavalli 8 жил өмнө
parent
commit
fbc1ef059c

+ 1 - 0
core/cds/src/cds_sched.c

@@ -536,6 +536,7 @@ OL_RX_THREAD_START_FAILURE:
 	cds_free_ol_rx_pkt_freeq(gp_cds_sched_context);
 pkt_freeqalloc_failure:
 #endif
+	gp_cds_sched_context = NULL;
 
 	return QDF_STATUS_E_RESOURCES;
 

+ 6 - 4
core/hdd/src/wlan_hdd_main.c

@@ -9188,10 +9188,12 @@ err_stop_modules:
 	hdd_wlan_stop_modules(hdd_ctx, false);
 
 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);