|
@@ -1307,8 +1307,10 @@ int lbs_start_card(struct lbs_private *priv)
|
|
|
|
|
|
lbs_update_channel(priv);
|
|
|
|
|
|
- /* 5.0.16p0 is known to NOT support any mesh */
|
|
|
- if (priv->fwrelease > 0x05001000) {
|
|
|
+ /* Check mesh FW version and appropriately send the mesh start
|
|
|
+ * command
|
|
|
+ */
|
|
|
+ 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
|
|
@@ -1322,27 +1324,35 @@ int lbs_start_card(struct lbs_private *priv)
|
|
|
It's just that 5.110.20.pXX will not have done anything
|
|
|
useful */
|
|
|
|
|
|
- priv->mesh_tlv = 0x100 + 291;
|
|
|
+ priv->mesh_tlv = TLV_TYPE_OLD_MESH_ID;
|
|
|
if (lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_START,
|
|
|
priv->curbssparams.channel)) {
|
|
|
- priv->mesh_tlv = 0x100 + 37;
|
|
|
+ priv->mesh_tlv = TLV_TYPE_MESH_ID;
|
|
|
if (lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_START,
|
|
|
priv->curbssparams.channel))
|
|
|
priv->mesh_tlv = 0;
|
|
|
}
|
|
|
- if (priv->mesh_tlv) {
|
|
|
- lbs_add_mesh(priv);
|
|
|
-
|
|
|
- if (device_create_file(&dev->dev, &dev_attr_lbs_mesh))
|
|
|
- lbs_pr_err("cannot register lbs_mesh attribute\n");
|
|
|
-
|
|
|
- /* While rtap isn't related to mesh, only mesh-enabled
|
|
|
- * firmware implements the rtap functionality via
|
|
|
- * CMD_802_11_MONITOR_MODE.
|
|
|
- */
|
|
|
- if (device_create_file(&dev->dev, &dev_attr_lbs_rtap))
|
|
|
- lbs_pr_err("cannot register lbs_rtap attribute\n");
|
|
|
- }
|
|
|
+ } else if (priv->mesh_fw_ver == MESH_FW_NEW) {
|
|
|
+ /* 10.0.0.pXX new firmwares should succeed with TLV
|
|
|
+ * 0x100+37; Do not invoke command with old TLV.
|
|
|
+ */
|
|
|
+ priv->mesh_tlv = TLV_TYPE_MESH_ID;
|
|
|
+ if (lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_START,
|
|
|
+ priv->curbssparams.channel))
|
|
|
+ priv->mesh_tlv = 0;
|
|
|
+ }
|
|
|
+ if (priv->mesh_tlv) {
|
|
|
+ lbs_add_mesh(priv);
|
|
|
+
|
|
|
+ if (device_create_file(&dev->dev, &dev_attr_lbs_mesh))
|
|
|
+ lbs_pr_err("cannot register lbs_mesh attribute\n");
|
|
|
+
|
|
|
+ /* While rtap isn't related to mesh, only mesh-enabled
|
|
|
+ * firmware implements the rtap functionality via
|
|
|
+ * CMD_802_11_MONITOR_MODE.
|
|
|
+ */
|
|
|
+ if (device_create_file(&dev->dev, &dev_attr_lbs_rtap))
|
|
|
+ lbs_pr_err("cannot register lbs_rtap attribute\n");
|
|
|
}
|
|
|
|
|
|
lbs_debugfs_init_one(priv, dev);
|