From 8cc132d398bed90c9087e0141b4764bb7283f0d8 Mon Sep 17 00:00:00 2001 From: Alan Chen Date: Mon, 28 Sep 2020 11:04:11 -0700 Subject: [PATCH] qcacld-3.0: Add a new ini item for modulated DTIM on system suspend Add a new ini item enable_mod_dtim_system_suspend to control the modulated DTIM on system suspend feature. This ini is used to set modulated DTIM configuration: Current values of enable_mod_dtim_on_system_suspend: 0 -> Modulated DTIM will be enabled for every wow entry (RTPM wow + System suspend wow) 1 -> Enable modulated DTIM only for System suspend wow. For RTPM wow, the device will stay in DTIM 1 (non-modulated DTIM) Change-Id: Ia3a9d259d8ba1e483ea3e8e7f99f60bbc27c67af CRs-Fixed: 2787108 --- components/pmo/core/src/wlan_pmo_main.c | 2 ++ .../pmo/dispatcher/inc/wlan_pmo_common_cfg.h | 31 ++++++++++++++++++- .../inc/wlan_pmo_common_public_struct.h | 3 ++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/components/pmo/core/src/wlan_pmo_main.c b/components/pmo/core/src/wlan_pmo_main.c index c7c5102727..33b679878e 100644 --- a/components/pmo/core/src/wlan_pmo_main.c +++ b/components/pmo/core/src/wlan_pmo_main.c @@ -186,6 +186,8 @@ static void wlan_pmo_init_cfg(struct wlan_objmgr_psoc *psoc, psoc_cfg->sta_mod_dtim = cfg_get(psoc, CFG_PMO_ENABLE_MODULATED_DTIM); psoc_cfg->enable_mc_list = cfg_get(psoc, CFG_PMO_MC_ADDR_LIST_ENABLE); psoc_cfg->power_save_mode = cfg_get(psoc, CFG_PMO_POWERSAVE_MODE); + psoc_cfg->is_mod_dtim_on_sys_suspend_enabled = + cfg_get(psoc, CFG_PMO_MOD_DTIM_ON_SYS_SUSPEND); psoc_cfg->default_power_save_mode = psoc_cfg->power_save_mode; psoc_cfg->max_ps_poll = cfg_get(psoc, CFG_PMO_MAX_PS_POLL); diff --git a/components/pmo/dispatcher/inc/wlan_pmo_common_cfg.h b/components/pmo/dispatcher/inc/wlan_pmo_common_cfg.h index 91a337ad5c..3a9f1cb26d 100644 --- a/components/pmo/dispatcher/inc/wlan_pmo_common_cfg.h +++ b/components/pmo/dispatcher/inc/wlan_pmo_common_cfg.h @@ -219,6 +219,34 @@ CFG_VALUE_OR_DEFAULT, \ "Optimized Power Management") +/* + * + * enable_mod_dtim_on_system_suspend - enable modulated DTIM + * on system suspend display off case + * @Min: 0 + * @Max: 1 + * @Default: 0 + * + * This ini is used to set modulated DTIM configuration: + * Current values of enable_mod_dtim_on_system_suspend: + * 0 -> Modulated DTIM will be enabled for every wow entry + * (RTPM wow + System suspend wow) + * 1 -> Enable modulated DTIM only for System suspend wow. + * For RTPM wow, the device will stay in DTIM 1 (non-modulated DTIM) + * + * Related: None + * + * Supported Feature: Modulated DTIM + * + * Usage: External + * + * + */ +#define CFG_PMO_MOD_DTIM_ON_SYS_SUSPEND CFG_INI_BOOL( \ + "enable_mod_dtim_on_system_suspend", \ + 0, \ + "Modulated DTIM on System suspend wow") + /* * * gMaxPsPoll - Max powersave poll @@ -391,6 +419,7 @@ CFG(CFG_PMO_ACTIVE_MODE) \ CFG(CFG_PMO_PWR_FAILURE) \ CFG(CFG_PMO_WOW_DATA_INACTIVITY_TIMEOUT) \ - CFG(CFG_RA_RATE_LIMIT_INTERVAL) + CFG(CFG_RA_RATE_LIMIT_INTERVAL) \ + CFG(CFG_PMO_MOD_DTIM_ON_SYS_SUSPEND) #endif /* WLAN_PMO_COMMON_CFG_H__ */ diff --git a/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h b/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h index 80c6d5716b..3e85676d7e 100644 --- a/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h +++ b/components/pmo/dispatcher/inc/wlan_pmo_common_public_struct.h @@ -305,6 +305,8 @@ enum active_apf_mode { * @active_mc_bc_apf_mode: Setting that determines how APF is applied in * active mode for MC/BC packets * @ito_repeat_count: Indicates ito repeated count + * @is_mod_dtim_on_sys_suspend_enabled: true when mod dtim is enabled for + * system suspend wow else false */ struct pmo_psoc_cfg { bool ptrn_match_enable_all_vdev; @@ -368,6 +370,7 @@ struct pmo_psoc_cfg { enum active_apf_mode active_uc_apf_mode; enum active_apf_mode active_mc_bc_apf_mode; uint8_t ito_repeat_count; + bool is_mod_dtim_on_sys_suspend_enabled; }; /**