Browse Source

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
Sourav Mohapatra 7 years ago
parent
commit
21b3c988b4
1 changed files with 2 additions and 2 deletions
  1. 2 2
      core/hdd/src/wlan_hdd_main.c

+ 2 - 2
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;