diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-11 18:57:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:06:53 -0500 |
commit | 1f8a08342c8c1c90d0b752f28eb6f24ea7164cdb (patch) | |
tree | 97ef038bb2f2e42e813801957b581d4f9d73c564 /drivers/net/wireless/libertas | |
parent | 23a397ac821ab0aa263bda47131bb0628e49101a (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')
-rw-r--r-- | drivers/net/wireless/libertas/if_usb.c | 21 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 54 |
2 files changed, 0 insertions, 75 deletions
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index 351c7ea43184..b19a6c9c2a78 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c | |||
@@ -978,17 +978,6 @@ static int if_usb_suspend(struct usb_interface *intf, pm_message_t message) | |||
978 | if (priv->psstate != PS_STATE_FULL_POWER) | 978 | if (priv->psstate != PS_STATE_FULL_POWER) |
979 | return -1; | 979 | return -1; |
980 | 980 | ||
981 | if (priv->mesh_dev && !priv->mesh_autostart_enabled) { | ||
982 | /* Mesh autostart must be activated while sleeping | ||
983 | * On resume it will go back to the current state | ||
984 | */ | ||
985 | struct cmd_ds_mesh_access mesh_access; | ||
986 | memset(&mesh_access, 0, sizeof(mesh_access)); | ||
987 | |||
988 | mesh_access.data[0] = cpu_to_le32(1); | ||
989 | lbs_mesh_access(priv, CMD_ACT_MESH_SET_AUTOSTART_ENABLED, &mesh_access); | ||
990 | } | ||
991 | |||
992 | netif_device_detach(cardp->eth_dev); | 981 | netif_device_detach(cardp->eth_dev); |
993 | netif_device_detach(priv->mesh_dev); | 982 | netif_device_detach(priv->mesh_dev); |
994 | 983 | ||
@@ -1016,16 +1005,6 @@ static int if_usb_resume(struct usb_interface *intf) | |||
1016 | netif_device_attach(cardp->eth_dev); | 1005 | netif_device_attach(cardp->eth_dev); |
1017 | netif_device_attach(priv->mesh_dev); | 1006 | netif_device_attach(priv->mesh_dev); |
1018 | 1007 | ||
1019 | if (priv->mesh_dev && !priv->mesh_autostart_enabled) { | ||
1020 | /* Mesh autostart was activated while sleeping | ||
1021 | * Disable it if appropriate | ||
1022 | */ | ||
1023 | struct cmd_ds_mesh_access mesh_access; | ||
1024 | memset(&mesh_access, 0, sizeof(mesh_access)); | ||
1025 | mesh_access.data[0] = cpu_to_le32(0); | ||
1026 | lbs_mesh_access(priv, CMD_ACT_MESH_SET_AUTOSTART_ENABLED, &mesh_access); | ||
1027 | } | ||
1028 | |||
1029 | lbs_deb_leave(LBS_DEB_USB); | 1008 | lbs_deb_leave(LBS_DEB_USB); |
1030 | return 0; | 1009 | return 0; |
1031 | } | 1010 | } |
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 | */ |
370 | static DEVICE_ATTR(anycast_mask, 0644, lbs_anycast_get, lbs_anycast_set); | 370 | static DEVICE_ATTR(anycast_mask, 0644, lbs_anycast_get, lbs_anycast_set); |
371 | 371 | ||
372 | static 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 | |||
387 | static 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 | |||
406 | static DEVICE_ATTR(autostart_enabled, 0644, | ||
407 | lbs_autostart_enabled_get, lbs_autostart_enabled_set); | ||
408 | |||
409 | static struct attribute *lbs_mesh_sysfs_entries[] = { | 372 | static 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) | |||
883 | static int lbs_setup_firmware(struct lbs_private *priv) | 845 | static 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; |
924 | done: | 870 | done: |
925 | lbs_deb_leave_args(LBS_DEB_FW, "ret %d", ret); | 871 | lbs_deb_leave_args(LBS_DEB_FW, "ret %d", ret); |