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>
This commit is contained in:
committed by
John W. Linville
parent
08e87a833f
commit
060210f938
@ -668,9 +668,18 @@ B43_DEBUGFS_FOPS(restart, NULL, restart_write_file, 1);
|
||||
B43_DEBUGFS_FOPS(loctls, loctls_read_file, NULL, 0);
|
||||
|
||||
|
||||
int b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature)
|
||||
bool b43_debug(struct b43_wldev *dev, enum b43_dyndbg feature)
|
||||
{
|
||||
return !!(dev->dfsentry && dev->dfsentry->dyn_debug[feature]);
|
||||
bool enabled;
|
||||
|
||||
enabled = (dev->dfsentry && dev->dfsentry->dyn_debug[feature]);
|
||||
if (unlikely(enabled)) {
|
||||
/* Force full debugging messages, if the user enabled
|
||||
* some dynamic debugging feature. */
|
||||
b43_modparam_verbose = B43_VERBOSITY_MAX;
|
||||
}
|
||||
|
||||
return enabled;
|
||||
}
|
||||
|
||||
static void b43_remove_dynamic_debug(struct b43_wldev *dev)
|
||||
|
Reference in New Issue
Block a user