blob: 01f76885b1258c53046c90fbac1ef27d447ae741 [file] [log] [blame]
developerd0c89452024-10-11 16:53:27 +08001From 9134d34ad3ad49037980ec5e37437753dc583a4b Mon Sep 17 00:00:00 2001
developer05f3b2b2024-08-19 19:17:34 +08002From: Allen Ye <allen.ye@mediatek.com>
3Date: Wed, 17 Jul 2024 11:36:11 +0800
developerd0c89452024-10-11 16:53:27 +08004Subject: [PATCH 169/223] mtk: mt76: mt7996: Fix legacy action frame wrong
developer05f3b2b2024-08-19 19:17:34 +08005 address translation
6
7For non-associated STA send unicast ANQP request, AP should use unicast
8to response, so mt76 sould tell fw not translate frames of this type.
9
developerd0c89452024-10-11 16:53:27 +080010Change-Id: Ie39964538d2b8bcf5a00566b6874e4e4341a4ad4
developer05f3b2b2024-08-19 19:17:34 +080011Signed-off-by: Allen Ye <allen.ye@mediatek.com>
12---
13 mt7996/mac.c | 8 ++++++--
14 1 file changed, 6 insertions(+), 2 deletions(-)
15
16diff --git a/mt7996/mac.c b/mt7996/mac.c
developerd0c89452024-10-11 16:53:27 +080017index 1a3c661f..406a1275 100644
developer05f3b2b2024-08-19 19:17:34 +080018--- a/mt7996/mac.c
19+++ b/mt7996/mac.c
developerd0c89452024-10-11 16:53:27 +080020@@ -683,7 +683,8 @@ mt7996_mac_write_txwi_8023(struct mt7996_dev *dev, __le32 *txwi,
developer05f3b2b2024-08-19 19:17:34 +080021
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));
developerd0c89452024-10-11 16:53:27 +080030@@ -782,6 +783,9 @@ mt7996_mac_write_txwi_80211(struct mt7996_dev *dev, __le32 *txwi,
developer05f3b2b2024-08-19 19:17:34 +080031 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,
developerd0c89452024-10-11 16:53:27 +080040@@ -875,7 +879,7 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi,
developer05f3b2b2024-08-19 19:17:34 +080041 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--
developerd0c89452024-10-11 16:53:27 +0800502.45.2
developer05f3b2b2024-08-19 19:17:34 +080051