diff options
author | Michael Buesch <mb@bu3sch.de> | 2009-11-18 20:53:05 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-11-18 17:09:28 -0500 |
commit | 9bd568a50c446433038dec2a5186c5c57c3dbd23 (patch) | |
tree | b753571eb581f0646343c8d78688aba1d7a32c7b /drivers/net/wireless/b43/dma.h | |
parent | 76aa5e704c80fb7ca8bd3d05593d9a28298c92cd (diff) |
b43: Enforce DMA descriptor memory constraints
Enforce all device constraints on the descriptor memory region.
There are several constraints on the descriptor memory, as documented
in the specification. The current code does not enforce them and/or
incorrectly enforces them.
Those constraints are:
- The address limitations on 30/32bit engines, that also apply to
the skbs.
- The 4k alignment requirement on 30/32bit engines.
- The 8k alignment requirement on 64bit engines.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/dma.h')
-rw-r--r-- | drivers/net/wireless/b43/dma.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/dma.h b/drivers/net/wireless/b43/dma.h index f0b0838fb5b..356a0ff8f04 100644 --- a/drivers/net/wireless/b43/dma.h +++ b/drivers/net/wireless/b43/dma.h @@ -157,7 +157,6 @@ struct b43_dmadesc_generic { } __attribute__ ((__packed__)); /* Misc DMA constants */ -#define B43_DMA_RINGMEMSIZE PAGE_SIZE #define B43_DMA0_RX_FRAMEOFFSET 30 /* DMA engine tuning knobs */ @@ -243,6 +242,12 @@ struct b43_dmaring { /* The QOS priority assigned to this ring. Only used for TX rings. * This is the mac80211 "queue" value. */ u8 queue_prio; + /* Pointers and size of the originally allocated and mapped memory + * region for the descriptor ring. */ + void *alloc_descbase; + dma_addr_t alloc_dmabase; + unsigned int alloc_descsize; + /* Pointer to our wireless device. */ struct b43_wldev *dev; #ifdef CONFIG_B43_DEBUG /* Maximum number of used slots. */ |