aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2007-02-24 17:25:22 +0100
committerGuido Guenther <agx@bogon.sigxcpu.org>2007-02-24 17:25:22 +0100
commit83fed7745658c22985739aebabf3f099a408178b (patch)
tree7477717a4366f8fa919962d9770441ef4463f6b3
parent867f419aabb5d31fd1abecf34dd388494c38fa2e (diff)
move debug macros into one place and make debug variable static
-rw-r--r--at76c503.c17
-rw-r--r--at76c503.h11
2 files changed, 12 insertions, 16 deletions
diff --git a/at76c503.c b/at76c503.c
index 3459009..1f2a975 100644
--- a/at76c503.c
+++ b/at76c503.c
@@ -62,29 +62,17 @@
#define FILL_BULK_URB(a,b,c,d,e,f,g) usb_fill_bulk_urb(a,b,c,d,e,f,g)
-int at76_debug = DBG_DEFAULTS;
-
-/* uncond. debug output */
-#define dbg_uc(format, arg...) \
- printk(KERN_DEBUG __FILE__ ": " format "\n" , ## arg)
-
-#define assert(x) \
- do {\
- if (!(x)) \
- err("%d: assertion " #x " failed", __LINE__);\
- } while (0)
+static int at76_debug = DBG_DEFAULTS;
/* how often do we re-try these packets ? */
#define AUTH_RETRIES 3
#define ASSOC_RETRIES 3
#define DISASSOC_RETRIES 3
-
static unsigned long spin_l_istate_flags;
#define LOCK_ISTATE() spin_lock_irqsave(&dev->istate_spinlock,spin_l_istate_flags);
#define UNLOCK_ISTATE() spin_unlock_irqrestore(&dev->istate_spinlock,spin_l_istate_flags);
-
#define NEW_STATE(dev,newstate) \
do {\
scan_hook(newstate == SCANNING); \
@@ -101,7 +89,6 @@ static unsigned long spin_l_istate_flags;
/* the interval in ticks we poll if scan is completed */
#define SCAN_POLL_INTERVAL (HZ/4)
-
/* Version Information */
#define DRIVER_NAME "at76_usb"
#define DRIVER_AUTHOR \
@@ -109,7 +96,6 @@ static unsigned long spin_l_istate_flags;
"Alex <alex@foogod.com>, Nick Jones, Balint Seeber <n0_5p4m_p13453@hotmail.com>"
#define DRIVER_DESC "Atmel at76c50x USB Wireless LAN Driver"
-
/* Module paramaters */
module_param_named(debug, at76_debug, int, 0600);
MODULE_PARM_DESC(debug, "Debugging level");
@@ -606,6 +592,7 @@ static inline void iwevent_scan_complete(struct net_device *dev)
wireless_send_event(dev, SIOCGIWSCAN, &wrqu, NULL);
dbg(DBG_WE_EVENTS, "%s: SIOCGIWSCAN sent", dev->name);
}
+
static inline void iwevent_bss_connect(struct net_device *dev, u8 *bssid)
{
union iwreq_data wrqu;
diff --git a/at76c503.h b/at76c503.h
index 526a3ae..b2b03a0 100644
--- a/at76c503.h
+++ b/at76c503.h
@@ -703,7 +703,6 @@ typedef struct p80211msg_lnxind_wlansniffrm
#define DBG_DFU 0x20000000 /* device firmware upgrade */
#define DBG_DEFAULTS 0
-extern int at76_debug;
/* Use our own dbg macro */
#undef dbg
@@ -713,4 +712,14 @@ extern int at76_debug;
printk(KERN_DEBUG __FILE__ ": " format "\n" , ## arg);\
} while (0)
+/* uncond. debug output */
+#define dbg_uc(format, arg...) \
+ printk(KERN_DEBUG __FILE__ ": " format "\n" , ## arg)
+
+#define assert(x) \
+ do {\
+ if (!(x)) \
+ err("%d: assertion " #x " failed", __LINE__);\
+ } while (0)
+
#endif /* _AT76C503_H */