diff options
author | Michael Buesch <mb@bu3sch.de> | 2009-02-19 23:39:26 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-27 14:52:47 -0500 |
commit | 8eccb53f1b858c9bd0b745f839174725b76508ec (patch) | |
tree | 434ed31a9409936670c1c06f867ad541a08f2e2d /drivers/net/wireless/b43/dma.h | |
parent | ca2d559e1a41d62a5b49fb9ab513025ea27f1e7c (diff) | |
download | lwn-8eccb53f1b858c9bd0b745f839174725b76508ec.tar.gz lwn-8eccb53f1b858c9bd0b745f839174725b76508ec.zip |
b43: Fix DMA buffer size handling
This fixes hidden bugs in the size handling of the DMA buffers.
This sets the RX buffer size to the theoretical max packet size and
fixes passing of the size values to the device (must not subtract the header offset).
These bugs are hidden and don't actually trigger due to the magic +100
offset for the buffer size.
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 | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/wireless/b43/dma.h b/drivers/net/wireless/b43/dma.h index d1eb5c0848a5..4ec24e8f4fd7 100644 --- a/drivers/net/wireless/b43/dma.h +++ b/drivers/net/wireless/b43/dma.h @@ -1,14 +1,12 @@ #ifndef B43_DMA_H_ #define B43_DMA_H_ -#include <linux/list.h> +#include <linux/ieee80211.h> #include <linux/spinlock.h> -#include <linux/workqueue.h> -#include <linux/linkage.h> -#include <asm/atomic.h> #include "b43.h" + /* DMA-Interrupt reasons. */ #define B43_DMAIRQ_FATALMASK ((1 << 10) | (1 << 11) | (1 << 12) \ | (1 << 14) | (1 << 15)) @@ -161,14 +159,13 @@ struct b43_dmadesc_generic { /* Misc DMA constants */ #define B43_DMA_RINGMEMSIZE PAGE_SIZE -#define B43_DMA0_RX_FRAMEOFFSET 30 -#define B43_DMA3_RX_FRAMEOFFSET 0 +#define B43_DMA0_RX_FRAMEOFFSET 30 /* DMA engine tuning knobs */ #define B43_TXRING_SLOTS 128 #define B43_RXRING_SLOTS 64 -#define B43_DMA0_RX_BUFFERSIZE (2304 + 100) -#define B43_DMA3_RX_BUFFERSIZE 16 +#define B43_DMA0_RX_BUFFERSIZE IEEE80211_MAX_FRAME_LEN + struct sk_buff; struct b43_private; |