From 6bdbdbf4a151a3a1333818cd17a7d7795e936041 Mon Sep 17 00:00:00 2001 From: Sascha Silbe Date: Wed, 11 May 2011 14:52:34 +0200 Subject: [PATCH] libertas: Add libertas_disablemesh module parameter to disable mesh interface This allows individual users and deployments to disable mesh support at runtime, i.e. without having to build and maintain a custom kernel. Based on a patch by Paul Fox . Signed-off-by: Sascha Silbe Signed-off-by: John W. Linville --- drivers/net/wireless/libertas/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 84d05a765b5b..8c40949cb076 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c @@ -36,6 +36,10 @@ unsigned int lbs_debug; EXPORT_SYMBOL_GPL(lbs_debug); module_param_named(libertas_debug, lbs_debug, int, 0644); +unsigned int lbs_disablemesh; +EXPORT_SYMBOL_GPL(lbs_disablemesh); +module_param_named(libertas_disablemesh, lbs_disablemesh, int, 0644); + /* * This global structure is used to send the confirm_sleep command as @@ -944,7 +948,10 @@ int lbs_start_card(struct lbs_private *priv) lbs_update_channel(priv); - lbs_init_mesh(priv); + if (!lbs_disablemesh) + lbs_init_mesh(priv); + else + pr_info("%s: mesh disabled\n", dev->name); lbs_debugfs_init_one(priv, dev); -- GitLab