diff mbox series

[5/5] ath9k: fix reporting calculated new FFT upper max

Message ID 20180919103711.19304-6-sw@simonwunderlich.de (mailing list archive)
State Accepted
Commit 4fb5837ac2bd46a85620b297002c704e9958f64d
Delegated to: Kalle Valo
Headers show
Series ath9k: FFT fixes and improvements | expand

Commit Message

Simon Wunderlich Sept. 19, 2018, 10:37 a.m. UTC
Cc: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
---
 drivers/net/wireless/ath/ath9k/common-spectral.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Kalle Valo Oct. 1, 2018, 2:07 p.m. UTC | #1
Simon Wunderlich <sw@simonwunderlich.de> wrote:

> Cc: Nick Kossifidis <mickflemm@gmail.com>
> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

No empty commit logs, please. But I can add that, just tell me what to add.
Simon Wunderlich Oct. 1, 2018, 2:26 p.m. UTC | #2
On Monday, October 1, 2018 2:07:55 PM CEST Kalle Valo wrote:
> Simon Wunderlich <sw@simonwunderlich.de> wrote:
> > Cc: Nick Kossifidis <mickflemm@gmail.com>
> > Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
> 
> No empty commit logs, please. But I can add that, just tell me what to add.

How about:

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.





Let me know if you need me to resend or anything else.

Thank you,
      Simon
Kalle Valo Oct. 1, 2018, 2:31 p.m. UTC | #3
Simon Wunderlich <sw@simonwunderlich.de> writes:

> On Monday, October 1, 2018 2:07:55 PM CEST Kalle Valo wrote:
>> Simon Wunderlich <sw@simonwunderlich.de> wrote:
>> > Cc: Nick Kossifidis <mickflemm@gmail.com>
>> > Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
>> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
>> 
>> No empty commit logs, please. But I can add that, just tell me what to add.
>
> How about:
>
> 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.

Perfect, thanks.

> Let me know if you need me to resend or anything else.

No need, I added this to the patch in the (not yet pushed) pending
branch.
Simon Wunderlich Oct. 1, 2018, 2:32 p.m. UTC | #4
On Monday, October 1, 2018 5:31:42 PM CEST Kalle Valo wrote:
> Simon Wunderlich <sw@simonwunderlich.de> writes:
> > On Monday, October 1, 2018 2:07:55 PM CEST Kalle Valo wrote:
> >> Simon Wunderlich <sw@simonwunderlich.de> wrote:
> >> > Cc: Nick Kossifidis <mickflemm@gmail.com>
> >> > Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
> >> > Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
> >> 
> >> No empty commit logs, please. But I can add that, just tell me what to
> >> add.
> > 
> > How about:
> > 
> > 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.
> 
> Perfect, thanks.
> 
> > Let me know if you need me to resend or anything else.
> 
> No need, I added this to the patch in the (not yet pushed) pending
> branch.

Awesome, thank you!

Cheers,
     Simon
diff mbox series

Patch

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))