diff options
| author | Komal Seelam <kseelam@qti.qualcomm.com> | 2016-05-19 21:22:14 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-05-30 17:21:58 +0530 |
| commit | 97298d29b63fd91498b7d6a3530bedcc79158fc4 (patch) | |
| tree | b531532af5c347abf8759f254e663326513b9430 /CORE/VOSS/src | |
| parent | 58dfe3d63681e5f0d819ec7b14f8d8fb4276c9c2 (diff) | |
qcacld-2.0: API to do runtime pm active
Driver Upper layers are not aware of runtime pm state. We have seen
cases, where upper layers want to do driver to be runtime active.
One such case is, during MCC, Firmware sends pause event to host,
and driver is runtime suspended.
Host got a DHCP or ARP packet, which gets queued in the tx layer,
as the vdev queues are paused.
Firmware doesn't have wakeup capability for un pause events, so
driver doesn't unpause the queues, which results in a data stall.
The fix is to do runtime resume so driver can recieve unpause events
and allow data packets to flow through.
Hence provide an API to do runtime resume when needed.
CRs-Fixed: 1018401
Change-Id: Ie0d080ff1a8f6c05677af6f575fb93a62f13a0c6
Diffstat (limited to 'CORE/VOSS/src')
| -rw-r--r-- | CORE/VOSS/src/vos_lock.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/CORE/VOSS/src/vos_lock.c b/CORE/VOSS/src/vos_lock.c index f99fe25d83f5..4dcb3394e42c 100644 --- a/CORE/VOSS/src/vos_lock.c +++ b/CORE/VOSS/src/vos_lock.c @@ -745,3 +745,30 @@ void vos_runtime_pm_prevent_suspend_deinit(runtime_pm_context_t data) { hif_runtime_pm_prevent_suspend_deinit(data); } + +/** + * vos_request_runtime_pm_resume() - API to ensure driver is runtime pm active + * + * Driver modules can use this API to ensure driver is runtime pm active + * + * Return: VOS_STATUS + */ +VOS_STATUS vos_request_runtime_pm_resume(void) +{ + void *ol_sc; + v_CONTEXT_t gContext; + + gContext = vos_get_global_context(VOS_MODULE_ID_SYS, NULL); + + ol_sc = vos_get_context(VOS_MODULE_ID_HIF, gContext); + + if (ol_sc == NULL) { + VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, + "%s: HIF context is null!", __func__); + return VOS_STATUS_E_INVAL; + } + + hif_request_runtime_pm_resume(ol_sc); + + return VOS_STATUS_SUCCESS; +} |
