developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 1 | From 9134d34ad3ad49037980ec5e37437753dc583a4b Mon Sep 17 00:00:00 2001 |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 2 | From: Allen Ye <allen.ye@mediatek.com> |
| 3 | Date: Wed, 17 Jul 2024 11:36:11 +0800 |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 4 | Subject: [PATCH 169/223] mtk: mt76: mt7996: Fix legacy action frame wrong |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 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 | |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 10 | Change-Id: Ie39964538d2b8bcf5a00566b6874e4e4341a4ad4 |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 11 | Signed-off-by: Allen Ye <allen.ye@mediatek.com> |
| 12 | --- |
| 13 | mt7996/mac.c | 8 ++++++-- |
| 14 | 1 file changed, 6 insertions(+), 2 deletions(-) |
| 15 | |
| 16 | diff --git a/mt7996/mac.c b/mt7996/mac.c |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 17 | index 1a3c661f..406a1275 100644 |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 18 | --- a/mt7996/mac.c |
| 19 | +++ b/mt7996/mac.c |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 20 | @@ -683,7 +683,8 @@ mt7996_mac_write_txwi_8023(struct mt7996_dev *dev, __le32 *txwi, |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 21 | |
| 22 | static void |
| 23 | mt7996_mac_write_txwi_80211(struct mt7996_dev *dev, __le32 *txwi, |
| 24 | - struct sk_buff *skb, struct ieee80211_key_conf *key) |
| 25 | + struct sk_buff *skb, struct ieee80211_key_conf *key, |
| 26 | + struct mt76_wcid *wcid) |
| 27 | { |
| 28 | struct mt76_phy *mphy = |
| 29 | mt76_dev_phy(&dev->mt76, le32_get_bits(txwi[1], MT_TXD1_TGID)); |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 30 | @@ -782,6 +783,9 @@ mt7996_mac_write_txwi_80211(struct mt7996_dev *dev, __le32 *txwi, |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 31 | txwi[5] |= cpu_to_le32(MT_TXD5_FL); |
| 32 | txwi[6] |= cpu_to_le32(MT_TXD6_DIS_MAT); |
| 33 | } |
| 34 | + |
| 35 | + if (!wcid->sta && ieee80211_is_action(fc)) |
| 36 | + txwi[6] |= cpu_to_le32(MT_TXD6_DIS_MAT); |
| 37 | } |
| 38 | |
| 39 | void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi, |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 40 | @@ -875,7 +879,7 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi, |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 41 | if (is_8023) |
| 42 | mt7996_mac_write_txwi_8023(dev, txwi, skb, wcid); |
| 43 | else |
| 44 | - mt7996_mac_write_txwi_80211(dev, txwi, skb, key); |
| 45 | + mt7996_mac_write_txwi_80211(dev, txwi, skb, key, wcid); |
| 46 | |
| 47 | if (txwi[1] & cpu_to_le32(MT_TXD1_FIXED_RATE)) { |
| 48 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; |
| 49 | -- |
developer | d0c8945 | 2024-10-11 16:53:27 +0800 | [diff] [blame^] | 50 | 2.45.2 |
developer | 05f3b2b | 2024-08-19 19:17:34 +0800 | [diff] [blame] | 51 | |