]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ath9k: fix reporting calculated new FFT upper max
authorSimon Wunderlich <sw@simonwunderlich.de>
Mon, 1 Oct 2018 14:26:59 +0000 (17:26 +0300)
committerKhalid Elmously <khalid.elmously@canonical.com>
Thu, 28 Nov 2019 04:59:27 +0000 (23:59 -0500)
BugLink: https://bugs.launchpad.net/bugs/1854216
[ Upstream commit 4fb5837ac2bd46a85620b297002c704e9958f64d ]

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 <mickflemm@gmail.com>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/net/wireless/ath/ath9k/common-spectral.c

index a41bcbda1d9e8eeb27cf57dfcc88f3da852eaaf4..37d5994eb1ccd94f0706138e83342357d3e0405e 100644 (file)
@@ -411,7 +411,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))