developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 1 | From 6d35d91b55b55134d3fca5a9f913121b2b8058eb Mon Sep 17 00:00:00 2001 |
| 2 | From: Allen Ye <allen.ye@mediatek.com> |
| 3 | Date: Wed, 17 Jul 2024 11:36:11 +0800 |
| 4 | Subject: [PATCH 181/199] mtk: mt76: mt7996: Fix legacy action frame wrong |
| 5 | address translation |
| 6 | |
| 7 | For non-associated STA send unicast ANQP request, AP should use unicast |
| 8 | to response, so mt76 sould tell fw not translate frames of this type. |
| 9 | |
| 10 | Signed-off-by: Allen Ye <allen.ye@mediatek.com> |
| 11 | --- |
| 12 | mt7996/mac.c | 8 ++++++-- |
| 13 | 1 file changed, 6 insertions(+), 2 deletions(-) |
| 14 | |
| 15 | diff --git a/mt7996/mac.c b/mt7996/mac.c |
| 16 | index 657a19c1..e571bbfa 100644 |
| 17 | --- a/mt7996/mac.c |
| 18 | +++ b/mt7996/mac.c |
| 19 | @@ -671,7 +671,8 @@ mt7996_mac_write_txwi_8023(struct mt7996_dev *dev, __le32 *txwi, |
| 20 | |
| 21 | static void |
| 22 | mt7996_mac_write_txwi_80211(struct mt7996_dev *dev, __le32 *txwi, |
| 23 | - struct sk_buff *skb, struct ieee80211_key_conf *key) |
| 24 | + struct sk_buff *skb, struct ieee80211_key_conf *key, |
| 25 | + struct mt76_wcid *wcid) |
| 26 | { |
| 27 | struct mt76_phy *mphy = |
| 28 | mt76_dev_phy(&dev->mt76, le32_get_bits(txwi[1], MT_TXD1_TGID)); |
| 29 | @@ -770,6 +771,9 @@ mt7996_mac_write_txwi_80211(struct mt7996_dev *dev, __le32 *txwi, |
| 30 | txwi[5] |= cpu_to_le32(MT_TXD5_FL); |
| 31 | txwi[6] |= cpu_to_le32(MT_TXD6_DIS_MAT); |
| 32 | } |
| 33 | + |
| 34 | + if (!wcid->sta && ieee80211_is_action(fc)) |
| 35 | + txwi[6] |= cpu_to_le32(MT_TXD6_DIS_MAT); |
| 36 | } |
| 37 | |
| 38 | void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi, |
| 39 | @@ -863,7 +867,7 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi, |
| 40 | if (is_8023) |
| 41 | mt7996_mac_write_txwi_8023(dev, txwi, skb, wcid); |
| 42 | else |
| 43 | - mt7996_mac_write_txwi_80211(dev, txwi, skb, key); |
| 44 | + mt7996_mac_write_txwi_80211(dev, txwi, skb, key, wcid); |
| 45 | |
| 46 | if (txwi[1] & cpu_to_le32(MT_TXD1_FIXED_RATE)) { |
| 47 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
| 48 | -- |
| 49 | 2.18.0 |
| 50 | |