]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: mt76: mt7996: fix RX buffer size of MCU event
authorShayne Chen <shayne.chen@mediatek.com>
Thu, 15 May 2025 03:29:50 +0000 (11:29 +0800)
committerFelix Fietkau <nbd@nbd.name>
Thu, 22 May 2025 10:57:36 +0000 (12:57 +0200)
commit42cb27af34de4acf680606fad2c1f2932110591f
treea8b242eb9ec92420c91cc182803fd7b0b6298123
parent79e788fcb2043eabf99e73f6af35a79ccca365c4
wifi: mt76: mt7996: fix RX buffer size of MCU event

Some management frames are first processed by the firmware and then
passed to the driver through the MCU event rings. In CONNAC3, event rings
do not support scatter-gather and have a size limitation of 2048 bytes.
If a packet sized between 1728 and 2048 bytes arrives from an event ring,
the ring will hang because the driver attempts to use scatter-gather to
process it.

To fix this, include the size of struct skb_shared_info in the MCU RX
buffer size to prevent scatter-gather from being used for event skb in
mt76_dma_rx_fill_buf().

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Co-developed-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Link: https://patch.msgid.link/20250515032952.1653494-7-shayne.chen@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7996/dma.c
drivers/net/wireless/mediatek/mt76/mt7996/mt7996.h