From 0a54fa91df03f28543522e39d11dab92d55d0a0f Mon Sep 17 00:00:00 2001 From: Rakesh Pillai Date: Thu, 23 Nov 2017 17:13:38 +0530 Subject: [PATCH] qcacld-3.0: Clear bad state of driver at start of probe During SSR we check if the driver is in bad state, to decide whether we should send suspend to the fw. This causes a race when SSR occurs during driver probe, since the driver state is still marked as bad. Clear the flag indicating the driver state as bad during the start of probe. CRs-Fixed: 2144058 Change-Id: I13087dc65dbffa6a784395606fac2c41f6ce7591 --- core/hdd/src/wlan_hdd_driver_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index f62cccc52801..91cb90b542aa 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -367,6 +367,7 @@ static int wlan_hdd_probe(struct device *dev, void *bdev, reinit ? "re-" : "", QWLAN_VERSIONSTR); mutex_lock(&hdd_init_deinit_lock); + cds_set_driver_in_bad_state(false); if (!reinit) hdd_start_driver_ops_timer(eHDD_DRV_OP_PROBE); else @@ -413,7 +414,6 @@ static int wlan_hdd_probe(struct device *dev, void *bdev, hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_DRIVER_INIT); hdd_remove_pm_qos(dev); cds_set_fw_down(false); - cds_set_driver_in_bad_state(false); probe_fail_cnt = 0; re_init_fail_cnt = 0; hdd_stop_driver_ops_timer();