diff options
| author | Dundi Raviteja <dundi@codeaurora.org> | 2018-10-11 13:07:28 +0530 |
|---|---|---|
| committer | nshrivas <nshrivas@codeaurora.org> | 2018-10-22 09:04:05 -0700 |
| commit | 24bd4f882bcf7b23c45e9acc8dca127498d71b41 (patch) | |
| tree | bd72117db5ae5dd5f5371f6522f70b5b18e551d8 | |
| parent | 2f8289b5ea69ab7730dae8f93050a2b8fb2d6a4f (diff) | |
qcacld-3.0: Remove redundant checks before invoking cds_trigger_recovery
In cds_trigger_recovery(), already there are various checks which
are repeated while invoking cds_trigger_recovery(), so remove
those redundant checks.
Change-Id: Id5eb32a0a0e55911e913e9bb57ecf6f0b46edbbf
CRs-Fixed: 2331408
| -rw-r--r-- | core/dp/txrx/ol_txrx.c | 5 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_scan.c | 11 | ||||
| -rw-r--r-- | core/utils/logging/src/wlan_logging_sock_svc.c | 5 | ||||
| -rw-r--r-- | core/wma/src/wma_features.c | 53 |
4 files changed, 11 insertions, 63 deletions
diff --git a/core/dp/txrx/ol_txrx.c b/core/dp/txrx/ol_txrx.c index 4dea23b118c9..d9a8a341819d 100644 --- a/core/dp/txrx/ol_txrx.c +++ b/core/dp/txrx/ol_txrx.c @@ -3839,10 +3839,7 @@ void peer_unmap_timer_handler(unsigned long data) peer->mac_addr.raw[4], peer->mac_addr.raw[5]); if (!cds_is_driver_recovering() && !cds_is_fw_down()) { wma_peer_debug_dump(); - if (cds_is_self_recovery_enabled()) - cds_trigger_recovery(CDS_PEER_UNMAP_TIMEDOUT); - else - QDF_BUG(0); + cds_trigger_recovery(CDS_PEER_UNMAP_TIMEDOUT); } else { WMA_LOGE("%s: Recovery is in progress, ignore!", __func__); } diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index 77327fde614e..d98686b83a21 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -761,17 +761,8 @@ static void hdd_scan_inactivity_timer_handler(unsigned long scan_req) if (cds_is_load_or_unload_in_progress()) hdd_err("%s: Module (un)loading; Ignore hdd scan req timeout", __func__); - else if (cds_is_driver_recovering()) - hdd_err("%s: Module recovering; Ignore hdd scan req timeout", - __func__); - else if (cds_is_driver_in_bad_state()) - hdd_err("%s: Module in bad state; Ignore hdd scan req timeout", - __func__); - else if (cds_is_self_recovery_enabled()) - cds_trigger_recovery(CDS_SCAN_REQ_EXPIRED); else - QDF_BUG(0); - + cds_trigger_recovery(CDS_SCAN_REQ_EXPIRED); } /** diff --git a/core/utils/logging/src/wlan_logging_sock_svc.c b/core/utils/logging/src/wlan_logging_sock_svc.c index d93653764b74..4ba9000fe110 100644 --- a/core/utils/logging/src/wlan_logging_sock_svc.c +++ b/core/utils/logging/src/wlan_logging_sock_svc.c @@ -749,10 +749,7 @@ static void send_flush_completion_to_user(uint8_t ring_id) if (!recovery_needed) return; - if (cds_is_self_recovery_enabled()) - cds_trigger_recovery(CDS_REASON_UNSPECIFIED); - else - QDF_BUG(0); + cds_trigger_recovery(CDS_REASON_UNSPECIFIED); } /** diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 44c4c6a154e8..0d35a7a39d2d 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -5658,10 +5658,7 @@ QDF_STATUS wma_enable_d0wow_in_fw(WMA_HANDLE handle) "Credits: %d, pending_cmds: %d", wmi_get_host_credits(wma->wmi_handle), wmi_get_pending_cmds(wma->wmi_handle)); - if (!cds_is_driver_recovering()) - cds_trigger_recovery(CDS_SUSPEND_TIMEOUT); - else - WMA_LOGE("%s: LOGP is in progress, ignore!", __func__); + cds_trigger_recovery(CDS_SUSPEND_TIMEOUT); return status; } @@ -5677,11 +5674,7 @@ QDF_STATUS wma_enable_d0wow_in_fw(WMA_HANDLE handle) WMA_LOGE("%s: No Credits after HTC ACK:%d, pending_cmds:%d, cannot resume back", __func__, host_credits, wmi_pending_cmds); htc_dump_counter_info(wma->htc_handle); - if (!cds_is_driver_recovering()) - cds_trigger_recovery(CDS_SUSPEND_TIMEOUT); - else - WMA_LOGE("%s: SSR in progress, ignore no credit issue", - __func__); + cds_trigger_recovery(CDS_SUSPEND_TIMEOUT); } wma->wow.wow_enable_cmd_sent = true; @@ -5759,11 +5752,7 @@ QDF_STATUS wma_enable_wow_in_fw(WMA_HANDLE handle, uint32_t wow_flags) wmi_get_host_credits(wma->wmi_handle), wmi_get_pending_cmds(wma->wmi_handle)); wmi_set_target_suspend(wma->wmi_handle, false); - if (!cds_is_driver_recovering()) { - cds_trigger_recovery(CDS_SUSPEND_TIMEOUT); - } else { - WMA_LOGE("%s: LOGP is in progress, ignore!", __func__); - } + cds_trigger_recovery(CDS_SUSPEND_TIMEOUT); return QDF_STATUS_E_FAILURE; } @@ -5781,11 +5770,7 @@ QDF_STATUS wma_enable_wow_in_fw(WMA_HANDLE handle, uint32_t wow_flags) WMA_LOGE("%s: No Credits after HTC ACK:%d, pending_cmds:%d, cannot resume back", __func__, host_credits, wmi_pending_cmds); htc_dump_counter_info(wma->htc_handle); - if (!cds_is_driver_recovering()) - cds_trigger_recovery(CDS_SUSPEND_TIMEOUT); - else - WMA_LOGE("%s: SSR in progress, ignore no credit issue", - __func__); + cds_trigger_recovery(CDS_SUSPEND_TIMEOUT); } WMA_LOGD("WOW enabled successfully in fw: credits:%d pending_cmds: %d", @@ -6522,13 +6507,8 @@ static QDF_STATUS wma_send_host_wakeup_ind_to_fw(tp_wma_handle wma) WMA_LOGP("%s: Pending commands %d credits %d", __func__, wmi_get_pending_cmds(wma->wmi_handle), wmi_get_host_credits(wma->wmi_handle)); - if (!cds_is_driver_recovering()) { - wmi_tag_crash_inject(wma->wmi_handle, true); - cds_trigger_recovery(CDS_RESUME_TIMEOUT); - } else { - WMA_LOGE("%s: SSR in progress, ignore resume timeout", - __func__); - } + wmi_tag_crash_inject(wma->wmi_handle, true); + cds_trigger_recovery(CDS_RESUME_TIMEOUT); } else { WMA_LOGD("Host wakeup received"); } @@ -6578,11 +6558,7 @@ QDF_STATUS wma_disable_d0wow_in_fw(WMA_HANDLE handle) WMA_LOGP("%s: Pending commands: %d credits: %d", __func__, wmi_get_pending_cmds(wma->wmi_handle), wmi_get_host_credits(wma->wmi_handle)); - - if (!cds_is_driver_recovering()) - cds_trigger_recovery(CDS_RESUME_TIMEOUT); - else - WMA_LOGE("%s: LOGP is in progress, ignore!", __func__); + cds_trigger_recovery(CDS_RESUME_TIMEOUT); return status; } @@ -8771,14 +8747,6 @@ static inline void wma_suspend_target_timeout(bool is_self_recovery_enabled) if (cds_is_load_or_unload_in_progress()) WMA_LOGE("%s: Module (un)loading; Ignoring suspend timeout", __func__); - else if (cds_is_driver_recovering()) - WMA_LOGE("%s: Module recovering; Ignoring suspend timeout", - __func__); - else if (cds_is_driver_in_bad_state()) - WMA_LOGE("%s: Module in bad state; Ignoring suspend timeout", - __func__); - else if (cds_is_fw_down()) - WMA_LOGE(FL("FW is down; Ignoring suspend timeout")); else cds_trigger_recovery(CDS_SUSPEND_TIMEOUT); } @@ -8958,12 +8926,7 @@ QDF_STATUS wma_resume_target(WMA_HANDLE handle) WMA_LOGP("%s: Pending commands %d credits %d", __func__, wmi_get_pending_cmds(wma->wmi_handle), wmi_get_host_credits(wma->wmi_handle)); - if (!cds_is_driver_recovering()) { - cds_trigger_recovery(CDS_RESUME_TIMEOUT); - } else { - WMA_LOGE("%s: SSR in progress, ignore resume timeout", - __func__); - } + cds_trigger_recovery(CDS_RESUME_TIMEOUT); } else { WMA_LOGD("Host wakeup received"); } |
