summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorNicolas Cavallari <nicolas.cavallari@green-communications.fr>2022-11-10 16:39:51 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-12-31 13:32:21 +0100
commit71e73d3ce2b85d3efa6d546d161645a0a9ee49ce (patch)
tree08a506dd9104559ec532b5dd0b9d0c5c96ec6c71 /drivers/net/wireless
parent13b31708e54f37e91379031e5f797855b6128318 (diff)
downloadlinux-stable-71e73d3ce2b85d3efa6d546d161645a0a9ee49ce.tar.gz
linux-stable-71e73d3ce2b85d3efa6d546d161645a0a9ee49ce.tar.bz2
linux-stable-71e73d3ce2b85d3efa6d546d161645a0a9ee49ce.zip
wifi: mt76: mt7915: Fix chainmask calculation on mt7915 DBDC
[ Upstream commit de147cc28985a2a09e5d6d179fc5ef59b22fc058 ] 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") Co-developed-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c
index 83bced0c0785..0bce0ce51be0 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 = min_t(u8, path, 2);
nss = FIELD_GET(MT_EE_WIFI_CONF3_TX_PATH_B0,
eeprom[MT_EE_WIFI_CONF + 3]);
if (phy->band_idx)