From patchwork Fri Jan 26 14:20:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wojciech Dubowik X-Patchwork-Id: 10186025 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F0D56602C8 for ; Fri, 26 Jan 2018 14:21:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E34E928E99 for ; Fri, 26 Jan 2018 14:21:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8197290FC; Fri, 26 Jan 2018 14:21:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AE4B28E99 for ; Fri, 26 Jan 2018 14:21:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752923AbeAZOVG (ORCPT ); Fri, 26 Jan 2018 09:21:06 -0500 Received: from mail.neratec.com ([46.140.151.2]:45318 "EHLO mail.neratec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751486AbeAZOVE (ORCPT ); Fri, 26 Jan 2018 09:21:04 -0500 Received: from localhost (localhost [127.0.0.1]) by mail.neratec.com (Postfix) with ESMTP id EF9D3CE0452; Fri, 26 Jan 2018 15:21:02 +0100 (CET) Received: from mail.neratec.com ([127.0.0.1]) by localhost (mail.neratec.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ENf-QukAt1wG; Fri, 26 Jan 2018 15:21:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mail.neratec.com (Postfix) with ESMTP id CC79FCE0454; Fri, 26 Jan 2018 15:21:02 +0100 (CET) X-Virus-Scanned: amavisd-new at neratec.com Received: from mail.neratec.com ([127.0.0.1]) by localhost (mail.neratec.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Is1XoqH-StHD; Fri, 26 Jan 2018 15:21:02 +0100 (CET) Received: from wlanTS2.lan.neratec.com (wlanTS2.lan.neratec.com [192.168.11.95]) by mail.neratec.com (Postfix) with ESMTPSA id A55EBCE0452; Fri, 26 Jan 2018 15:21:02 +0100 (CET) From: Wojciech Dubowik To: linux-wireless@vger.kernel.org Cc: kvalo@codeaurora.org, ath9k-devel@qca.qualcomm.com, Wojciech Dubowik Subject: [PATCH] ath9k: Fix get channel default noise floor Date: Fri, 26 Jan 2018 15:20:54 +0100 Message-Id: <1516976454-8883-1-git-send-email-Wojciech.Dubowik@neratec.com> X-Mailer: git-send-email 2.7.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 8da58553cc63 ("ath9k: Use calibrated noise floor value when available") introduced regression in ath9k_hw_getchan_noise where per chain nominal noise floor has been taken instead default for channel. Revert to original default channel noise floor. Reported-by: Sebastian Gottschall Signed-off-by: Wojciech Dubowik --- drivers/net/wireless/ath/ath9k/calib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/calib.c b/drivers/net/wireless/ath/ath9k/calib.c index 3d9447e..695c779 100644 --- a/drivers/net/wireless/ath/ath9k/calib.c +++ b/drivers/net/wireless/ath/ath9k/calib.c @@ -72,7 +72,7 @@ static s16 ath9k_hw_get_default_nf(struct ath_hw *ah, s16 ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan, s16 nf) { - s8 noise = ath9k_hw_get_default_nf(ah, chan, 0); + s8 noise = ATH_DEFAULT_NOISE_FLOOR; if (nf) { s8 delta = nf - ATH9K_NF_CAL_NOISE_THRESH -