Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2444893rdf; Mon, 6 Nov 2023 14:39:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJ7MhADiP7fhP6PUVVyMA+SvP9oxk/WhJHqq7IROZSx1MDLWXrWsqynrebJboB4OIhwjvS X-Received: by 2002:a05:6a20:7fa4:b0:183:e7bb:590a with SMTP id d36-20020a056a207fa400b00183e7bb590amr8915251pzj.49.1699310390622; Mon, 06 Nov 2023 14:39:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699310390; cv=none; d=google.com; s=arc-20160816; b=eQtleS7An3MAFrMS8mm/8UqrBpyg4tIcSu1G/zEQUDp1ct7j0G44fe8Gv6UuCJS6eo Ad7oIhXarU5wRFptzC5jaEnaLy9e0ntX1cDYezDKn8NEB1T80RLP1NNIZ1wwPbSdPauZ pbl+9RVA3IGLtIt+yVaP9zOwcstJDQBQsuwgqFRbyhCf0BTZOSBXsMt37xvFdh4IS7r7 bnC0/RVa61cCsBRgBHPUhYB3H/Cp/ps0YstTP+fioQeSO284JhqjkIH0PnHNszMYcT6G fYl090vXnmAA6eVt/MCG8/cdHmH4rsgsxumctm+LH0xMtEYm5IEPYuy3GGTKsqE6G678 1B8w== 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=aDIvl9z2YniK6Zai9dKc/foVI+zeXt3EOohqzKV2mjhnldDGfFb1DOjslztc5g3g0y Eh7GyfQDNjABYgm2d5b3nLszMScJ254h0u6wfuG8dgCebTYTFNPBTHR9GXxdS5DxCcpq SEFDVdQnUQPRAjG7zXFNRj2srSZsYXUZYeCV4/0atUxJDg+fHIpafLY5ZngWUL9CGJYb Ym75u/MpdPPeC1yJOazRDBjYXw8bY4SrjwM1yX5kWUHPiaMvuPw3kwobYWdLrQZK54YH aeyhU4tBCE+H8a2fHrtqxrlUUmg+gCcfH99jv7jl+RMDAwCxE/ORWGiwtk5LLtCFBR6E XluA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id p31-20020a056a000a1f00b006b7b42fe43asi9433839pfh.185.2023.11.06.14.39.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 14:39:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id B462380E0697; Mon, 6 Nov 2023 14:39:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233225AbjKFWju (ORCPT + 56 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <58c999ad9fd073183bec5532fe62782b7d4be0d5.1699310162.git.daniel@makrotopia.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 06 Nov 2023 14:39:49 -0800 (PST) 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); -- 2.42.0