Commit b0341744 authored by Seth Forshee's avatar Seth Forshee Committed by John W. Linville

brcmsmac: Add module parameter for setting the debug level

The debug level can be set by passing debug=... to brcmsmac whenever
CONFIG_BRCMDBG is enabled.
Signed-off-by: default avatarSeth Forshee <seth.forshee@canonical.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Tested-by: default avatarDaniel Wagner <wagi@monom.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1ca47e68
...@@ -98,10 +98,14 @@ static struct bcma_device_id brcms_coreid_table[] = { ...@@ -98,10 +98,14 @@ static struct bcma_device_id brcms_coreid_table[] = {
}; };
MODULE_DEVICE_TABLE(bcma, brcms_coreid_table); MODULE_DEVICE_TABLE(bcma, brcms_coreid_table);
#ifdef DEBUG #if defined(CONFIG_BRCMDBG)
static int msglevel = 0xdeadbeef; /*
module_param(msglevel, int, 0); * Module parameter for setting the debug message level. Available
#endif /* DEBUG */ * flags are specified by the BRCM_DL_* macros in
* drivers/net/wireless/brcm80211/include/defs.h.
*/
module_param_named(debug, brcm_msg_level, uint, S_IRUGO | S_IWUSR);
#endif
static struct ieee80211_channel brcms_2ghz_chantable[] = { static struct ieee80211_channel brcms_2ghz_chantable[] = {
CHAN2GHZ(1, 2412, IEEE80211_CHAN_NO_HT40MINUS), CHAN2GHZ(1, 2412, IEEE80211_CHAN_NO_HT40MINUS),
...@@ -1184,10 +1188,6 @@ static DECLARE_WORK(brcms_driver_work, brcms_driver_init); ...@@ -1184,10 +1188,6 @@ static DECLARE_WORK(brcms_driver_work, brcms_driver_init);
static int __init brcms_module_init(void) static int __init brcms_module_init(void)
{ {
#ifdef DEBUG
if (msglevel != 0xdeadbeef)
brcm_msg_level = msglevel;
#endif
if (!schedule_work(&brcms_driver_work)) if (!schedule_work(&brcms_driver_work))
return -EBUSY; return -EBUSY;
......
...@@ -279,12 +279,7 @@ struct edcf_acparam { ...@@ -279,12 +279,7 @@ struct edcf_acparam {
} __packed; } __packed;
/* debug/trace */ /* debug/trace */
uint brcm_msg_level = uint brcm_msg_level;
#if defined(DEBUG)
BRCM_DL_INFO;
#else
0;
#endif /* DEBUG */
/* TX FIFO number to WME/802.1E Access Category */ /* TX FIFO number to WME/802.1E Access Category */
static const u8 wme_fifo2ac[] = { static const u8 wme_fifo2ac[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment