Skip to content

Commit 36e0210

Browse files
committed
wifi: mt76: mt7996: split link specific data from struct mt7996_vif
Preparation for MLO support. Link: https://patch.msgid.link/[email protected] Signed-off-by: Felix Fietkau <[email protected]>
1 parent e24646e commit 36e0210

File tree

5 files changed

+185
-132
lines changed

5 files changed

+185
-132
lines changed

drivers/net/wireless/mediatek/mt76/mt7996/debugfs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ static void
601601
mt7996_sta_hw_queue_read(void *data, struct ieee80211_sta *sta)
602602
{
603603
struct mt7996_sta *msta = (struct mt7996_sta *)sta->drv_priv;
604-
struct mt7996_dev *dev = msta->vif->phy->dev;
604+
struct mt7996_dev *dev = msta->vif->deflink.phy->dev;
605605
struct seq_file *s = data;
606606
u8 ac;
607607

@@ -621,7 +621,7 @@ mt7996_sta_hw_queue_read(void *data, struct ieee80211_sta *sta)
621621
GENMASK(11, 0));
622622
seq_printf(s, "\tSTA %pM wcid %d: AC%d%d queued:%d\n",
623623
sta->addr, msta->wcid.idx,
624-
msta->vif->mt76.wmm_idx, ac, qlen);
624+
msta->vif->deflink.mt76.wmm_idx, ac, qlen);
625625
}
626626
}
627627

@@ -899,7 +899,7 @@ static ssize_t mt7996_sta_fixed_rate_set(struct file *file,
899899
#define LONG_PREAMBLE 1
900900
struct ieee80211_sta *sta = file->private_data;
901901
struct mt7996_sta *msta = (struct mt7996_sta *)sta->drv_priv;
902-
struct mt7996_dev *dev = msta->vif->phy->dev;
902+
struct mt7996_dev *dev = msta->vif->deflink.phy->dev;
903903
struct ra_rate phy = {};
904904
char buf[100];
905905
int ret;

drivers/net/wireless/mediatek/mt76/mt7996/mac.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static struct mt76_wcid *mt7996_rx_get_wcid(struct mt7996_dev *dev,
7272
if (!sta->vif)
7373
return NULL;
7474

75-
return &sta->vif->sta.wcid;
75+
return &sta->vif->deflink.sta.wcid;
7676
}
7777

7878
bool mt7996_mac_wtbl_update(struct mt7996_dev *dev, int idx, u32 mask)
@@ -182,7 +182,7 @@ static void mt7996_mac_sta_poll(struct mt7996_dev *dev)
182182
rssi[3] = to_rssi(GENMASK(31, 14), val);
183183

184184
msta->ack_signal =
185-
mt76_rx_signal(msta->vif->phy->mt76->antenna_mask, rssi);
185+
mt76_rx_signal(msta->vif->deflink.phy->mt76->antenna_mask, rssi);
186186

187187
ewma_avg_signal_add(&msta->avg_ack_signal, -msta->ack_signal);
188188
}
@@ -196,7 +196,7 @@ void mt7996_mac_enable_rtscts(struct mt7996_dev *dev,
196196
struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv;
197197
u32 addr;
198198

199-
addr = mt7996_mac_wtbl_lmac_addr(dev, mvif->sta.wcid.idx, 5);
199+
addr = mt7996_mac_wtbl_lmac_addr(dev, mvif->deflink.sta.wcid.idx, 5);
200200
if (enable)
201201
mt76_set(dev, addr, BIT(5));
202202
else
@@ -984,7 +984,7 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
984984
if (vif) {
985985
struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv;
986986

987-
txp->fw.bss_idx = mvif->mt76.idx;
987+
txp->fw.bss_idx = mvif->deflink.mt76.idx;
988988
}
989989

990990
txp->fw.token = cpu_to_le16(id);

0 commit comments

Comments
 (0)