diff --git a/umac/scan/core/src/wlan_scan_main.h b/umac/scan/core/src/wlan_scan_main.h index 78c40e3e47..6362db9b33 100644 --- a/umac/scan/core/src/wlan_scan_main.h +++ b/umac/scan/core/src/wlan_scan_main.h @@ -304,6 +304,7 @@ struct extscan_def_config { * @skip_dfs_chan_in_p2p_search: Skip DFS channels in p2p search. * @use_wake_lock_in_user_scan: if wake lock will be acquired during user scan * @active_dwell_2g: default active dwell time for 2G channels, if it's not zero + * @min_dwell_time_6g: default min dwell time for 6G channels * @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 @@ -393,6 +394,7 @@ struct scan_default_params { bool skip_dfs_chan_in_p2p_search; bool use_wake_lock_in_user_scan; uint32_t active_dwell_2g; + uint32_t min_dwell_time_6g; uint32_t active_dwell_6g; uint32_t passive_dwell_6g; uint32_t active_dwell_time_6g_conc; diff --git a/umac/scan/dispatcher/inc/cfg_scan.h b/umac/scan/dispatcher/inc/cfg_scan.h index ee803aaed1..a5dd3c73b9 100644 --- a/umac/scan/dispatcher/inc/cfg_scan.h +++ b/umac/scan/dispatcher/inc/cfg_scan.h @@ -179,6 +179,32 @@ enum scan_mode_6ghz { 0, 10000, PLATFORM_VALUE(80, 0),\ CFG_VALUE_OR_DEFAULT, "active dwell time for 2G channels") +/* + * + * min_channel_time_6g - Set min dwell time for 6G channels scan + * @Min: 5 + * @Max: 60 + * @Default: 25 + * + * This ini is used to set minimum time in msecs spent in 6G channels scan. + * Firmware will park on the 6G channel for this duration and if no FILS + * discovery, Beacon, Probe resp is received it will move to new channel after + * this duration. If found , it will wait for "active_max_channel_time_6g" + * duration + * + * Related: active_max_channel_time_6g + * + * Supported Feature: Scan + * + * Usage: External + * + * + */ +#define CFG_MIN_6G_CHANNEL_TIME CFG_INI_UINT(\ + "min_dwell_time_6g",\ + 5, 60, 25,\ + CFG_VALUE_OR_DEFAULT, "min dwell time for 6G channels") + /* * * active_max_channel_time_6g - Set max time for active 6G channel scan @@ -191,6 +217,8 @@ enum scan_mode_6ghz { * * Related: None * + * Supported Feature: Scan + * * Usage: External * * @@ -198,7 +226,7 @@ enum scan_mode_6ghz { #define CFG_ACTIVE_MAX_6G_CHANNEL_TIME CFG_INI_UINT(\ "active_max_channel_time_6g",\ 0, 10000, 60,\ - CFG_VALUE_OR_DEFAULT, "active dwell time for 6G channels") + CFG_VALUE_OR_DEFAULT, "max active dwell time for 6G channels") /* * @@ -209,9 +237,10 @@ enum scan_mode_6ghz { * * This ini is used to set maximum time in msecs spent in passive 6G chan scan * - * * Related: None * + * Supported Feature: Scan + * * Usage: External * * @@ -219,7 +248,7 @@ enum scan_mode_6ghz { #define CFG_PASSIVE_MAX_6G_CHANNEL_TIME CFG_INI_UINT(\ "passive_max_channel_time_6g",\ 0, 10000, 60,\ - CFG_VALUE_OR_DEFAULT, "passive dwell time for 6G channels") + CFG_VALUE_OR_DEFAULT, "max passive dwell time for 6G channels") /* * @@ -234,6 +263,8 @@ enum scan_mode_6ghz { * * Related: None * + * Supported Feature: Scan + * * Usage: External * * @@ -256,6 +287,8 @@ enum scan_mode_6ghz { * * Related: None * + * Supported Feature: Scan + * * Usage: External * * @@ -1389,6 +1422,7 @@ enum scan_mode_6ghz { CFG(CFG_INITIAL_NO_DFS_SCAN) \ CFG(CFG_ACTIVE_MAX_2G_CHANNEL_TIME) \ CFG(CFG_PASSIVE_MAX_CHANNEL_TIME) \ + CFG(CFG_MIN_6G_CHANNEL_TIME) \ CFG(CFG_ACTIVE_MAX_6G_CHANNEL_TIME) \ CFG(CFG_PASSIVE_MAX_6G_CHANNEL_TIME) \ CFG(CFG_ACTIVE_MAX_6G_CHANNEL_TIME_CONC) \ diff --git a/umac/scan/dispatcher/inc/wlan_scan_public_structs.h b/umac/scan/dispatcher/inc/wlan_scan_public_structs.h index 6c50e937d0..adbc427b42 100644 --- a/umac/scan/dispatcher/inc/wlan_scan_public_structs.h +++ b/umac/scan/dispatcher/inc/wlan_scan_public_structs.h @@ -973,6 +973,7 @@ enum scan_request_type { * @dwell_time_active: active dwell time * @dwell_time_active_2g: active dwell time for 2G channels, if it's not zero * @dwell_time_passive: passive dwell time + * @min_dwell_time_6g: 6Ghz min dwell time * @dwell_time_active_6g: 6Ghz active dwell time * @dwell_time_passive_6g: 6Ghz passive dwell time * @min_rest_time: min rest time @@ -1058,6 +1059,7 @@ struct scan_req_params { uint32_t dwell_time_active; uint32_t dwell_time_active_2g; uint32_t dwell_time_passive; + uint32_t min_dwell_time_6g; uint32_t dwell_time_active_6g; uint32_t dwell_time_passive_6g; uint32_t min_rest_time; diff --git a/umac/scan/dispatcher/src/wlan_scan_api.c b/umac/scan/dispatcher/src/wlan_scan_api.c index 2f8a96cff6..0adafac074 100644 --- a/umac/scan/dispatcher/src/wlan_scan_api.c +++ b/umac/scan/dispatcher/src/wlan_scan_api.c @@ -493,6 +493,7 @@ wlan_scan_init_default_params(struct wlan_objmgr_vdev *vdev, req->scan_req.scan_priority = def->scan_priority; req->scan_req.dwell_time_active = def->active_dwell; req->scan_req.dwell_time_active_2g = def->active_dwell_2g; + req->scan_req.min_dwell_time_6g = def->min_dwell_time_6g; req->scan_req.dwell_time_active_6g = def->active_dwell_6g; req->scan_req.dwell_time_passive_6g = def->passive_dwell_6g; req->scan_req.dwell_time_passive = def->passive_dwell; diff --git a/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c b/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c index 2d5466f40c..b51fdd9d3e 100644 --- a/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c +++ b/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c @@ -769,6 +769,8 @@ wlan_scan_global_init(struct wlan_objmgr_psoc *psoc, cfg_get(psoc, CFG_ENABLE_WAKE_LOCK_IN_SCAN); scan_obj->scan_def.active_dwell_2g = cfg_get(psoc, CFG_ACTIVE_MAX_2G_CHANNEL_TIME); + scan_obj->scan_def.min_dwell_time_6g = + cfg_get(psoc, CFG_MIN_6G_CHANNEL_TIME); scan_obj->scan_def.active_dwell_6g = cfg_get(psoc, CFG_ACTIVE_MAX_6G_CHANNEL_TIME); scan_obj->scan_def.passive_dwell_6g = diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index e18d1450fc..e1ba627f89 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -3159,6 +3159,7 @@ static QDF_STATUS send_scan_start_cmd_tlv(wmi_unified_t wmi_handle, cmd->dwell_time_active = params->dwell_time_active; cmd->dwell_time_active_2g = params->dwell_time_active_2g; cmd->dwell_time_passive = params->dwell_time_passive; + cmd->min_dwell_time_6ghz = params->min_dwell_time_6g; cmd->dwell_time_active_6ghz = params->dwell_time_active_6g; cmd->dwell_time_passive_6ghz = params->dwell_time_passive_6g; cmd->scan_start_offset = params->scan_offset_time;