linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtlwifi: add module parameter to set global debug level
@ 2011-08-12 19:22 Stefan Assmann
  2011-08-12 20:33 ` Larry Finger
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Assmann @ 2011-08-12 19:22 UTC (permalink / raw)
  To: linux-wireless; +Cc: Larry.Finger, sassmann

Adding a module parameter to allow setting the global debug level.
No need to recompile the module anymore to set the debug level.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
---
 drivers/net/wireless/rtlwifi/debug.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/rtlwifi/debug.c b/drivers/net/wireless/rtlwifi/debug.c
index 5fa7385..1d82639 100644
--- a/drivers/net/wireless/rtlwifi/debug.c
+++ b/drivers/net/wireless/rtlwifi/debug.c
@@ -28,12 +28,16 @@
 
 #include "wifi.h"
 
+static unsigned int debug = DBG_EMERG;
+module_param(debug, uint, 0);
+MODULE_PARM_DESC(debug, "Set global debug level for rtlwifi (uint)");
+
 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 |
-- 
1.7.6


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] rtlwifi: add module parameter to set global debug level
  2011-08-12 19:22 [PATCH] rtlwifi: add module parameter to set global debug level Stefan Assmann
@ 2011-08-12 20:33 ` Larry Finger
  2011-08-13  9:44   ` Stefan Assmann
  0 siblings, 1 reply; 3+ messages in thread
From: Larry Finger @ 2011-08-12 20:33 UTC (permalink / raw)
  To: Stefan Assmann; +Cc: linux-wireless

On 08/12/2011 02:22 PM, Stefan Assmann wrote:
> Adding a module parameter to allow setting the global debug level.
> No need to recompile the module anymore to set the debug level.
>
> Signed-off-by: Stefan Assmann<sassmann@kpanic.de>
> ---
>   drivers/net/wireless/rtlwifi/debug.c |    6 +++++-
>   1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/debug.c b/drivers/net/wireless/rtlwifi/debug.c
> index 5fa7385..1d82639 100644
> --- a/drivers/net/wireless/rtlwifi/debug.c
> +++ b/drivers/net/wireless/rtlwifi/debug.c
> @@ -28,12 +28,16 @@
>
>   #include "wifi.h"
>
> +static unsigned int debug = DBG_EMERG;
> +module_param(debug, uint, 0);
> +MODULE_PARM_DESC(debug, "Set global debug level for rtlwifi (uint)");

As the system puts a (uint) following the description when the modinfo command 
is used, the one above is redundant. Replace it with (0,2-5) instead. I have no 
idea why there is a hole in the debug levels, but I hesitate to close it. Also, 
send patches to John Linville with Cc to wireless.

Thanks for doing this. I'll sign off on it when you send V2.

Larry

> +
>   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 |


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] rtlwifi: add module parameter to set global debug level
  2011-08-12 20:33 ` Larry Finger
@ 2011-08-13  9:44   ` Stefan Assmann
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Assmann @ 2011-08-13  9:44 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless

On 12.08.2011 22:33, Larry Finger wrote:
> On 08/12/2011 02:22 PM, Stefan Assmann wrote:
>> Adding a module parameter to allow setting the global debug level.
>> No need to recompile the module anymore to set the debug level.
>>
>> Signed-off-by: Stefan Assmann<sassmann@kpanic.de>
>> ---
>>   drivers/net/wireless/rtlwifi/debug.c |    6 +++++-
>>   1 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/net/wireless/rtlwifi/debug.c b/drivers/net/wireless/rtlwifi/debug.c
>> index 5fa7385..1d82639 100644
>> --- a/drivers/net/wireless/rtlwifi/debug.c
>> +++ b/drivers/net/wireless/rtlwifi/debug.c
>> @@ -28,12 +28,16 @@
>>
>>   #include "wifi.h"
>>
>> +static unsigned int debug = DBG_EMERG;
>> +module_param(debug, uint, 0);
>> +MODULE_PARM_DESC(debug, "Set global debug level for rtlwifi (uint)");
> 
> As the system puts a (uint) following the description when the modinfo command 
> is used, the one above is redundant. Replace it with (0,2-5) instead. I have no 
> idea why there is a hole in the debug levels, but I hesitate to close it. Also, 
> send patches to John Linville with Cc to wireless.
> 
> Thanks for doing this. I'll sign off on it when you send V2.

Snap, I missed that. Thanks for pointing it out. V2 should be coming
around shortly.

  Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-13  9:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-12 19:22 [PATCH] rtlwifi: add module parameter to set global debug level Stefan Assmann
2011-08-12 20:33 ` Larry Finger
2011-08-13  9:44   ` Stefan Assmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).