blob: 465c6314e8c65d8b8feb9ea8ad31bfe6c7df27fd [file] [log] [blame]
developer47efbdb2023-06-29 20:33:22 +08001From 3496d9a51ede8540e8378dc783535229aeebbc7e Mon Sep 17 00:00:00 2001
developerd68e00e2022-06-01 10:59:24 +08002From: Peter Chiu <chui-hao.chiu@mediatek.com>
3Date: Thu, 14 Apr 2022 15:18:02 +0800
developer47efbdb2023-06-29 20:33:22 +08004Subject: [PATCH 1006/1031] wifi: mt76: mt7915: drop undefined action frame
developerd68e00e2022-06-01 10:59:24 +08005
6---
7 mt7915/mac.c | 6 ++++++
8 1 file changed, 6 insertions(+)
9
10diff --git a/mt7915/mac.c b/mt7915/mac.c
developer47efbdb2023-06-29 20:33:22 +080011index 3773cdc..f26f949 100644
developerd68e00e2022-06-01 10:59:24 +080012--- a/mt7915/mac.c
13+++ b/mt7915/mac.c
developer47efbdb2023-06-29 20:33:22 +080014@@ -737,6 +737,8 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
developerd68e00e2022-06-01 10:59:24 +080015 struct mt76_tx_info *tx_info)
16 {
17 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx_info->skb->data;
18+ struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)tx_info->skb->data;
19+ __le16 fc = hdr->frame_control;
20 struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
21 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx_info->skb);
22 struct ieee80211_key_conf *key = info->control.hw_key;
developer47efbdb2023-06-29 20:33:22 +080023@@ -767,6 +769,10 @@ int mt7915_tx_prepare_skb(struct mt76_dev *mdev, void *txwi_ptr,
developerd68e00e2022-06-01 10:59:24 +080024 t = (struct mt76_txwi_cache *)(txwi + mdev->drv->txwi_size);
25 t->skb = tx_info->skb;
26
27+ if (ieee80211_is_action(fc) &&
28+ mgmt->u.action.category == 0xff)
29+ return -1;
30+
31 id = mt76_token_consume(mdev, &t);
32 if (id < 0)
33 return id;
34--
developer8effbd32023-04-17 15:57:28 +0800352.18.0
developerd68e00e2022-06-01 10:59:24 +080036