From: Simon Wunderlich Date: Mon, 1 Oct 2018 14:26:59 +0000 (+0300) Subject: ath9k: fix reporting calculated new FFT upper max X-Git-Tag: v5.4-rc1~2266^2~144^2~24^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4fb5837ac2bd46a85620b297002c704e9958f64d;p=platform%2Fkernel%2Flinux-rpi.git ath9k: fix reporting calculated new FFT upper max Since the debug print code is outside of the loop, it shouldn't use the loop iterator anymore but instead print the found maximum index. Cc: Nick Kossifidis Signed-off-by: Simon Wunderlich Signed-off-by: Kalle Valo --- diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c index 70ddaf6199a0..6a43d26276e5 100644 --- a/drivers/net/wireless/ath/ath9k/common-spectral.c +++ b/drivers/net/wireless/ath/ath9k/common-spectral.c @@ -381,7 +381,7 @@ ath_cmn_process_ht20_40_fft(struct ath_rx_status *rs, ath_dbg(common, SPECTRAL_SCAN, "Calculated new upper max 0x%X at %i\n", - tmp_mag, i); + tmp_mag, fft_sample_40.upper_max_index); } else for (i = dc_pos; i < SPECTRAL_HT20_40_NUM_BINS; i++) { if (fft_sample_40.data[i] == (upper_mag >> max_exp))