diff options
Diffstat (limited to 'drivers/net/wireless/ray_cs.c')
-rw-r--r-- | drivers/net/wireless/ray_cs.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c index fc81ac67009d..ed4bf5013f1a 100644 --- a/drivers/net/wireless/ray_cs.c +++ b/drivers/net/wireless/ray_cs.c | |||
@@ -868,14 +868,8 @@ static int ray_suspend(struct pcmcia_device *p_dev) | |||
868 | dev_link_t *link = dev_to_instance(p_dev); | 868 | dev_link_t *link = dev_to_instance(p_dev); |
869 | struct net_device *dev = link->priv; | 869 | struct net_device *dev = link->priv; |
870 | 870 | ||
871 | link->state |= DEV_SUSPEND; | 871 | if ((link->state & DEV_CONFIG) && (link->open)) |
872 | if (link->state & DEV_CONFIG) { | 872 | netif_device_detach(dev); |
873 | if (link->open) | ||
874 | netif_device_detach(dev); | ||
875 | |||
876 | pcmcia_release_configuration(link->handle); | ||
877 | } | ||
878 | |||
879 | 873 | ||
880 | return 0; | 874 | return 0; |
881 | } | 875 | } |
@@ -885,14 +879,10 @@ static int ray_resume(struct pcmcia_device *p_dev) | |||
885 | dev_link_t *link = dev_to_instance(p_dev); | 879 | dev_link_t *link = dev_to_instance(p_dev); |
886 | struct net_device *dev = link->priv; | 880 | struct net_device *dev = link->priv; |
887 | 881 | ||
888 | link->state &= ~DEV_SUSPEND; | 882 | if ((link->state & DEV_CONFIG) && (link->open)) { |
889 | if (link->state & DEV_CONFIG) { | 883 | ray_reset(dev); |
890 | pcmcia_request_configuration(link->handle, &link->conf); | 884 | netif_device_attach(dev); |
891 | if (link->open) { | 885 | } |
892 | ray_reset(dev); | ||
893 | netif_device_attach(dev); | ||
894 | } | ||
895 | } | ||
896 | 886 | ||
897 | return 0; | 887 | return 0; |
898 | } | 888 | } |