diff options
| author | Sundar Subramaniyan <subrams@qti.qualcomm.com> | 2013-12-02 17:45:15 -0800 |
|---|---|---|
| committer | Prakash Dhavali <pdhavali@qca.qualcomm.com> | 2013-12-06 03:17:28 -0800 |
| commit | b2079b85e4e4ea6e2bfb130f50dca1f93983e1af (patch) | |
| tree | d1cfe0f8a1175ffab26f37322c16a4bc4869afcc | |
| parent | adb7fa76fddcb6fdddbd7f594bd49d1f1e2ab676 (diff) | |
qcacld-2.0: Wait for ack from firmware for WoW enable command
Wait for acknowledgement from firmware for WoW Enable WMI
command to synchronize with the target before posting the ready
to suspend message to UMAC. The acknowledgement serves as an
indication to the host that WoW has been enabled in firmware
and that host can then begin to power collapse.
Change-Id: I7fcaa6f551aa3d8a7d9e77a52a58ce49a35cd8c8
CRs-Fixed: 584438
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 8 | ||||
| -rw-r--r-- | CORE/SERVICES/WMA/wma.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index d92865076b90..0c718fff637b 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -7694,6 +7694,7 @@ static VOS_STATUS wma_enable_wow_in_fw(tp_wma_handle wma) wmi_wow_enable_cmd_fixed_param)); cmd->enable = TRUE; + vos_event_reset(&wma->target_suspend); ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len, WMI_WOW_ENABLE_CMDID); if (ret) { @@ -7702,6 +7703,13 @@ static VOS_STATUS wma_enable_wow_in_fw(tp_wma_handle wma) return VOS_STATUS_E_FAILURE; } + if (vos_wait_single_event(&wma->target_suspend, + WMA_TGT_SUSPEND_COMPLETE_TIMEOUT) + != VOS_STATUS_SUCCESS) { + WMA_LOGE("Failed to receive WoW Enable Ack from FW"); + return VOS_STATUS_E_FAILURE; + } + WMA_LOGD("WOW enabled successfully in fw"); return VOS_STATUS_SUCCESS; diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h index 35e23bcd5e3d..637ce27dbcdc 100644 --- a/CORE/SERVICES/WMA/wma.h +++ b/CORE/SERVICES/WMA/wma.h @@ -76,6 +76,7 @@ /** Private **/ #define WMA_CFG_NV_DNLD_TIMEOUT 500 #define WMA_READY_EVENTID_TIMEOUT 2000 +#define WMA_TGT_SUSPEND_COMPLETE_TIMEOUT 200 #define MAX_MEM_CHUNKS 32 /* In prima 12 HW stations are supported including BCAST STA(staId 0) |
