Commit 1a7d3f47 authored by Felix Fietkau's avatar Felix Fietkau

mt76: mt7615: fix antenna mask initialization in DBDC mode

Update wiphy available antenna mask, and fix chainmask setting on 3x3 hardware
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent b2c4d95c
...@@ -350,6 +350,8 @@ mt7615_cap_dbdc_enable(struct mt7615_dev *dev) ...@@ -350,6 +350,8 @@ mt7615_cap_dbdc_enable(struct mt7615_dev *dev)
else else
dev->mphy.antenna_mask = dev->chainmask >> 1; dev->mphy.antenna_mask = dev->chainmask >> 1;
dev->phy.chainmask = dev->mphy.antenna_mask; dev->phy.chainmask = dev->mphy.antenna_mask;
dev->mphy.hw->wiphy->available_antennas_rx = dev->phy.chainmask;
dev->mphy.hw->wiphy->available_antennas_tx = dev->phy.chainmask;
mt76_set_stream_caps(&dev->mt76, true); mt76_set_stream_caps(&dev->mt76, true);
} }
...@@ -361,6 +363,8 @@ mt7615_cap_dbdc_disable(struct mt7615_dev *dev) ...@@ -361,6 +363,8 @@ mt7615_cap_dbdc_disable(struct mt7615_dev *dev)
IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ; IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ;
dev->mphy.antenna_mask = dev->chainmask; dev->mphy.antenna_mask = dev->chainmask;
dev->phy.chainmask = dev->chainmask; dev->phy.chainmask = dev->chainmask;
dev->mphy.hw->wiphy->available_antennas_rx = dev->chainmask;
dev->mphy.hw->wiphy->available_antennas_tx = dev->chainmask;
mt76_set_stream_caps(&dev->mt76, true); mt76_set_stream_caps(&dev->mt76, true);
} }
......
...@@ -686,7 +686,13 @@ mt7615_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant) ...@@ -686,7 +686,13 @@ mt7615_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
mutex_lock(&dev->mt76.mutex); mutex_lock(&dev->mt76.mutex);
phy->mt76->antenna_mask = tx_ant; phy->mt76->antenna_mask = tx_ant;
phy->chainmask = ext_phy ? tx_ant << 2 : tx_ant; if (ext_phy) {
if (dev->chainmask == 0xf)
tx_ant <<= 2;
else
tx_ant <<= 1;
}
phy->chainmask = tx_ant;
mt76_set_stream_caps(&dev->mt76, true); mt76_set_stream_caps(&dev->mt76, true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment