aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/b43/dma.h
diff options
context:
space:
mode:
authorMichael Buesch2009-11-19 22:24:29 +0100
committerJohn W. Linville2009-11-23 17:05:28 -0500
commit07681e211d736ba2394ab7f29f77e93adecd22c5 (patch)
treed97c679446e738275894636f02d50190bf986599 /drivers/net/wireless/b43/dma.h
parent8c35024aa65c079f800df7778869a8dbda074182 (diff)
b43: Rewrite DMA Tx status handling sanity checks
This rewrites the error handling policies in the TX status handler. It tries to be error-tolerant as in "try hard to not crash the machine". It won't recover from errors (that are bugs in the firmware or driver), because that's impossible. However, it will return a more or less useful error message and bail out. It also tries hard to use rate-limited messages to not flood the syslog in case of a failure. 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.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/dma.h b/drivers/net/wireless/b43/dma.h
index 356a0ff8f044..e607b392314c 100644
--- a/drivers/net/wireless/b43/dma.h
+++ b/drivers/net/wireless/b43/dma.h
@@ -1,7 +1,7 @@
#ifndef B43_DMA_H_
#define B43_DMA_H_
-#include <linux/ieee80211.h>
+#include <linux/err.h>
#include "b43.h"
@@ -164,6 +164,10 @@ struct b43_dmadesc_generic {
#define B43_RXRING_SLOTS 64
#define B43_DMA0_RX_BUFFERSIZE IEEE80211_MAX_FRAME_LEN
+/* Pointer poison */
+#define B43_DMA_PTR_POISON ((void *)ERR_PTR(-ENOMEM))
+#define b43_dma_ptr_is_poisoned(ptr) (unlikely((ptr) == B43_DMA_PTR_POISON))
+
struct sk_buff;
struct b43_private;