From patchwork Thu Nov 10 15:39:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Cavallari X-Patchwork-Id: 623661 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6845C43217 for ; Thu, 10 Nov 2022 15:42:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231616AbiKJPmT (ORCPT ); Thu, 10 Nov 2022 10:42:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230043AbiKJPmR (ORCPT ); Thu, 10 Nov 2022 10:42:17 -0500 Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F333D2F00B for ; Thu, 10 Nov 2022 07:42:15 -0800 (PST) Received: from evilbit.green-communications.fr ([92.154.77.116]) by mrelayeu.kundenserver.de (mreue106 [213.165.67.119]) with ESMTPSA (Nemesis) id 1MaIKJ-1oVs3b1niH-00WEuG; Thu, 10 Nov 2022 16:42:02 +0100 From: Nicolas Cavallari To: linux-wireless@vger.kernel.org Cc: Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang Subject: [PATCH 3/4] wifi: mt76: mt7915: Fix VHT beamforming capabilities with DBDC Date: Thu, 10 Nov 2022 16:39:52 +0100 Message-Id: <20221110153953.22562-4-nicolas.cavallari@green-communications.fr> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221110153953.22562-1-nicolas.cavallari@green-communications.fr> References: <20221110153953.22562-1-nicolas.cavallari@green-communications.fr> MIME-Version: 1.0 X-Provags-ID: V03:K1:4piidyHkK02Q2q/kp8+P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I6HMltN58DD2tQF8YJTfLCHwVquDw3VX5ARR5EEs8oNersa2pe0UYSWeA9ciFJfi7vRJ iOF7Rzzap24shgo+DD3A5JjscCDEwCm+RlWajr/P6F4b6RwqiciN/kTaqgCv3915pAvBJQR0u o86tL9uuojwvQylDvPmpdgcPMtWSEd8Nu+ggO87sAzWrthkU14VkKNyc6j/RTsORhM0omRmHE IagdJZlFjWwzarn1vDRTGkgYJhWr8qO1KXcAhnfWNyEr3rcC43a7v6w99ofBsjR1IXOhepgzB oc05DJYs5FfpJNeWe/l1bwfQoVtSCmv5KVZbv1VhXODmfo5lH0Jb83Mzj3hhTIInG8SS8GvZv oLinO3vohOwUwSoOnS1YBdLFeO2d9UM/R/yrUURMqMuQI8vx9NyaY4r3ukOtIX2sYPLN7yX8L LibLr199vaeF8giPvF11gC6xrBCBCX8+imMEe6q9bYKPKILnjZ9K/xfCVBwbmEaR2ZVYZKs5n BlV3QsjOTWU2Jiw6AYemdkeNVvhKelllhIMqr4OemopnaV8us7c= Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Do not hardcode beamformee 4 space-time streams support, because DBDC can only support up to 2. Fixes: 00b2e16e0063 ("mt76: mt7915: add TxBF capabilities") Signed-off-by: Nicolas Cavallari --- drivers/net/wireless/mediatek/mt76/mt7915/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c index 324db5291c85..f2707115b5f3 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c @@ -711,7 +711,8 @@ void mt7915_set_stream_vht_txbf_caps(struct mt7915_phy *phy) *cap |= IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE | IEEE80211_VHT_CAP_MU_BEAMFORMEE_CAPABLE | - (3 << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT); + FIELD_PREP(IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK, + sts - 1); *cap &= ~(IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK | IEEE80211_VHT_CAP_SU_BEAMFORMER_CAPABLE |