]> git.karo-electronics.de Git - mv-sheeva.git/commit
wl12xx: allow runtime changing of debug_level
authorEliad Peller <eliad@wizery.com>
Sun, 12 Dec 2010 10:15:35 +0000 (12:15 +0200)
committerLuciano Coelho <luciano.coelho@nokia.com>
Wed, 15 Dec 2010 13:41:36 +0000 (15:41 +0200)
commit17c1755c24d83f9fd0509b64c76cc43fc60cc642
tree15d4287053529b89f65a7ef75041880efad180c1
parentea559b460509b241cc1a3f36eebe0b2b634b3cf2
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>
drivers/net/wireless/wl12xx/debugfs.c
drivers/net/wireless/wl12xx/main.c
drivers/net/wireless/wl12xx/wl12xx.h