Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4529381pxv; Tue, 20 Jul 2021 06:02:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJ5z1JQS+TwDgYwqlDYV0Hlpa/7q/3nwi3irWY+QSLGsS8fp4BZIx5qwqOltqvh45SUtk1 X-Received: by 2002:a19:ef0f:: with SMTP id n15mr21385099lfh.63.1626786140141; Tue, 20 Jul 2021 06:02:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626786140; cv=none; d=google.com; s=arc-20160816; b=LipTWHx9McknQfmrHsV+ibG8s01Z6/CG2Q2fpqJMPSjmBMzLzM10TOnQ+U09Wmxwpm 6P4Dxs4138LiD7srhgWPYM4Xnw83sOghZCUHgm3CbSe3zsB2G64XmpTgRh349nGFUSeI lzyDk2x8pTFdsHWillDNg16F7sqZtwFLOvmTShcy9AA26qXvUGDV2KcRrhSC1t8uAL5z Do0y9ZQbmSfFJx1C1RdWEAY61P5iYlyjbEHbACcwuWkJjuGac1WANaYPBMjjgw2lDWJA l91nPgIIVZ1sXWOAsFpQ55mmaL7GQMdIzFFNGxI6heSkngJEHn1DyvBjxYj/a+QhmJxe O3lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=XDYHlRm8bFjZqxbXDGg+/CSVaJJ0ZBjAST37xfaimCc=; b=T7JJw5FkL4uh7hZIBMDET3ibyipy2SI0DQyz8NQZf5V23slhUKJ4M4NKG96EZAhXwe cIkVaWmp7l0CwJapNYnng908gb/PG8aHlKxVjnU80l0sQcg74/fgM45J4q2afixezoVT UGqMp5udmcEAGmR9BD4d6Uu+LY7K1Fwv2jFCpGmRZTF1QzYeHiNhrsHKhU7Y/UG0i3lA 3C7nEmVoa/PEgWPrIRbyrBFE7P22bpacHRCVStdIktK7BfpHUzlUjzQ3/xDOT6WXGAW6 RdLjcHf3IjZWVg6GFdTuThfjAkvlwnBsOhq0k9C1RLwaj7sWOZudJu8r7lwmtkVsThct PQPQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si28560765eji.655.2021.07.20.06.01.49; Tue, 20 Jul 2021 06:02:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231847AbhGTMUt (ORCPT + 99 others); Tue, 20 Jul 2021 08:20:49 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:53678 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229956AbhGTMUq (ORCPT ); Tue, 20 Jul 2021 08:20:46 -0400 X-UUID: 82a65126d30c49f59fbb647433bd812e-20210720 X-UUID: 82a65126d30c49f59fbb647433bd812e-20210720 Received: from mtkcas10.mediatek.inc [(172.21.101.39)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1269396128; Tue, 20 Jul 2021 21:01:21 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 20 Jul 2021 21:01:20 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 20 Jul 2021 21:01:20 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , linux-mediatek , Shayne Chen Subject: [PATCH 2/2] mt76: mt7915: fix bit fields for HT rate idx Date: Tue, 20 Jul 2021 21:00:14 +0800 Message-ID: <20210720130014.23572-2-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210720130014.23572-1-shayne.chen@mediatek.com> References: <20210720130014.23572-1-shayne.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org The bit fields of tx rate idx should be 6 bits, otherwise it might be incorrect in HT mode. For VHT/HE rates, only 4 bits are actually used by rate idx, the other 2 bits are used for other functions. Fixes: c31d94af1843 ("mt76: mt7915: fix tx rate related fields in tx descriptor") Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt7915/mac.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.h b/drivers/net/wireless/mediatek/mt76/mt7915/mac.h index 5e6f3ef..15f4341 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.h +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.h @@ -283,7 +283,8 @@ enum tx_mcu_port_q_idx { #define MT_TX_RATE_MODE GENMASK(9, 6) #define MT_TX_RATE_SU_EXT_TONE BIT(5) #define MT_TX_RATE_DCM BIT(4) -#define MT_TX_RATE_IDX GENMASK(3, 0) +/* VHT/HE only use bits 0-3 */ +#define MT_TX_RATE_IDX GENMASK(5, 0) #define MT_TXP_MAX_BUF_NUM 6 -- 2.25.1