Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp2499119pxy; Mon, 3 May 2021 01:07:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBzQ/vg53E1XDuZCgyvGygsbHi8AM96VKFi5qXcQ5YEQ8DNc38qmzrphcJk5QkK9KeKN1p X-Received: by 2002:a17:90a:dd45:: with SMTP id u5mr30910342pjv.15.1620029242464; Mon, 03 May 2021 01:07:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620029242; cv=none; d=google.com; s=arc-20160816; b=jIBtwqgbtkpOL1PquGfPnJx5YqSOPm5v8u/jVhLN2aSGrAdHgTEi/Gd/d6rBh5xUMr j6fgzaIKfSJ/ShXqrQWYw+xycBhOUzf8OSfR9bmQNTQR+kmRzuV54kGF4++FiuvTUIef GdthXPBNL0oQjpmusKtTk1ciq0BuD4BXkymVKPtHbkPv1sf88c6O8533OOhNicGkJK+f PmVya+JV2EaT+XjHTbwTbQJ0bytG70auw2Kn45hrgHxjOoWgVrK8TOFJCtOGI1rMrhbo +YBQy2HB3pLbpc3HRrSH+tzipjCDrZr1c25fB7HvimbJE90UR+tLCN8RiMzZGL0cRBpn zZTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=n77tiYLHfqz86LFn0FjXfUSDgxychU/IYGuEkjIJlDk=; b=EIwTYuvu8Dgj2fGUJwVXCSwfKYATrZc2kXECiQV7YybG7Ph4V9ZxYHaXXbXgfOBUMY nRKeDiDjpNRapZQoP7Of0unDvz0zBwsGxS0aCP5R1yFu+M6yyZGm9PwL0gATwTgDXhOd rhF6xoLF/wfGz3+BFBUOTZdd6u3aJhZ68ruBsSy1L+qeU5gGBZmFAR07zi152WPVQkpw hj5GhL4S22YOrf22ZOT4no3rggIWd7R3mvdCRY3ti3wxtEgM154UQ0aThiFqEkTMRK6s abEy4/+RmHR0KZPj/go3keP9JWnsn+uGEAzw8OB3OWg+FSvtcppnL0NWunyfd35+2BpJ h0kA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w7si13613001plc.2.2021.05.03.01.07.08; Mon, 03 May 2021 01:07:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232752AbhECIGQ (ORCPT + 99 others); Mon, 3 May 2021 04:06:16 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:48189 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229817AbhECIGP (ORCPT ); Mon, 3 May 2021 04:06:15 -0400 X-UUID: de53cdbca5ca45d0aa86426a15724753-20210503 X-UUID: de53cdbca5ca45d0aa86426a15724753-20210503 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1944823597; Mon, 03 May 2021 16:05:20 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs08n1.mediatek.inc (172.21.101.55) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 3 May 2021 16:05:18 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 3 May 2021 16:05:19 +0800 From: Shayne Chen To: Felix Fietkau CC: linux-wireless , Lorenzo Bianconi , Ryder Lee , linux-mediatek , Evelyn Tsai , Shayne Chen Subject: [PATCH] mt76: mt7915: fix tssi indication field of DBDC NICs Date: Mon, 3 May 2021 16:04:37 +0800 Message-ID: <20210503080437.4697-1-shayne.chen@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Evelyn Tsai Correct the bitfield which indicates TSSI on/off for MT7915D NIC. Signed-off-by: Evelyn Tsai Signed-off-by: Shayne Chen --- drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h index 033fb59..7896e98 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h +++ b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h @@ -99,12 +99,15 @@ static inline bool mt7915_tssi_enabled(struct mt7915_dev *dev, enum nl80211_band band) { u8 *eep = dev->mt76.eeprom.data; + u8 val = eep[MT_EE_WIFI_CONF + 7]; - /* TODO: DBDC */ - if (band == NL80211_BAND_5GHZ) - return eep[MT_EE_WIFI_CONF + 7] & MT_EE_WIFI_CONF7_TSSI0_5G; + if (band == NL80211_BAND_2GHZ) + return val & MT_EE_WIFI_CONF7_TSSI0_2G; + + if (dev->dbdc_support) + return val & MT_EE_WIFI_CONF7_TSSI1_5G; else - return eep[MT_EE_WIFI_CONF + 7] & MT_EE_WIFI_CONF7_TSSI0_2G; + return val & MT_EE_WIFI_CONF7_TSSI0_5G; } extern const u8 mt7915_sku_group_len[MAX_SKU_RATE_GROUP_NUM]; -- 2.18.0