diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 378d9fe96296..551f12e261ae 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -5507,20 +5507,14 @@ eCsrPhyMode hdd_cfg_xlate_to_csr_phy_mode(eHddDot11Mode dot11Mode) */ CDF_STATUS hdd_set_idle_ps_config(hdd_context_t *pHddCtx, uint32_t val) { - struct hdd_config *pConfig = pHddCtx->config; CDF_STATUS status = CDF_STATUS_SUCCESS; hddLog(LOG1, "hdd_set_idle_ps_config: Enter Val %d", val); - if (pConfig->fIsImpsEnabled) { - status = sme_set_idle_powersave_config(pHddCtx->pcds_context, - pHddCtx->hHal, val); - if (CDF_STATUS_SUCCESS != status) { - hddLog(LOGE, "Fail to Set Idle PS Config val %d", val); - } - } else { - hddLog(LOG1, "hdd_set_idle_ps_config: IMPS not enabled in ini"); - } + status = sme_set_idle_powersave_config(pHddCtx->pcds_context, + pHddCtx->hHal, val); + if (CDF_STATUS_SUCCESS != status) + hddLog(LOGE, "Fail to Set Idle PS Config val %d", val); return status; } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 0278c1dea824..6e8f8bb2428a 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -5685,7 +5685,10 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc) hdd_hostapd_channel_wakelock_init(hdd_ctx); - hdd_set_idle_ps_config(hdd_ctx, true); + if (hdd_ctx->config->fIsImpsEnabled) + hdd_set_idle_ps_config(hdd_ctx, true); + else + hdd_set_idle_ps_config(hdd_ctx, false); #ifdef FEATURE_WLAN_AUTO_SHUTDOWN if (hdd_ctx->config->WlanAutoShutdown != 0) if (sme_set_auto_shutdown_cb