From fc2803db9222d65555b6ddfcda8d83d6a4847752 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Lokere Date: Mon, 11 Jan 2016 19:31:38 -0800 Subject: [PATCH] qcacld-3.0: Set the IMPS enable/disable based on INI Send IMPS disable cmd to FW if IMPS is disabled in INI. Change-Id: Ib5e663d1966ab059b69aa0b7a3bc92a99dd6368a CRs-Fixed: 962402 --- core/hdd/src/wlan_hdd_cfg.c | 14 ++++---------- core/hdd/src/wlan_hdd_main.c | 5 ++++- 2 files changed, 8 insertions(+), 11 deletions(-) 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