From 83fed7745658c22985739aebabf3f099a408178b Mon Sep 17 00:00:00 2001 From: Guido Guenther Date: Sat, 24 Feb 2007 17:25:22 +0100 Subject: move debug macros into one place and make debug variable static --- at76c503.c | 17 ++--------------- at76c503.h | 11 ++++++++++- 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 , Nick Jones, Balint Seeber " #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 */ -- cgit v1.2.3