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,
struct mt7615_dev *dev = phy->dev;
struct cfg80211_chan_def *chandef = &phy->mt76->chandef;
int freq1 = chandef->center_freq1, freq2 = chandef->center_freq2;
+ u8 n_chains = hweight8(phy->mt76->antenna_mask);
struct {
u8 control_chan;
u8 center_chan;
} req = {
.control_chan = chandef->chan->hw_value,
.center_chan = ieee80211_frequency_to_channel(freq1),
- .tx_streams = (dev->chainmask >> 8) & 0xf,
- .rx_streams_mask = dev->mphy.antenna_mask,
+ .tx_streams = n_chains,
+ .rx_streams_mask = n_chains,
.center_chan2 = ieee80211_frequency_to_channel(freq2),
};
int ret;
if (ret)
return ret;
+ req.rx_streams_mask = phy->chainmask;
+
return __mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_SET_RX_PATH,
&req, sizeof(req), true);
}