rt2x00: Move rt2x00debug_dump_frame declaration to rt2x00.h.
authorGertjan van Wingerde <gwingerde@gmail.com>
Thu, 13 May 2010 11:16:36 +0000 (13:16 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 2 Jun 2010 20:12:52 +0000 (16:12 -0400)
This allows rt2x00debug_dump_frame to be used from everywhere.

This is preparation for beacon writing clean ups.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00.h
drivers/net/wireless/rt2x00/rt2x00debug.c
drivers/net/wireless/rt2x00/rt2x00dump.h
drivers/net/wireless/rt2x00/rt2x00lib.h

index 6c1ff4c15c8430d4288b4bb0e687d812e912d1e5..c8e5fed4dc079f117b81f32d172579eaaa71728a 100644 (file)
@@ -39,6 +39,7 @@
 #include <net/mac80211.h>
 
 #include "rt2x00debug.h"
+#include "rt2x00dump.h"
 #include "rt2x00leds.h"
 #include "rt2x00reg.h"
 #include "rt2x00queue.h"
@@ -1014,6 +1015,26 @@ struct data_queue *rt2x00queue_get_queue(struct rt2x00_dev *rt2x00dev,
 struct queue_entry *rt2x00queue_get_entry(struct data_queue *queue,
                                          enum queue_index index);
 
+/*
+ * Debugfs handlers.
+ */
+/**
+ * rt2x00debug_dump_frame - Dump a frame to userspace through debugfs.
+ * @rt2x00dev: Pointer to &struct rt2x00_dev.
+ * @type: The type of frame that is being dumped.
+ * @skb: The skb containing the frame to be dumped.
+ */
+#ifdef CONFIG_RT2X00_LIB_DEBUGFS
+void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
+                           enum rt2x00_dump_type type, struct sk_buff *skb);
+#else
+static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
+                                         enum rt2x00_dump_type type,
+                                         struct sk_buff *skb)
+{
+}
+#endif /* CONFIG_RT2X00_LIB_DEBUGFS */
+
 /*
  * Interrupt context handlers.
  */
index e9fe93fd804268a943368d65237c2657896bd25f..b0498e7e7aae95a733eef24bbb139ee0486c690b 100644 (file)
@@ -211,6 +211,7 @@ void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
        if (!test_bit(FRAME_DUMP_FILE_OPEN, &intf->frame_dump_flags))
                skb_queue_purge(&intf->frame_dump_skbqueue);
 }
+EXPORT_SYMBOL_GPL(rt2x00debug_dump_frame);
 
 static int rt2x00debug_file_open(struct inode *inode, struct file *file)
 {
index ed303b423e4180e095b68f0ab11459e675679098..6df2e0b746b84c770670a476856dbce4de267025 100644 (file)
 
 /*
        Module: rt2x00dump
-       Abstract: Data structures for the rt2x00debug & userspace.
+       Abstract:
+               Data structures for the rt2x00debug & userspace.
+
+               The declarations in this file can be used by both rt2x00
+               and userspace and therefore should be kept together in
+               this file.
  */
 
 #ifndef RT2X00DUMP_H
index be2e37fb40718c3b51771f6250d4373dade15ee3..0ca40e1fe699bfa09bcf07d3fd6d8c0f30f35aee 100644 (file)
@@ -27,8 +27,6 @@
 #ifndef RT2X00LIB_H
 #define RT2X00LIB_H
 
-#include "rt2x00dump.h"
-
 /*
  * Interval defines
  */
@@ -296,8 +294,6 @@ static inline void rt2x00lib_free_firmware(struct rt2x00_dev *rt2x00dev)
 #ifdef CONFIG_RT2X00_LIB_DEBUGFS
 void rt2x00debug_register(struct rt2x00_dev *rt2x00dev);
 void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev);
-void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
-                           enum rt2x00_dump_type type, struct sk_buff *skb);
 void rt2x00debug_update_crypto(struct rt2x00_dev *rt2x00dev,
                               struct rxdone_entry_desc *rxdesc);
 #else
@@ -309,12 +305,6 @@ static inline void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev)
 {
 }
 
-static inline void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev,
-                                         enum rt2x00_dump_type type,
-                                         struct sk_buff *skb)
-{
-}
-
 static inline void rt2x00debug_update_crypto(struct rt2x00_dev *rt2x00dev,
                                             struct rxdone_entry_desc *rxdesc)
 {