Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp811958rwb; Thu, 10 Nov 2022 07:43:08 -0800 (PST) X-Google-Smtp-Source: AMsMyM4HrUkK3fgjYZmnKINsZBGtGzG52dV002uOUgd4g6WS/ZJverGyIqN4nP/Leoad0ZYPQaUc X-Received: by 2002:a17:907:2beb:b0:7a3:28c7:5835 with SMTP id gv43-20020a1709072beb00b007a328c75835mr3090637ejc.32.1668094987936; Thu, 10 Nov 2022 07:43:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668094987; cv=none; d=google.com; s=arc-20160816; b=Z05vzkqDliSRBnk3hO8CVjCOTO30BAvrv0+2ChKeBzTvjGvZuAldbk/WHTk3QTFhjj 9Q3E/Ogo35iLeBJFjtJumu8R2SaFHwgh7WnwUpN7ItMbFU7Pu6wU/AbTGkVf9mHvvuSB r2FMUmjoI2X/2Bk7NWG9Ghh4PEgsOgDd3rQCEN1dz56N0swQ7RD9oOTm4f6IDup0w1qd duqOFF0c1KrERvJLAV2wHtk/Dr6YWn38hrzbzCVdY4s9dKAh+gBo7nZpk+0iTBg837yr Ov+v5ZoxtCqzyzTboUKQg+mqgAhlVha4hPH8LB0VHzPC0NCVY4WTHfImsjgYNgLa6ZFR gvvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=lnBygJr/k4T3NhAhfbxR6HqdizS59Xd7MPt5LYArKXk=; b=e9AD112u05otAEqopCwHRyA38jkIaxdK9PaDrPGi+wCFSoIlqmObRuRGG5uKQ6oRMq 1CY3a/sILQ0QlTDd22iHJZQT01F19EEUQmsK25VSPqijxVjyeOHuVk56JB3fEkGtTNV0 SDP9A2DPKBWbbeZ/IqTaXTieBKG16EHkaJgC7mgSS9v4CMNEPhptNykdwsJN0uPrwDQC RoQ+qTLr85t+qT8sXfjsPQ2f/1ZGZ6ikjh0XXPyXmyjjVAxoNhdNgIbMNE4xB9w5Xqgi ZNk8JHs0Q2CA+6M2AckCayNv/Ika3qDfyGW2dqV48qLiwTFcDuR7MCygIsZtsWFpH5PF Yncg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z17-20020a50cd11000000b00461f10cb543si18010073edi.154.2022.11.10.07.42.28; Thu, 10 Nov 2022 07:43:07 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231520AbiKJPmS (ORCPT + 66 others); Thu, 10 Nov 2022 10:42:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229675AbiKJPmQ (ORCPT ); Thu, 10 Nov 2022 10:42:16 -0500 Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 640037669 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 1M1qbm-1oqwlO0gDw-002GtZ; 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 2/4] wifi: mt76: mt7915: Fix chainmask calculation on mt7915 DBDC Date: Thu, 10 Nov 2022 16:39:51 +0100 Message-Id: <20221110153953.22562-3-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 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:kBXxo6Uj4nCN1xxyuMGEJ/vbCTwUbKOu4ZtSdQNtZq9qwf2+cUZ uMgT0HsVDRcIfYO8GNAIVe30ustQdJwN5OhBDM5XZQvESqjq0H2IYsyl/2QWMz+MWdBMdh7 ompvnTeRm0S7gPWlTUHtc+1vin/cp7qOuWahteFN+L0ZBD8REDjnlBPEFSnwCZG5on2spNq QqeqAhn/HcCw/sPwptClg== X-UI-Out-Filterresults: notjunk:1;V03:K0:I+x1uICSHfY=:4HUWDw7wdIUveJtgYHoqOs eJ4RmY7CckeaCEmy8B+UqvDUcmMeUzT90gczQDwvP7qQS8BqjbPCoyQAKeGVVjVoItgHX+SK9 2/GZIpTf4yLDWJfhHJCKmAYJ04w9HU4eBGBK914b+i/2SLdVk5Q7YBlyuwfkd/9aOTgFjN8+G Eqlns7oWAB3lblRKu4SYJCRiuh3M50w1Nkpyba9xTFbCKXBLanjZxqPBOnnVesB54RAsIuWyK fa08nKUEHvf+lXE1HzctfALdY4OOMlDh+BP6fOvByMXF7cusU1oUyN+cimKzjeDNYgRT9H6Jt EuIqMtgZ6Xp/FMTUMHjm0EI63pCBYnsHJbvn6WnQTD8YNkeXp1731mP9Lw4u03n35CFB8hXIk 0iBSiRSQWFT07XHwrLQ/4SEIoPT8B576WTQuRsplIfQqCraTDbWJ2bRDgnK3wVoxy4Ld3aPH6 fPZHBoPY+dWoIAUyWRiR0HAXBoCtwT1UCcxTH8NwapNw4y/6Btm5IHcMBHfF8OjxmDAszY5Mq Q1xeI3AhPxFQ6UU+pXAED5pC1L9VtP1Y7ugFQLBIBmLf/tsaW/H98G0T+7pLJ6Rl0zVGzMBsi gXIJI9tfhAHtRIkdJx620FPWRnxL3bgP+aIr6aG4RHoPDgvz1H+YbVhrz/Caydt/z11R35tft BQxhgeLXZtOMW/qnpWtTi6y8lV5e3vCjWhU3ejhbLPvae+rB1ppXi+/kzGBlPfbnW07MAXQ4T Qo+DJ6uYtce8Z/w1Vtt4sdlGkaUruDnbZQMN+nXO2qI0/CfobjR2oXxk7cot+7k+tR2Q8C1zG k+ODDFYIe2InbonijLRl94XEemXPP6Np3hqZ8Cj8xxFwLbLcbw= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 mt7915 does not have a per-band number of chains unlike the other chips, it only has a total number of chains. Yet the current code would consider the total number as a per-band number. For example, it would report that a 2x2 + 2x2 DBDC card have 4 chains on each band and set chainmask to 0b1111 for the first interface and 0b11110000 for the second. Fixes: 99ad32a4ca3a ("mt76: mt7915: add support for MT7986") Signed-off-by: Nicolas Cavallari --- drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c index 83bced0c0785..8bb971018a1e 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c @@ -194,6 +194,7 @@ void mt7915_eeprom_parse_hw_cap(struct mt7915_dev *dev, nss = path; if (dev->dbdc_support) { if (is_mt7915(&dev->mt76)) { + path = path / 2; nss = FIELD_GET(MT_EE_WIFI_CONF3_TX_PATH_B0, eeprom[MT_EE_WIFI_CONF + 3]); if (phy->band_idx) -- 2.38.1