| From 9134d34ad3ad49037980ec5e37437753dc583a4b Mon Sep 17 00:00:00 2001 |
| From: Allen Ye <allen.ye@mediatek.com> |
| Date: Wed, 17 Jul 2024 11:36:11 +0800 |
| Subject: [PATCH 169/223] mtk: mt76: mt7996: Fix legacy action frame wrong |
| address translation |
| |
| For non-associated STA send unicast ANQP request, AP should use unicast |
| to response, so mt76 sould tell fw not translate frames of this type. |
| |
| Change-Id: Ie39964538d2b8bcf5a00566b6874e4e4341a4ad4 |
| Signed-off-by: Allen Ye <allen.ye@mediatek.com> |
| --- |
| mt7996/mac.c | 8 ++++++-- |
| 1 file changed, 6 insertions(+), 2 deletions(-) |
| |
| diff --git a/mt7996/mac.c b/mt7996/mac.c |
| index 1a3c661f..406a1275 100644 |
| --- a/mt7996/mac.c |
| +++ b/mt7996/mac.c |
| @@ -683,7 +683,8 @@ mt7996_mac_write_txwi_8023(struct mt7996_dev *dev, __le32 *txwi, |
| |
| static void |
| mt7996_mac_write_txwi_80211(struct mt7996_dev *dev, __le32 *txwi, |
| - struct sk_buff *skb, struct ieee80211_key_conf *key) |
| + struct sk_buff *skb, struct ieee80211_key_conf *key, |
| + struct mt76_wcid *wcid) |
| { |
| struct mt76_phy *mphy = |
| mt76_dev_phy(&dev->mt76, le32_get_bits(txwi[1], MT_TXD1_TGID)); |
| @@ -782,6 +783,9 @@ mt7996_mac_write_txwi_80211(struct mt7996_dev *dev, __le32 *txwi, |
| txwi[5] |= cpu_to_le32(MT_TXD5_FL); |
| txwi[6] |= cpu_to_le32(MT_TXD6_DIS_MAT); |
| } |
| + |
| + if (!wcid->sta && ieee80211_is_action(fc)) |
| + txwi[6] |= cpu_to_le32(MT_TXD6_DIS_MAT); |
| } |
| |
| void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi, |
| @@ -875,7 +879,7 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi, |
| if (is_8023) |
| mt7996_mac_write_txwi_8023(dev, txwi, skb, wcid); |
| else |
| - mt7996_mac_write_txwi_80211(dev, txwi, skb, key); |
| + mt7996_mac_write_txwi_80211(dev, txwi, skb, key, wcid); |
| |
| if (txwi[1] & cpu_to_le32(MT_TXD1_FIXED_RATE)) { |
| struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
| -- |
| 2.45.2 |
| |