Message ID | 20221110153953.22562-2-nicolas.cavallari@green-communications.fr (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Felix Fietkau |
Headers | show |
Series | [1/4] wifi: mt76: mt7915: fix antenna selection with bad eeprom. | expand |
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c index e2482c65d639..83bced0c0785 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c +++ b/drivers/net/wireless/mediatek/mt76/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;
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> --- drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c | 2 ++ 1 file changed, 2 insertions(+)