Skip to content

Commit

Permalink
wifi: mt76: mt7996: disable AMSDU for non-data frames
Browse files Browse the repository at this point in the history
[ Upstream commit 5d5edc0 ]

Disable AMSDU for non-data frames to prevent TX token leak issues.

Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Peter Chiu authored and gregkh committed Apr 13, 2024
1 parent 9864f58 commit 6f4d5f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/mediatek/mt76/mt7996/mac.c
Expand Up @@ -732,6 +732,9 @@ mt7996_mac_write_txwi_8023(struct mt7996_dev *dev, __le32 *txwi,
FIELD_PREP(MT_TXD2_SUB_TYPE, fc_stype);

txwi[2] |= cpu_to_le32(val);

if (wcid->amsdu)
txwi[3] |= cpu_to_le32(MT_TXD3_HW_AMSDU);
}

static void
Expand Down Expand Up @@ -862,8 +865,6 @@ void mt7996_mac_write_txwi(struct mt7996_dev *dev, __le32 *txwi,
val |= MT_TXD3_PROTECT_FRAME;
if (info->flags & IEEE80211_TX_CTL_NO_ACK)
val |= MT_TXD3_NO_ACK;
if (wcid->amsdu)
val |= MT_TXD3_HW_AMSDU;

txwi[3] = cpu_to_le32(val);
txwi[4] = 0;
Expand Down

0 comments on commit 6f4d5f9

Please sign in to comment.