suppressing mesh

Paul Fox pgf at laptop.org
Sat Dec 18 11:40:32 EST 2010


i wrote:
 > martin wrote:
 >  > On Fri, Dec 17, 2010 at 6:15 PM, Martin Abente
 >  > <martin.abente.lahaye at gmail.com> wrote:
 >  > > I wrote this script that is a little bit better than just waiting N 
 > seconds,
 >  > > and it seems to work fine:
 >  > ...
 >  > 
 >  > great!
 >  > 
 >  > > But I like Martin's idea better, just not sure how to make it work atm.
 >  > 
 >  > embed exactly that chunk of code you wrote at the end of the function
 >  > I linked to earlier.
 >  > 
 >  > I'm 99.9% sure it'll just work. If/when it does, we make it
 >  > conditional on a config option and pester pgf to include it an
 >  > release.
 > 
 > this actually sounds like a perfect use for the resume script
 > hook to me, since they're already spawned into the background.
 > is "mesh off" a general problem?

so it seems that being able to permanently suppress mesh on the XO-1
is becoming a desired feature, since ad-hoc is the way forward if
mixing XO-1/1.5 in "under a tree" sharing.

but powerd isn't the right place for fixing this.

could others who've been inside libertas take a look at this small
patch?  it adds a module parameter that would allow keeping mesh
disabled on card discovery, but also allow enabling it later on if
desired.  (uncompiled/untested)

paul

diff --git a/drivers/net/wireless/libertas/main.c 
b/drivers/net/wireless/libertas/main.c
index 3f81289..f355b6a 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -39,6 +39,10 @@ unsigned int lbs_debug;
 EXPORT_SYMBOL_GPL(lbs_debug);
 module_param_named(libertas_debug, lbs_debug, int, 0644);
 
+unsigned int lbs_startmesh = 1;
+EXPORT_SYMBOL_GPL(lbs_startmesh);
+module_param_named(libertas_startmesh, lbs_startmesh, int, 0644);
+
 
 /* This global structure is used to send the confirm_sleep command as
  * fast as possible down to the firmware. */
@@ -1347,7 +1351,10 @@ int lbs_start_card(struct lbs_private *priv)
 	/* Check mesh FW version and appropriately send the mesh start
 	 * command
 	 */
-	if (priv->mesh_fw_ver == MESH_FW_OLD) {
+	if (!lbs_startmesh) {
+		priv->mesh_tlv = 0;
+
+	} if (priv->mesh_fw_ver == MESH_FW_OLD) {
 		/* Enable mesh, if supported, and work out which TLV it uses.
 		   0x100 + 291 is an unofficial value used in 5.110.20.pXX
 		   0x100 + 37 is the official value used in 5.110.21.pXX

=---------------------
 paul fox, pgf at laptop.org



More information about the Devel mailing list