Commit 3756162b authored by Helmut Schaa's avatar Helmut Schaa Committed by John W. Linville

libipw: fix debug output

Replace all remaining occurrences of CONFIG_IEEE80211_DEBUG with
CONFIG_LIBIPW_DEBUG in libipw to allow debug output again.
Signed-off-by: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5077fd35
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
/* debug macros */ /* debug macros */
#ifdef CONFIG_IEEE80211_DEBUG #ifdef CONFIG_LIBIPW_DEBUG
extern u32 ieee80211_debug_level; extern u32 ieee80211_debug_level;
#define IEEE80211_DEBUG(level, fmt, args...) \ #define IEEE80211_DEBUG(level, fmt, args...) \
do { if (ieee80211_debug_level & (level)) \ do { if (ieee80211_debug_level & (level)) \
...@@ -128,7 +128,7 @@ static inline bool ieee80211_ratelimit_debug(u32 level) ...@@ -128,7 +128,7 @@ static inline bool ieee80211_ratelimit_debug(u32 level)
{ {
return false; return false;
} }
#endif /* CONFIG_IEEE80211_DEBUG */ #endif /* CONFIG_LIBIPW_DEBUG */
/* /*
* To use the debug system: * To use the debug system:
...@@ -152,7 +152,7 @@ static inline bool ieee80211_ratelimit_debug(u32 level) ...@@ -152,7 +152,7 @@ static inline bool ieee80211_ratelimit_debug(u32 level)
* you simply need to add your entry to the ieee80211_debug_level array. * you simply need to add your entry to the ieee80211_debug_level array.
* *
* If you do not see debug_level in /proc/net/ieee80211 then you do not have * If you do not see debug_level in /proc/net/ieee80211 then you do not have
* CONFIG_IEEE80211_DEBUG defined in your kernel configuration * CONFIG_LIBIPW_DEBUG defined in your kernel configuration
* *
*/ */
......
...@@ -221,7 +221,7 @@ void free_ieee80211(struct net_device *dev) ...@@ -221,7 +221,7 @@ void free_ieee80211(struct net_device *dev)
free_netdev(dev); free_netdev(dev);
} }
#ifdef CONFIG_IEEE80211_DEBUG #ifdef CONFIG_LIBIPW_DEBUG
static int debug = 0; static int debug = 0;
u32 ieee80211_debug_level = 0; u32 ieee80211_debug_level = 0;
...@@ -252,11 +252,11 @@ static int store_debug_level(struct file *file, const char __user * buffer, ...@@ -252,11 +252,11 @@ static int store_debug_level(struct file *file, const char __user * buffer,
return strnlen(buf, len); return strnlen(buf, len);
} }
#endif /* CONFIG_IEEE80211_DEBUG */ #endif /* CONFIG_LIBIPW_DEBUG */
static int __init ieee80211_init(void) static int __init ieee80211_init(void)
{ {
#ifdef CONFIG_IEEE80211_DEBUG #ifdef CONFIG_LIBIPW_DEBUG
struct proc_dir_entry *e; struct proc_dir_entry *e;
ieee80211_debug_level = debug; ieee80211_debug_level = debug;
...@@ -276,7 +276,7 @@ static int __init ieee80211_init(void) ...@@ -276,7 +276,7 @@ static int __init ieee80211_init(void)
e->read_proc = show_debug_level; e->read_proc = show_debug_level;
e->write_proc = store_debug_level; e->write_proc = store_debug_level;
e->data = NULL; e->data = NULL;
#endif /* CONFIG_IEEE80211_DEBUG */ #endif /* CONFIG_LIBIPW_DEBUG */
printk(KERN_INFO DRV_NAME ": " DRV_DESCRIPTION ", " DRV_VERSION "\n"); printk(KERN_INFO DRV_NAME ": " DRV_DESCRIPTION ", " DRV_VERSION "\n");
printk(KERN_INFO DRV_NAME ": " DRV_COPYRIGHT "\n"); printk(KERN_INFO DRV_NAME ": " DRV_COPYRIGHT "\n");
...@@ -286,20 +286,20 @@ static int __init ieee80211_init(void) ...@@ -286,20 +286,20 @@ static int __init ieee80211_init(void)
static void __exit ieee80211_exit(void) static void __exit ieee80211_exit(void)
{ {
#ifdef CONFIG_IEEE80211_DEBUG #ifdef CONFIG_LIBIPW_DEBUG
if (ieee80211_proc) { if (ieee80211_proc) {
remove_proc_entry("debug_level", ieee80211_proc); remove_proc_entry("debug_level", ieee80211_proc);
remove_proc_entry(DRV_NAME, init_net.proc_net); remove_proc_entry(DRV_NAME, init_net.proc_net);
ieee80211_proc = NULL; ieee80211_proc = NULL;
} }
#endif /* CONFIG_IEEE80211_DEBUG */ #endif /* CONFIG_LIBIPW_DEBUG */
} }
#ifdef CONFIG_IEEE80211_DEBUG #ifdef CONFIG_LIBIPW_DEBUG
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
module_param(debug, int, 0444); module_param(debug, int, 0444);
MODULE_PARM_DESC(debug, "debug output mask"); MODULE_PARM_DESC(debug, "debug output mask");
#endif /* CONFIG_IEEE80211_DEBUG */ #endif /* CONFIG_LIBIPW_DEBUG */
module_exit(ieee80211_exit); module_exit(ieee80211_exit);
module_init(ieee80211_init); module_init(ieee80211_init);
......
...@@ -1080,7 +1080,7 @@ static int ieee80211_parse_qos_info_param_IE(struct ieee80211_info_element ...@@ -1080,7 +1080,7 @@ static int ieee80211_parse_qos_info_param_IE(struct ieee80211_info_element
return rc; return rc;
} }
#ifdef CONFIG_IEEE80211_DEBUG #ifdef CONFIG_LIBIPW_DEBUG
#define MFIE_STRING(x) case MFIE_TYPE_ ##x: return #x #define MFIE_STRING(x) case MFIE_TYPE_ ##x: return #x
static const char *get_info_element_string(u16 id) static const char *get_info_element_string(u16 id)
...@@ -1125,7 +1125,7 @@ static int ieee80211_parse_info_param(struct ieee80211_info_element ...@@ -1125,7 +1125,7 @@ static int ieee80211_parse_info_param(struct ieee80211_info_element
{ {
DECLARE_SSID_BUF(ssid); DECLARE_SSID_BUF(ssid);
u8 i; u8 i;
#ifdef CONFIG_IEEE80211_DEBUG #ifdef CONFIG_LIBIPW_DEBUG
char rates_str[64]; char rates_str[64];
char *p; char *p;
#endif #endif
...@@ -1161,14 +1161,14 @@ static int ieee80211_parse_info_param(struct ieee80211_info_element ...@@ -1161,14 +1161,14 @@ static int ieee80211_parse_info_param(struct ieee80211_info_element
break; break;
case MFIE_TYPE_RATES: case MFIE_TYPE_RATES:
#ifdef CONFIG_IEEE80211_DEBUG #ifdef CONFIG_LIBIPW_DEBUG
p = rates_str; p = rates_str;
#endif #endif
network->rates_len = min(info_element->len, network->rates_len = min(info_element->len,
MAX_RATES_LENGTH); MAX_RATES_LENGTH);
for (i = 0; i < network->rates_len; i++) { for (i = 0; i < network->rates_len; i++) {
network->rates[i] = info_element->data[i]; network->rates[i] = info_element->data[i];
#ifdef CONFIG_IEEE80211_DEBUG #ifdef CONFIG_LIBIPW_DEBUG
p += snprintf(p, sizeof(rates_str) - p += snprintf(p, sizeof(rates_str) -
(p - rates_str), "%02X ", (p - rates_str), "%02X ",
network->rates[i]); network->rates[i]);
...@@ -1188,14 +1188,14 @@ static int ieee80211_parse_info_param(struct ieee80211_info_element ...@@ -1188,14 +1188,14 @@ static int ieee80211_parse_info_param(struct ieee80211_info_element
break; break;
case MFIE_TYPE_RATES_EX: case MFIE_TYPE_RATES_EX:
#ifdef CONFIG_IEEE80211_DEBUG #ifdef CONFIG_LIBIPW_DEBUG
p = rates_str; p = rates_str;
#endif #endif
network->rates_ex_len = min(info_element->len, network->rates_ex_len = min(info_element->len,
MAX_RATES_EX_LENGTH); MAX_RATES_EX_LENGTH);
for (i = 0; i < network->rates_ex_len; i++) { for (i = 0; i < network->rates_ex_len; i++) {
network->rates_ex[i] = info_element->data[i]; network->rates_ex[i] = info_element->data[i];
#ifdef CONFIG_IEEE80211_DEBUG #ifdef CONFIG_LIBIPW_DEBUG
p += snprintf(p, sizeof(rates_str) - p += snprintf(p, sizeof(rates_str) -
(p - rates_str), "%02X ", (p - rates_str), "%02X ",
network->rates[i]); network->rates[i]);
...@@ -1562,7 +1562,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device ...@@ -1562,7 +1562,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
}; };
struct ieee80211_network *target; struct ieee80211_network *target;
struct ieee80211_network *oldest = NULL; struct ieee80211_network *oldest = NULL;
#ifdef CONFIG_IEEE80211_DEBUG #ifdef CONFIG_LIBIPW_DEBUG
struct ieee80211_info_element *info_element = beacon->info_element; struct ieee80211_info_element *info_element = beacon->info_element;
#endif #endif
unsigned long flags; unsigned long flags;
...@@ -1640,7 +1640,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device ...@@ -1640,7 +1640,7 @@ static void ieee80211_process_probe_response(struct ieee80211_device
list_del(ieee->network_free_list.next); list_del(ieee->network_free_list.next);
} }
#ifdef CONFIG_IEEE80211_DEBUG #ifdef CONFIG_LIBIPW_DEBUG
IEEE80211_DEBUG_SCAN("Adding '%s' (%pM) via %s.\n", IEEE80211_DEBUG_SCAN("Adding '%s' (%pM) via %s.\n",
print_ssid(ssid, network.ssid, print_ssid(ssid, network.ssid,
network.ssid_len), network.ssid_len),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment