mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-17 09:41:09 +02:00
wifi: mt76: mt7996: Overwrite unspecified link_id in mt7996_tx()
Set link_id to msta or mvif primary value if it is set to IEEE80211_LINK_UNSPECIFIED by mac80211 in mt7996_tx routine. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://patch.msgid.link/20250708-mt7996-mlo-fixes-v2-v1-1-f2682818a8a3@kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
committed by
Felix Fietkau
parent
d103f26a5c
commit
1609b014aa
@@ -1221,21 +1221,30 @@ static void mt7996_tx(struct ieee80211_hw *hw,
|
||||
struct mt76_wcid *wcid = &dev->mt76.global_wcid;
|
||||
u8 link_id = u32_get_bits(info->control.flags,
|
||||
IEEE80211_TX_CTRL_MLO_LINK);
|
||||
struct mt7996_sta *msta;
|
||||
struct mt7996_vif *mvif;
|
||||
|
||||
rcu_read_lock();
|
||||
|
||||
if (vif) {
|
||||
struct mt7996_vif *mvif = (void *)vif->drv_priv;
|
||||
msta = control->sta ? (void *)control->sta->drv_priv : NULL;
|
||||
mvif = vif ? (void *)vif->drv_priv : NULL;
|
||||
|
||||
/* Use primary link_id if the value from mac80211 is set to
|
||||
* IEEE80211_LINK_UNSPECIFIED.
|
||||
*/
|
||||
if (link_id == IEEE80211_LINK_UNSPECIFIED) {
|
||||
if (msta)
|
||||
link_id = msta->deflink_id;
|
||||
else if (mvif)
|
||||
link_id = mvif->mt76.deflink_id;
|
||||
}
|
||||
|
||||
if (mvif) {
|
||||
struct mt76_vif_link *mlink = &mvif->deflink.mt76;
|
||||
|
||||
if (link_id < IEEE80211_LINK_UNSPECIFIED)
|
||||
mlink = rcu_dereference(mvif->mt76.link[link_id]);
|
||||
|
||||
if (!mlink) {
|
||||
ieee80211_free_txskb(hw, skb);
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
if (mlink->wcid)
|
||||
wcid = mlink->wcid;
|
||||
|
||||
@@ -1254,8 +1263,7 @@ static void mt7996_tx(struct ieee80211_hw *hw,
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
if (control->sta && link_id < IEEE80211_LINK_UNSPECIFIED) {
|
||||
struct mt7996_sta *msta = (void *)control->sta->drv_priv;
|
||||
if (msta && link_id < IEEE80211_LINK_UNSPECIFIED) {
|
||||
struct mt7996_sta_link *msta_link;
|
||||
|
||||
msta_link = rcu_dereference(msta->link[link_id]);
|
||||
|
||||
Reference in New Issue
Block a user