wifi: mt76: mt7996: Remove unnecessary link_id checks in mt7996_tx

Remove unnecessary link_id checks in mt7996_tx routine since if the link
identifier provided by mac80211 is unspecified the value will be
overwritten at the beginning on the function.

Fixes: f940c9b7aef6 ("wifi: mt76: mt7996: Set proper link destination address in mt7996_tx()")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Lorenzo Bianconi
2025-10-13 12:49:14 +02:00
committed by Felix Fietkau
parent 4e7077f774
commit 754e335704
+5 -7
View File
@@ -1338,12 +1338,10 @@ static void mt7996_tx(struct ieee80211_hw *hw,
}
if (mvif) {
struct mt76_vif_link *mlink = &mvif->deflink.mt76;
struct mt76_vif_link *mlink;
if (link_id < IEEE80211_LINK_UNSPECIFIED)
mlink = rcu_dereference(mvif->mt76.link[link_id]);
if (mlink->wcid)
mlink = rcu_dereference(mvif->mt76.link[link_id]);
if (mlink && mlink->wcid)
wcid = mlink->wcid;
if (mvif->mt76.roc_phy &&
@@ -1351,7 +1349,7 @@ static void mt7996_tx(struct ieee80211_hw *hw,
mphy = mvif->mt76.roc_phy;
if (mphy->roc_link)
wcid = mphy->roc_link->wcid;
} else {
} else if (mlink) {
mphy = mt76_vif_link_phy(mlink);
}
}
@@ -1361,7 +1359,7 @@ static void mt7996_tx(struct ieee80211_hw *hw,
goto unlock;
}
if (msta && link_id < IEEE80211_LINK_UNSPECIFIED) {
if (msta) {
struct mt7996_sta_link *msta_link;
msta_link = rcu_dereference(msta->link[link_id]);