From ce4879b6e31378a28173bdf66c5cadaad0ec9246 Mon Sep 17 00:00:00 2001 From: Yue Ma Date: Thu, 8 Aug 2019 17:40:03 -0700 Subject: [PATCH] qcacld-3.0: Config WOW_NLO_SCAN_COMPLETE_EVENT by default WOW_NLO_SCAN_COMPLETE_EVENT should be always a wakeable event so there is no need config it again during runtime PM suspend. Same for WOW_NLO_DETECTED_EVENT which is already configed by default. Hence it is safe to skip config dynamic wake events for runtime PM. Change-Id: Ie99f9f3dbd5e696601c79b826dbc949c0b439dc1 CRs-fixed: 2502738 --- components/pmo/core/src/wlan_pmo_suspend_resume.c | 10 ++++++++-- components/pmo/core/src/wlan_pmo_wow.c | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/components/pmo/core/src/wlan_pmo_suspend_resume.c b/components/pmo/core/src/wlan_pmo_suspend_resume.c index 9d338f9c5602..b741923824ba 100644 --- a/components/pmo/core/src/wlan_pmo_suspend_resume.c +++ b/components/pmo/core/src/wlan_pmo_suspend_resume.c @@ -448,8 +448,14 @@ static QDF_STATUS pmo_core_psoc_configure_suspend(struct wlan_objmgr_psoc *psoc, if (pmo_core_is_wow_applicable(psoc)) { pmo_debug("WOW Suspend"); pmo_core_apply_lphb(psoc); - - pmo_core_configure_dynamic_wake_events(psoc); + /* + * Dynamic wake events should not be needed for runtime PM. + * Any wake events can be configed by default if they are + * really needed for runtime PM. In fact, most of them are + * only needed for system suspend. + */ + if (!is_runtime_pm) + pmo_core_configure_dynamic_wake_events(psoc); pmo_core_update_wow_enable(psoc_ctx, true); pmo_core_update_wow_enable_cmd_sent(psoc_ctx, false); } else { diff --git a/components/pmo/core/src/wlan_pmo_wow.c b/components/pmo/core/src/wlan_pmo_wow.c index 5453cac92037..9564b064094f 100644 --- a/components/pmo/core/src/wlan_pmo_wow.c +++ b/components/pmo/core/src/wlan_pmo_wow.c @@ -422,6 +422,9 @@ void pmo_set_sta_wow_bitmask(uint32_t *bitmask, uint32_t wow_bitmap_size) pmo_set_wow_event_bitmap(WOW_11D_SCAN_EVENT, wow_bitmap_size, bitmask); + pmo_set_wow_event_bitmap(WOW_NLO_SCAN_COMPLETE_EVENT, + wow_bitmap_size, + bitmask); } void pmo_set_sap_wow_bitmask(uint32_t *bitmask, uint32_t wow_bitmap_size)