]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: mt76: fix rx checksum offload on mt7615/mt7915/mt7921
authorFelix Fietkau <nbd@nbd.name>
Wed, 5 Oct 2022 13:08:24 +0000 (15:08 +0200)
committerKalle Valo <kvalo@kernel.org>
Tue, 11 Oct 2022 08:41:20 +0000 (11:41 +0300)
commiteeb9947fca16b755378128396a064ea8468611a2
tree93fc8c194faad4640940e7191654d596ebbac540
parent5da0136dc1a31f90f146dc10b825fc97bbbafae5
wifi: mt76: fix rx checksum offload on mt7615/mt7915/mt7921

Checking the relevant rxd bits for the checksum information only indicates
if the checksum verification was performed by the hardware and doesn't show
actual checksum errors. Checksum errors are indicated in the info field of
the DMA descriptor. Fix packets erroneously marked as CHECKSUM_UNNECESSARY
by checking the extra bits as well.
Those bits are only passed to the driver for MMIO devices at the moment, so
limit checksum offload to those.

Fixes: 52f22091d074 ("mt76: mt7615: add rx checksum offload support")
Fixes: bcccbcf4a2a7 ("mt76: mt7915: add rx checksum offload support")
Fixes: 552957293dfb ("mt76: mt7921: enable rx csum offload")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221005130824.23371-2-nbd@nbd.name
drivers/net/wireless/mediatek/mt76/dma.c
drivers/net/wireless/mediatek/mt76/mt7615/mac.c
drivers/net/wireless/mediatek/mt76/mt7915/mac.c
drivers/net/wireless/mediatek/mt76/mt7921/mac.c