diff options
| author | Nitesh Shah <niteshs@codeaurora.org> | 2016-08-23 08:07:09 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-09-21 17:00:51 -0700 |
| commit | d732f74d749bdf2c5ed560d35b6508b859690212 (patch) | |
| tree | e74854dc1835ddc502984346ca1032609295be7d /core/utils | |
| parent | 440450989af84d95efbd9fe9c0c44c2687c3e4ca (diff) | |
qcacld-3.0: Diag event for WOW reason code
Propagation from qcacld-2.0 to qcacld-3.0
Add diag event for WOW reason code.
The event EVENT_WLAN_POWERSAVE_WOW will be used to
inform the WOW reason code.
Change-Id: I9273c9e737b97207ce0acee131ab6f3c19cd3e0d
CRs-Fixed: 1037383
Diffstat (limited to 'core/utils')
| -rw-r--r-- | core/utils/host_diag_log/src/host_diag_log.c | 23 | ||||
| -rw-r--r-- | core/utils/host_diag_log/src/i_host_diag_core_event.h | 8 |
2 files changed, 31 insertions, 0 deletions
diff --git a/core/utils/host_diag_log/src/host_diag_log.c b/core/utils/host_diag_log/src/host_diag_log.c index 05c3ea25e535..2fd1b3566fc9 100644 --- a/core/utils/host_diag_log/src/host_diag_log.c +++ b/core/utils/host_diag_log/src/host_diag_log.c @@ -41,6 +41,7 @@ #include "wlan_ptt_sock_svc.h" #include "wlan_nlink_srv.h" #include "cds_api.h" +#include "wlan_ps_wow_diag.h" #define PTT_MSG_DIAG_CMDS_TYPE (0x5050) @@ -283,3 +284,25 @@ void host_log_low_resource_failure(uint8_t event_sub_type) WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, EVENT_WLAN_LOW_RESOURCE_FAILURE); } + +#ifdef FEATURE_WLAN_DIAG_SUPPORT +/** + * qdf_wow_wakeup_host_event()- send wow wakeup event + * @wow_wakeup_cause: WOW wakeup reason code + * + * This function sends wow wakeup reason code diag event + * + * Return: void. + */ +void qdf_wow_wakeup_host_event(uint8_t wow_wakeup_cause) +{ + WLAN_HOST_DIAG_EVENT_DEF(wowRequest, + host_event_wlan_powersave_wow_payload_type); + qdf_mem_zero(&wowRequest, sizeof(wowRequest)); + + wowRequest.event_subtype = WLAN_WOW_WAKEUP; + wowRequest.wow_wakeup_cause = wow_wakeup_cause; + WLAN_HOST_DIAG_EVENT_REPORT(&wowRequest, + EVENT_WLAN_POWERSAVE_WOW); +} +#endif diff --git a/core/utils/host_diag_log/src/i_host_diag_core_event.h b/core/utils/host_diag_log/src/i_host_diag_core_event.h index b17ac856219c..b90bae7fd217 100644 --- a/core/utils/host_diag_log/src/i_host_diag_core_event.h +++ b/core/utils/host_diag_log/src/i_host_diag_core_event.h @@ -115,6 +115,14 @@ static inline void host_log_low_resource_failure(uint8_t event_sub_type) } #endif /* FEATURE_WLAN_DIAG_SUPPORT */ +#ifdef FEATURE_WLAN_DIAG_SUPPORT +void qdf_wow_wakeup_host_event(uint8_t wow_wakeup_cause); +#else +static inline void qdf_wow_wakeup_host_event(uint8_t wow_wakeup_cause) +{ + return; +} +#endif /* FEATURE_WLAN_DIAG_SUPPORT */ #ifdef __cplusplus } #endif /* __cplusplus */ |
