From patchwork Mon Nov 6 22:39:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 162211 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2969429vqu; Mon, 6 Nov 2023 14:40:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqM4cGr7igBsMM7Lz+/GgY7ScQ4HNeCIozxnmlJYM7kzuTqm56ty5sn2trO9ujFv0O3pFd X-Received: by 2002:a17:902:ccca:b0:1c5:ce3c:c399 with SMTP id z10-20020a170902ccca00b001c5ce3cc399mr39499669ple.39.1699310405767; Mon, 06 Nov 2023 14:40:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699310405; cv=none; d=google.com; s=arc-20160816; b=gVt3vjIzPiXRi/O2DraXJk2jK9C8RKJ6ZNscMSRBeG4LmM72dPoP2EifCpcF8WCwBD /T2MNfnP5hIF+ojW5Ro57v+0s0YaY6/jIio0dLTLrbFYaemthlRZ/bM+TJJv58N1KTcx qrSNqwd4MXCyDxlS26iAeTcFTGwskRKqO896PU33ARsfmIef2QYW9f2F3vBTr2LBnHtO 6xzHiJYmh6KrsR2ZQfFpPGm3Z2psXv28I15CSIjNo8DgSElG9b/2C3S052+8IoL/CJGU rAMJ4yqq2LBbmDDjDZco1QuZnYlnryFz3DLg4SdANwJG31PuVlGIcKm9xy/Dba+pS63n cbTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date; bh=aCW+iqeqbg3S1A4LbDhmQlkQIgodyBkaAYltQxiZyMA=; fh=dR9hnX7zpzfkb6MxmueecnnlUsoo7OQBV21MCWFph74=; b=Iq0kmDFqes/EvvwLs6NA+XdTEd4IJnLhryYMYv0M4qdiipQg50Xbxxy7K32zDfnAE1 udCqyRmvTxX8VuDqYYWwXlqXRqdkHic0ZRF7wb6yswpX/XGDxV3lkTMslcN3ET50WN/r ZLNM0F+/27XjGNLQokVgUii1/08ZiXEQjHFW6fDuvltIT/lZEWbSSW+wIa8+Ko9TepqV MK7+Wq3bqXK5Z2YgUX/XXtQGwa7W0Tf3YEbYFzjqDEtDgBb44WAYgGELQqP0+/b4lO7G uSWx7N3UcCaiNAmvygSU1pn77JnoBdHexlHOXj+ezS2ckzv9kitJvLN7HeBAz5RKpxAX w1GQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id i4-20020a17090332c400b001cc1a3e42d8si9663935plr.324.2023.11.06.14.40.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 14:40:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 8971F8032489; Mon, 6 Nov 2023 14:40:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233145AbjKFWju (ORCPT + 34 others); Mon, 6 Nov 2023 17:39:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53066 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233195AbjKFWjt (ORCPT ); Mon, 6 Nov 2023 17:39:49 -0500 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5CE81BF; Mon, 6 Nov 2023 14:39:46 -0800 (PST) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from ) id 1r08Fu-0004w8-1M; Mon, 06 Nov 2023 22:39:38 +0000 Date: Mon, 6 Nov 2023 22:39:31 +0000 From: Daniel Golle To: Felix Fietkau , Lorenzo Bianconi , Ryder Lee , Shayne Chen , Sean Wang , Kalle Valo , Matthias Brugger , AngeloGioacchino Del Regno , Daniel Golle , StanleyYP Wang , Peter Chiu , Howard Hsu , Rany Hany , Simon Horman , Alexander Couzens , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 2/2] wifi: mt76: mt7915: also MT7981 is 3T3R but nss2 on 5 GHz band Message-ID: <3e43ce8ae3dc80d02a4393e0d28de2fbf7e938db.1699310162.git.daniel@makrotopia.org> References: <58c999ad9fd073183bec5532fe62782b7d4be0d5.1699310162.git.daniel@makrotopia.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <58c999ad9fd073183bec5532fe62782b7d4be0d5.1699310162.git.daniel@makrotopia.org> X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 06 Nov 2023 14:40:03 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781856108224383151 X-GMAIL-MSGID: 1781856108224383151 From: StanleyYP Wang Just like MT7916 also MT7981 can handle 3T3R DBDC frontend and should hence be included in the corresponding conditional expression in the driver. Add it. Fixes: 6bad146d162e ("wifi: mt76: mt7915: add support for MT7981") Signed-off-by: StanleyYP Wang Signed-off-by: Daniel Golle --- drivers/net/wireless/mediatek/mt76/mt7915/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c index 8ebbf186fab23..e667de50ece23 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c @@ -1045,8 +1045,9 @@ mt7915_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) phy->mt76->antenna_mask = tx_ant; - /* handle a variant of mt7916 which has 3T3R but nss2 on 5 GHz band */ - if (is_mt7916(&dev->mt76) && band && hweight8(tx_ant) == max_nss) + /* handle a variant of mt7916/mt7981 which has 3T3R but nss2 on 5 GHz band */ + if ((is_mt7916(&dev->mt76) || is_mt7981(&dev->mt76)) && + band && hweight8(tx_ant) == max_nss) phy->mt76->chainmask = (dev->chainmask >> chainshift) << chainshift; else phy->mt76->chainmask = tx_ant << (chainshift * band);