blob: 83c76c09aed878a555872c537a40330d11e83c76 [file] [log] [blame]
developer43a264f2024-03-26 14:09:54 +08001From a8a291acfb296d02ea780e466e080d789f70af21 Mon Sep 17 00:00:00 2001
2From: Michael-CY Lee <michael-cy.lee@mediatek.com>
3Date: Tue, 19 Mar 2024 08:35:26 +0800
4Subject: [PATCH] mtk: wifi: mt76: mt7915: assign DEAUTH to ALTX queue for CERT
5
6Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
7---
8 mt76_connac_mac.c | 10 ++++++++++
9 1 file changed, 10 insertions(+)
10
11diff --git a/mt76_connac_mac.c b/mt76_connac_mac.c
12index abb95b3..edeb618 100644
13--- a/mt76_connac_mac.c
14+++ b/mt76_connac_mac.c
15@@ -385,6 +385,8 @@ mt76_connac2_mac_write_txwi_80211(struct mt76_dev *dev, __le32 *txwi,
16 struct sk_buff *skb,
17 struct ieee80211_key_conf *key)
18 {
19+ struct mt76_phy *mphy =
20+ mt76_dev_phy(dev, le32_get_bits(txwi[1], MT_TXD1_TGID));
21 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
22 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data;
23 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
24@@ -394,6 +396,14 @@ mt76_connac2_mac_write_txwi_80211(struct mt76_dev *dev, __le32 *txwi,
25 u8 fc_type, fc_stype;
26 u32 val;
27
28+ if (ieee80211_is_cert_mode(mphy->hw) && ieee80211_is_deauth(fc)) {
29+ /* In WPA3 cert TC-4.8.1, the deauth must be transmitted without
30+ * considering PSM bit
31+ */
32+ txwi[0] &= ~cpu_to_le32(MT_TXD0_Q_IDX);
33+ txwi[0] |= cpu_to_le32(FIELD_PREP(MT_TXD0_Q_IDX, MT_LMAC_ALTX0));
34+ }
35+
36 if (ieee80211_is_action(fc) &&
37 mgmt->u.action.category == WLAN_CATEGORY_BACK &&
38 mgmt->u.action.u.addba_req.action_code == WLAN_ACTION_ADDBA_REQ) {
39--
402.25.1
41