summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKomal Seelam <kseelam@qti.qualcomm.com>2014-02-19 16:51:58 -0800
committerAkash Patel <c_akashp@qca.qualcomm.com>2014-02-20 21:42:20 -0800
commit6d1fa93da0b37cee352da97504feb45f7f1d5f22 (patch)
tree607bdfc5bd6014d3e338d3608d053609035a3b6f
parentc16c4c48a261d0729bfa0d961a030362cf493b26 (diff)
qcacld: Fail to suspend when host has pending commands in cfg80211 suspend
Fail to suspend in cfg80211 suspend if host has pending commands to send after timeout with zero credits. If host has credits and still pending commands post success to cfg80211 suspend and check for pending commands and credits in hif_pci_suspend to improve chances of going to suspend. Change-Id: Ib5ec24d48ae0b156afc99b19943b9a1a38461cf1 CRs-Fixed: 619380
-rw-r--r--CORE/SERVICES/WMA/wma.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 07f7ce955460..0d21bc4789c5 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -11541,7 +11541,9 @@ int wma_enable_wow_in_fw(WMA_HANDLE handle)
vos_event_reset(&wma->target_suspend);
if (wmi_get_host_credits(wma->wmi_handle) < WMI_WOW_REQUIRED_CREDITS) {
- WMA_LOGE("Cannot Post WMI_WOW_ENABLE_CMDID !. No Credits\n");
+ WMA_LOGE("Cannot Post WMI_WOW_ENABLE_CMDID !.Credits:%d"
+ "pending_cmds:%d\n", wmi_get_host_credits(wma->wmi_handle),
+ wmi_get_pending_cmds(wma->wmi_handle));
goto error;
}
@@ -11562,8 +11564,10 @@ int wma_enable_wow_in_fw(WMA_HANDLE handle)
if ((wmi_get_host_credits(wma->wmi_handle) != WMI_MAX_HOST_CREDITS) ||
wmi_get_pending_cmds(wma->wmi_handle))
{
- WMA_LOGE("Host Doesn't have enough credits!. FW didn't give enough credits");
- VOS_BUG(0);
+ WMA_LOGE("Host Doesn't have enough credits after HTC ACK:%d !"
+ "pending_cmds:%d\n", wmi_get_host_credits(wma->wmi_handle),
+ wmi_get_pending_cmds(wma->wmi_handle));
+ VOS_ASSERT(0);
return VOS_STATUS_E_FAILURE;
}
@@ -12210,9 +12214,12 @@ enable_wow:
ret = wmi_is_suspend_ready(wma->wmi_handle);
if (ret) {
+ if (wmi_get_host_credits(wma->wmi_handle))
+ goto send_ready_to_suspend;
+
WMA_LOGE("WMI Commands are pending in the queue for long time"
- "FW is not responding with credits");
- VOS_BUG(0);
+ "FW is not responding with credits; Fail to suspend");
+ VOS_ASSERT(0);
return VOS_STATUS_E_FAILURE;
}