summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanumanth Reddy Pothula <c_hpothu@codeaurora.org>2017-01-07 14:08:57 +0530
committerqcabuildsw <qcabuildsw@localhost>2017-01-12 02:19:34 -0800
commit49080b02a94034f2621110cc15be7af97b2644e7 (patch)
tree80de5a6243102f922d5d1cc164742b4a4fb23793
parent8c0dc469acdfe208ffc7e2e22b6f629d9f1123a5 (diff)
qcacld-3.0: Add ini param to support power collapse of phy registers
Add a new ini param to enable power collapse of physical registers. ini values can be: 0-Disable Phy register retention 1-Statically enable Phy register retention 2-Dynamically enable/disable Phy register retention by default ini value is set to zero. Change-Id: Ia922c4c25a47b3251c765fda5d4189c69d1a1d14 CRs-Fixed: 1100324
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h22
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c11
-rw-r--r--core/hdd/src/wlan_hdd_main.c4
3 files changed, 37 insertions, 0 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index c50bc47f2306..0c161a0f4cae 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -6676,6 +6676,27 @@ enum dot11p_mode {
#define CFG_EXTWOW_TCP_RX_TIMEOUT_DEFAULT (200)
#endif
+/*
+ * <ini>
+ * gEnableFastPwrTransition - Configuration for fast power transition
+ * @Min: 0
+ * @Max: 2
+ * @Default: 0
+ *
+ * This ini supported values:
+ * 0x0: Phy register retention disabled (Higher timeline, Good for power)
+ * 0x1: Phy register retention statically enabled
+ * 0x2: Phy register retention enabled/disabled dynamically
+ *
+ * Usage: Internal
+ *
+ * </ini>
+ */
+#define CFG_ENABLE_PHY_REG_NAME "gEnableFastPwrTransition"
+#define CFG_PHY_REG_DEFAULT (0x0)
+#define CFG_PHY_REG_MIN (0x0)
+#define CFG_PHY_REG_MAX (0x2)
+
/*---------------------------------------------------------------------------
Type declarations
-------------------------------------------------------------------------*/
@@ -7381,6 +7402,7 @@ struct hdd_config {
uint32_t per_roam_rest_time;
uint32_t max_sched_scan_plan_interval;
uint32_t max_sched_scan_plan_iterations;
+ uint8_t enable_phy_reg_retention;
};
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index b240d39682b3..45973343b698 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -4089,6 +4089,14 @@ REG_TABLE_ENTRY g_registry_table[] = {
CFG_SIFS_BURST_DURATION_DEFAULT,
CFG_SIFS_BURST_DURATION_MIN,
CFG_SIFS_BURST_DURATION_MAX),
+
+ REG_VARIABLE(CFG_ENABLE_PHY_REG_NAME, WLAN_PARAM_HexInteger,
+ struct hdd_config, enable_phy_reg_retention,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_PHY_REG_DEFAULT,
+ CFG_PHY_REG_MIN,
+ CFG_PHY_REG_MAX),
+
REG_VARIABLE(CFG_OPTIMIZE_CA_EVENT_NAME, WLAN_PARAM_Integer,
struct hdd_config, goptimize_chan_avoid_event,
VAR_FLAGS_OPTIONAL |
@@ -5674,6 +5682,9 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
hdd_info("Name = [%s] Value = [%u]",
CFG_CRASH_FW_TIMEOUT_NAME,
pHddCtx->config->fw_timeout_crash);
+ hdd_info("Name = [%s] Value = [%u]",
+ CFG_ENABLE_PHY_REG_NAME,
+ pHddCtx->config->enable_phy_reg_retention);
hdd_per_roam_print_ini_config(pHddCtx);
}
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index a53035f84264..8febd2bfc3ed 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -7902,6 +7902,10 @@ int hdd_configure_cds(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter)
if (cds_register_dp_cb(&dp_cbacks) != QDF_STATUS_SUCCESS)
hdd_err("Unable to register datapath callbacks in CDS");
+ if (hdd_ctx->config->enable_phy_reg_retention)
+ wma_cli_set_command(0, WMI_PDEV_PARAM_FAST_PWR_TRANSITION,
+ hdd_ctx->config->enable_phy_reg_retention, PDEV_CMD);
+
return 0;
hdd_features_deinit: