From 10ea93ec1d60b514f216d6d21c2112e58296a815 Mon Sep 17 00:00:00 2001 From: Utkarsh Bhatnagar Date: Thu, 20 Aug 2020 17:40:50 +0530 Subject: [PATCH] qcacmn: update SAP and P2P Go dwell time seperately For SAP, the dwell time cannot exceed 32 ms as it can't go offchannel more than 32 ms. For Go, since it advertise NOA to annouce the absense period, it can have regular dwell time which is 40 ms. This was done increased scan latency was seen across different targets. Change-Id: I59a827380dbd76780eaebd8fff25a2eff2ef5107 CRs-Fixed: 2730638 --- umac/scan/core/src/wlan_scan_manager.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/umac/scan/core/src/wlan_scan_manager.c b/umac/scan/core/src/wlan_scan_manager.c index 74bf6bdea027..9db8a082710d 100644 --- a/umac/scan/core/src/wlan_scan_manager.c +++ b/umac/scan/core/src/wlan_scan_manager.c @@ -638,14 +638,24 @@ static void scm_req_update_concurrency_params(struct wlan_objmgr_vdev *vdev, * 2.if DBS is supported and SAP is not on 2g, * do not reset active dwell time for 2g. */ + + /* + * For SAP, the dwell time cannot exceed 32 ms as it can't go + * offchannel more than 32 ms. For Go, since we + * advertise NOA, GO can have regular dwell time which is 40 ms. + */ if ((ap_present && sap_peer_count) || (go_present && go_peer_count)) { - if (policy_mgr_is_hw_dbs_capable(psoc) && - policy_mgr_is_sap_go_on_2g(psoc)) { - req->scan_req.dwell_time_active_2g = - QDF_MIN(req->scan_req.dwell_time_active, - (SCAN_CTS_DURATION_MS_MAX - - SCAN_ROAM_SCAN_CHANNEL_SWITCH_TIME)); + if ((policy_mgr_is_hw_dbs_capable(psoc) && + policy_mgr_is_sap_go_on_2g(psoc)) || + !policy_mgr_is_hw_dbs_capable(psoc)) { + if (ap_present) + req->scan_req.dwell_time_active_2g = + QDF_MIN(req->scan_req.dwell_time_active, + (SCAN_CTS_DURATION_MS_MAX - + SCAN_ROAM_SCAN_CHANNEL_SWITCH_TIME)); + else + req->scan_req.dwell_time_active_2g = 0; } req->scan_req.min_rest_time = req->scan_req.max_rest_time; }