From 6fc5d5803cc63b96973a7d6b91ec83919aaec8f0 Mon Sep 17 00:00:00 2001 From: gaurank kathpalia Date: Fri, 14 Jun 2019 15:06:18 +0530 Subject: [PATCH] qcacld-3.0: Allow simultaneous scans for Hostapd scan Currently the drivers blocks every simultaneous scan that comes to the driver, and returns BUSY. here if the STA SCAN which is low priority after connection comes, and at the same time ACS has completed and the hostapd tries to do a HT scan, it would get error as BUSY, and it will try to scan again and again until successful or the timeout happens. This will in turn delay the hotspot bringup as start ap does not come until the hostapd does a OBSS scan. Fix is to skip the check of simultaneous scan for SAP, and make the priority of scan request high for SAP scan. Change-Id: I5625a3e7c05f75238771ea1ec35b80ae5113bbc3 CRs-Fixed: 2471854 --- core/hdd/src/wlan_hdd_scan.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_scan.c b/core/hdd/src/wlan_hdd_scan.c index 4646d0a2a0f6..0a4cc7293517 100644 --- a/core/hdd/src/wlan_hdd_scan.c +++ b/core/hdd/src/wlan_hdd_scan.c @@ -681,8 +681,13 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy, !qdf_mem_cmp(&request->ssids[0], "DIRECT-", 7)) ucfg_p2p_status_scan(vdev); - /* set priority as SCAN_PRIORITY_COUNT to use default scan priority */ - params.priority = SCAN_PRIORITY_COUNT; + /* If this a scan on SAP adapter, use scan priority high */ + if (adapter->device_mode == QDF_SAP_MODE) + params.priority = SCAN_PRIORITY_HIGH; + else + /* Use default scan priority */ + params.priority = SCAN_PRIORITY_COUNT; + status = wlan_cfg80211_scan(vdev, request, ¶ms); hdd_objmgr_put_vdev(vdev); error: