From 59e72a4f7f5d173c04ed4a5a3b74baa7f7836d36 Mon Sep 17 00:00:00 2001 From: Vasanthakumar Thiagarajan Date: Mon, 15 Dec 2008 20:40:46 +0530 Subject: [PATCH] --- yaml --- r: 122808 b: refs/heads/master c: 9bf9fca8dea70116016d32c2bf3f83170c8fba76 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/ath9k/recv.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 72435da26c72..5fad54b8d219 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f7a276a625e0b980185d2eb8e8e3e9425a708bee +refs/heads/master: 9bf9fca8dea70116016d32c2bf3f83170c8fba76 diff --git a/trunk/drivers/net/wireless/ath9k/recv.c b/trunk/drivers/net/wireless/ath9k/recv.c index cc160fe9f817..462e08c3d09d 100644 --- a/trunk/drivers/net/wireless/ath9k/recv.c +++ b/trunk/drivers/net/wireless/ath9k/recv.c @@ -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. @@ -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);