Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions mt792x_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ void mt792x_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
IEEE80211_TX_CTRL_MLO_LINK);
sta = (struct mt792x_sta *)control->sta->drv_priv;
mlink = mt792x_sta_to_link(sta, link_id);
if (!mlink)
goto free_skb;
wcid = &mlink->wcid;
}

Expand All @@ -113,9 +115,12 @@ void mt792x_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
link_id = wcid->link_id;
rcu_read_lock();
conf = rcu_dereference(vif->link_conf[link_id]);
memcpy(hdr->addr2, conf->addr, ETH_ALEN);

link_sta = rcu_dereference(control->sta->link[link_id]);
if (!conf || !link_sta) {
rcu_read_unlock();
goto free_skb;
}
memcpy(hdr->addr2, conf->addr, ETH_ALEN);
memcpy(hdr->addr1, link_sta->addr, ETH_ALEN);

if (vif->type == NL80211_IFTYPE_STATION)
Expand All @@ -136,6 +141,10 @@ void mt792x_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
}

mt76_connac_pm_queue_skb(hw, &dev->pm, wcid, skb);
return;

free_skb:
ieee80211_free_txskb(hw, skb);
}
EXPORT_SYMBOL_GPL(mt792x_tx);

Expand Down