Browse Source

qcacmn: Go for DBS scan if atleast one session is connected

In coex mode, BT throughput test cases are getting effected as
driver is selecting non-DBS scan policy for directed scan requests.
FW is going to use only one MAC for scan when performing non-DBS
scan which inturn increases the total scan duration.
This increase in total scan duration has effect on BT throughput
test cases.

Select DBS scan policy if atleast one session is in connected
state.

CRs-Fixed: 2084608
Change-Id: I6fba26accbaed4d57c6c56a782e570b534af43c4
Ganesh Kondabattini 7 years ago
parent
commit
948539c1d3
1 changed files with 9 additions and 0 deletions
  1. 9 0
      umac/scan/dispatcher/src/wlan_scan_ucfg_api.c

+ 9 - 0
umac/scan/dispatcher/src/wlan_scan_ucfg_api.c

@@ -365,6 +365,7 @@ ucfg_scan_update_dbs_scan_ctrl_ext_flag(struct scan_start_request *req)
 	uint32_t num_chan;
 	struct wlan_objmgr_psoc *psoc;
 	uint32_t scan_dbs_policy = SCAN_DBS_POLICY_FORCE_NONDBS;
+	uint32_t conn_cnt;
 
 	psoc = wlan_vdev_get_psoc(req->vdev);
 
@@ -372,6 +373,14 @@ ucfg_scan_update_dbs_scan_ctrl_ext_flag(struct scan_start_request *req)
 			wlan_objmgr_psoc_get_dual_mac_disable(psoc))
 		goto end;
 
+	conn_cnt = policy_mgr_get_connection_count(psoc);
+	if (conn_cnt > 0) {
+		scm_debug("%d active connections, go for DBS scan",
+				conn_cnt);
+		scan_dbs_policy = SCAN_DBS_POLICY_DEFAULT;
+		goto end;
+	}
+
 	if (req->scan_req.num_ssids) {
 		scm_debug("directed SSID");
 		goto end;