]> git.baikalelectronics.ru Git - kernel.git/commit
mwifiex: re-fix for unaligned accesses
authorArnd Bergmann <arnd@arndb.de>
Fri, 7 May 2021 22:07:55 +0000 (00:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:53:36 +0000 (16:53 +0200)
commit142ee0e6514b829cbf6dbd776d74c6a528ea6586
treeae062229fa704778e0585f98f3e92635c9769321
parent467932fba33db93ec2823fd96930709b6c437c2c
mwifiex: re-fix for unaligned accesses

[ Upstream commit 8f4e3d48bb50765ab27ae5bebed2595b20de80a1 ]

A patch from 2017 changed some accesses to DMA memory to use
get_unaligned_le32() and similar interfaces, to avoid problems
with doing unaligned accesson uncached memory.

However, the change in the mwifiex_pcie_alloc_sleep_cookie_buf()
function ended up changing the size of the access instead,
as it operates on a pointer to u8.

Change this function back to actually access the entire 32 bits.
Note that the pointer is aligned by definition because it came
from dma_alloc_coherent().

Fixes: 68b416ec9192 ("mwifiex: fix for unaligned reads")
Acked-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/marvell/mwifiex/pcie.c