diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-07-15 11:44:43 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-07-29 16:36:28 -0400 |
commit | e86600c7b4e9b9b22ba51620613d6159bf5cf504 (patch) | |
tree | 2779aca37e692ff9910781035de6c7e5587fbd39 /drivers/net | |
parent | 274c7c3638cd027b46f76d0caef96c1bad8b6701 (diff) |
Ath5k: fix dma operation
Don't sync
- coherent mapping (descriptors)
- before unmap, it's useless
- (wrongly anyway -- for_cpu) beacon skb, it's just mapped,
so by the device yet
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath5k/base.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 8e9afb3b3a56..3aa22dc71651 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -1704,10 +1704,6 @@ ath5k_tasklet_rx(unsigned long data) | |||
1704 | skb = bf->skb; | 1704 | skb = bf->skb; |
1705 | ds = bf->desc; | 1705 | ds = bf->desc; |
1706 | 1706 | ||
1707 | /* TODO only one segment */ | ||
1708 | pci_dma_sync_single_for_cpu(sc->pdev, sc->desc_daddr, | ||
1709 | sc->desc_len, PCI_DMA_FROMDEVICE); | ||
1710 | |||
1711 | /* | 1707 | /* |
1712 | * last buffer must not be freed to ensure proper hardware | 1708 | * last buffer must not be freed to ensure proper hardware |
1713 | * function. When the hardware finishes also a packet next to | 1709 | * function. When the hardware finishes also a packet next to |
@@ -1771,8 +1767,6 @@ ath5k_tasklet_rx(unsigned long data) | |||
1771 | goto next; | 1767 | goto next; |
1772 | } | 1768 | } |
1773 | accept: | 1769 | accept: |
1774 | pci_dma_sync_single_for_cpu(sc->pdev, bf->skbaddr, | ||
1775 | rs.rs_datalen, PCI_DMA_FROMDEVICE); | ||
1776 | pci_unmap_single(sc->pdev, bf->skbaddr, sc->rxbufsize, | 1770 | pci_unmap_single(sc->pdev, bf->skbaddr, sc->rxbufsize, |
1777 | PCI_DMA_FROMDEVICE); | 1771 | PCI_DMA_FROMDEVICE); |
1778 | bf->skb = NULL; | 1772 | bf->skb = NULL; |
@@ -1860,9 +1854,6 @@ ath5k_tx_processq(struct ath5k_softc *sc, struct ath5k_txq *txq) | |||
1860 | list_for_each_entry_safe(bf, bf0, &txq->q, list) { | 1854 | list_for_each_entry_safe(bf, bf0, &txq->q, list) { |
1861 | ds = bf->desc; | 1855 | ds = bf->desc; |
1862 | 1856 | ||
1863 | /* TODO only one segment */ | ||
1864 | pci_dma_sync_single_for_cpu(sc->pdev, sc->desc_daddr, | ||
1865 | sc->desc_len, PCI_DMA_FROMDEVICE); | ||
1866 | ret = sc->ah->ah_proc_tx_desc(sc->ah, ds, &ts); | 1857 | ret = sc->ah->ah_proc_tx_desc(sc->ah, ds, &ts); |
1867 | if (unlikely(ret == -EINPROGRESS)) | 1858 | if (unlikely(ret == -EINPROGRESS)) |
1868 | break; | 1859 | break; |
@@ -2035,8 +2026,6 @@ ath5k_beacon_send(struct ath5k_softc *sc) | |||
2035 | ATH5K_WARN(sc, "beacon queue %u didn't stop?\n", sc->bhalq); | 2026 | ATH5K_WARN(sc, "beacon queue %u didn't stop?\n", sc->bhalq); |
2036 | /* NB: hw still stops DMA, so proceed */ | 2027 | /* NB: hw still stops DMA, so proceed */ |
2037 | } | 2028 | } |
2038 | pci_dma_sync_single_for_cpu(sc->pdev, bf->skbaddr, bf->skb->len, | ||
2039 | PCI_DMA_TODEVICE); | ||
2040 | 2029 | ||
2041 | ath5k_hw_put_tx_buf(ah, sc->bhalq, bf->daddr); | 2030 | ath5k_hw_put_tx_buf(ah, sc->bhalq, bf->daddr); |
2042 | ath5k_hw_tx_start(ah, sc->bhalq); | 2031 | ath5k_hw_tx_start(ah, sc->bhalq); |