]> git.baikalelectronics.ru Git - kernel.git/commit
mwifiex: balance dma map/unmap sizes
authorAaron Durbin <adurbin@chromium.org>
Sat, 8 Feb 2014 00:25:50 +0000 (16:25 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 12 Feb 2014 20:36:14 +0000 (15:36 -0500)
commit005f7ad914b4cb9b6dde9e3c6d96b8a8f7d5bf7a
treede19768520319278f26081b60dc0cdac24338608
parente1c422a46add1a1260a8906b3d09d25821f3bac6
mwifiex: balance dma map/unmap sizes

Depending on the underlying DMA implementation its
not possible to partially unmap DMA buffers. Moreover
its not possible to understand the intent of passing
0 as the size to dma unmap. The intent of this
driver is unmap the entire skb buffer. The only way
to ensure that the size matches on unmap is to store
both the dma address and the size in the skb ca field.

Introduce a mwifiex_dma_mapping structure which tracks
the dma address and the size. Additionally, provide
a mwifiex_unmap_pci_memory() that utilizes the new
structure. This also provide symmetry within the
internal API.

Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Reviewed-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/pcie.c
drivers/net/wireless/mwifiex/util.h