diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath9k/recv.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath9k/recv.c b/drivers/net/wireless/ath9k/recv.c index cc160fe9f817..462e08c3d09d 100644 --- a/drivers/net/wireless/ath9k/recv.c +++ b/drivers/net/wireless/ath9k/recv.c | |||
@@ -520,6 +520,15 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) | |||
520 | continue; | 520 | continue; |
521 | 521 | ||
522 | /* | 522 | /* |
523 | * Synchronize the DMA transfer with CPU before | ||
524 | * 1. accessing the frame | ||
525 | * 2. requeueing the same buffer to h/w | ||
526 | */ | ||
527 | pci_dma_sync_single_for_cpu(sc->pdev, bf->bf_buf_addr, | ||
528 | sc->rx.bufsize, | ||
529 | PCI_DMA_FROMDEVICE); | ||
530 | |||
531 | /* | ||
523 | * If we're asked to flush receive queue, directly | 532 | * If we're asked to flush receive queue, directly |
524 | * chain it back at the queue without processing it. | 533 | * chain it back at the queue without processing it. |
525 | */ | 534 | */ |
@@ -547,10 +556,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush) | |||
547 | if (!requeue_skb) | 556 | if (!requeue_skb) |
548 | goto requeue; | 557 | goto requeue; |
549 | 558 | ||
550 | /* Sync and unmap the frame */ | 559 | /* Unmap the frame */ |
551 | pci_dma_sync_single_for_cpu(sc->pdev, bf->bf_buf_addr, | ||
552 | sc->rx.bufsize, | ||
553 | PCI_DMA_FROMDEVICE); | ||
554 | pci_unmap_single(sc->pdev, bf->bf_buf_addr, | 560 | pci_unmap_single(sc->pdev, bf->bf_buf_addr, |
555 | sc->rx.bufsize, | 561 | sc->rx.bufsize, |
556 | PCI_DMA_FROMDEVICE); | 562 | PCI_DMA_FROMDEVICE); |