Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/openwrt/mt76.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Cavallari <nicolas.cavallari@green-communications.fr>2022-11-10 18:39:50 +0300
committerFelix Fietkau <nbd@nbd.name>2022-11-11 13:38:25 +0300
commit0263711ba362e36d6dcdcd2461c1a7ad7cf5098c (patch)
tree6e83dc37de34c391a2061fe651533632ab306d3f
parent1e9060420c929a93620817a17dbd1cd7878cb757 (diff)
wifi: mt76: mt7915: fix antenna selection with bad eeprom.
If the nss value is zero in the eeprom, set it to the max. This eeprom fragment from a mt7915 DBDC shows the problem: 00000190: 24 24 08 00 28 00 00 15 00 00 00 00 00 00 00 00 Fixes: 51a87540232c ("wifi: mt76: mt7915: rework eeprom tx paths and streams init") Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr> Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--mt7915/eeprom.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mt7915/eeprom.c b/mt7915/eeprom.c
index e2482c65..83bced0c 100644
--- a/mt7915/eeprom.c
+++ b/mt7915/eeprom.c
@@ -208,6 +208,8 @@ void mt7915_eeprom_parse_hw_cap(struct mt7915_dev *dev,
nss_max = 2;
}
+ if (!nss)
+ nss = nss_max;
nss = min_t(u8, min_t(u8, nss_max, nss), path);
mphy->chainmask = BIT(path) - 1;