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)
commit443dc85ad13eeb0340fa3a555c04a6c04c9b61ed
tree93fc8c194faad4640940e7191654d596ebbac540
parent47c44088ac089adfa2f852770ac11e3b7ce8d7c5
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: 2122dfbfd0bd ("mt76: mt7615: add rx checksum offload support")
Fixes: 94244d2ea503 ("mt76: mt7915: add rx checksum offload support")
Fixes: 0e75732764e8 ("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