diff options
author | Felix Fietkau <nbd@openwrt.org> | 2008-01-31 04:09:54 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2008-01-31 04:09:54 +0000 |
commit | 02cabf59486ff526a71c760b7120e0ce5e7892b7 (patch) | |
tree | d7025986045fd65118b17b57a8aedd7b718e4d82 /package/madwifi/patches/326-soc_dma.patch | |
parent | e80d5f9686da8698ae2b8d961401ec76cedcce30 (diff) | |
download | master-31e0f0ae-02cabf59486ff526a71c760b7120e0ce5e7892b7.tar.gz master-31e0f0ae-02cabf59486ff526a71c760b7120e0ce5e7892b7.tar.bz2 master-31e0f0ae-02cabf59486ff526a71c760b7120e0ce5e7892b7.zip |
pull madwifi forward to the latest upstream version - should fix some dual radio issues; add preliminary 2.6.24 support patch (compiles, not run-time tested, thx SeG)
SVN-Revision: 10334
Diffstat (limited to 'package/madwifi/patches/326-soc_dma.patch')
-rw-r--r-- | package/madwifi/patches/326-soc_dma.patch | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/package/madwifi/patches/326-soc_dma.patch b/package/madwifi/patches/326-soc_dma.patch deleted file mode 100644 index a5075c4684..0000000000 --- a/package/madwifi/patches/326-soc_dma.patch +++ /dev/null @@ -1,90 +0,0 @@ -Index: madwifi-trunk-r3280/ath/if_ath_ahb.c -=================================================================== ---- madwifi-trunk-r3280.orig/ath/if_ath_ahb.c 2008-01-28 20:00:18.552163264 +0100 -+++ madwifi-trunk-r3280/ath/if_ath_ahb.c 2008-01-28 20:00:18.612166683 +0100 -@@ -69,27 +69,13 @@ - void * - bus_alloc_consistent(void *hwdev, size_t size, dma_addr_t *dma_handle) - { -- void *ret; -- -- ret = (void *) __get_free_pages(GFP_ATOMIC, get_order(size)); -- -- if (ret != NULL) { -- memset(ret, 0, size); -- *dma_handle = __pa(ret); -- dma_cache_wback_inv((unsigned long) ret, size); -- ret = UNCAC_ADDR(ret); -- } -- -- return ret; -+ return dma_alloc_coherent(hwdev, size, dma_handle, GFP_ATOMIC); - } - - void - bus_free_consistent(void *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) - { -- unsigned long addr = (unsigned long) vaddr; -- -- addr = CAC_ADDR(addr); -- free_pages(addr, get_order(size)); -+ dma_free_coherent(hwdev, size, vaddr, dma_handle); - } - - static int -Index: madwifi-trunk-r3280/ath/if_ath_ahb.h -=================================================================== ---- madwifi-trunk-r3280.orig/ath/if_ath_ahb.h 2008-01-28 19:52:49.442569967 +0100 -+++ madwifi-trunk-r3280/ath/if_ath_ahb.h 2008-01-28 21:55:51.325773888 +0100 -@@ -8,6 +8,7 @@ - #ifndef _DEV_ATH_AHB_H_ - #define _DEV_ATH_AHB_H_ - -+#include <linux/dma-mapping.h> - #include <asm/io.h> - #include <asm/uaccess.h> - -@@ -89,8 +90,8 @@ - #define AR531X_RADIO1_MASK 0x000c - #define AR531X_RADIO1_S 2 - --#define BUS_DMA_FROMDEVICE 0 --#define BUS_DMA_TODEVICE 1 -+#define BUS_DMA_FROMDEVICE DMA_FROM_DEVICE -+#define BUS_DMA_TODEVICE DMA_TO_DEVICE - - #define AR531X_APBBASE 0xbc000000 - #define AR531X_RESETTMR (AR531X_APBBASE + 0x3000) -@@ -115,29 +116,19 @@ - static __inline void bus_dma_sync_single(void *hwdev, dma_addr_t dma_handle, - size_t size, int direction) - { -- unsigned long addr; -- -- addr = (unsigned long) __va(dma_handle); -- dma_cache_wback_inv(addr, size); -+ dma_sync_single(hwdev, dma_handle, size, direction); - } - - static __inline dma_addr_t bus_map_single(void *hwdev, void *ptr, - size_t size, int direction) - { -- dma_cache_wback_inv((unsigned long) ptr, size); -- -- return __pa(ptr); -+ return dma_map_single(hwdev, ptr, size, direction); - } - - static __inline void bus_unmap_single(void *hwdev, dma_addr_t dma_addr, - size_t size, int direction) - { -- if (direction != BUS_DMA_TODEVICE) { -- unsigned long addr; -- -- addr = (unsigned long)__va(dma_addr); -- dma_cache_wback_inv(addr, size); -- } -+ dma_unmap_single(hwdev, dma_addr, size, direction); - } - void *bus_alloc_consistent(void *, size_t, dma_addr_t *); - void bus_free_consistent(void *, size_t, void *, dma_addr_t); |