浏览代码

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 4 年之前
父节点
当前提交
d710aaf1e4
共有 1 个文件被更改,包括 6 次插入0 次删除
  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,