linux/drivers/net/wireless/ath/wcn36xx
Benjamin Li 9bfe38e064 wcn36xx: add proper DMA memory barriers in rx path
This is essentially exactly following the dma_wmb()/dma_rmb() usage
instructions in Documentation/memory-barriers.txt.

The theoretical races here are:

1. DXE (the DMA Transfer Engine in the Wi-Fi subsystem) seeing the
dxe->ctrl & WCN36xx_DXE_CTRL_VLD write before the dxe->dst_addr_l
write, thus performing DMA into the wrong address.

2. CPU reading dxe->dst_addr_l before DXE unsets dxe->ctrl &
WCN36xx_DXE_CTRL_VLD. This should generally be harmless since DXE
doesn't write dxe->dst_addr_l (no risk of freeing the wrong skb).

Fixes: 8e84c25821 ("wcn36xx: mac80211 driver for Qualcomm WCN3660/WCN3680 hardware")
Signed-off-by: Benjamin Li <benl@squareup.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211023001528.3077822-1-benl@squareup.com
2021-10-27 10:44:16 +03:00
..
debug.c wcn36xx: Add ability for wcn36xx_smd_dump_cmd_req to pass two's complement 2021-09-21 16:33:25 +03:00
debug.h
dxe.c wcn36xx: add proper DMA memory barriers in rx path 2021-10-27 10:44:16 +03:00
dxe.h wcn36xx: Remove useless skb spinlock 2018-04-10 17:39:50 +03:00
hal.h wcn36xx: Implement Idle Mode Power Save 2021-09-21 16:34:32 +03:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
main.c wcn36xx: Fix HT40 capability for 2Ghz band 2021-10-27 10:43:56 +03:00
Makefile ath: fix SPDX tags 2019-06-26 18:11:06 +03:00
pmc.c Revert "wcn36xx: Disable bmps when encryption is disabled" 2021-10-27 10:43:31 +03:00
pmc.h
smd.c wcn36xx: Add chained transfer support for AMSDU 2021-10-27 10:42:22 +03:00
smd.h wcn36xx: Implement Idle Mode Power Save 2021-09-21 16:34:32 +03:00
testmode_i.h wcn36xx: Add support for Factory Test Mode (FTM) 2018-05-25 13:17:28 +03:00
testmode.c netlink: make validation more configurable for future strictness 2019-04-27 17:07:21 -04:00
testmode.h wcn36xx: Replace zero-length array with flexible-array 2020-05-13 19:03:06 +03:00
txrx.c wcn36xx: Add chained transfer support for AMSDU 2021-10-27 10:42:22 +03:00
txrx.h wcn36xx: Correct band/freq reporting on RX 2021-10-27 10:41:44 +03:00
wcn36xx.h Revert "wcn36xx: Disable bmps when encryption is disabled" 2021-10-27 10:43:31 +03:00