Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp352056rwj; Fri, 23 Dec 2022 02:17:38 -0800 (PST) X-Google-Smtp-Source: AMrXdXsB4dEAI3L98coJlVoNXEfYOSM7Vx54zsVhKA/zakXdxzDHKOREs1gG0brpXCEFe4c01nLB X-Received: by 2002:aa7:ccc2:0:b0:462:2e05:30ce with SMTP id y2-20020aa7ccc2000000b004622e0530cemr6972740edt.42.1671790658417; Fri, 23 Dec 2022 02:17:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671790658; cv=none; d=google.com; s=arc-20160816; b=ZwvsybxLkBU9OQLbKD3rU5y41EvUGKH+8WI5DkI8sS8LBd4qB8OLJ893DUtDbtygx1 JBF21BnGKCZLFcwor6wTkxtDxzsnljaWLmfh83seZCneomXuP/UdASgnL1XXcZtaBIoh CTbds3kEd2HorSbZLID1G/yk1zSmtAWLUaTOOUdQuQtG34KD3o74wlkZ3DOq4iSLd930 2VWDtcTX8DLI6SUxQSK3sb/TmEawe5F5tx87IXBYT0CHqhhrJDynzPeGWNbsWrVF6VmP Nu8tXYxRoV/bmDMJbEXBRUWnyCbaSsF2IUmYng3mwciygqrIzWmw8QpWq+hNXcl3Aii3 9ruA== 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:dkim-signature; bh=dLWhqdv9Lf/raDbcUz7GbywP65tHkDSnKUGye8OTIA4=; b=sh25THy+/s51qp7wDfNyJSUxlMJ5uAIFYIpd9OoltaMQF9GHwcbOFJmCPB8Y16btrt gdcDsJ69XIm1gz5wDQvvwVl+iFdsxCmuSssCT2szsfM55XgCk2DAP5XvGi+U2d0AROix tCrZwBbgZtUeRp1CXbFAfG0zyZy7BoFXLGekdNmZzlIV6SB8vJHq8nurFtJDnXH6K1EP gDw/AknG15ovGMih7kAX4YeUEj335Cy7NjLz2YHLqhz5NDn0gScpLMz9NFMOgvsjkhkU Qg7AqYCg/XjN/AgSPRcj9IIvLttNdQiff81DO87h7NlBbowBklw/uzT72ANNJBxM+Ki3 Psbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=mLPT3JJO; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b5-20020a0564021f0500b004821228f4dasi849679edb.326.2022.12.23.02.17.18; Fri, 23 Dec 2022 02:17:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=mLPT3JJO; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231423AbiLWKQn (ORCPT + 66 others); Fri, 23 Dec 2022 05:16:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230312AbiLWKQg (ORCPT ); Fri, 23 Dec 2022 05:16:36 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CB3812ADC for ; Fri, 23 Dec 2022 02:16:35 -0800 (PST) X-UUID: 4895012a662247fab19bb83f23e6134e-20221223 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=dLWhqdv9Lf/raDbcUz7GbywP65tHkDSnKUGye8OTIA4=; b=mLPT3JJO167fJc1xU6Sj5SWILwJS6NpH6goUy9N6B0RCSiG6/24ADE89+5YWn4NmhBvDwUcueU8Sh8C1I9zfmGcc6CF5u6c4iIKjSCCIYenUPHq2kc5cXkAJwBztZn4p4zWg9sRRVK2l868M3m/A+MMHcDxTsB4EY4Ec1cLp4QM=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.14,REQID:f2895f8d-cdd3-46c2-9cd0-d7e4f488f27b,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:95 X-CID-INFO: VERSION:1.1.14,REQID:f2895f8d-cdd3-46c2-9cd0-d7e4f488f27b,IP:0,URL :0,TC:0,Content:0,EDM:0,RT:0,SF:95,FILE:0,BULK:0,RULE:Spam_GS981B3D,ACTION :quarantine,TS:95 X-CID-META: VersionHash:dcaaed0,CLOUDID:02f5388a-8530-4eff-9f77-222cf6e2895b,B ulkID:2212231816325I0TCT4T,BulkQuantity:0,Recheck:0,SF:28|17|19|48,TC:nil, Content:0,EDM:-3,IP:nil,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 4895012a662247fab19bb83f23e6134e-20221223 Received: from mtkmbs13n1.mediatek.inc [(172.21.101.193)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 749857116; Fri, 23 Dec 2022 18:16:32 +0800 Received: from mtkmbs13n1.mediatek.inc (172.21.101.193) by mtkmbs11n1.mediatek.inc (172.21.101.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Fri, 23 Dec 2022 18:16:30 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Fri, 23 Dec 2022 18:16:30 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , Evelyn Tsai , Bo Jiao , linux-mediatek , Shayne Chen Subject: [PATCH 3/4] wifi: mt76: mt7996: do not hardcode vht beamform cap Date: Fri, 23 Dec 2022 18:13:47 +0800 Message-ID: <20221223101348.11504-3-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20221223101348.11504-1-shayne.chen@mediatek.com> References: <20221223101348.11504-1-shayne.chen@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Use the sts variable when setting vht beamform sts cap. Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt7996/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/init.c b/drivers/net/wireless/mediatek/mt76/mt7996/init.c index 64e8dfd06e9f..7a9692a66ed8 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7996/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7996/init.c @@ -465,7 +465,7 @@ void mt7996_set_stream_vht_txbf_caps(struct mt7996_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 | -- 2.25.1