Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bfa6696b authored by Bob Copeland's avatar Bob Copeland Committed by Kalle Valo
Browse files

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: default avatarBob Copeland <me@bobcopeland.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 232ddcd8
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -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.
	 * and while-do will not make any cycles.
	 */
	 */
	do {
	do {
		if (ctl->desc->ctrl & WCN36XX_DXE_CTRL_VALID_MASK)
			break;
		if (ctl->skb) {
		if (ctl->skb) {
			dma_unmap_single(NULL, ctl->desc->src_addr_l,
			dma_unmap_single(NULL, ctl->desc->src_addr_l,
					 ctl->skb->len, DMA_TO_DEVICE);
					 ctl->skb->len, DMA_TO_DEVICE);