From 018477577dac8ef57d50960c3e8980cce1f12b0f Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Wed, 25 Oct 2017 13:56:27 -0700 Subject: [PATCH] qcacld-3.0: Reject interface up during SSR A recent change added a sleeping wait to the interface up handing code in hdd_open, which can lead to transient deadlocks and cascading bad behavior when Sub-System Restart (SSR) is in progress. Instead, simply return -EBUSY when SSR is in progress, allowing the user to try again. Change-Id: Id029090f9aafefa76d9778f8e5de5698b852495b CRs-Fixed: 2132580 --- core/hdd/src/wlan_hdd_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index dabf33015f76..ef114d122aae 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -2563,17 +2563,17 @@ static int __hdd_open(struct net_device *dev) MTRACE(qdf_trace(QDF_MODULE_ID_HDD, TRACE_CODE_HDD_OPEN_REQUEST, adapter->sessionId, adapter->device_mode)); - if (!hdd_wait_for_recovery_completion()) { - hdd_err("Recovery failed"); - return -EIO; - } - /* Nothing to be done if device is unloading */ if (cds_is_driver_unloading()) { hdd_err("Driver is unloading can not open the hdd"); return -EBUSY; } + if (cds_is_driver_recovering()) { + hdd_err("WLAN is currently recovering; Please try again."); + return -EBUSY; + } + mutex_lock(&hdd_init_deinit_lock); hdd_start_driver_ops_timer(eHDD_DRV_OP_IFF_UP);