From: Simon Wunderlich Date: Mon, 1 Oct 2018 14:26:46 +0000 (+0300) Subject: ath9k: return when short FFT frame was handled X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b796a6c04e65e35033ad4cb390500ff03ef72350;p=linux.git ath9k: return when short FFT frame was handled With the loop break like this, there are false "FFT report truncated" messages because the iterator is not advanced as the check expects. Instead, just return, for a single frame there is nothing left to be done anyways. 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 0c5559009a285..f6dd0ecfbbf33 100644 --- a/drivers/net/wireless/ath/ath9k/common-spectral.c +++ b/drivers/net/wireless/ath/ath9k/common-spectral.c @@ -686,7 +686,7 @@ int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv, struct ieee80211_h * loop. */ if (len <= fft_len + 2) - break; + return 1; sample_start = &vdata[i + 1];