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/main.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/main.c')
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 44931e42e2ba..ebf0467674cf 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -1715,9 +1715,8 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, | |||
1715 | } | 1715 | } |
1716 | 1716 | ||
1717 | /* allocate descriptors */ | 1717 | /* allocate descriptors */ |
1718 | dd->dd_desc = pci_alloc_consistent(to_pci_dev(sc->dev), | 1718 | dd->dd_desc = dma_alloc_coherent(sc->dev, dd->dd_desc_len, |
1719 | dd->dd_desc_len, | 1719 | &dd->dd_desc_paddr, GFP_ATOMIC); |
1720 | &dd->dd_desc_paddr); | ||
1721 | if (dd->dd_desc == NULL) { | 1720 | if (dd->dd_desc == NULL) { |
1722 | error = -ENOMEM; | 1721 | error = -ENOMEM; |
1723 | goto fail; | 1722 | goto fail; |
@@ -1763,8 +1762,8 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, | |||
1763 | } | 1762 | } |
1764 | return 0; | 1763 | return 0; |
1765 | fail2: | 1764 | fail2: |
1766 | pci_free_consistent(to_pci_dev(sc->dev), | 1765 | dma_free_coherent(sc->dev, dd->dd_desc_len, dd->dd_desc, |
1767 | dd->dd_desc_len, dd->dd_desc, dd->dd_desc_paddr); | 1766 | dd->dd_desc_paddr); |
1768 | fail: | 1767 | fail: |
1769 | memset(dd, 0, sizeof(*dd)); | 1768 | memset(dd, 0, sizeof(*dd)); |
1770 | return error; | 1769 | return error; |
@@ -1777,8 +1776,8 @@ void ath_descdma_cleanup(struct ath_softc *sc, | |||
1777 | struct ath_descdma *dd, | 1776 | struct ath_descdma *dd, |
1778 | struct list_head *head) | 1777 | struct list_head *head) |
1779 | { | 1778 | { |
1780 | pci_free_consistent(to_pci_dev(sc->dev), | 1779 | dma_free_coherent(sc->dev, dd->dd_desc_len, dd->dd_desc, |
1781 | dd->dd_desc_len, dd->dd_desc, dd->dd_desc_paddr); | 1780 | dd->dd_desc_paddr); |
1782 | 1781 | ||
1783 | INIT_LIST_HEAD(head); | 1782 | INIT_LIST_HEAD(head); |
1784 | kfree(dd->dd_bufptr); | 1783 | kfree(dd->dd_bufptr); |