dev->stop = &netwave_close;
link->irq.Instance = dev;
- link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
return netwave_pcmcia_config( link);
} /* netwave_attach */
DEBUG(0, "netwave_detach(0x%p)\n", link);
- if (link->state & DEV_CONFIG)
- netwave_release(link);
+ netwave_release(link);
if (link->dev_node)
unregister_netdev(dev);
link->conf.ConfigBase = parse.config.base;
link->conf.Present = parse.config.rmask[0];
- /* Configure card */
- link->state |= DEV_CONFIG;
-
/*
* Try allocating IO ports. This tries a few fixed addresses.
* If you want, you can also read the card's config table to
strcpy(priv->node.dev_name, dev->name);
link->dev_node = &priv->node;
- link->state &= ~DEV_CONFIG_PENDING;
/* Reset card before reading physical address */
netwave_doreset(dev->base_addr, ramBase);
{
struct net_device *dev = link->priv;
- if ((link->state & DEV_CONFIG) && (link->open))
+ if (link->open)
netif_device_detach(dev);
return 0;
{
struct net_device *dev = link->priv;
- if ((link->state & DEV_CONFIG) && (link->open)) {
+ if (link->open) {
netwave_reset(dev);
netif_device_attach(dev);
}
status = inb(iobase + NETWAVE_REG_ASR);
- if (!DEV_OK(link)) {
+ if (!pcmcia_dev_present(link)) {
DEBUG(1, "netwave_interrupt: Interrupt with status 0x%x "
"from removed or suspended card!\n", status);
break;
DEBUG(1, "netwave_open: starting.\n");
- if (!DEV_OK(link))
+ if (!pcmcia_dev_present(link))
return -ENODEV;
link->open++;