Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9d1be36 authored by Holger Schurig's avatar Holger Schurig Committed by David S. Miller
Browse files

libertas: don't blindly try mesh



The CF card only has a very old firmware (5.0.16p0). This firmware doesn't
know anything about mesh config. However, current code blindly calls
mesh_config when the card is inserted. So check the firmware version before
issuing this command.

Signed-off-by: default avatarHolger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent dac10a9f
Loading
Loading
Loading
Loading
+27 −23
Original line number Diff line number Diff line
@@ -1192,6 +1192,10 @@ int lbs_start_card(struct lbs_private *priv)
	if (device_create_file(&dev->dev, &dev_attr_lbs_rtap))
		lbs_pr_err("cannot register lbs_rtap attribute\n");

	lbs_update_channel(priv);

	/* 5.0.16p0 is known to NOT support any mesh */
	if (priv->fwrelease > 0x05001000) {
		/* 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
@@ -1205,7 +1209,6 @@ int lbs_start_card(struct lbs_private *priv)
		   It's just that 5.110.20.pXX will not have done anything
		   useful */

	lbs_update_channel(priv);
		priv->mesh_tlv = 0x100 + 291;
		if (lbs_mesh_config(priv, 1, priv->curbssparams.channel)) {
			priv->mesh_tlv = 0x100 + 37;
@@ -1218,6 +1221,7 @@ int lbs_start_card(struct lbs_private *priv)
			if (device_create_file(&dev->dev, &dev_attr_lbs_mesh))
				lbs_pr_err("cannot register lbs_mesh attribute\n");
		}
	}

	lbs_debugfs_init_one(priv, dev);