Explorar o código

qcacmn: Don't print the FFT report in Spectral report mode 0

target_if_dump_fft_report_gen3() function doesn't check if the FFT report
is present in the Spectral report. Add the report mode 0 check to avoid
printing FFT report when it is not there.

Change-Id: Ia825cd7927ec7ffa41473649d381c717b0ef26c9
CRs-Fixed: 2898904
Shiva Krishna Pittala %!s(int64=4) %!d(string=hai) anos
pai
achega
d710aaf1e4
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      target_if/spectral/target_if_spectral_phyerr.c

+ 6 - 0
target_if/spectral/target_if_spectral_phyerr.c

@@ -1418,6 +1418,12 @@ target_if_dump_fft_report_gen3(struct target_if_spectral *spectral,
 	size_t fft_bin_buf_size;
 	uint8_t tag, signature;
 
+	qdf_assert_always(spectral);
+
+	/* There won't be FFT report/bins in report mode 0, so return */
+	if (!spectral->params[smode].ss_rpt_mode)
+		return;
+
 	fft_hdr_length = get_bitfield(
 				p_fft_report->fft_hdr_lts,
 				SPECTRAL_REPORT_LTS_HDR_LENGTH_SIZE_GEN3,