Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 122808
b: refs/heads/master
c: 9bf9fca
h: refs/heads/master
v: v3
  • Loading branch information
Vasanthakumar Thiagarajan authored and John W. Linville committed Dec 19, 2008
1 parent 16c54cf commit 59e72a4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f7a276a625e0b980185d2eb8e8e3e9425a708bee
refs/heads/master: 9bf9fca8dea70116016d32c2bf3f83170c8fba76
14 changes: 10 additions & 4 deletions trunk/drivers/net/wireless/ath9k/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,15 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush)
if (!skb)
continue;

/*
* Synchronize the DMA transfer with CPU before
* 1. accessing the frame
* 2. requeueing the same buffer to h/w
*/
pci_dma_sync_single_for_cpu(sc->pdev, bf->bf_buf_addr,
sc->rx.bufsize,
PCI_DMA_FROMDEVICE);

/*
* If we're asked to flush receive queue, directly
* chain it back at the queue without processing it.
Expand Down Expand Up @@ -547,10 +556,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush)
if (!requeue_skb)
goto requeue;

/* Sync and unmap the frame */
pci_dma_sync_single_for_cpu(sc->pdev, bf->bf_buf_addr,
sc->rx.bufsize,
PCI_DMA_FROMDEVICE);
/* Unmap the frame */
pci_unmap_single(sc->pdev, bf->bf_buf_addr,
sc->rx.bufsize,
PCI_DMA_FROMDEVICE);
Expand Down

0 comments on commit 59e72a4

Please sign in to comment.