mt76: mt7615: rework chainmask handling

Move chainmask to struct mt7615_phy and instead of needlessly making the
format similar to values for older chips, make it refer to the actual chain
bits used for the rx/tx path.
This is important for multiple wiphy support, where for a secondary phy,
antenna_mask will start at 0, and chainmask will start at the chain offset
(bit 2)

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2019-12-03 20:04:12 +01:00
parent 705a0fcdc3
commit 849fefacc4
3 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -124,8 +124,8 @@ static void mt7615_eeprom_parse_hw_cap(struct mt7615_dev *dev)
if (!tx_mask || tx_mask > max_nss)
tx_mask = max_nss;
dev->chainmask = tx_mask << 8 | rx_mask;
dev->mphy.antenna_mask = BIT(tx_mask) - 1;
dev->phy.chainmask = dev->mphy.antenna_mask;
}
int mt7615_eeprom_get_power_index(struct mt7615_dev *dev,