]> asedeno.scripts.mit.edu Git - linux.git/commit
mt76: dma: fix buffer unmap with non-linear skbs
authorLorenzo Bianconi <lorenzo@kernel.org>
Sun, 27 Oct 2019 19:53:09 +0000 (20:53 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 30 Oct 2019 14:59:48 +0000 (16:59 +0200)
commit7bd0650be63cbb9e45e394d689c81365fe48e495
tree500f4aa1ddf7c9801fee497fa713300d5f541be8
parentf37f05503575c59020dacd36e999f4e8b3dbc115
mt76: dma: fix buffer unmap with non-linear skbs

mt76 dma layer is supposed to unmap skb data buffers while keep txwi
mapped on hw dma ring. At the moment mt76 wrongly unmap txwi or does
not unmap data fragments in even positions for non-linear skbs. This
issue may result in hw hangs with A-MSDU if the system relies on IOMMU
or SWIOTLB. Fix this behaviour properly unmapping data fragments on
non-linear skbs.

Fixes: 17f1de56df05 ("mt76: add common code shared between multiple chipsets")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mediatek/mt76/dma.c
drivers/net/wireless/mediatek/mt76/mt76.h