blob: 83c76c09aed878a555872c537a40330d11e83c76 [file] [log] [blame]
From a8a291acfb296d02ea780e466e080d789f70af21 Mon Sep 17 00:00:00 2001
From: Michael-CY Lee <michael-cy.lee@mediatek.com>
Date: Tue, 19 Mar 2024 08:35:26 +0800
Subject: [PATCH] mtk: wifi: mt76: mt7915: assign DEAUTH to ALTX queue for CERT
Signed-off-by: Michael-CY Lee <michael-cy.lee@mediatek.com>
---
mt76_connac_mac.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/mt76_connac_mac.c b/mt76_connac_mac.c
index abb95b3..edeb618 100644
--- a/mt76_connac_mac.c
+++ b/mt76_connac_mac.c
@@ -385,6 +385,8 @@ mt76_connac2_mac_write_txwi_80211(struct mt76_dev *dev, __le32 *txwi,
struct sk_buff *skb,
struct ieee80211_key_conf *key)
{
+ struct mt76_phy *mphy =
+ mt76_dev_phy(dev, le32_get_bits(txwi[1], MT_TXD1_TGID));
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)skb->data;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -394,6 +396,14 @@ mt76_connac2_mac_write_txwi_80211(struct mt76_dev *dev, __le32 *txwi,
u8 fc_type, fc_stype;
u32 val;
+ if (ieee80211_is_cert_mode(mphy->hw) && ieee80211_is_deauth(fc)) {
+ /* In WPA3 cert TC-4.8.1, the deauth must be transmitted without
+ * considering PSM bit
+ */
+ txwi[0] &= ~cpu_to_le32(MT_TXD0_Q_IDX);
+ txwi[0] |= cpu_to_le32(FIELD_PREP(MT_TXD0_Q_IDX, MT_LMAC_ALTX0));
+ }
+
if (ieee80211_is_action(fc) &&
mgmt->u.action.category == WLAN_CATEGORY_BACK &&
mgmt->u.action.u.addba_req.action_code == WLAN_ACTION_ADDBA_REQ) {
--
2.25.1