From patchwork Thu Jan 6 06:20:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chiu X-Patchwork-Id: 12705144 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 768DAC433F5 for ; Thu, 6 Jan 2022 06:21:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=fQUOceV9Bx1mg7kYObv9g8WfyKcbqkx0OQ5ngtwKfJI=; b=K661NtDRpw6JiL KOPZtMd7J7X+gF9H+Vt3nwoIAyRrHNoaLmGAyg1pYRVNNu+6CVZBjgjtyEXMFetdCrZh9ogxkuzi1 uG7D3lOqEC6pT1uM1MS2kT3eNP6TUFItHthEONnAEJOq90xOIjRFbr3M3QV3D+3AwtLXpNKoo97jq 9oItjyejZW1NJcj2cPeSkEv2U3twrLg32f42fnc0QTamt6l6qgAThOd0Ld3zb8bkk9h78BKJwAWbh l8nxScwXs4Xjz5tXMtIDW1PcoZBoqB1hSGNoebIJBJ/Kbyx/FaZYn5WIER8mBZ9z4ixeJJ91S5Ny9 eBSWXQHFQ8SdeVFQqdOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5M9W-00GkUg-FC; Thu, 06 Jan 2022 06:21:34 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5M9T-00GkU6-GK for linux-mediatek@lists.infradead.org; Thu, 06 Jan 2022 06:21:32 +0000 X-UUID: e0f575e462af49be82e699ca44885d88-20220105 X-UUID: e0f575e462af49be82e699ca44885d88-20220105 Received: from mtkcas67.mediatek.inc [(172.29.193.45)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 521700696; Wed, 05 Jan 2022 23:21:28 -0700 Received: from mtkmbs10n1.mediatek.inc (172.21.101.34) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 5 Jan 2022 22:21:27 -0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.15; Thu, 6 Jan 2022 14:21:25 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 6 Jan 2022 14:21:25 +0800 From: Peter Chiu To: Felix Fietkau CC: Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , Shayne Chen , Deren Wu , , , Peter Chiu Subject: [PATCH 1/2] mt76: mt7915: fix ht mcs in mt7915_mac_add_txs_skb() Date: Thu, 6 Jan 2022 14:20:56 +0800 Message-ID: <20220106062057.14981-1-chui-hao.chiu@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220105_222131_570301_D844B557 X-CRM114-Status: UNSURE ( 9.26 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The mcs value of HT mode reported by mt7915_mac_add_txs_skb() has already been converted to the expected format. Fixes: 9908d98ae72cd ("mt76: mt7915: report tx rate directly from tx status") Signed-off-by: Peter Chiu --- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c index a6770fd40b34..5368a3e276c7 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c @@ -1568,7 +1568,6 @@ mt7915_mac_add_txs_skb(struct mt7915_dev *dev, struct mt76_wcid *wcid, int pid, break; case MT_PHY_TYPE_HT: case MT_PHY_TYPE_HT_GF: - rate.mcs += (rate.nss - 1) * 8; if (rate.mcs > 31) goto out; From patchwork Thu Jan 6 06:20:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Chiu X-Patchwork-Id: 12705151 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4BF80C433EF for ; Thu, 6 Jan 2022 06:31:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1NPdwTit5jKXNsMbDpR8jNT8eiU63CHutR4uZSc4u2I=; b=DMrGom45MK224T ArmMse5HhCSIreSmKOyyEvsbwLhdLd2DkhGZZX3zTb4NQSwWxtVowUc7VKZw51YDxjOq8cdyAxnQd PqFD+gUDKg6eiMxNfhKW7EfumlNQXEgfoeaCMjY1zuSD4KdibjSApFJX5wQNfMXEHRb5HZCCODPX/ i41GpD0DXr30no2bgcTwPJaJRTB/wZYrACmQSkCiakn47TdIHMnB28bCv+vLac9FEu7Y5/mfzNl3j 8ALBPemrpFQshIHRtELR8l0QskMqgiX7ZfKJk1D1HSCE6FFKEmwPdnGtEy6ja90OT+uRPc4+vvz9M 1iSaloZhnq85MoJNGLjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5MJC-00GlCF-TC; Thu, 06 Jan 2022 06:31:34 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1n5MJ9-00GlBR-Vd for linux-mediatek@lists.infradead.org; Thu, 06 Jan 2022 06:31:33 +0000 X-UUID: 5704e4824b734c1ea380c1b8d1f5dca5-20220105 X-UUID: 5704e4824b734c1ea380c1b8d1f5dca5-20220105 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1492600991; Wed, 05 Jan 2022 23:31:29 -0700 Received: from mtkmbs10n2.mediatek.inc (172.21.101.183) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 5 Jan 2022 22:21:27 -0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs10n2.mediatek.inc (172.21.101.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.792.3; Thu, 6 Jan 2022 14:21:25 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 6 Jan 2022 14:21:25 +0800 From: Peter Chiu To: Felix Fietkau CC: Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , Shayne Chen , Deren Wu , , , Peter Chiu Subject: [PATCH 2/2] mt76: mt7921: fix ht mcs in mt7921_mac_add_txs_skb() Date: Thu, 6 Jan 2022 14:20:57 +0800 Message-ID: <20220106062057.14981-2-chui-hao.chiu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20220106062057.14981-1-chui-hao.chiu@mediatek.com> References: <20220106062057.14981-1-chui-hao.chiu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220105_223132_049520_1EA6DEB9 X-CRM114-Status: GOOD ( 10.03 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org The mcs value of HT mode reported by mt7921_mac_add_txs_skb() has already been converted to the expected format. Fixes: 970ab80ef9f63 ("mt76: mt7921: report tx rate directly from tx status") Signed-off-by: Peter Chiu --- drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c index 0744f6e42ba3..cc070180fdc0 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c @@ -1092,7 +1092,6 @@ mt7921_mac_add_txs_skb(struct mt7921_dev *dev, struct mt76_wcid *wcid, int pid, break; case MT_PHY_TYPE_HT: case MT_PHY_TYPE_HT_GF: - rate.mcs += (rate.nss - 1) * 8; if (rate.mcs > 31) goto out;