diff options
author | Michael Buesch <mb@bu3sch.de> | 2009-01-25 15:49:59 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 16:01:47 -0500 |
commit | 060210f938d8aa0b9d795588a2274cd67ba9d6a4 (patch) | |
tree | 74eceabb2bb5b945862f49e567bf862d243ff13a /drivers/net/wireless/b43/main.h | |
parent | 08e87a833f5e77ff33b64c9ac27cb7fb9ecd4a48 (diff) | |
download | kernel_samsung_tuna-060210f938d8aa0b9d795588a2274cd67ba9d6a4.zip kernel_samsung_tuna-060210f938d8aa0b9d795588a2274cd67ba9d6a4.tar.gz kernel_samsung_tuna-060210f938d8aa0b9d795588a2274cd67ba9d6a4.tar.bz2 |
b43: Dynamically control log verbosity
Dynamically control the log verbosity with a module parameter.
This enables us to dynamically enable debugging messages (or disable
info, warn, error messages) via module parameter or /sys/module/b43/parameters/verbose.
This increases the module size by about 3k. But in practice it reduces the
module size for the user, because some distributions ship the b43 module
with CONFIG_B43_DEBUG set, which increases the module by about 15k.
So with this patch applied, distributions should really _disable_ CONFIG_B43_DEBUG.
There is no reason to keep it in a production-release kernel.
So we have a net reduction in size by about 12k.
This patch also adds a printk of the wireless core revision, so people
don't have to enable SSB debugging to get the wireless core revision.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/main.h')
-rw-r--r-- | drivers/net/wireless/b43/main.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/main.h b/drivers/net/wireless/b43/main.h index e6d90f3..40abcf5 100644 --- a/drivers/net/wireless/b43/main.h +++ b/drivers/net/wireless/b43/main.h @@ -40,6 +40,24 @@ extern int b43_modparam_qos; +extern int b43_modparam_verbose; + +/* Logmessage verbosity levels. Update the b43_modparam_verbose helptext, if + * you add or remove levels. */ +enum b43_verbosity { + B43_VERBOSITY_ERROR, + B43_VERBOSITY_WARN, + B43_VERBOSITY_INFO, + B43_VERBOSITY_DEBUG, + __B43_VERBOSITY_AFTERLAST, /* keep last */ + + B43_VERBOSITY_MAX = __B43_VERBOSITY_AFTERLAST - 1, +#if B43_DEBUG + B43_VERBOSITY_DEFAULT = B43_VERBOSITY_DEBUG, +#else + B43_VERBOSITY_DEFAULT = B43_VERBOSITY_INFO, +#endif +}; /* Lightweight function to convert a frequency (in Mhz) to a channel number. */ |