diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-01-14 20:17:03 +0100 |
---|---|---|
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) | |
download | lwn-7da3c55ce849e17fd9017c7bf770a03fa083d95b.tar.gz lwn-7da3c55ce849e17fd9017c7bf770a03fa083d95b.zip |
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, } /* allocate descriptors */ - dd->dd_desc = pci_alloc_consistent(to_pci_dev(sc->dev), - dd->dd_desc_len, - &dd->dd_desc_paddr); + dd->dd_desc = dma_alloc_coherent(sc->dev, dd->dd_desc_len, + &dd->dd_desc_paddr, GFP_ATOMIC); if (dd->dd_desc == NULL) { error = -ENOMEM; goto fail; @@ -1763,8 +1762,8 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, } return 0; fail2: - pci_free_consistent(to_pci_dev(sc->dev), - dd->dd_desc_len, dd->dd_desc, dd->dd_desc_paddr); + dma_free_coherent(sc->dev, dd->dd_desc_len, dd->dd_desc, + dd->dd_desc_paddr); fail: memset(dd, 0, sizeof(*dd)); return error; @@ -1777,8 +1776,8 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd, struct list_head *head) { - pci_free_consistent(to_pci_dev(sc->dev), - dd->dd_desc_len, dd->dd_desc, dd->dd_desc_paddr); + dma_free_coherent(sc->dev, dd->dd_desc_len, dd->dd_desc, + dd->dd_desc_paddr); INIT_LIST_HEAD(head); kfree(dd->dd_bufptr); |