aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r--drivers/net/wireless/libertas/main.c44
1 files changed, 27 insertions, 17 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 8ae935ac32f1..89575e448015 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -1307,8 +1307,10 @@ int lbs_start_card(struct lbs_private *priv)
1307 1307
1308 lbs_update_channel(priv); 1308 lbs_update_channel(priv);
1309 1309
1310 /* 5.0.16p0 is known to NOT support any mesh */ 1310 /* Check mesh FW version and appropriately send the mesh start
1311 if (priv->fwrelease > 0x05001000) { 1311 * command
1312 */
1313 if (priv->mesh_fw_ver == MESH_FW_OLD) {
1312 /* Enable mesh, if supported, and work out which TLV it uses. 1314 /* Enable mesh, if supported, and work out which TLV it uses.
1313 0x100 + 291 is an unofficial value used in 5.110.20.pXX 1315 0x100 + 291 is an unofficial value used in 5.110.20.pXX
1314 0x100 + 37 is the official value used in 5.110.21.pXX 1316 0x100 + 37 is the official value used in 5.110.21.pXX
@@ -1322,27 +1324,35 @@ int lbs_start_card(struct lbs_private *priv)
1322 It's just that 5.110.20.pXX will not have done anything 1324 It's just that 5.110.20.pXX will not have done anything
1323 useful */ 1325 useful */
1324 1326
1325 priv->mesh_tlv = 0x100 + 291; 1327 priv->mesh_tlv = TLV_TYPE_OLD_MESH_ID;
1326 if (lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_START, 1328 if (lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_START,
1327 priv->curbssparams.channel)) { 1329 priv->curbssparams.channel)) {
1328 priv->mesh_tlv = 0x100 + 37; 1330 priv->mesh_tlv = TLV_TYPE_MESH_ID;
1329 if (lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_START, 1331 if (lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_START,
1330 priv->curbssparams.channel)) 1332 priv->curbssparams.channel))
1331 priv->mesh_tlv = 0; 1333 priv->mesh_tlv = 0;
1332 } 1334 }
1333 if (priv->mesh_tlv) { 1335 } else if (priv->mesh_fw_ver == MESH_FW_NEW) {
1334 lbs_add_mesh(priv); 1336 /* 10.0.0.pXX new firmwares should succeed with TLV
1335 1337 * 0x100+37; Do not invoke command with old TLV.
1336 if (device_create_file(&dev->dev, &dev_attr_lbs_mesh)) 1338 */
1337 lbs_pr_err("cannot register lbs_mesh attribute\n"); 1339 priv->mesh_tlv = TLV_TYPE_MESH_ID;
1338 1340 if (lbs_mesh_config(priv, CMD_ACT_MESH_CONFIG_START,
1339 /* While rtap isn't related to mesh, only mesh-enabled 1341 priv->curbssparams.channel))
1340 * firmware implements the rtap functionality via 1342 priv->mesh_tlv = 0;
1341 * CMD_802_11_MONITOR_MODE. 1343 }
1342 */ 1344 if (priv->mesh_tlv) {
1343 if (device_create_file(&dev->dev, &dev_attr_lbs_rtap)) 1345 lbs_add_mesh(priv);
1344 lbs_pr_err("cannot register lbs_rtap attribute\n"); 1346
1345 } 1347 if (device_create_file(&dev->dev, &dev_attr_lbs_mesh))
1348 lbs_pr_err("cannot register lbs_mesh attribute\n");
1349
1350 /* While rtap isn't related to mesh, only mesh-enabled
1351 * firmware implements the rtap functionality via
1352 * CMD_802_11_MONITOR_MODE.
1353 */
1354 if (device_create_file(&dev->dev, &dev_attr_lbs_rtap))
1355 lbs_pr_err("cannot register lbs_rtap attribute\n");
1346 } 1356 }
1347 1357
1348 lbs_debugfs_init_one(priv, dev); 1358 lbs_debugfs_init_one(priv, dev);