From d8ee7699e6d4fd84336c745292d045ffc6c949c3 Mon Sep 17 00:00:00 2001 From: Yeshwanth Sriram Guntuka Date: Mon, 29 Oct 2018 19:45:57 +0530 Subject: [PATCH] qcacmn: Reduce scan time when in GO+STA MCC Scan on STA interface is taking around 10 secs to complete. There is a 7secs expiry time used in nl which could result in scan results received for the first 3secs, which are from 2G channels, to be flushed. Fix is to not set offchannel simultaneous feature capability, decrease the active dwell time for 2G channels to 40msecs and increase burst duration to 240msecs when GO is active. Change-Id: If014b2115048018432943d863bbe184beb498408 CRs-Fixed: 2340516 --- .../policy_mgr/src/wlan_policy_mgr_get_set_utils.c | 3 ++- umac/scan/core/src/wlan_scan_main.h | 5 +++-- umac/scan/dispatcher/src/wlan_scan_ucfg_api.c | 9 ++++++--- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c index 250b5fb94988..c41b794d0a6b 100644 --- a/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c +++ b/umac/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c @@ -3025,7 +3025,8 @@ bool policy_mgr_is_scan_simultaneous_capable(struct wlan_objmgr_psoc *psoc) (ENABLE_DBS_CXN_AND_DISABLE_DBS_SCAN == wlan_objmgr_psoc_get_dual_mac_disable(psoc)) || (ENABLE_DBS_CXN_AND_DISABLE_SIMULTANEOUS_SCAN == - wlan_objmgr_psoc_get_dual_mac_disable(psoc))) + wlan_objmgr_psoc_get_dual_mac_disable(psoc)) || + !policy_mgr_is_hw_dbs_capable(psoc)) return false; return true; diff --git a/umac/scan/core/src/wlan_scan_main.h b/umac/scan/core/src/wlan_scan_main.h index 320bcc0566f5..ee8a2927160b 100644 --- a/umac/scan/core/src/wlan_scan_main.h +++ b/umac/scan/core/src/wlan_scan_main.h @@ -85,8 +85,9 @@ #define SCAN_ROAM_SCAN_CHANNEL_SWITCH_TIME (4) #define SCAN_DWELL_TIME_PROBE_TIME_MAP_SIZE (11) #define SCAN_GO_MIN_ACTIVE_SCAN_BURST_DURATION (40) -#define SCAN_GO_MAX_ACTIVE_SCAN_BURST_DURATION (120) -#define SCAN_P2P_SCAN_MAX_BURST_DURATION (180) +#define SCAN_GO_MAX_ACTIVE_SCAN_BURST_DURATION (240) +#define SCAN_P2P_SCAN_MAX_BURST_DURATION (240) +#define SCAN_GO_BURST_SCAN_MAX_NUM_OFFCHANNELS (6) /** * struct probe_time_dwell_time - probe time, dwell time map diff --git a/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c b/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c index eb2b8118403d..32044d9139ec 100644 --- a/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c +++ b/umac/scan/dispatcher/src/wlan_scan_ucfg_api.c @@ -561,8 +561,9 @@ int ucfg_scan_get_burst_duration(int max_ch_time, * If miracast is not running, accommodate max * stations to make the scans faster */ - burst_duration = SCAN_BURST_SCAN_MAX_NUM_OFFCHANNELS * - max_ch_time; + burst_duration = SCAN_GO_BURST_SCAN_MAX_NUM_OFFCHANNELS * + max_ch_time; + if (burst_duration > SCAN_GO_MAX_ACTIVE_SCAN_BURST_DURATION) { uint8_t channels = SCAN_P2P_SCAN_MAX_BURST_DURATION / max_ch_time; @@ -628,8 +629,10 @@ static void ucfg_scan_req_update_concurrency_params( * firmware spends more time on home channel which will increase the * probability of sending beacon at TBTT */ - if (ap_present || go_present) + if (ap_present || go_present) { + req->scan_req.dwell_time_active_2g = 0; req->scan_req.min_rest_time = req->scan_req.max_rest_time; + } if (req->scan_req.p2p_scan_type == SCAN_NON_P2P_DEFAULT) { /*