qcacmn: Trigger sys wakeup for WMI command when WOW is enabled
DHCP packet is received in the IPA exception path when system is suspending. As part of DHCP packet processing, WMI_PEER_SET_PARAM_CMDID is sent to FW after WOW is enabled resulting in self recovery getting triggered by host. Fix is to do an explicit system wakeup if a WMI command has to be sent post WOW enablement. Change-Id: If1904a4fe5c861deed1b35071be10cb8cc8d6407 CRs-Fixed: 2890913
This commit is contained in:

committed by
snandini

parent
125c4c2a60
commit
6611374cf4
130
hif/inc/hif.h
130
hif/inc/hif.h
@@ -333,6 +333,22 @@ enum hif_event_type {
|
||||
/* Do check hif_hist_skip_event_record when adding new events */
|
||||
};
|
||||
|
||||
/**
|
||||
* enum hif_system_pm_state - System PM state
|
||||
* HIF_SYSTEM_PM_STATE_ON: System in active state
|
||||
* HIF_SYSTEM_PM_STATE_BUS_RESUMING: bus resume in progress as part of
|
||||
* system resume
|
||||
* HIF_SYSTEM_PM_STATE_BUS_SUSPENDING: bus suspend in progress as part of
|
||||
* system suspend
|
||||
* HIF_SYSTEM_PM_STATE_BUS_SUSPENDED: bus suspended as part of system suspend
|
||||
*/
|
||||
enum hif_system_pm_state {
|
||||
HIF_SYSTEM_PM_STATE_ON,
|
||||
HIF_SYSTEM_PM_STATE_BUS_RESUMING,
|
||||
HIF_SYSTEM_PM_STATE_BUS_SUSPENDING,
|
||||
HIF_SYSTEM_PM_STATE_BUS_SUSPENDED,
|
||||
};
|
||||
|
||||
#ifdef WLAN_FEATURE_DP_EVENT_HISTORY
|
||||
|
||||
#if defined(HIF_CONFIG_SLUB_DEBUG_ON) || defined(HIF_CE_DEBUG_DATA_BUF)
|
||||
@@ -1778,4 +1794,118 @@ static inline
|
||||
void hif_set_enable_detection(struct hif_opaque_softc *hif_ctx, bool value)
|
||||
{}
|
||||
#endif
|
||||
|
||||
#ifdef SYSTEM_PM_CHECK
|
||||
/**
|
||||
* __hif_system_pm_set_state() - Set system pm state
|
||||
* @hif: hif opaque handle
|
||||
* @state: system state
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void __hif_system_pm_set_state(struct hif_opaque_softc *hif,
|
||||
enum hif_system_pm_state state);
|
||||
|
||||
/**
|
||||
* hif_system_pm_set_state_on() - Set system pm state to ON
|
||||
* @hif: hif opaque handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static inline
|
||||
void hif_system_pm_set_state_on(struct hif_opaque_softc *hif)
|
||||
{
|
||||
__hif_system_pm_set_state(hif, HIF_SYSTEM_PM_STATE_ON);
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_system_pm_set_state_resuming() - Set system pm state to resuming
|
||||
* @hif: hif opaque handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static inline
|
||||
void hif_system_pm_set_state_resuming(struct hif_opaque_softc *hif)
|
||||
{
|
||||
__hif_system_pm_set_state(hif, HIF_SYSTEM_PM_STATE_BUS_RESUMING);
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_system_pm_set_state_suspending() - Set system pm state to suspending
|
||||
* @hif: hif opaque handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static inline
|
||||
void hif_system_pm_set_state_suspending(struct hif_opaque_softc *hif)
|
||||
{
|
||||
__hif_system_pm_set_state(hif, HIF_SYSTEM_PM_STATE_BUS_SUSPENDING);
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_system_pm_set_state_suspended() - Set system pm state to suspended
|
||||
* @hif: hif opaque handle
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static inline
|
||||
void hif_system_pm_set_state_suspended(struct hif_opaque_softc *hif)
|
||||
{
|
||||
__hif_system_pm_set_state(hif, HIF_SYSTEM_PM_STATE_BUS_SUSPENDED);
|
||||
}
|
||||
|
||||
/**
|
||||
* hif_system_pm_get_state() - Get system pm state
|
||||
* @hif: hif opaque handle
|
||||
*
|
||||
* Return: system state
|
||||
*/
|
||||
int32_t hif_system_pm_get_state(struct hif_opaque_softc *hif);
|
||||
|
||||
/**
|
||||
* hif_system_pm_state_check() - Check system state and trigger resume
|
||||
* if required
|
||||
* @hif: hif opaque handle
|
||||
*
|
||||
* Return: 0 if system is in on state else error code
|
||||
*/
|
||||
int hif_system_pm_state_check(struct hif_opaque_softc *hif);
|
||||
#else
|
||||
static inline
|
||||
void __hif_system_pm_set_state(struct hif_opaque_softc *hif,
|
||||
enum hif_system_pm_state state)
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
void hif_system_pm_set_state_on(struct hif_opaque_softc *hif)
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
void hif_system_pm_set_state_resuming(struct hif_opaque_softc *hif)
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
void hif_system_pm_set_state_suspending(struct hif_opaque_softc *hif)
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
void hif_system_pm_set_state_suspended(struct hif_opaque_softc *hif)
|
||||
{
|
||||
}
|
||||
|
||||
static inline
|
||||
int32_t hif_system_pm_get_state(struct hif_opaque_softc *hif)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int hif_system_pm_state_check(struct hif_opaque_softc *hif)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
#endif /* _HIF_H_ */
|
||||
|
Reference in New Issue
Block a user