summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiran Kumar Lokere <klokere@codeaurora.org>2016-11-17 17:43:36 -0800
committerqcabuildsw <qcabuildsw@localhost>2016-12-14 14:06:48 -0800
commit0ac679c91024d48a4abb7d395f688035902be519 (patch)
treeac117fc8e7e61bb96eb3e22c12caf8dccc6e2b62
parentf852712f1f01a09acaf5384798ca161fd58b5ff2 (diff)
downloadqcacld-0ac679c91024d48a4abb7d395f688035902be519.tar.gz
qcacld-3.0: Add support to configure auto PS timer
Add support to disable/configure the auto BMPS timer using INI configuration. The default value for the auto BMPS timer was set to 20 sec and when the connection is established from cmd line, DUT enters into power save once the timeout happens which can lead to issue in DHCP completion. Framework disables the power save during DHCP and enables it when DHCP is done, hence disable the auto BMPS timer by default and provide the INI configuration to configure it. Change-Id: I9732f915dd0fb552dd4943b70a6026a7a2bc80a0 CRs-Fixed: 1092305
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h7
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c3
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c9
-rw-r--r--core/sme/inc/csr_api.h1
-rw-r--r--core/sme/inc/sme_power_save.h1
-rw-r--r--core/sme/src/common/sme_power_save.c5
-rw-r--r--core/sme/src/csr/csr_api_roam.c4
7 files changed, 29 insertions, 1 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index f020259d5e..30c01601a4 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -123,6 +123,12 @@
#define CFG_ENABLE_PS_MAX (1)
#define CFG_ENABLE_PS_DEFAULT (1)
+/* Auto BMPS timer value in sec */
+#define CFG_AUTO_PS_ENABLE_TIMER_NAME "gAutoBmpsTimerValue"
+#define CFG_AUTO_PS_ENABLE_TIMER_MIN (0)
+#define CFG_AUTO_PS_ENABLE_TIMER_MAX (120)
+#define CFG_AUTO_PS_ENABLE_TIMER_DEFAULT (0)
+
#define CFG_BMPS_MINIMUM_LI_NAME "gBmpsMinListenInterval"
#define CFG_BMPS_MINIMUM_LI_MIN (1)
#define CFG_BMPS_MINIMUM_LI_MAX (65535)
@@ -3641,6 +3647,7 @@ struct hdd_config {
char PowerUsageControl[4];
bool fIsImpsEnabled;
bool is_ps_enabled;
+ uint32_t auto_bmps_timer_val;
uint32_t nBmpsModListenInterval;
uint32_t nBmpsMaxListenInterval;
uint32_t nBmpsMinListenInterval;
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index f6266c3bf3..f95e7de811 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -2067,10 +2067,11 @@ static int hdd_change_sta_state_authenticated(hdd_adapter_t *adapter,
int ret;
uint32_t timeout;
hdd_station_ctx_t *hddstactx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
+ hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
timeout = hddstactx->hdd_ReassocScenario ?
AUTO_PS_ENTRY_TIMER_DEFAULT_VALUE :
- AUTO_DEFERRED_PS_ENTRY_TIMER_DEFAULT_VALUE;
+ hdd_ctx->config->auto_bmps_timer_val * 1000;
hdd_info("Changing TL state to AUTHENTICATED for StaId= %d",
hddstactx->conn_info.staId[0]);
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 8266b5d02c..eddea65086 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -428,6 +428,13 @@ REG_TABLE_ENTRY g_registry_table[] = {
CFG_ENABLE_PS_MIN,
CFG_ENABLE_PS_MAX),
+ REG_VARIABLE(CFG_AUTO_PS_ENABLE_TIMER_NAME, WLAN_PARAM_Integer,
+ struct hdd_config, auto_bmps_timer_val,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_AUTO_PS_ENABLE_TIMER_DEFAULT,
+ CFG_AUTO_PS_ENABLE_TIMER_MIN,
+ CFG_AUTO_PS_ENABLE_TIMER_MAX),
+
REG_VARIABLE(CFG_BMPS_MINIMUM_LI_NAME, WLAN_PARAM_Integer,
struct hdd_config, nBmpsMinListenInterval,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -7163,6 +7170,8 @@ QDF_STATUS hdd_set_sme_config(hdd_context_t *pHddCtx)
pHddCtx->config->prefer_non_dfs_on_radar;
smeConfig->csrConfig.is_ps_enabled = pHddCtx->config->is_ps_enabled;
+ smeConfig->csrConfig.auto_bmps_timer_val =
+ pHddCtx->config->auto_bmps_timer_val;
hdd_set_fine_time_meas_cap(pHddCtx, smeConfig);
cds_set_multicast_logging(pHddCtx->config->multicast_host_fw_msgs);
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index 8eacac835a..818f425cad 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -1283,6 +1283,7 @@ typedef struct tagCsrConfigParam {
#endif /* FEATURE_AP_MCC_CH_AVOIDANCE */
uint8_t f_prefer_non_dfs_on_radar;
bool is_ps_enabled;
+ uint32_t auto_bmps_timer_val;
uint32_t fine_time_meas_cap;
uint32_t dual_mac_feature_disable;
uint32_t roam_dense_traffic_thresh;
diff --git a/core/sme/inc/sme_power_save.h b/core/sme/inc/sme_power_save.h
index d2dbb25e9c..2e7936cde8 100644
--- a/core/sme/inc/sme_power_save.h
+++ b/core/sme/inc/sme_power_save.h
@@ -127,6 +127,7 @@ struct ps_params {
*/
struct ps_global_info {
bool ps_enabled;
+ uint32_t auto_bmps_timer_val;
struct ps_params ps_params[MAX_SME_SESSIONS];
/* Remain in Power active till DHCP completes */
bool remain_in_power_active_till_dhcp;
diff --git a/core/sme/src/common/sme_power_save.c b/core/sme/src/common/sme_power_save.c
index f364be3c10..56ec1095c9 100644
--- a/core/sme/src/common/sme_power_save.c
+++ b/core/sme/src/common/sme_power_save.c
@@ -1001,6 +1001,11 @@ QDF_STATUS sme_ps_enable_auto_ps_timer(tHalHandle hal_ctx,
struct ps_params *ps_param = &ps_global_info->ps_params[session_id];
QDF_STATUS qdf_status;
+ if (!ps_global_info->auto_bmps_timer_val) {
+ sms_log(mac_ctx, LOGE, FL("auto_ps_timer is disabled in INI"));
+ return QDF_STATUS_SUCCESS;
+ }
+
sms_log(mac_ctx, LOGE, FL("Start auto_ps_timer for %d ms"),
timeout);
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 47f87448f8..6bb2108224 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -2581,6 +2581,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
pMac->sme.ps_global_info.ps_enabled =
pParam->is_ps_enabled;
+ pMac->sme.ps_global_info.auto_bmps_timer_val =
+ pParam->auto_bmps_timer_val;
pMac->roam.configParam.ignore_peer_ht_opmode =
pParam->ignore_peer_ht_opmode;
pMac->fine_time_meas_cap = pParam->fine_time_meas_cap;
@@ -2787,6 +2789,8 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
pParam->dual_mac_feature_disable =
pMac->dual_mac_feature_disable;
pParam->is_ps_enabled = pMac->sme.ps_global_info.ps_enabled;
+ pParam->auto_bmps_timer_val =
+ pMac->sme.ps_global_info.auto_bmps_timer_val;
pParam->fEnableDebugLog = pMac->fEnableDebugLog;
pParam->enable5gEBT = pMac->enable5gEBT;
pParam->f_sta_miracast_mcc_rest_time_val =