From 13699a1bd8fbdffbc9c1a6ce7b63716540d8b609 Mon Sep 17 00:00:00 2001 From: Sandeep Puligilla Date: Tue, 17 Jul 2018 21:30:54 -0700 Subject: [PATCH] qcacmn: Add CFG items to scan component Add following CFG/INI items to scan component(part-2) CFG_SCAN_NUM_PROBES CFG_SCAN_PROBE_REPEAT_TIME CFG_ADAPTIVE_SCAN_DWELL_MODE CFG_IS_BSSID_HINT_PRIORITY Change-Id: Ib355d898260c660cd07103390adbfef921599c3d CRs-Fixed: 2277184 --- umac/scan/core/src/wlan_scan_main.h | 4 - umac/scan/dispatcher/inc/wlan_scan_cfg.h | 138 +++++++++++++++++- umac/scan/dispatcher/src/wlan_scan_ucfg_api.c | 14 +- 3 files changed, 142 insertions(+), 14 deletions(-) diff --git a/umac/scan/core/src/wlan_scan_main.h b/umac/scan/core/src/wlan_scan_main.h index b53799ba2d38..d13879909909 100644 --- a/umac/scan/core/src/wlan_scan_main.h +++ b/umac/scan/core/src/wlan_scan_main.h @@ -101,11 +101,9 @@ struct probe_time_dwell_time { #define SCAN_CONC_IDLE_TIME 25 #define SCAN_CONC_MAX_REST_TIME 20 #define SCAN_CONC_MIN_REST_TIME 10 -#define SCAN_REPEAT_PROBE_TIME 20 #define SCAN_PROBE_SPACING_TIME 0 #define SCAN_PROBE_DELAY 0 #define SCAN_MAX_SCAN_TIME 30000 -#define SCAN_NUM_PROBES 2 #define SCAN_NETWORK_IDLE_TIMEOUT 0 #define HIDDEN_SSID_TIME (1*60*1000) #define SCAN_CHAN_STATS_EVENT_ENAB (false) @@ -121,11 +119,9 @@ struct probe_time_dwell_time { #define SCAN_CONC_IDLE_TIME 0 #define SCAN_CONC_MAX_REST_TIME 0 #define SCAN_CONC_MIN_REST_TIME 0 -#define SCAN_REPEAT_PROBE_TIME 50 #define SCAN_PROBE_SPACING_TIME 0 #define SCAN_PROBE_DELAY 0 #define SCAN_MAX_SCAN_TIME 50000 -#define SCAN_NUM_PROBES 0 #define SCAN_NETWORK_IDLE_TIMEOUT 200 #define HIDDEN_SSID_TIME (0xFFFFFFFF) #define SCAN_CHAN_STATS_EVENT_ENAB (true) diff --git a/umac/scan/dispatcher/inc/wlan_scan_cfg.h b/umac/scan/dispatcher/inc/wlan_scan_cfg.h index b81845bb26c0..0ae2f5cce5be 100644 --- a/umac/scan/dispatcher/inc/wlan_scan_cfg.h +++ b/umac/scan/dispatcher/inc/wlan_scan_cfg.h @@ -24,18 +24,150 @@ #include "cfg_define.h" +/* + * + * gActiveMaxChannelTime - Set max channel time for active scan + * @Min: 0 + * @Max: 10000 + * @Default: 40 + * + * This ini is used to set maximum channel time in secs spent in + * active scan + * + * Related: None + * + * Usage: External + * + * + */ #define CFG_ACTIVE_MAX_CHANNEL_TIME CFG_INI_UINT(\ "gActiveMaxChannelTime",\ - 0, 10000, 40,\ + 0, 10000, MCL_OR_WIN_VALUE(40, 105),\ CFG_VALUE_OR_DEFAULT, "active dwell time") +/* + * + * gPassiveMaxChannelTime - Set max channel time for passive scan + * @Min: 0 + * @Max: 10000 + * @Default: 110 + * + * This ini is used to set maximum channel time in secs spent in + * passive scan + * + * Related: None + * + * Usage: External + * + * + */ #define CFG_PASSIVE_MAX_CHANNEL_TIME CFG_INI_UINT(\ "gPassiveMaxChannelTime",\ - 0, 10000, 100,\ + 0, 10000, MCL_OR_WIN_VALUE(100, 300),\ CFG_VALUE_OR_DEFAULT, "passive dwell time") +/* + * + * gScanNumProbes - Set the number of probes on each channel for active scan + * @Min: 0 + * @Max: 20 + * @Default: 0 + * + * This ini is used to set number of probes on each channel for + * active scan + */ +#define CFG_SCAN_NUM_PROBES CFG_INI_UINT(\ + "gScanNumProbes",\ + 0, 20, MCL_OR_WIN_VALUE(0, 5),\ + CFG_VALUE_OR_DEFAULT,\ + "number of probes on each channel") + +/* + * + * gScanProbeRepeatTime - Set the probe repeat time on each channel + * @Min: 0 + * @Max: 30 + * @Default: 0 + * + * This ini is used to set probe repeat time on each channel for + * active scan + * + * Related: None + * + * Supported Feature: Scan + * + * Usage: External + * + * + */ +#define CFG_SCAN_PROBE_REPEAT_TIME CFG_INI_UINT(\ + "gScanProbeRepeatTime",\ + 0, 30, MCL_OR_WIN_VALUE(20, 50),\ + CFG_VALUE_OR_DEFAULT,\ + "probe repeat time on each channel") + +/* + * + * hostscan_adaptive_dwell_mode - Enable adaptive dwell mode + * during host scan with conneciton + * @Min: 0 + * @Max: 4 + * @Default: 2 + * + * This ini will set the algo used in dwell time optimization + * during host scan with 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 + * + * + */ +#define CFG_ADAPTIVE_SCAN_DWELL_MODE CFG_INI_UINT(\ + "hostscan_adaptive_dwell_mode",\ + 0, 4, 2,\ + CFG_VALUE_OR_DEFAULT,\ + "Enable adaptive dwell mode") +/* + * + * is_bssid_hint_priority - Set priority for connection with bssid_hint + * BSSID. + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to give priority to BSS for connection which comes + * as part of bssid_hint + * + * Related: None + * + * Supported Feature: STA + * + * Usage: External + * + * + */ +#define CFG_IS_BSSID_HINT_PRIORITY CFG_INI_UINT(\ + "is_bssid_hint_priority",\ + 0, 1, 0,\ + CFG_VALUE_OR_DEFAULT, \ + "Set priority for connection with bssid_hint") + #define CFG_SCAN_ALL \ CFG(CFG_ACTIVE_MAX_CHANNEL_TIME) \ - CFG(CFG_PASSIVE_MAX_CHANNEL_TIME) + CFG(CFG_PASSIVE_MAX_CHANNEL_TIME) \ + CFG(CFG_SCAN_NUM_PROBES) \ + CFG(CFG_SCAN_PROBE_REPEAT_TIME) \ + CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE) \ + CFG(CFG_IS_BSSID_HINT_PRIORITY) #endif diff --git a/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c b/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c index d8841693db71..fb7b45b8bd67 100644 --- a/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c +++ b/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c @@ -1411,17 +1411,21 @@ wlan_scan_global_init(struct wlan_objmgr_psoc *psoc, scan_obj->scan_def.conc_max_rest_time = SCAN_CONC_MAX_REST_TIME; scan_obj->scan_def.conc_min_rest_time = SCAN_CONC_MIN_REST_TIME; scan_obj->scan_def.conc_idle_time = SCAN_CONC_IDLE_TIME; - scan_obj->scan_def.repeat_probe_time = SCAN_REPEAT_PROBE_TIME; + scan_obj->scan_def.repeat_probe_time = + cfg_get(psoc, CFG_SCAN_PROBE_REPEAT_TIME); scan_obj->scan_def.probe_spacing_time = SCAN_PROBE_SPACING_TIME; scan_obj->scan_def.probe_delay = SCAN_PROBE_DELAY; scan_obj->scan_def.burst_duration = SCAN_BURST_DURATION; scan_obj->scan_def.max_scan_time = SCAN_MAX_SCAN_TIME; - scan_obj->scan_def.num_probes = SCAN_NUM_PROBES; + scan_obj->scan_def.num_probes = cfg_get(psoc, CFG_SCAN_NUM_PROBES); scan_obj->scan_def.scan_cache_aging_time = SCAN_CACHE_AGING_TIME; scan_obj->scan_def.max_bss_per_pdev = SCAN_MAX_BSS_PDEV; scan_obj->scan_def.scan_priority = SCAN_PRIORITY; scan_obj->scan_def.idle_time = SCAN_NETWORK_IDLE_TIMEOUT; - scan_obj->scan_def.adaptive_dwell_time_mode = SCAN_DWELL_MODE_DEFAULT; + scan_obj->scan_def.adaptive_dwell_time_mode = + cfg_get(psoc, CFG_ADAPTIVE_SCAN_DWELL_MODE); + scan_obj->scan_def.is_bssid_hint_priority = + cfg_get(psoc, CFG_IS_BSSID_HINT_PRIORITY); /* scan contrl flags */ scan_obj->scan_def.scan_f_passive = true; scan_obj->scan_def.scan_f_ofdm_rates = true; @@ -1906,12 +1910,8 @@ QDF_STATUS ucfg_scan_update_user_config(struct wlan_objmgr_psoc *psoc, scan_def->scan_cache_aging_time = scan_cfg->scan_cache_aging_time; scan_def->prefer_5ghz = scan_cfg->prefer_5ghz; scan_def->select_5ghz_margin = scan_cfg->select_5ghz_margin; - scan_def->adaptive_dwell_time_mode = scan_cfg->scan_dwell_time_mode; scan_def->scan_f_chan_stat_evnt = scan_cfg->is_snr_monitoring_enabled; scan_obj->ie_whitelist = scan_cfg->ie_whitelist; - scan_def->repeat_probe_time = scan_cfg->usr_cfg_probe_rpt_time; - scan_def->num_probes = scan_cfg->usr_cfg_num_probes; - scan_def->is_bssid_hint_priority = scan_cfg->is_bssid_hint_priority; scan_def->enable_mac_spoofing = scan_cfg->enable_mac_spoofing; scan_def->sta_miracast_mcc_rest_time = scan_cfg->sta_miracast_mcc_rest_time;