qcacld-3.0: Add ini hostscan_adaptive_dwell_mode_no_conn

This ini will set the algo used in dwell time optimization
during host scan without connection.

Change-Id: Ie81636d32b6c42651aa9b5de52889970c17f6aca
CRs-Fixed: 2159656
This commit is contained in:
Paul Zhang 2017-12-20 09:24:25 +08:00 • committed by snandini
commit 72697bdc04
6 changed files with 62 additions and 5 deletions

View file

@ -1309,13 +1309,14 @@ enum hdd_dot11_mode {
/*
* <ini>
* hostscan_adaptive_dwell_mode - Enable adaptive dwell mode
* during host scan
* during host scan with conneciton
* @Min: 0
* @Max: 4
* @Default: 1
* @Default: 2
*
* This ini will set the algo used in dwell time optimization
* during host scan. see enum wmi_dwelltime_adaptive_mode.
* during host scan with connection.
* See enum wmi_dwelltime_adaptive_mode.
* Acceptable values for this:
* 0: Default (Use firmware default mode)
* 1: Conservative optimization
@ -1334,7 +1335,38 @@ enum hdd_dot11_mode {
#define CFG_ADAPTIVE_SCAN_DWELL_MODE_NAME "hostscan_adaptive_dwell_mode"
#define CFG_ADAPTIVE_SCAN_DWELL_MODE_MIN (0)
#define CFG_ADAPTIVE_SCAN_DWELL_MODE_MAX (4)
#define CFG_ADAPTIVE_SCAN_DWELL_MODE_DEFAULT (1)
#define CFG_ADAPTIVE_SCAN_DWELL_MODE_DEFAULT (2)
/*
* <ini>
* hostscan_adaptive_dwell_mode_no_conn - Enable adaptive dwell mode
* during host scan without connection
* @Min: 0
* @Max: 4
* @Default: 1
*
* This ini will set the algo used in dwell time optimization
* during host scan without connection.
* See enum wmi_dwelltime_adaptive_mode.
* Acceptable values for this:
* 0: Default (Use firmware default mode)
* 1: Conservative optimization
* 2: Moderate optimization
* 3: Aggressive optimization
* 4: Static
*
* Related: None
*
* Supported Feature: Scan
*
* Usage: External
*
* </ini>
*/
#define CFG_ADAPTIVE_SCAN_DWELL_MODE_NC_NAME "hostscan_adaptive_dwell_mode_no_conn"
#define CFG_ADAPTIVE_SCAN_DWELL_MODE_NC_MIN (0)
#define CFG_ADAPTIVE_SCAN_DWELL_MODE_NC_MAX (4)
#define CFG_ADAPTIVE_SCAN_DWELL_MODE_NC_DEFAULT (1)
/*
* <ini>
@ -14626,6 +14658,7 @@ struct hdd_config {
uint8_t dp_trace_config[DP_TRACE_CONFIG_STRING_LENGTH];
bool adaptive_dwell_mode_enabled;
enum wmi_dwelltime_adaptive_mode scan_adaptive_dwell_mode;
enum wmi_dwelltime_adaptive_mode scan_adaptive_dwell_mode_nc;
enum wmi_dwelltime_adaptive_mode roamscan_adaptive_dwell_mode;
enum wmi_dwelltime_adaptive_mode extscan_adaptive_dwell_mode;
enum wmi_dwelltime_adaptive_mode pnoscan_adaptive_dwell_mode;

View file

@ -4272,6 +4272,13 @@ struct reg_table_entry g_registry_table[] = {
CFG_ADAPTIVE_SCAN_DWELL_MODE_MIN,
CFG_ADAPTIVE_SCAN_DWELL_MODE_MAX),
REG_VARIABLE(CFG_ADAPTIVE_SCAN_DWELL_MODE_NC_NAME, WLAN_PARAM_Integer,
struct hdd_config, scan_adaptive_dwell_mode_nc,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_ADAPTIVE_SCAN_DWELL_MODE_NC_DEFAULT,
CFG_ADAPTIVE_SCAN_DWELL_MODE_NC_MIN,
CFG_ADAPTIVE_SCAN_DWELL_MODE_NC_MAX),
REG_VARIABLE(CFG_ADAPTIVE_ROAMSCAN_DWELL_MODE_NAME, WLAN_PARAM_Integer,
struct hdd_config, roamscan_adaptive_dwell_mode,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@ -6966,6 +6973,9 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx)
hdd_debug("Name = [%s] Value = [%u]",
CFG_ADAPTIVE_SCAN_DWELL_MODE_NAME,
hdd_ctx->config->scan_adaptive_dwell_mode);
hdd_debug("Name = [%s] Value = [%u]",
CFG_ADAPTIVE_SCAN_DWELL_MODE_NC_NAME,
hdd_ctx->config->scan_adaptive_dwell_mode_nc);
hdd_debug("Name = [%s] Value = [%u]",
CFG_ADAPTIVE_ROAMSCAN_DWELL_MODE_NAME,
hdd_ctx->config->roamscan_adaptive_dwell_mode);
@ -8942,6 +8952,8 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
pConfig->enable_fatal_event;
smeConfig->csrConfig.scan_adaptive_dwell_mode =
hdd_ctx->config->scan_adaptive_dwell_mode;
smeConfig->csrConfig.scan_adaptive_dwell_mode_nc =
hdd_ctx->config->scan_adaptive_dwell_mode_nc;
smeConfig->csrConfig.roamscan_adaptive_dwell_mode =
hdd_ctx->config->roamscan_adaptive_dwell_mode;

View file

@ -1328,6 +1328,7 @@ typedef struct tagCsrConfigParam {
uint32_t edca_be_aifs;
bool enable_fatal_event;
enum wmi_dwelltime_adaptive_mode scan_adaptive_dwell_mode;
enum wmi_dwelltime_adaptive_mode scan_adaptive_dwell_mode_nc;
enum wmi_dwelltime_adaptive_mode roamscan_adaptive_dwell_mode;
struct csr_sta_roam_policy_params sta_roam_policy_params;
uint32_t tx_aggregation_size;

View file

@ -610,6 +610,7 @@ struct csr_config {
bool enable_fatal_event;
bool vendor_vht_sap;
enum wmi_dwelltime_adaptive_mode scan_adaptive_dwell_mode;
enum wmi_dwelltime_adaptive_mode scan_adaptive_dwell_mode_nc;
enum wmi_dwelltime_adaptive_mode roamscan_adaptive_dwell_mode;
struct csr_sta_roam_policy_params sta_roam_policy;
uint32_t tx_aggregation_size;

View file

@ -2857,6 +2857,8 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
pMac->roam.configParam.scan_adaptive_dwell_mode =
pParam->scan_adaptive_dwell_mode;
pMac->roam.configParam.scan_adaptive_dwell_mode_nc =
pParam->scan_adaptive_dwell_mode_nc;
pMac->roam.configParam.roamscan_adaptive_dwell_mode =
pParam->roamscan_adaptive_dwell_mode;
@ -3124,6 +3126,8 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
pParam->scan_adaptive_dwell_mode =
cfg_params->scan_adaptive_dwell_mode;
pParam->scan_adaptive_dwell_mode_nc =
cfg_params->scan_adaptive_dwell_mode_nc;
pParam->roamscan_adaptive_dwell_mode =
cfg_params->roamscan_adaptive_dwell_mode;

View file

@ -571,7 +571,13 @@ QDF_STATUS csr_scan_request(tpAniSirGlobal pMac, uint16_t sessionId,
sme_debug("updating dwell time for first scan %u",
scan_req->maxChnTime);
}
scan_req->scan_adaptive_dwell_mode = cfg_prm->scan_adaptive_dwell_mode;
if (csr_is_conn_state_disconnected(pMac, sessionId))
scan_req->scan_adaptive_dwell_mode =
cfg_prm->scan_adaptive_dwell_mode_nc;
else
scan_req->scan_adaptive_dwell_mode =
cfg_prm->scan_adaptive_dwell_mode;
status = csr_scan_copy_request(pMac, &scan_cmd->u.scanCmd.u.scanRequest,
scan_req);