From patchwork Thu Jun 21 09:17:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 10479531 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 CA8B760230 for ; Thu, 21 Jun 2018 09:18:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBF702929A for ; Thu, 21 Jun 2018 09:18:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BA8C5292B5; Thu, 21 Jun 2018 09:18:16 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 76BA9292A1 for ; Thu, 21 Jun 2018 09:18:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932944AbeFUJSP (ORCPT ); Thu, 21 Jun 2018 05:18:15 -0400 Received: from nbd.name ([46.4.11.11]:55524 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932902AbeFUJSF (ORCPT ); Thu, 21 Jun 2018 05:18:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=scYfgulupMaPqW0bA0JvKRZbQqPu1jSn8ae29jERoUM=; b=FZOWQftCQniS/30IUyHpzu0e+e Fu44+vK9m3NvW8aXa7KYT0nBAndkEc6cO18dmbPixotDDWJ37COmpRH3F2vnzz8vbS8n2VSRLSC8I W9HzANbSYPdRQyGgqW/mFARB4GFNsGcvmpeFt7JN40sfeF2IVl7hIucxJcHE0tNpZ6tM=; Received: by maeck.lan (Postfix, from userid 501) id 6A5DA2DE8969; Thu, 21 Jun 2018 11:18:01 +0200 (CEST) From: Felix Fietkau To: linux-wireless@vger.kernel.org Cc: kvalo@codeaurora.org Subject: [PATCH 2/9] mt76: fix threshold for gain adjustment Date: Thu, 21 Jun 2018 11:17:54 +0200 Message-Id: <20180621091801.41184-2-nbd@nbd.name> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180621091801.41184-1-nbd@nbd.name> References: <20180621091801.41184-1-nbd@nbd.name> 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 The gain should be reduced only for very strong connections, not for mid range. Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt76x2_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c b/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c index c1c38ca3330a..4ed6641c3a32 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x2_phy.c @@ -530,7 +530,7 @@ mt76x2_phy_update_channel_gain(struct mt76x2_dev *dev) else mt76_wr(dev, MT_BBP(RXO, 14), 0x00560423); - if (low_gain) { + if (low_gain == 2) { mt76_wr(dev, MT_BBP(RXO, 18), 0xf000a991); mt76_wr(dev, MT_BBP(AGC, 35), 0x08080808); mt76_wr(dev, MT_BBP(AGC, 37), 0x08080808);