From eb5bf8cfc7a11f768caecbfb8551dd4f7eec5dac Mon Sep 17 00:00:00 2001 From: Ajit Pal Singh Date: Thu, 28 Mar 2019 19:23:40 +0530 Subject: [PATCH] qcacmn: Add new WMI API to check target suspend status Add new WMI API to check target suspend status Change-Id: Ie4ba55fc3db2d8de7354377b26325d3510a1e228 CRs-Fixed: 2425368 --- wmi/inc/wmi_unified_api.h | 10 ++++++++++ wmi/src/wmi_unified.c | 13 +++++++++++++ 2 files changed, 23 insertions(+) diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h index 1eaf716ad3..44274ffc82 100644 --- a/wmi/inc/wmi_unified_api.h +++ b/wmi/inc/wmi_unified_api.h @@ -375,6 +375,16 @@ int wmi_get_pending_cmds(wmi_unified_t wmi_handle); */ void wmi_set_target_suspend(wmi_unified_t wmi_handle, bool val); +/** + * wmi_is_target_suspended() - WMI API to check target suspend state + * @wmi_handle: handle to WMI. + * + * WMI API to check target suspend state + * + * Return: true if target is suspended, else false. + */ +bool wmi_is_target_suspended(struct wmi_unified *wmi_handle); + /** * WMI API to set bus suspend state * @param wmi_handle: handle to WMI. diff --git a/wmi/src/wmi_unified.c b/wmi/src/wmi_unified.c index 5405fe1182..be80a61666 100644 --- a/wmi/src/wmi_unified.c +++ b/wmi/src/wmi_unified.c @@ -2898,6 +2898,19 @@ void wmi_set_target_suspend(wmi_unified_t wmi_handle, A_BOOL val) qdf_atomic_set(&wmi_handle->is_target_suspended, val); } +/** + * wmi_is_target_suspended() - WMI API to check target suspend state + * @wmi_handle: handle to WMI. + * + * WMI API to check target suspend state + * + * Return: true if target is suspended, else false. + */ +bool wmi_is_target_suspended(struct wmi_unified *wmi_handle) +{ + return qdf_atomic_read(&wmi_handle->is_target_suspended); +} + /** * WMI API to set crash injection state * @param wmi_handle: handle to WMI.