diff options
author | Dedy Lansky <dlansky@codeaurora.org> | 2019-09-10 16:46:29 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2019-09-12 18:06:53 +0300 |
commit | f4519fd9375d310c608f9a47e4f3a0579bc94998 (patch) | |
tree | d8c94c105a1d4f0a685888dc03226ff218ea2210 /drivers/net/wireless/ath/wil6210/txrx_edma.h | |
parent | wil6210: fix PTK re-key race (diff) | |
download | linux-dev-f4519fd9375d310c608f9a47e4f3a0579bc94998.tar.xz linux-dev-f4519fd9375d310c608f9a47e4f3a0579bc94998.zip |
wil6210: make sure DR bit is read before rest of the status message
Due to compiler optimization, it's possible that dr_bit (descriptor
ready) is read last from the status message.
Due to race condition between HW writing the status message and
driver reading it, other fields that were read earlier (before dr_bit)
could have invalid values.
Fix this by explicitly reading the dr_bit first and then using rmb
before reading the rest of the status message.
Signed-off-by: Dedy Lansky <dlansky@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/wireless/ath/wil6210/txrx_edma.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.h b/drivers/net/wireless/ath/wil6210/txrx_edma.h index 724d223afe82..136c51c338cf 100644 --- a/drivers/net/wireless/ath/wil6210/txrx_edma.h +++ b/drivers/net/wireless/ath/wil6210/txrx_edma.h @@ -421,12 +421,6 @@ static inline u8 wil_rx_status_get_tid(void *msg) return val & WIL_RX_EDMA_DLPF_LU_MISS_CID_TID_MASK; } -static inline int wil_rx_status_get_desc_rdy_bit(void *msg) -{ - return WIL_GET_BITS(((struct wil_rx_status_compressed *)msg)->d0, - 31, 31); -} - static inline int wil_rx_status_get_eop(void *msg) /* EoP = End of Packet */ { return WIL_GET_BITS(((struct wil_rx_status_compressed *)msg)->d0, |