rtlwifi: add module parameter to set global debug level
authorStefan Assmann <sassmann@kpanic.de>
Sat, 13 Aug 2011 10:12:36 +0000 (12:12 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 22 Aug 2011 18:46:01 +0000 (14:46 -0400)
No need to recompile the module anymore to set the debug level.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/debug.c

index 5fa73852cb661b73274bd8e86e718a5ff92c80ba..b2f897acb23857836aee851f83b154e9e5a0e548 100644 (file)
 
 #include "wifi.h"
 
+static unsigned int debug = DBG_EMERG;
+module_param(debug, uint, 0);
+MODULE_PARM_DESC(debug, "Set global debug level for rtlwifi (0,2-5)");
+
 void rtl_dbgp_flag_init(struct ieee80211_hw *hw)
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        u8 i;
 
-       rtlpriv->dbg.global_debuglevel = DBG_EMERG;
+       rtlpriv->dbg.global_debuglevel = debug;
 
        rtlpriv->dbg.global_debugcomponents =
            COMP_ERR | COMP_FW | COMP_INIT | COMP_RECV | COMP_SEND |