summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Copeland <me@bobcopeland.com>2015-01-09 14:15:48 -0500
committerKalle Valo <kvalo@codeaurora.org>2015-01-23 19:12:01 +0200
commitbfa6696b39ae4da554a8b8ec9d17bba1ed6ae889 (patch)
treea33decaa6ad72ee5a18bfb55aa80bd1ef92efc1a
parent232ddcd80fa5c878efd631c6562cbaa24535bdc1 (diff)
downloadlinux-bfa6696b39ae4da554a8b8ec9d17bba1ed6ae889.tar.bz2
wcn36xx: don't process 'valid' descriptors
The DMA engine will reset the valid bit after a descriptor is complete; any with the valid bit still set may still be in use by the hardware, so check that before freeing the descriptor. Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r--drivers/net/wireless/ath/wcn36xx/dxe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/dxe.c b/drivers/net/wireless/ath/wcn36xx/dxe.c
index 73f12f196f14..3d6bc9b87176 100644
--- a/drivers/net/wireless/ath/wcn36xx/dxe.c
+++ b/drivers/net/wireless/ath/wcn36xx/dxe.c
@@ -354,6 +354,8 @@ static void reap_tx_dxes(struct wcn36xx *wcn, struct wcn36xx_dxe_ch *ch)
* and while-do will not make any cycles.
*/
do {
+ if (ctl->desc->ctrl & WCN36XX_DXE_CTRL_VALID_MASK)
+ break;
if (ctl->skb) {
dma_unmap_single(NULL, ctl->desc->src_addr_l,
ctl->skb->len, DMA_TO_DEVICE);