summaryrefslogtreecommitdiffstats
path: root/net/wimax
diff options
context:
space:
mode:
authorInaky Perez-Gonzalez <inaky@linux.intel.com>2009-09-02 15:36:05 -0700
committerInaky Perez-Gonzalez <inaky@linux.intel.com>2009-10-19 15:55:50 +0900
commit4c2b1a11646bf74e2926ce8b13a21884adc1e05c (patch)
tree59cd5b59b21969264c6833b567b828484a6d76ed /net/wimax
parent4dc1bf074e4db5aa281a7b82ceebb24df98922d2 (diff)
downloadop-kernel-dev-4c2b1a11646bf74e2926ce8b13a21884adc1e05c.zip
op-kernel-dev-4c2b1a11646bf74e2926ce8b13a21884adc1e05c.tar.gz
wimax: allow specifying debug levels as command line option
Add "debug" module options to all the wimax modules (including drivers) so that the debug levels can be set upon kernel boot or module load time. This is needed as currently there was a limitation where the debug levels could only be set when a device was succesfully enumerated. This made it difficult to debug issues that made a device not probe properly. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'net/wimax')
-rw-r--r--net/wimax/stack.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/wimax/stack.c b/net/wimax/stack.c
index 79fb7d7..c886641 100644
--- a/net/wimax/stack.c
+++ b/net/wimax/stack.c
@@ -60,6 +60,14 @@
#define D_SUBMODULE stack
#include "debug-levels.h"
+static char wimax_debug_params[128];
+module_param_string(debug, wimax_debug_params, sizeof(wimax_debug_params),
+ 0644);
+MODULE_PARM_DESC(debug,
+ "String of space-separated NAME:VALUE pairs, where NAMEs "
+ "are the different debug submodules and VALUE are the "
+ "initial debug value to set.");
+
/*
* Authoritative source for the RE_STATE_CHANGE attribute policy
*
@@ -562,6 +570,9 @@ int __init wimax_subsys_init(void)
int result, cnt;
d_fnstart(4, NULL, "()\n");
+ d_parse_params(D_LEVEL, D_LEVEL_SIZE, wimax_debug_params,
+ "wimax.debug");
+
snprintf(wimax_gnl_family.name, sizeof(wimax_gnl_family.name),
"WiMAX");
result = genl_register_family(&wimax_gnl_family);
OpenPOWER on IntegriCloud