summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/main.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2010-12-12 12:15:35 +0200
committerLuciano Coelho <luciano.coelho@nokia.com>2010-12-15 15:41:36 +0200
commit17c1755c24d83f9fd0509b64c76cc43fc60cc642 (patch)
tree15d4287053529b89f65a7ef75041880efad180c1 /drivers/net/wireless/wl12xx/main.c
parentea559b460509b241cc1a3f36eebe0b2b634b3cf2 (diff)
downloadblackbird-op-linux-17c1755c24d83f9fd0509b64c76cc43fc60cc642.tar.gz
blackbird-op-linux-17c1755c24d83f9fd0509b64c76cc43fc60cc642.zip
wl12xx: allow runtime changing of debug_level
Currently, the debug level is set in compilation time (by the DEBUG_LEVEL const). This method has the advantage of compiling only the relevant messages, while optimizing out the unused ones. In order to allow runtime control over the debug_level, while optimizing out messages when debug messages are not needed, we combine some methods: 1. use dynamic_debug (pr_debug) rather then printk. 2. add debug_level module param in order to set debug level during insmod. 3. add debug_level sysfs file in order to allow dynamic control over the debug level. Since patches for pr_debug_hex_dump() implementation haven't been applied yet, we are still temporarly using print_hex_dump(). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/main.c')
-rw-r--r--drivers/net/wireless/wl12xx/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 0865585c8a75..8c50d3b3fabb 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -2833,6 +2833,11 @@ int wl1271_free_hw(struct wl1271 *wl)
}
EXPORT_SYMBOL_GPL(wl1271_free_hw);
+u32 wl12xx_debug_level;
+EXPORT_SYMBOL_GPL(wl12xx_debug_level);
+module_param_named(debug_level, wl12xx_debug_level, uint, DEBUG_NONE);
+MODULE_PARM_DESC(debug_level, "wl12xx debugging level");
+
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Luciano Coelho <luciano.coelho@nokia.com>");
MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>");
OpenPOWER on IntegriCloud