From 7b48192e1fc9f45bf56070139a9bbb16d119904d Mon Sep 17 00:00:00 2001 From: Amruta Kulkarni Date: Fri, 7 May 2021 17:08:54 -0700 Subject: [PATCH] qcacmn: Add new assoc and nonassoc ini for 6g scan Add new ini's for assoc active and passive dwell time for 6g. These will be applied if STA is connected. Change-Id: I680fbd3038968ecf6ff9920fff982456135bfd77 CRs-Fixed: 2941359 --- umac/scan/core/src/wlan_scan_main.h | 4 ++ umac/scan/core/src/wlan_scan_manager.c | 7 +++ umac/scan/dispatcher/inc/wlan_scan_cfg.h | 47 +++++++++++++++++++ umac/scan/dispatcher/src/wlan_scan_ucfg_api.c | 4 ++ 4 files changed, 62 insertions(+) diff --git a/umac/scan/core/src/wlan_scan_main.h b/umac/scan/core/src/wlan_scan_main.h index 29c0e08e174a..709674962189 100644 --- a/umac/scan/core/src/wlan_scan_main.h +++ b/umac/scan/core/src/wlan_scan_main.h @@ -304,6 +304,8 @@ struct extscan_def_config { * @active_dwell_2g: default active dwell time for 2G channels, if it's not zero * @active_dwell_6g: default active dwell time for 6G channels * @passive_dwell_6g: default passive dwell time for 6G channels + * @active_dwell_time_6g_conc: default concurrent active dwell time for 6G + * @passive_dwell_time_6g_conc: default concurrent passive dwell time for 6G * @passive_dwell:default passive dwell time * @max_rest_time: default max rest time * @sta_miracast_mcc_rest_time: max rest time for miracast and mcc @@ -391,6 +393,8 @@ struct scan_default_params { uint32_t active_dwell_2g; uint32_t active_dwell_6g; uint32_t passive_dwell_6g; + uint32_t active_dwell_time_6g_conc; + uint32_t passive_dwell_time_6g_conc; uint32_t passive_dwell; uint32_t max_rest_time; uint32_t sta_miracast_mcc_rest_time; diff --git a/umac/scan/core/src/wlan_scan_manager.c b/umac/scan/core/src/wlan_scan_manager.c index c4bc918731b5..de436566c474 100644 --- a/umac/scan/core/src/wlan_scan_manager.c +++ b/umac/scan/core/src/wlan_scan_manager.c @@ -793,6 +793,13 @@ static void scm_req_update_concurrency_params(struct wlan_objmgr_vdev *vdev, scm_debug("NDP active modify dwell time 2ghz %d", req->scan_req.dwell_time_active_2g); } + + if (sta_active) { + req->scan_req.dwell_time_active_6g = + scan_obj->scan_def.active_dwell_time_6g_conc; + req->scan_req.dwell_time_passive_6g = + scan_obj->scan_def.passive_dwell_time_6g_conc; + } } /** diff --git a/umac/scan/dispatcher/inc/wlan_scan_cfg.h b/umac/scan/dispatcher/inc/wlan_scan_cfg.h index c213ea598431..09c6ed4051e9 100644 --- a/umac/scan/dispatcher/inc/wlan_scan_cfg.h +++ b/umac/scan/dispatcher/inc/wlan_scan_cfg.h @@ -221,6 +221,51 @@ enum scan_mode_6ghz { 0, 10000, 30,\ CFG_VALUE_OR_DEFAULT, "passive dwell time for 6G channels") +/* + * + * active_max_channel_time_6g_conc - Set max time for active 6G + * channel scan when associated to AP. + * @Min: 0 + * @Max: 10000 + * @Default: 40 + * + * This ini is used to set maximum time in msecs spent in + * active 6G channel scan + * + * Related: None + * + * Usage: External + * + * + */ +#define CFG_ACTIVE_MAX_6G_CHANNEL_TIME_CONC CFG_INI_UINT(\ + "active_max_channel_time_6g_conc",\ + 0, 10000, 40,\ + CFG_VALUE_OR_DEFAULT, "active conc dwell time for 6G channels") + +/* + * + * passive_max_channel_time_6g_conc - Set max time for passive 6G + * channel scan when associated to AP. + * @Min: 0 + * @Max: 10000 + * @Default: 40 + * + * This ini is used to set maximum time in msecs spent in + * passive 6G chan scan + * + * Related: None + * + * Usage: External + * + * + */ +#define CFG_PASSIVE_MAX_6G_CHANNEL_TIME_CONC CFG_INI_UINT(\ + "passive_max_channel_time_6g_conc",\ + 0, 10000, 40,\ + CFG_VALUE_OR_DEFAULT,\ + "passive conc dwell time for 6G channels") + /* * * gPassiveMaxChannelTime - Set max channel time for passive scan @@ -1346,6 +1391,8 @@ enum scan_mode_6ghz { CFG(CFG_PASSIVE_MAX_CHANNEL_TIME) \ CFG(CFG_ACTIVE_MAX_6G_CHANNEL_TIME) \ CFG(CFG_PASSIVE_MAX_6G_CHANNEL_TIME) \ + CFG(CFG_ACTIVE_MAX_6G_CHANNEL_TIME_CONC) \ + CFG(CFG_PASSIVE_MAX_6G_CHANNEL_TIME_CONC) \ CFG(CFG_SCAN_NUM_PROBES) \ CFG(CFG_SCAN_PROBE_REPEAT_TIME) \ CFG(CFG_ADAPTIVE_SCAN_DWELL_MODE) \ diff --git a/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c b/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c index eb16661c62b9..153eb17763cf 100644 --- a/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c +++ b/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c @@ -879,6 +879,10 @@ wlan_scan_global_init(struct wlan_objmgr_psoc *psoc, cfg_get(psoc, CFG_ACTIVE_MAX_6G_CHANNEL_TIME); scan_obj->scan_def.passive_dwell_6g = cfg_get(psoc, CFG_PASSIVE_MAX_6G_CHANNEL_TIME); + scan_obj->scan_def.active_dwell_time_6g_conc = + cfg_get(psoc, CFG_ACTIVE_MAX_6G_CHANNEL_TIME_CONC); + scan_obj->scan_def.passive_dwell_time_6g_conc = + cfg_get(psoc, CFG_PASSIVE_MAX_6G_CHANNEL_TIME_CONC); scan_obj->scan_def.passive_dwell = cfg_get(psoc, CFG_PASSIVE_MAX_CHANNEL_TIME); scan_obj->scan_def.max_rest_time = SCAN_MAX_REST_TIME;