Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1835417ybe; Wed, 11 Sep 2019 23:43:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxyS193H3x5y4xCiUWQCro9Wl1tOug5AHJ5lSMRq+/MNKut2TrDNvHxGfniyLHMJjqT9312 X-Received: by 2002:a17:906:4f16:: with SMTP id t22mr33406025eju.84.1568270623598; Wed, 11 Sep 2019 23:43:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568270623; cv=none; d=google.com; s=arc-20160816; b=ZiKAXRVdn2b/DLsw3dU47wICZESTgT9zdDUCPfAKmHCX2cOKgkno57gqXfRS9m78k8 c0C5XzfsZJ0FeDnkZgTrhPpxMvSzvOvHKL3fm5jzrHZAhjeWK+LpIqnHIiLdSO4jKLcr XoWPJ+qwfMCN0UXg/qFijRW9uvwyag9OsprbL6buifI/8J57RRNawNgI2Vh1eThbQAm8 Fx6/+pvC1zj6EUwoo4I7V0f8pdZ//N56VBfqOd+ZFPe0KUWE6H3tKaTa3Al2FwP43Gur hLCBFvW/NBvZzWtv+bsYbt386Z49ulA8JiA1EBn0Bxit0/BtT/GmkpzDybBFsETT4rb1 oDfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:authenticated-by; bh=MCtFzRiJZWOkAXQRIzv/d27Q1crAqS/mU9bdbdsjC1k=; b=aeeLc15C4JqavXBfR8o46SHjfvA8f6jYc1GvWgi5edBIac7NMiEgBRGa85yt32QNwA L4l/013P1to7QocFPXlJbIZLzzxSg388rr3fcdqtnmfK5HWdMb65pJEDzXSY9ilk6D40 +tGSnRcmuLHZZFPOtI/gJrcLiEHvMdv3LlHPRoWHWAGYYuFgYuFvELeGdaZPQVkrDJ90 htNcadOxI9/bP60ESORidOK8KjSTmvSpUleuiuryY4gZ9Lj4qiSU6xRc9TwzW1xYluwF uP5KWzgTzPmNoVXocZyPPAMO8rZfrifMD1yg6Q0v0CmLw4BKljECV10pLXEaDTo0MtKs xBvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j51si14911678ede.301.2019.09.11.23.43.19; Wed, 11 Sep 2019 23:43:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728588AbfILGjm (ORCPT + 99 others); Thu, 12 Sep 2019 02:39:42 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:41620 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725765AbfILGjl (ORCPT ); Thu, 12 Sep 2019 02:39:41 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x8C6dMVp009945, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTITCASV01.realtek.com.tw[172.21.6.18]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id x8C6dMVp009945 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 12 Sep 2019 14:39:23 +0800 Received: from localhost.localdomain (172.21.68.126) by RTITCASV01.realtek.com.tw (172.21.6.18) with Microsoft SMTP Server id 14.3.468.0; Thu, 12 Sep 2019 14:39:22 +0800 From: To: CC: , Subject: [PATCH 1/2] rtw88: fix wrong rx power calculation Date: Thu, 12 Sep 2019 14:39:14 +0800 Message-ID: <1568270355-29727-2-git-send-email-yhchuang@realtek.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1568270355-29727-1-git-send-email-yhchuang@realtek.com> References: <1568270355-29727-1-git-send-email-yhchuang@realtek.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.68.126] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Tsang-Shian Lin Fix the wrong RF path for CCK rx power calculation. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Tsang-Shian Lin Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/rtw88/rtw8822c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c index 207f64c..24b27bc 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c @@ -1620,9 +1620,9 @@ static void query_phy_status_page0(struct rtw_dev *rtwdev, u8 *phy_status, else if (gain_a > u_bnd) rx_power[RF_PATH_A] -= (gain_a - u_bnd) << 1; if (gain_b < l_bnd) - rx_power[RF_PATH_A] += (l_bnd - gain_b) << 1; + rx_power[RF_PATH_B] += (l_bnd - gain_b) << 1; else if (gain_b > u_bnd) - rx_power[RF_PATH_A] -= (gain_b - u_bnd) << 1; + rx_power[RF_PATH_B] -= (gain_b - u_bnd) << 1; rx_power[RF_PATH_A] -= 110; rx_power[RF_PATH_B] -= 110; -- 2.7.4