mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: move chainmask in mt76_phy
Move chainmask from driver phy to mt76_phy since it is used by all drivers. This is a preliminary patch to create a common mcu library used by mt7615 and mt7921 drivers Co-developed-by: Sean Wang <[email protected]> Signed-off-by: Sean Wang <[email protected]> Signed-off-by: Lorenzo Bianconi <[email protected]> Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
d679b56b95
commit
36cd48ab44
+6
-7
@@ -243,8 +243,8 @@ static int mt7915_register_ext_phy(struct mt7915_dev *dev)
|
||||
phy = mphy->priv;
|
||||
phy->dev = dev;
|
||||
phy->mt76 = mphy;
|
||||
phy->chainmask = dev->chainmask & ~dev->phy.chainmask;
|
||||
mphy->antenna_mask = BIT(hweight8(phy->chainmask)) - 1;
|
||||
mphy->chainmask = dev->chainmask & ~dev->mphy.chainmask;
|
||||
mphy->antenna_mask = BIT(hweight8(mphy->chainmask)) - 1;
|
||||
mt7915_init_wiphy(mphy->hw);
|
||||
|
||||
INIT_LIST_HEAD(&phy->stats_list);
|
||||
@@ -339,7 +339,7 @@ static int mt7915_init_hardware(struct mt7915_dev *dev)
|
||||
|
||||
void mt7915_set_stream_vht_txbf_caps(struct mt7915_phy *phy)
|
||||
{
|
||||
int nss = hweight8(phy->chainmask);
|
||||
int nss = hweight8(phy->mt76->chainmask);
|
||||
u32 *cap = &phy->mt76->sband_5g.sband.vht_cap.cap;
|
||||
|
||||
*cap |= IEEE80211_VHT_CAP_SU_BEAMFORMEE_CAPABLE |
|
||||
@@ -450,8 +450,7 @@ static int
|
||||
mt7915_init_he_caps(struct mt7915_phy *phy, enum nl80211_band band,
|
||||
struct ieee80211_sband_iftype_data *data)
|
||||
{
|
||||
int i, idx = 0;
|
||||
int nss = hweight8(phy->chainmask);
|
||||
int i, idx = 0, nss = hweight8(phy->mt76->chainmask);
|
||||
u16 mcs_map = 0;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
@@ -658,8 +657,8 @@ int mt7915_register_device(struct mt7915_dev *dev)
|
||||
dev->mphy.sband_5g.sband.vht_cap.cap |=
|
||||
IEEE80211_VHT_CAP_SHORT_GI_160 |
|
||||
IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ;
|
||||
dev->mphy.hw->wiphy->available_antennas_rx = dev->phy.chainmask;
|
||||
dev->mphy.hw->wiphy->available_antennas_tx = dev->phy.chainmask;
|
||||
dev->mphy.hw->wiphy->available_antennas_rx = dev->mphy.chainmask;
|
||||
dev->mphy.hw->wiphy->available_antennas_tx = dev->mphy.chainmask;
|
||||
|
||||
mt76_set_stream_caps(&dev->mphy, true);
|
||||
mt7915_set_stream_vht_txbf_caps(&dev->phy);
|
||||
|
||||
Reference in New Issue
Block a user