aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-11 18:57:49 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:06:53 -0500
commit1f8a08342c8c1c90d0b752f28eb6f24ea7164cdb (patch)
tree97ef038bb2f2e42e813801957b581d4f9d73c564 /drivers/net/wireless/libertas/main.c
parent23a397ac821ab0aa263bda47131bb0628e49101a (diff)
libertas: kill references to mesh autostart
Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r--drivers/net/wireless/libertas/main.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index fd76c46225d1..bb685ac8e15e 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -369,46 +369,8 @@ static DEVICE_ATTR(lbs_mesh, 0644, lbs_mesh_get, lbs_mesh_set);
369 */ 369 */
370static DEVICE_ATTR(anycast_mask, 0644, lbs_anycast_get, lbs_anycast_set); 370static DEVICE_ATTR(anycast_mask, 0644, lbs_anycast_get, lbs_anycast_set);
371 371
372static ssize_t lbs_autostart_enabled_get(struct device *dev,
373 struct device_attribute *attr, char * buf)
374{
375 struct lbs_private *priv = to_net_dev(dev)->priv;
376 struct cmd_ds_mesh_access mesh_access;
377 int ret;
378
379 memset(&mesh_access, 0, sizeof(mesh_access));
380
381 ret = lbs_mesh_access(priv, CMD_ACT_MESH_GET_AUTOSTART_ENABLED, &mesh_access);
382 if (ret)
383 return ret;
384 return sprintf(buf, "%d\n", le32_to_cpu(mesh_access.data[0]));
385}
386
387static ssize_t lbs_autostart_enabled_set(struct device *dev,
388 struct device_attribute *attr, const char * buf, size_t count)
389{
390 struct cmd_ds_mesh_access mesh_access;
391 uint32_t datum;
392 struct lbs_private *priv = (to_net_dev(dev))->priv;
393 int ret;
394
395 memset(&mesh_access, 0, sizeof(mesh_access));
396 sscanf(buf, "%d", &datum);
397 mesh_access.data[0] = cpu_to_le32(datum);
398
399 ret = lbs_mesh_access(priv, CMD_ACT_MESH_SET_AUTOSTART_ENABLED, &mesh_access);
400 if (ret == 0)
401 priv->mesh_autostart_enabled = datum ? 1 : 0;
402
403 return strlen(buf);
404}
405
406static DEVICE_ATTR(autostart_enabled, 0644,
407 lbs_autostart_enabled_get, lbs_autostart_enabled_set);
408
409static struct attribute *lbs_mesh_sysfs_entries[] = { 372static struct attribute *lbs_mesh_sysfs_entries[] = {
410 &dev_attr_anycast_mask.attr, 373 &dev_attr_anycast_mask.attr,
411 &dev_attr_autostart_enabled.attr,
412 NULL, 374 NULL,
413}; 375};
414 376
@@ -883,7 +845,6 @@ static int lbs_thread(void *data)
883static int lbs_setup_firmware(struct lbs_private *priv) 845static int lbs_setup_firmware(struct lbs_private *priv)
884{ 846{
885 int ret = -1; 847 int ret = -1;
886 struct cmd_ds_mesh_access mesh_access;
887 848
888 lbs_deb_enter(LBS_DEB_FW); 849 lbs_deb_enter(LBS_DEB_FW);
889 850
@@ -905,21 +866,6 @@ static int lbs_setup_firmware(struct lbs_private *priv)
905 goto done; 866 goto done;
906 } 867 }
907 868
908 /* Disable mesh autostart */
909 if (priv->mesh_dev) {
910 memset(&mesh_access, 0, sizeof(mesh_access));
911 mesh_access.data[0] = cpu_to_le32(0);
912 ret = lbs_mesh_access(priv, CMD_ACT_MESH_SET_AUTOSTART_ENABLED,
913 &mesh_access);
914 if (ret) {
915 printk("Mesh autostart set failed\n");
916 ret = 0;
917 //ret = -1;
918 goto done;
919 }
920 priv->mesh_autostart_enabled = 0;
921 }
922
923 ret = 0; 869 ret = 0;
924done: 870done:
925 lbs_deb_leave_args(LBS_DEB_FW, "ret %d", ret); 871 lbs_deb_leave_args(LBS_DEB_FW, "ret %d", ret);