diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-01-14 14:17:03 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:00:29 -0500 |
commit | 7da3c55ce849e17fd9017c7bf770a03fa083d95b (patch) | |
tree | 9832274615883cbb3e3f383ca258d37b1fce4f62 /drivers/net/wireless/ath9k/xmit.c | |
parent | f5870acb3a8e2cad57b6c5ffd3157a7dfbb47942 (diff) |
ath9k: convert to use bus-agnostic DMA routines
Convert to use bus-agnostic DMA routines to make it usable on AHB bus as well.
Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Tested-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/xmit.c')
-rw-r--r-- | drivers/net/wireless/ath9k/xmit.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c index 27cb9d523f5f..522078d80931 100644 --- a/drivers/net/wireless/ath9k/xmit.c +++ b/drivers/net/wireless/ath9k/xmit.c | |||
@@ -340,10 +340,8 @@ static void ath_tx_complete_buf(struct ath_softc *sc, | |||
340 | } | 340 | } |
341 | 341 | ||
342 | /* Unmap this frame */ | 342 | /* Unmap this frame */ |
343 | pci_unmap_single(to_pci_dev(sc->dev), | 343 | dma_unmap_single(sc->dev, bf->bf_dmacontext, skb->len, DMA_TO_DEVICE); |
344 | bf->bf_dmacontext, | 344 | |
345 | skb->len, | ||
346 | PCI_DMA_TODEVICE); | ||
347 | /* complete this frame */ | 345 | /* complete this frame */ |
348 | ath_tx_complete(sc, skb, &tx_status); | 346 | ath_tx_complete(sc, skb, &tx_status); |
349 | 347 | ||
@@ -1716,13 +1714,12 @@ static int ath_tx_setup_buffer(struct ath_softc *sc, struct ath_buf *bf, | |||
1716 | /* DMA setup */ | 1714 | /* DMA setup */ |
1717 | bf->bf_mpdu = skb; | 1715 | bf->bf_mpdu = skb; |
1718 | 1716 | ||
1719 | bf->bf_dmacontext = pci_map_single(to_pci_dev(sc->dev), skb->data, | 1717 | bf->bf_dmacontext = dma_map_single(sc->dev, skb->data, |
1720 | skb->len, PCI_DMA_TODEVICE); | 1718 | skb->len, DMA_TO_DEVICE); |
1721 | if (unlikely(pci_dma_mapping_error(to_pci_dev(sc->dev), | 1719 | if (unlikely(dma_mapping_error(sc->dev, bf->bf_dmacontext))) { |
1722 | bf->bf_dmacontext))) { | ||
1723 | bf->bf_mpdu = NULL; | 1720 | bf->bf_mpdu = NULL; |
1724 | DPRINTF(sc, ATH_DBG_CONFIG, | 1721 | DPRINTF(sc, ATH_DBG_CONFIG, |
1725 | "pci_dma_mapping_error() on TX\n"); | 1722 | "dma_mapping_error() on TX\n"); |
1726 | return -ENOMEM; | 1723 | return -ENOMEM; |
1727 | } | 1724 | } |
1728 | 1725 | ||