* [PATCH] libertas: only enable rtap with mesh firmware
@ 2008-07-29 17:50 Dan Williams
2008-07-30 7:12 ` Holger Schurig
0 siblings, 1 reply; 2+ messages in thread
From: Dan Williams @ 2008-07-29 17:50 UTC (permalink / raw)
To: linux-wireless; +Cc: Luis Carlos Cobo, Holger Schurig, libertas-dev
Since only mesh-enabled firmware has the CMD_802_11_MONITOR_MODE on
which the rtap functionality depends, only expose the rtap functionality
when mesh is also available.
Signed-off-by: Dan Williams <dcbw@redhat.com>
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index abd6d9e..3e29ed7 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -297,9 +297,7 @@ static ssize_t lbs_rtap_set(struct device *dev,
lbs_add_rtap(priv);
}
priv->monitormode = monitor_mode;
- }
-
- else {
+ } else {
if (!priv->monitormode)
return strlen(buf);
priv->monitormode = 0;
@@ -1242,8 +1240,6 @@ int lbs_start_card(struct lbs_private *priv)
lbs_pr_err("cannot register ethX device\n");
goto done;
}
- if (device_create_file(&dev->dev, &dev_attr_lbs_rtap))
- lbs_pr_err("cannot register lbs_rtap attribute\n");
lbs_update_channel(priv);
@@ -1275,6 +1271,13 @@ 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");
+
+ /* 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");
}
}
@@ -1306,9 +1309,9 @@ void lbs_stop_card(struct lbs_private *priv)
netif_carrier_off(priv->dev);
lbs_debugfs_remove_one(priv);
- device_remove_file(&dev->dev, &dev_attr_lbs_rtap);
if (priv->mesh_tlv) {
device_remove_file(&dev->dev, &dev_attr_lbs_mesh);
+ device_remove_file(&dev->dev, &dev_attr_lbs_rtap);
}
/* Flush pending command nodes */
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libertas: only enable rtap with mesh firmware
2008-07-29 17:50 [PATCH] libertas: only enable rtap with mesh firmware Dan Williams
@ 2008-07-30 7:12 ` Holger Schurig
0 siblings, 0 replies; 2+ messages in thread
From: Holger Schurig @ 2008-07-30 7:12 UTC (permalink / raw)
To: Dan Williams; +Cc: linux-wireless, Luis Carlos Cobo, libertas-dev
Ok :-)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-07-30 7:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-29 17:50 [PATCH] libertas: only enable rtap with mesh firmware Dan Williams
2008-07-30 7:12 ` Holger Schurig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox