summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/mwifiex/main.c
diff options
context:
space:
mode:
authorZhaoyang Liu <liuzy@marvell.com>2015-05-12 00:48:18 +0530
committerKalle Valo <kvalo@codeaurora.org>2015-05-26 13:50:33 +0300
commitc687a0077faa0d24fe97a4434974f32bd359beb7 (patch)
tree2fec67342ff703092919d24e9191235ed0395d25 /drivers/net/wireless/mwifiex/main.c
parentc2c6c85fca47f4c5ac99d482b64d59dbd142117c (diff)
mwifiex: add prints debug ctrl support
This patch adds support for debugging print control in mwifiex driver. The debug level can be controlled via either by modules load parameter debug_mask or by writing to debug_mask in debugfs file. Signed-off-by: Zhaoyang Liu <liuzy@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex/main.c')
-rw-r--r--drivers/net/wireless/mwifiex/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
index 213aa986e87a..eca4378eddda 100644
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
@@ -24,6 +24,10 @@
#define VERSION "1.0"
+static unsigned int debug_mask = MWIFIEX_DEFAULT_DEBUG_MASK;
+module_param(debug_mask, uint, 0);
+MODULE_PARM_DESC(debug_mask, "bitmap for debug flags");
+
const char driver_version[] = "mwifiex " VERSION " (%s) ";
static char *cal_data_cfg;
module_param(cal_data_cfg, charp, 0);
@@ -63,6 +67,7 @@ static int mwifiex_register(void *card, struct mwifiex_if_ops *if_ops,
/* Save interface specific operations in adapter */
memmove(&adapter->if_ops, if_ops, sizeof(struct mwifiex_if_ops));
+ adapter->debug_mask = debug_mask;
/* card specific initialization has been deferred until now .. */
if (adapter->if_ops.init_if)