blob: e6819c5a1053b26bc792a7c32277d44b9bb8114e [file] [log] [blame]
developer05f3b2b2024-08-19 19:17:34 +08001From 6d35d91b55b55134d3fca5a9f913121b2b8058eb Mon Sep 17 00:00:00 2001
2From: Allen Ye <allen.ye@mediatek.com>
3Date: Wed, 17 Jul 2024 11:36:11 +0800
4Subject: [PATCH 181/199] mtk: mt76: mt7996: Fix legacy action frame wrong
5 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
10Signed-off-by: Allen Ye <allen.ye@mediatek.com>
11---
12 mt7996/mac.c | 8 ++++++--
13 1 file changed, 6 insertions(+), 2 deletions(-)
14
15diff --git a/mt7996/mac.c b/mt7996/mac.c
16index 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--
492.18.0
50