From d841bcca03d1b6d4a4a4313e0bb8f092a6b727f8 Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Fri, 30 Aug 2019 12:17:22 -0700 Subject: [PATCH] qcacld-3.0: Return -EAGAIN from idle shutdown if system is suspending Return -EAGAIN from idle shutdown callback API if system suspend is ongoing such that cnss driver does not turn off suspend the PCIe link and psoc idle shutdown can be re-tried later. Change-Id: If859abb70c18d03c2e73a8c589a4e138b98cb996 CRs-Fixed: 2518448 --- core/hdd/src/wlan_hdd_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index d748e5935c7c..47f86888ad20 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9735,7 +9735,7 @@ static int __hdd_psoc_idle_shutdown(struct hdd_context *hdd_ctx) osif_psoc_sync_wait_for_ops(psoc_sync); - QDF_BUG(!hdd_wlan_stop_modules(hdd_ctx, false)); + errno = hdd_wlan_stop_modules(hdd_ctx, false); osif_psoc_sync_trans_stop(psoc_sync); @@ -11872,7 +11872,7 @@ int hdd_wlan_stop_modules(struct hdd_context *hdd_ctx, bool ftm_mode) hdd_psoc_idle_timer_start(hdd_ctx); cds_set_module_stop_in_progress(false); - return 0; + return -EAGAIN; } }