From 21b3c988b4b2eba715326109d80e7d6aa52670c9 Mon Sep 17 00:00:00 2001 From: Sourav Mohapatra Date: Tue, 3 Apr 2018 17:33:03 +0530 Subject: [PATCH] qcacld-3.0: Return -EGAIAN and not -ENODEV if FW is down When wlan_hdd_validate_context returns ENODEV in the case of FW down or when driver is in bad state, wificond will reset and try to unload the driver while SSR/PDR may be in progress. Return -EGAIAN and not -ENODEV in the above case. Change-Id: I9b2314c2d4367b5373d1202b682d2c629a5a3e9f CRs-Fixed: 2217006 --- 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 97d2cfe9a1..1461f1e1eb 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -845,13 +845,13 @@ int wlan_hdd_validate_context(struct hdd_context *hdd_ctx) if (cds_is_driver_in_bad_state()) { hdd_debug("%pS driver in bad State: 0x%x Ignore!!!", (void *)_RET_IP_, cds_get_driver_state()); - return -ENODEV; + return -EAGAIN; } if (cds_is_fw_down()) { hdd_debug("%pS FW is down: 0x%x Ignore!!!", (void *)_RET_IP_, cds_get_driver_state()); - return -ENODEV; + return -EAGAIN; } return 0;