]> git.baikalelectronics.ru Git - kernel.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)
commitd9c683dcfb9cf43f794270546c90343dd4998013
tree500f4aa1ddf7c9801fee497fa713300d5f541be8
parent35f530fa432fb997afcfed7c9bdeac68e59f0c98
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: df608142a94e ("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