diff options
| author | Prashanth Bhatta <bhattap@codeaurora.org> | 2016-10-20 18:42:41 -0700 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-10-28 18:09:20 -0700 |
| commit | 697dd0cd4eb62c830b097751bd4987c860156abb (patch) | |
| tree | bcd738e5ff74d2ebbc45a8fdc8911e2837e5b93d | |
| parent | e675ca784d30e2a8f31eed94a0422cd92c0411ef (diff) | |
qcacld-3.0: Do not fail resume during recovery
If WLAN FW crashes while in suspend mode then resume fails.
Returning failure in this case confuses kernel power manager. Do
not return failure to resume if recovery is going on.
Also do not panic for the resume failures if recovery is going
on.
Change-Id: I380194cb53ca669edaf50544657b19b74de6dfd3
CRs-fixed: 1079299
(cherry picked from commit 3ff45a5b515810d36f36e2755a3653a55ab81a4a)
| -rw-r--r-- | core/hdd/src/wlan_hdd_driver_ops.c | 34 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_power.c | 3 |
2 files changed, 31 insertions, 6 deletions
diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c index 7861b503b4c5..afee223dcd4d 100644 --- a/core/hdd/src/wlan_hdd_driver_ops.c +++ b/core/hdd/src/wlan_hdd_driver_ops.c @@ -650,8 +650,13 @@ static int __wlan_hdd_bus_resume(void) { hdd_context_t *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); void *hif_ctx; - int status = wlan_hdd_validate_context(hdd_ctx); + int status; + QDF_STATUS qdf_status; + + if (cds_is_driver_recovering()) + return 0; + status = wlan_hdd_validate_context(hdd_ctx); if (status) return status; @@ -665,15 +670,28 @@ static int __wlan_hdd_bus_resume(void) return -EINVAL; status = hif_bus_resume(hif_ctx); - QDF_BUG(!status); + if (status) + goto out; status = wma_bus_resume(); - QDF_BUG(!status); + if (status) + goto out; - status = ol_txrx_bus_resume(); - QDF_BUG(!status); + qdf_status = ol_txrx_bus_resume(); + status = qdf_status_to_os_return(qdf_status); + if (status) + goto out; hdd_info("resume done"); + + return 0; + +out: + if (cds_is_driver_recovering()) + return 0; + + QDF_BUG(false); + return status; } @@ -701,8 +719,12 @@ static int __wlan_hdd_bus_resume_noirq(void) { hdd_context_t *hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD); void *hif_ctx; - int status = wlan_hdd_validate_context(hdd_ctx); + int status; + + if (cds_is_driver_recovering()) + return 0; + status = wlan_hdd_validate_context(hdd_ctx); if (status) { hdd_err("Invalid HDD context: %d", status); return status; diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c index fb4e58880e4d..e555233a7b5e 100644 --- a/core/hdd/src/wlan_hdd_power.c +++ b/core/hdd/src/wlan_hdd_power.c @@ -1729,6 +1729,9 @@ static int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy) ENTER(); + if (cds_is_driver_recovering()) + return 0; + if (QDF_GLOBAL_FTM_MODE == hdd_get_conparam()) { hdd_err("Command not allowed in FTM mode"); return -EINVAL; |
