diff options
| author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2007-05-25 11:32:07 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2007-06-11 14:28:37 -0400 |
| commit | a46c64108b06ec68337e62e7c2d4b3e8aed74b82 (patch) | |
| tree | 990494d871ff8f7394fe027d819f5c77b0e77a3f /drivers | |
| parent | 9012b28a407511fb355f6d2176a12d4653489672 (diff) | |
[PATCH] libertas: tune debug code
* renamed module parameter back to libertas_debug
* change from bit shifts to constants, that way it's easier to look at the
source and specify the libertas_debug=0xXXXX module parameter
* moved module_param from fw.c to main.c, where it belongs better
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/wireless/libertas/defs.h | 52 | ||||
| -rw-r--r-- | drivers/net/wireless/libertas/fw.c | 7 | ||||
| -rw-r--r-- | drivers/net/wireless/libertas/main.c | 8 |
3 files changed, 34 insertions, 33 deletions
diff --git a/drivers/net/wireless/libertas/defs.h b/drivers/net/wireless/libertas/defs.h index ae59b37fd47f..d69f954ccf9d 100644 --- a/drivers/net/wireless/libertas/defs.h +++ b/drivers/net/wireless/libertas/defs.h | |||
| @@ -15,34 +15,34 @@ | |||
| 15 | #define DRV_NAME "usb8xxx" | 15 | #define DRV_NAME "usb8xxx" |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | #define LBS_DEB_ENTER (1<<0) | 18 | #define LBS_DEB_ENTER 0x00000001 |
| 19 | #define LBS_DEB_LEAVE (1<<1) | 19 | #define LBS_DEB_LEAVE 0x00000002 |
| 20 | #define LBS_DEB_MAIN (1<<2) | 20 | #define LBS_DEB_MAIN 0x00000004 |
| 21 | #define LBS_DEB_NET (1<<3) | 21 | #define LBS_DEB_NET 0x00000008 |
| 22 | #define LBS_DEB_MESH (1<<4) | 22 | #define LBS_DEB_MESH 0x00000010 |
| 23 | #define LBS_DEB_WEXT (1<<5) | 23 | #define LBS_DEB_WEXT 0x00000020 |
| 24 | #define LBS_DEB_IOCTL (1<<6) | 24 | #define LBS_DEB_IOCTL 0x00000040 |
| 25 | #define LBS_DEB_SCAN (1<<7) | 25 | #define LBS_DEB_SCAN 0x00000080 |
| 26 | #define LBS_DEB_ASSOC (1<<8) | 26 | #define LBS_DEB_ASSOC 0x00000100 |
| 27 | #define LBS_DEB_JOIN (1<<9) | 27 | #define LBS_DEB_JOIN 0x00000200 |
| 28 | #define LBS_DEB_11D (1<<10) | 28 | #define LBS_DEB_11D 0x00000400 |
| 29 | #define LBS_DEB_DEBUGFS (1<<11) | 29 | #define LBS_DEB_DEBUGFS 0x00000800 |
| 30 | #define LBS_DEB_ETHTOOL (1<<12) | 30 | #define LBS_DEB_ETHTOOL 0x00001000 |
| 31 | #define LBS_DEB_HOST (1<<13) | 31 | #define LBS_DEB_HOST 0x00002000 |
| 32 | #define LBS_DEB_CMD (1<<14) | 32 | #define LBS_DEB_CMD 0x00004000 |
| 33 | #define LBS_DEB_RX (1<<15) | 33 | #define LBS_DEB_RX 0x00008000 |
| 34 | #define LBS_DEB_TX (1<<16) | 34 | #define LBS_DEB_TX 0x00010000 |
| 35 | #define LBS_DEB_FW (1<<17) | 35 | #define LBS_DEB_USB 0x00020000 |
| 36 | #define LBS_DEB_USB (1<<18) | 36 | #define LBS_DEB_CS 0x00040000 |
| 37 | #define LBS_DEB_CS (1<<19) | 37 | #define LBS_DEB_FW 0x00080000 |
| 38 | #define LBS_DEB_THREAD (1<<20) | 38 | #define LBS_DEB_THREAD 0x00100000 |
| 39 | #define LBS_DEB_HEX (1<<21) | 39 | #define LBS_DEB_HEX 0x00200000 |
| 40 | 40 | ||
| 41 | extern unsigned int libertas_debug_flags; | 41 | extern unsigned int libertas_debug; |
| 42 | 42 | ||
| 43 | #ifdef DEBUG | 43 | #ifdef DEBUG |
| 44 | #define LBS_DEB_LL(grp, fmt, args...) \ | 44 | #define LBS_DEB_LL(grp, fmt, args...) \ |
| 45 | do { if ((libertas_debug_flags & (grp)) == (grp)) \ | 45 | do { if ((libertas_debug & (grp)) == (grp)) \ |
| 46 | printk(KERN_DEBUG DRV_NAME "%s: " fmt, \ | 46 | printk(KERN_DEBUG DRV_NAME "%s: " fmt, \ |
| 47 | in_interrupt() ? " (INT)" : "", ## args); } while (0) | 47 | in_interrupt() ? " (INT)" : "", ## args); } while (0) |
| 48 | #else | 48 | #else |
| @@ -91,7 +91,7 @@ static inline void lbs_dbg_hex(char *prompt, u8 * buf, int len) | |||
| 91 | { | 91 | { |
| 92 | int i = 0; | 92 | int i = 0; |
| 93 | 93 | ||
| 94 | if (!(libertas_debug_flags & LBS_DEB_HEX)) | 94 | if (!(libertas_debug & LBS_DEB_HEX)) |
| 95 | return; | 95 | return; |
| 96 | 96 | ||
| 97 | printk(KERN_DEBUG "%s: ", prompt); | 97 | printk(KERN_DEBUG "%s: ", prompt); |
diff --git a/drivers/net/wireless/libertas/fw.c b/drivers/net/wireless/libertas/fw.c index 48c3d8545966..86c652dad92a 100644 --- a/drivers/net/wireless/libertas/fw.c +++ b/drivers/net/wireless/libertas/fw.c | |||
| @@ -1,12 +1,8 @@ | |||
| 1 | /** | 1 | /** |
| 2 | * This file contains the initialization for FW and HW | 2 | * This file contains the initialization for FW and HW |
| 3 | */ | 3 | */ |
| 4 | #include <linux/module.h> | ||
| 5 | #include <linux/moduleparam.h> | 4 | #include <linux/moduleparam.h> |
| 6 | |||
| 7 | #include <linux/vmalloc.h> | ||
| 8 | #include <linux/firmware.h> | 5 | #include <linux/firmware.h> |
| 9 | #include <linux/version.h> | ||
| 10 | 6 | ||
| 11 | #include "host.h" | 7 | #include "host.h" |
| 12 | #include "sbi.h" | 8 | #include "sbi.h" |
| @@ -20,9 +16,6 @@ | |||
| 20 | char *libertas_fw_name = NULL; | 16 | char *libertas_fw_name = NULL; |
| 21 | module_param_named(fw_name, libertas_fw_name, charp, 0644); | 17 | module_param_named(fw_name, libertas_fw_name, charp, 0644); |
| 22 | 18 | ||
| 23 | unsigned int libertas_debug_flags = 0; | ||
| 24 | module_param_named(debug, libertas_debug_flags, int, 0); | ||
| 25 | |||
| 26 | /** | 19 | /** |
| 27 | * @brief This function checks the validity of Boot2/FW image. | 20 | * @brief This function checks the validity of Boot2/FW image. |
| 28 | * | 21 | * |
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index cd107366beb7..6fcb2bdfbed1 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | * thread etc.. | 4 | * thread etc.. |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #include <linux/moduleparam.h> | ||
| 7 | #include <linux/delay.h> | 8 | #include <linux/delay.h> |
| 8 | #include <linux/freezer.h> | 9 | #include <linux/freezer.h> |
| 9 | #include <linux/etherdevice.h> | 10 | #include <linux/etherdevice.h> |
| @@ -29,6 +30,13 @@ const char libertas_driver_version[] = "COMM-USB8388-" DRIVER_RELEASE_VERSION | |||
| 29 | #endif | 30 | #endif |
| 30 | ""; | 31 | ""; |
| 31 | 32 | ||
| 33 | |||
| 34 | /* Module parameters */ | ||
| 35 | unsigned int libertas_debug = 0; | ||
| 36 | module_param(libertas_debug, int, 0644); | ||
| 37 | |||
| 38 | |||
| 39 | |||
| 32 | #define WLAN_TX_PWR_DEFAULT 20 /*100mW */ | 40 | #define WLAN_TX_PWR_DEFAULT 20 /*100mW */ |
| 33 | #define WLAN_TX_PWR_US_DEFAULT 20 /*100mW */ | 41 | #define WLAN_TX_PWR_US_DEFAULT 20 /*100mW */ |
| 34 | #define WLAN_TX_PWR_JP_DEFAULT 16 /*50mW */ | 42 | #define WLAN_TX_PWR_JP_DEFAULT 16 /*50mW */ |
