diff options
Diffstat (limited to 'drivers/net/wireless/wl3501_cs.c')
-rw-r--r-- | drivers/net/wireless/wl3501_cs.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index c43f05b98c4e..5e5d24c1ce2b 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
@@ -1451,6 +1451,8 @@ static void wl3501_detach(struct pcmcia_device *link) | |||
1451 | netif_device_detach(dev); | 1451 | netif_device_detach(dev); |
1452 | wl3501_release(link); | 1452 | wl3501_release(link); |
1453 | 1453 | ||
1454 | unregister_netdev(dev); | ||
1455 | |||
1454 | if (link->priv) | 1456 | if (link->priv) |
1455 | free_netdev(link->priv); | 1457 | free_netdev(link->priv); |
1456 | 1458 | ||
@@ -1977,20 +1979,15 @@ static int wl3501_config(struct pcmcia_device *link) | |||
1977 | } | 1979 | } |
1978 | 1980 | ||
1979 | this = netdev_priv(dev); | 1981 | this = netdev_priv(dev); |
1980 | /* | ||
1981 | * At this point, the dev_node_t structure(s) should be initialized and | ||
1982 | * arranged in a linked list at link->dev_node. | ||
1983 | */ | ||
1984 | link->dev_node = &this->node; | ||
1985 | 1982 | ||
1986 | this->base_addr = dev->base_addr; | 1983 | this->base_addr = dev->base_addr; |
1987 | 1984 | ||
1988 | if (!wl3501_get_flash_mac_addr(this)) { | 1985 | if (!wl3501_get_flash_mac_addr(this)) { |
1989 | printk(KERN_WARNING "%s: Cant read MAC addr in flash ROM?\n", | 1986 | printk(KERN_WARNING "%s: Cant read MAC addr in flash ROM?\n", |
1990 | dev->name); | 1987 | dev->name); |
1988 | unregister_netdev(dev); | ||
1991 | goto failed; | 1989 | goto failed; |
1992 | } | 1990 | } |
1993 | strcpy(this->node.dev_name, dev->name); | ||
1994 | 1991 | ||
1995 | for (i = 0; i < 6; i++) | 1992 | for (i = 0; i < 6; i++) |
1996 | dev->dev_addr[i] = ((char *)&this->mac_addr)[i]; | 1993 | dev->dev_addr[i] = ((char *)&this->mac_addr)[i]; |
@@ -2034,12 +2031,6 @@ failed: | |||
2034 | */ | 2031 | */ |
2035 | static void wl3501_release(struct pcmcia_device *link) | 2032 | static void wl3501_release(struct pcmcia_device *link) |
2036 | { | 2033 | { |
2037 | struct net_device *dev = link->priv; | ||
2038 | |||
2039 | /* Unlink the device chain */ | ||
2040 | if (link->dev_node) | ||
2041 | unregister_netdev(dev); | ||
2042 | |||
2043 | pcmcia_disable_device(link); | 2034 | pcmcia_disable_device(link); |
2044 | } | 2035 | } |
2045 | 2036 | ||