summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2007-11-27 21:49:29 +0100
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:05:08 -0800
commit4d8dd66c1659ba0d1b110ed0488f4f6ffbc90e71 (patch)
tree03ae5e8fc993ec504f099ddb5d1f40f3a371289d /drivers/net/wireless/rt2x00/rt2x00.h
parent08992f7fb139c7dbaf593402312ee5a055352f05 (diff)
rt2x00: Add TX/RX frame dumping facility
This adds TX/RX frame dumping capabilities through debugfs. The intention is that with this approach debugging of rt2x00 is simplified since _all_ frames going in and out of the device are send to debugfs as well along with additional information like the hardware descriptor. Based on the patch by Mattias Nissler. Mattias also has some tools that will make the dumped frames available to wireshark: http://www-user.rhrk.uni-kl.de/~nissler/rt2x00/ Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 31e48c25a692..ba874cff8648 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -623,7 +623,7 @@ struct rt2x00_dev {
* required for deregistration of debugfs.
*/
#ifdef CONFIG_RT2X00_LIB_DEBUGFS
- const struct rt2x00debug_intf *debugfs_intf;
+ struct rt2x00debug_intf *debugfs_intf;
#endif /* CONFIG_RT2X00_LIB_DEBUGFS */
/*
@@ -791,6 +791,12 @@ struct rt2x00_dev {
ring_loop(__entry, (__dev)->tx, ring_end(__dev))
/*
+ * Compute an array index from a pointer to an element and the base pointer.
+ */
+#define ARRAY_INDEX(__elem, __base) \
+ ( ((char *)(__elem) - (char *)(__base)) / sizeof(*(__elem)) )
+
+/*
* Generic RF access.
* The RF is being accessed by word index.
*/