瀏覽代碼

qcacmn: Stop the spectral scan at the end of last report in finite scan

In the case of finite Spectral scan, the spectral scan will be stopped in
the target once the requested count of spectral reports got generated.
The Host will not be notified of this stop scan. To synchronize the Host
data structures in accordance with the target, we explicitly stop the scan
once the last report is received. In the current implementation, the
stop_scan() is called at the beginning of the last report processing and
we continue processing the last report. As part of the last report
processing, we could access the data structures that were reset during
the stop_scan(). To fix this, stop the spectral scan at the end of the
last report processing.

Change-Id: Iecfa4e72ccbedae77ee2a57e9283910e980121d5
CRs-Fixed: 3287136
Shiva Krishna Pittala 2 年之前
父節點
當前提交
2bef7708b1
共有 1 個文件被更改,包括 17 次插入17 次删除
  1. 17 17
      target_if/spectral/target_if_spectral_phyerr.c

+ 17 - 17
target_if/spectral/target_if_spectral_phyerr.c

@@ -3496,22 +3496,6 @@ target_if_consume_spectral_report_gen3(
 		goto fail_no_print;
 	}
 
-	ret = target_if_spectral_is_finite_scan(spectral, spectral_mode,
-						&finite_scan);
-	if (QDF_IS_STATUS_ERROR(ret)) {
-		spectral_err_rl("Failed to check scan is finite");
-		goto fail;
-	}
-
-	if (finite_scan) {
-		ret = target_if_spectral_finite_scan_update(spectral,
-							    spectral_mode);
-		if (QDF_IS_STATUS_ERROR(ret)) {
-			spectral_err_rl("Failed to update scan count");
-			goto fail;
-		}
-	}
-
 	/* Validate and Process the search FFT report */
 	ret = target_if_process_sfft_report_gen3(
 					data, p_sfft,
@@ -3589,8 +3573,24 @@ target_if_consume_spectral_report_gen3(
 		goto fail;
 	}
 
+	ret = target_if_spectral_is_finite_scan(spectral, spectral_mode,
+						&finite_scan);
+	if (QDF_IS_STATUS_ERROR(ret)) {
+		spectral_err_rl("Failed to check scan is finite");
+		goto fail;
+	}
+
+	if (finite_scan) {
+		ret = target_if_spectral_finite_scan_update(spectral,
+							    spectral_mode);
+		if (QDF_IS_STATUS_ERROR(ret)) {
+			spectral_err_rl("Failed to update scan count");
+			goto fail;
+		}
+	}
+
 	return 0;
- fail:
+fail:
 	spectral_err_rl("Error while processing Spectral report");
 fail_no_print:
 	if (spectral_mode != SPECTRAL_SCAN_MODE_INVALID)