aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/b43legacy/dma.h
diff options
context:
space:
mode:
authorStefano Brivio <stefano.brivio@polimi.it>2008-02-08 06:31:53 +0100
committerJohn W. Linville <linville@tuxdriver.com>2008-02-15 13:44:18 -0500
commit8e118f0ed866afab654a438b85643d4f1472f28b (patch)
tree562364b18b16c98a7809ebce7be6b0d20c32eaec /drivers/net/wireless/b43legacy/dma.h
parentd68ab68066805fdfee1f5f29ec2ec0179fd92fe1 (diff)
b43legacy: fix DMA for 30/32-bit DMA engines
This checks if the DMA address is bigger than what the controller can manage. It will reallocate the buffers in the GFP_DMA zone in that case. The patch by Michael Buesch has been ported to b43legacy. Thanks to Matti Viljanen for reporting this. Cc: Matti Viljanen <viljanen.matti@gmail.com> Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43legacy/dma.h')
-rw-r--r--drivers/net/wireless/b43legacy/dma.h33
1 files changed, 8 insertions, 25 deletions
diff --git a/drivers/net/wireless/b43legacy/dma.h b/drivers/net/wireless/b43legacy/dma.h
index 26f6ab08de7..2dd488c5be2 100644
--- a/drivers/net/wireless/b43legacy/dma.h
+++ b/drivers/net/wireless/b43legacy/dma.h
@@ -218,6 +218,12 @@ struct b43legacy_dma_ops {
void (*set_current_rxslot)(struct b43legacy_dmaring *ring, int slot);
};
+enum b43legacy_dmatype {
+ B43legacy_DMA_30BIT = 30,
+ B43legacy_DMA_32BIT = 32,
+ B43legacy_DMA_64BIT = 64,
+};
+
struct b43legacy_dmaring {
/* Lowlevel DMA ops. */
const struct b43legacy_dma_ops *ops;
@@ -250,8 +256,8 @@ struct b43legacy_dmaring {
int index;
/* Boolean. Is this a TX ring? */
bool tx;
- /* Boolean. 64bit DMA if true, 32bit DMA otherwise. */
- bool dma64;
+ /* The type of DMA engine used. */
+ enum b43legacy_dmatype type;
/* Boolean. Is this ring stopped at ieee80211 level? */
bool stopped;
/* Lock, only used for TX. */
@@ -284,15 +290,6 @@ void b43legacy_dma_write(struct b43legacy_dmaring *ring,
int b43legacy_dma_init(struct b43legacy_wldev *dev);
void b43legacy_dma_free(struct b43legacy_wldev *dev);
-int b43legacy_dmacontroller_rx_reset(struct b43legacy_wldev *dev,
- u16 dmacontroller_mmio_base,
- int dma64);
-int b43legacy_dmacontroller_tx_reset(struct b43legacy_wldev *dev,
- u16 dmacontroller_mmio_base,
- int dma64);
-
-u16 b43legacy_dmacontroller_base(int dma64bit, int dmacontroller_idx);
-
void b43legacy_dma_tx_suspend(struct b43legacy_wldev *dev);
void b43legacy_dma_tx_resume(struct b43legacy_wldev *dev);
@@ -320,20 +317,6 @@ void b43legacy_dma_free(struct b43legacy_wldev *dev)
{
}
static inline
-int b43legacy_dmacontroller_rx_reset(struct b43legacy_wldev *dev,
- u16 dmacontroller_mmio_base,
- int dma64)
-{
- return 0;
-}
-static inline
-int b43legacy_dmacontroller_tx_reset(struct b43legacy_wldev *dev,
- u16 dmacontroller_mmio_base,
- int dma64)
-{
- return 0;
-}
-static inline
void b43legacy_dma_get_tx_stats(struct b43legacy_wldev *dev,
struct ieee80211_tx_queue_stats *stats)
{