Эх сурвалжийг харах

qcacld-3.0: Start the scan right away for RRM beacon requests

qcacld-2.0 to qcacld-3.0 propagation

Currently all the scan requests going from the host to the
firmware pass a rest time to the firmware. The firmware
waits for the rest time before starting the scan. This is
not needed in the case of RRM beacon requests with single
channel request to make it more optimal.

Configure the rest times to minimum and start the scan
right after receiving the request

Git-commit: b0132824baeceb25bbc80d0e82ed6693b783b4dd
Change-Id: Ia5c5a1c2c765d13611b901742910325954ce3d8a
CRs-Fixed: 1010596
Selvaraj, Sridhar 8 жил өмнө
parent
commit
6f92ecb764

+ 22 - 0
core/sme/src/rrm/sme_rrm.c

@@ -635,6 +635,7 @@ QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx)
 	tpRrmSMEContext sme_rrm_ctx = &mac_ctx->rrm.rrmSmeContext;
 	uint32_t session_id;
 	tSirScanType scan_type;
+	unsigned long current_time;
 
 	status = csr_roam_get_session_id_from_bssid(mac_ctx,
 			&sme_rrm_ctx->sessionBssId, &session_id);
@@ -695,6 +696,27 @@ QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx)
 		sms_log(mac_ctx, LOG1, FL("Scan Type(%d) Max Dwell Time(%d)"),
 				scan_req.scanType, scan_req.maxChnTime);
 
+		/*
+		 * For RRM scans timing is very important especially when the
+		 * request is for limited channels. There is no need for
+		 * firmware to rest for about 100-200 ms on the home channel.
+		 * Instead, it can start the scan right away which will make the
+		 * host to respond with the beacon report as quickly as
+		 * possible. Ensure that the scan requests are not back to back
+		 * and hence there is a check to see if the requests are atleast
+		 * 1 second apart.
+		 */
+		current_time = qdf_mc_timer_get_system_time();
+		sms_log(mac_ctx, LOG1, "prev scan triggered before %ld ms, totalchannels %d",
+				current_time - rrm_scan_timer,
+				sme_rrm_ctx->channelList.numOfChannels);
+		if ((abs(current_time - rrm_scan_timer) > 1000) &&
+				(sme_rrm_ctx->channelList.numOfChannels == 1)) {
+			scan_req.restTime = 1;
+			scan_req.min_rest_time = 1;
+			scan_req.idle_time = 1;
+		}
+
 		rrm_scan_timer = qdf_mc_timer_get_system_time();
 
 		/* set BSSType to default type */