From 14b120fdc422e62e0ca28c8e04e1898ebeac3460 Mon Sep 17 00:00:00 2001 From: Will Huang Date: Mon, 14 Jan 2019 17:26:14 +0800 Subject: [PATCH] qcacld-3.0: Move hdd_override_all_ps() to after psoc create hdd_override_all_ps() has been changed to override ini setting by calling ucfg_mlme_override_bmps_imps(), which need a valid psoc, so move it after hdd_objmgr_create_and_store_psoc(). Looks put it in hdd_override_ini_config() is a good choice. Change-Id: Ia902a5a94ae2e06f984473fc69628c114f35b052 CRs-Fixed: 2381140 --- core/hdd/inc/wlan_hdd_cfg.h | 16 ++++++++++++++++ core/hdd/src/wlan_hdd_cfg.c | 18 +----------------- core/hdd/src/wlan_hdd_main.c | 3 +++ 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index f0088ec19d0b..eb110ec698aa 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -1156,4 +1156,20 @@ QDF_STATUS hdd_update_nss(struct hdd_adapter *adapter, uint8_t nss); * Return: true on success, else false */ bool hdd_dfs_indicate_radar(struct hdd_context *hdd_ctx); + +/** + * hdd_override_all_ps() - overrides to disables all the powersave features. + * @hdd_ctx: Pointer to HDD context. + * Overrides below powersave ini configurations. + * gEnableImps=0 + * gEnableBmps=0 + * gRuntimePM=0 + * gWlanAutoShutdown = 0 + * gEnableSuspend=0 + * gEnablePowerSaveOffload=0 + * gEnableWoW=0 + * + * Return: None + */ +void hdd_override_all_ps(struct hdd_context *hdd_ctx); #endif diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 24025e490a92..3df3dc41b289 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -1183,21 +1183,7 @@ static void hdd_disable_auto_shutdown(struct hdd_config *cfg_ini) } #endif -/** - * hdd_override_all_ps() - overrides to disables all the powersave features. - * @hdd_ctx: Pointer to HDD context. - * Overrides below powersave ini configurations. - * gEnableImps=0 - * gEnableBmps=0 - * gRuntimePM=0 - * gWlanAutoShutdown = 0 - * gEnableSuspend=0 - * gEnablePowerSaveOffload=0 - * gEnableWoW=0 - * - * Return: None - */ -static void hdd_override_all_ps(struct hdd_context *hdd_ctx) +void hdd_override_all_ps(struct hdd_context *hdd_ctx) { struct hdd_config *cfg_ini = hdd_ctx->config; @@ -1316,8 +1302,6 @@ QDF_STATUS hdd_parse_config_ini(struct hdd_context *hdd_ctx) /* Loop through the registry table and apply all these configs */ qdf_status = hdd_apply_cfg_ini(hdd_ctx, cfg_ini_table, i); - if (QDF_GLOBAL_MONITOR_MODE == cds_get_conparam()) - hdd_override_all_ps(hdd_ctx); config_exit: release_firmware(fw); diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 89ec8f66921d..ba6af6b823a5 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9115,6 +9115,9 @@ static void hdd_override_ini_config(struct hdd_context *hdd_ctx) hdd_ctx->config->action_oui_enable = 0; hdd_err("Ignore action oui ini, since no action_oui component"); } + + if (QDF_GLOBAL_MONITOR_MODE == cds_get_conparam()) + hdd_override_all_ps(hdd_ctx); } #ifdef ENABLE_MTRACE_LOG