blob: 6687e45d92ec5f9fe225ed37eaa77572c761ee02 [file] [log] [blame]
developer1f55fcf2024-10-17 14:52:33 +08001From f53d004650f9a9d4d8f3f8e929be22d32a45f31c 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
developer1f55fcf2024-10-17 14:52:33 +08004Subject: [PATCH 169/193] 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
developer1f55fcf2024-10-17 14:52:33 +080017index 1a3c661..406a127 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