diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 35de07fca797..740fb1a9ef3e 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -12284,6 +12284,27 @@ enum hdd_external_acs_freq_band { * Usage: External * * + * 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 + * + * + */ +#define CFG_ENABLE_PHY_REG "gEnableFastPwrTransition" +#define CFG_PHY_REG_DEFAULT (0x0) +#define CFG_PHY_REG_MIN (0x0) +#define CFG_PHY_REG_MAX (0x2) + +/* + * Type declarations */ #define CFG_CHAN_BAND_WEIGHTAGE_NAME "chan_band_weightage" #define CFG_CHAN_BAND_WEIGHTAGE_DEFAULT (2) @@ -14038,6 +14059,7 @@ struct hdd_config { int8_t mbo_current_rssi_mcc_thres; int8_t mbo_candidate_rssi_btc_thres; uint8_t packet_filters_bitmap; + 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 97cf91a44408..b8766311db19 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -4338,6 +4338,14 @@ struct 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, 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 | @@ -6958,6 +6966,9 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx) hdd_ctx->config->oce_wan_score_slots15_to_12); hdd_debug("Name = [%s] value = [0x%x]", CFG_VC_MODE_BITMAP, hdd_ctx->config->vc_mode_cfg_bitmap); + hdd_debug("Name = [%s] Value = [%u]", + CFG_ENABLE_PHY_REG, + hdd_ctx->config->enable_phy_reg_retention); } @@ -9068,6 +9079,5 @@ QDF_STATUS hdd_update_nss(struct hdd_context *hdd_ctx, uint8_t nss) status = false; hdd_set_policy_mgr_user_cfg(hdd_ctx); - return (status == false) ? QDF_STATUS_E_FAILURE : QDF_STATUS_SUCCESS; } diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 509dfe54e7db..1046c9a21eb2 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -9411,6 +9411,11 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx, struct hdd_adapter *adapter) sme_cli_set_command(0, WMI_PDEV_AUTO_DETECT_POWER_FAILURE, hdd_ctx->config->auto_pwr_save_fail_mode, PDEV_CMD); + + 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; cds_disable: