libertas: Add libertas_disablemesh module parameter to disable mesh interface
authorSascha Silbe <silbe@activitycentral.com>
Wed, 11 May 2011 12:52:34 +0000 (14:52 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 11 May 2011 19:12:19 +0000 (15:12 -0400)
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 <pgf@laptop.org>.
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/main.c

index 84d05a7..8c40949 100644 (file)
@@ -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);