aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/dma.h
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2009-11-18 14:53:05 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-18 17:09:28 -0500
commit9bd568a50c446433038dec2a5186c5c57c3dbd23 (patch)
treeb753571eb581f0646343c8d78688aba1d7a32c7b /drivers/net/wireless/b43/dma.h
parent76aa5e704c80fb7ca8bd3d05593d9a28298c92cd (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.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/dma.h b/drivers/net/wireless/b43/dma.h
index f0b0838fb5ba..356a0ff8f044 100644
--- a/drivers/net/wireless/b43/dma.h
+++ b/drivers/net/wireless/b43/dma.h
@@ -157,7 +157,6 @@ struct b43_dmadesc_generic {
157} __attribute__ ((__packed__)); 157} __attribute__ ((__packed__));
158 158
159/* Misc DMA constants */ 159/* Misc DMA constants */
160#define B43_DMA_RINGMEMSIZE PAGE_SIZE
161#define B43_DMA0_RX_FRAMEOFFSET 30 160#define B43_DMA0_RX_FRAMEOFFSET 30
162 161
163/* DMA engine tuning knobs */ 162/* DMA engine tuning knobs */
@@ -243,6 +242,12 @@ struct b43_dmaring {
243 /* The QOS priority assigned to this ring. Only used for TX rings. 242 /* The QOS priority assigned to this ring. Only used for TX rings.
244 * This is the mac80211 "queue" value. */ 243 * This is the mac80211 "queue" value. */
245 u8 queue_prio; 244 u8 queue_prio;
245 /* Pointers and size of the originally allocated and mapped memory
246 * region for the descriptor ring. */
247 void *alloc_descbase;
248 dma_addr_t alloc_dmabase;
249 unsigned int alloc_descsize;
250 /* Pointer to our wireless device. */
246 struct b43_wldev *dev; 251 struct b43_wldev *dev;
247#ifdef CONFIG_B43_DEBUG 252#ifdef CONFIG_B43_DEBUG
248 /* Maximum number of used slots. */ 253 /* Maximum number of used slots. */