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
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
440450989a
commit
d732f74d74
@@ -41,6 +41,7 @@
|
|||||||
#include "wlan_ptt_sock_svc.h"
|
#include "wlan_ptt_sock_svc.h"
|
||||||
#include "wlan_nlink_srv.h"
|
#include "wlan_nlink_srv.h"
|
||||||
#include "cds_api.h"
|
#include "cds_api.h"
|
||||||
|
#include "wlan_ps_wow_diag.h"
|
||||||
|
|
||||||
#define PTT_MSG_DIAG_CMDS_TYPE (0x5050)
|
#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,
|
WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event,
|
||||||
EVENT_WLAN_LOW_RESOURCE_FAILURE);
|
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
|
||||||
|
@@ -115,6 +115,14 @@ static inline void host_log_low_resource_failure(uint8_t event_sub_type)
|
|||||||
}
|
}
|
||||||
#endif /* FEATURE_WLAN_DIAG_SUPPORT */
|
#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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
@@ -3116,10 +3116,12 @@ int wma_wow_wakeup_host_event(void *handle, uint8_t *event,
|
|||||||
|
|
||||||
if ((wake_info->wake_reason != WOW_REASON_UNSPECIFIED) ||
|
if ((wake_info->wake_reason != WOW_REASON_UNSPECIFIED) ||
|
||||||
(wake_info->wake_reason == WOW_REASON_UNSPECIFIED &&
|
(wake_info->wake_reason == WOW_REASON_UNSPECIFIED &&
|
||||||
!wmi_get_runtime_pm_inprogress(wma->wmi_handle)))
|
!wmi_get_runtime_pm_inprogress(wma->wmi_handle))) {
|
||||||
WMA_LOGA("WOW wakeup host event received (reason: %s(%d)) for vdev %d",
|
WMA_LOGA("WOW wakeup host event received (reason: %s(%d)) for vdev %d",
|
||||||
wma_wow_wake_reason_str(wake_info->wake_reason),
|
wma_wow_wake_reason_str(wake_info->wake_reason),
|
||||||
wake_info->wake_reason, wake_info->vdev_id);
|
wake_info->wake_reason, wake_info->vdev_id);
|
||||||
|
qdf_wow_wakeup_host_event(wake_info->wake_reason);
|
||||||
|
}
|
||||||
|
|
||||||
qdf_event_set(&wma->wma_resume_event);
|
qdf_event_set(&wma->wma_resume_event);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user