From 3d75fbb77e7afcbf6acd0e1181101b2537e1a5cd Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Tue, 7 Feb 2017 13:05:02 -0800 Subject: [PATCH] qcacld-3.0: Ignore suspend timeout during module (un)load During suspend, the host driver asserts if the firmware does not respond in a set amount of time. Avoid this assert if the driver is loading or unloading when the suspend operation times out. Change-Id: I38ff8663e29bcf1a373c1b91c8c358e2b037577d CRs-Fixed: 2003478 --- core/wma/src/wma_features.c | 33 +++++++++------------------------ 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 89af80282bd3..e08f65f59918 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -6704,34 +6704,19 @@ int wma_bus_resume(void) * * Return: NONE */ -#ifdef QCA_WIFI_3_0_ADRASTEA static inline void wma_suspend_target_timeout(bool is_self_recovery_enabled) { - if (cds_is_driver_recovering()) { - WMA_LOGE("%s: recovery is in progress, ignore!", __func__); - } else { - if (is_self_recovery_enabled) { - cds_trigger_recovery(false); - } else { - QDF_BUG(0); - } - } -} -#else /* ROME chipset */ -static inline void wma_suspend_target_timeout(bool is_self_recovery_enabled) -{ - if (cds_is_load_or_unload_in_progress() || cds_is_driver_recovering()) { - WMA_LOGE("%s: Unloading/Loading/recovery is in progress, Ignore!", + if (cds_is_load_or_unload_in_progress()) + WMA_LOGE("%s: Module (un)loading; Ignoring suspend timeout", __func__); - } else { - if (is_self_recovery_enabled) { - cds_trigger_recovery(false); - } else { - QDF_BUG(0); - } - } + else if (cds_is_driver_recovering()) + WMA_LOGE("%s: Module recovering; Ignoring suspend timeout", + __func__); + else if (is_self_recovery_enabled) + cds_trigger_recovery(false); + else + QDF_BUG(0); } -#endif /** * wma_suspend_target() - suspend target