浏览代码

qcacld-3.0: Correct the p2p scan parameters when SAP is beaconing

Correct the p2p scan's active dwell time, passive dwell time and
burst duration when a SAP session is already active. Since the
max duration of CTS-to-self is 32ms, the dwell time for p2p scans
are calculated in such a way that it does not cross 32ms if SAP
is running. This is in line with the existing STA scan parameters
when SAP is active.

Change-Id: I8089e01025ba07cc18684c277c36bb1694264214
CRs-Fixed: 998555
Manishekar Chandrasekaran 9 年之前
父节点
当前提交
3904436d36
共有 1 个文件被更改,包括 14 次插入14 次删除
  1. 14 14
      core/wma/src/wma_scan_roam.c

+ 14 - 14
core/wma/src/wma_scan_roam.c

@@ -295,20 +295,6 @@ QDF_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
 					WMA_3PORT_CONC_SCAN_MAX_BURST_DURATION;
 				break;
 			}
-			if (wma_is_sap_active(wma_handle)) {
-				/* Background scan while SoftAP is sending beacons.
-				 * Max duration of CTS2self is 32 ms, which limits
-				 * the dwell time.
-				 */
-				cmd->dwell_time_active =
-				   QDF_MIN(scan_req->maxChannelTime,
-					   (WMA_CTS_DURATION_MS_MAX -
-					    WMA_ROAM_SCAN_CHANNEL_SWITCH_TIME));
-				cmd->dwell_time_passive =
-					cmd->dwell_time_active;
-				cmd->burst_duration = 0;
-				break;
-			}
 			if (wma_handle->miracast_value &&
 					wma_is_mcc_24G(wma_handle)) {
 				cmd->max_rest_time =
@@ -414,6 +400,20 @@ QDF_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
 		}
 	}
 
+	if (wma_is_sap_active(wma_handle)) {
+		/* P2P/STA scan while SoftAP is sending beacons.
+		 * Max duration of CTS2self is 32 ms, which limits the
+		 * dwell time.
+		 */
+		cmd->dwell_time_active =
+			QDF_MIN(scan_req->maxChannelTime,
+					(WMA_CTS_DURATION_MS_MAX -
+					 WMA_ROAM_SCAN_CHANNEL_SWITCH_TIME));
+		cmd->dwell_time_passive =
+			cmd->dwell_time_active;
+		cmd->burst_duration = 0;
+	}
+
 	cmd->n_probes = (cmd->repeat_probe_time > 0) ?
 			cmd->dwell_time_active / cmd->repeat_probe_time : 0;
 	if (scan_req->channelList.numChannels) {