mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
wifi: mt76: mt7996: Fix mt7996_reverse_frag0_hdr_trans for MLO
Update mt7996_reverse_frag0_hdr_trans routine to support MLO. Co-developed-by: Bo Jiao <[email protected]> Signed-off-by: Bo Jiao <[email protected]> Signed-off-by: Shayne Chen <[email protected]> Co-developed-by: Lorenzo Bianconi <[email protected]> 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:
committed by
Felix Fietkau
parent
d30faac3b6
commit
304226bc45
+8
-3
@@ -229,7 +229,9 @@ static int mt7996_reverse_frag0_hdr_trans(struct sk_buff *skb, u16 hdr_gap)
|
||||
{
|
||||
struct mt76_rx_status *status = (struct mt76_rx_status *)skb->cb;
|
||||
struct ethhdr *eth_hdr = (struct ethhdr *)(skb->data + hdr_gap);
|
||||
struct mt7996_sta *msta = (struct mt7996_sta *)status->wcid;
|
||||
struct mt7996_sta_link *msta_link = (void *)status->wcid;
|
||||
struct mt7996_sta *msta = msta_link->sta;
|
||||
struct ieee80211_bss_conf *link_conf;
|
||||
__le32 *rxd = (__le32 *)skb->data;
|
||||
struct ieee80211_sta *sta;
|
||||
struct ieee80211_vif *vif;
|
||||
@@ -246,8 +248,11 @@ static int mt7996_reverse_frag0_hdr_trans(struct sk_buff *skb, u16 hdr_gap)
|
||||
if (!msta || !msta->vif)
|
||||
return -EINVAL;
|
||||
|
||||
sta = container_of((void *)msta, struct ieee80211_sta, drv_priv);
|
||||
sta = wcid_to_sta(status->wcid);
|
||||
vif = container_of((void *)msta->vif, struct ieee80211_vif, drv_priv);
|
||||
link_conf = rcu_dereference(vif->link_conf[msta_link->wcid.link_id]);
|
||||
if (!link_conf)
|
||||
return -EINVAL;
|
||||
|
||||
/* store the info from RXD and ethhdr to avoid being overridden */
|
||||
frame_control = le32_get_bits(rxd[8], MT_RXD8_FRAME_CONTROL);
|
||||
@@ -260,7 +265,7 @@ static int mt7996_reverse_frag0_hdr_trans(struct sk_buff *skb, u16 hdr_gap)
|
||||
switch (frame_control & (IEEE80211_FCTL_TODS |
|
||||
IEEE80211_FCTL_FROMDS)) {
|
||||
case 0:
|
||||
ether_addr_copy(hdr.addr3, vif->bss_conf.bssid);
|
||||
ether_addr_copy(hdr.addr3, link_conf->bssid);
|
||||
break;
|
||||
case IEEE80211_FCTL_FROMDS:
|
||||
ether_addr_copy(hdr.addr3, eth_hdr->h_source);
|
||||
|
||||
Reference in New Issue
Block a user