From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B2E6C432C3 for ; Fri, 22 Nov 2019 10:46:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 305572071C for ; Fri, 22 Nov 2019 10:46:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574419612; bh=n3L8c49TwuPiA6F7l7w64tmiblH3+gobPtPSx1j/Ylg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=MoDEYuASbimolkJsfxLmlc8MBwEW63FzDia/dcm9VneGxsucVKLaCQVYVCG9p6wPQ DOvfQMqLcx5rGClDku4gnUWSq1b9I1k+n1GIOSGVInS5xHZx5U/MG9cwDmAzntQrRs DlOQL3gcfjjRB/0hH+/m81AXOA+BpHCZWD5yoLxw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729681AbfKVKqu (ORCPT ); Fri, 22 Nov 2019 05:46:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:54236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729685AbfKVKqt (ORCPT ); Fri, 22 Nov 2019 05:46:49 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8740A20721; Fri, 22 Nov 2019 10:46:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574419609; bh=n3L8c49TwuPiA6F7l7w64tmiblH3+gobPtPSx1j/Ylg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Imnh/QnulNeOA/gm8ByfumhLPMcjKSqUVhp9Clih2NPwQFxcF2mcge1bDWW/S4s6M MdzNBelC28hu8Ve59alexhOvlAwOa4CgZXt3Wg4tIsJgvTjO0gsG42Y6KkWtygfPO5 912u2xD9gf8glOlLqwffoNO/xmVgops+CCMKRMfU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nick Kossifidis , Simon Wunderlich , Kalle Valo , Sasha Levin Subject: [PATCH 4.9 164/222] ath9k: fix reporting calculated new FFT upper max Date: Fri, 22 Nov 2019 11:28:24 +0100 Message-Id: <20191122100914.451807866@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191122100830.874290814@linuxfoundation.org> References: <20191122100830.874290814@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Simon Wunderlich [ 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 Signed-off-by: Simon Wunderlich Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath9k/common-spectral.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c index eedf86b67cf51..807fbe31e9303 100644 --- a/drivers/net/wireless/ath/ath9k/common-spectral.c +++ b/drivers/net/wireless/ath/ath9k/common-spectral.c @@ -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)) -- 2.20.1