[PATCH mt76] wifi: mt76: mt7996: Add missing DMA sync for EAPOL frames
Lorenzo Bianconi
lorenzo at kernel.org
Tue Sep 9 08:37:12 PDT 2025
Add missing DMA sync before updating EAPOL frames 802.11 addresses.
Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index 588f4aed31eda30aa48eeb06cfcbf36a0e147682..14c4c575a99895f6888a7bdb1353e05e84c8a3c9 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -1067,6 +1067,9 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
if (!link_sta)
return -EINVAL;
+ dma_sync_single_for_cpu(mdev->dma_dev, tx_info->buf[1].addr,
+ tx_info->buf[1].len, DMA_TO_DEVICE);
+
memcpy(hdr->addr1, link_sta->addr, ETH_ALEN);
memcpy(hdr->addr2, link_conf->addr, ETH_ALEN);
if (ieee80211_has_a4(hdr->frame_control)) {
@@ -1077,6 +1080,9 @@ int mt7996_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
} else if (ieee80211_has_fromds(hdr->frame_control)) {
memcpy(hdr->addr3, vif->addr, ETH_ALEN);
}
+
+ dma_sync_single_for_device(mdev->dma_dev, tx_info->buf[1].addr,
+ tx_info->buf[1].len, DMA_TO_DEVICE);
}
pid = mt76_tx_status_skb_add(mdev, wcid, tx_info->skb);
---
base-commit: b054061870ecbed6305c0f559ae90f459f17637d
change-id: 20250909-mt7996-mlo-eapol-missing-dma-sync-9a13f6528399
Best regards,
--
Lorenzo Bianconi <lorenzo at kernel.org>
More information about the Linux-mediatek
mailing list