/* The pcmcia_device structure is initialized, but we don't actually configure the card at this point  */
static int ipwireless_attach(struct pcmcia_device *link)
/* The pcmcia_device structure is initialized, but we don't actually configure the card at this point  */
static int ipwireless_attach(struct pcmcia_device *link)
{
	struct ipw_dev *ipw;
	int ret;
	ipw = kzalloc(sizeof(struct ipw_dev), GFP_KERNEL);
	if (!ipw)
		return -ENOMEM;
	ipw->link = link;
	link->priv = ipw;
	link->dev_node = &ipw->nodes[0];
	ipw->hardware = ipwireless_hardware_create();
	if (!ipw->hardware) {
		kfree(ipw);
		return -ENOMEM;
	}
	ret = config_ipwireless(ipw);
	if (ret != 0) {
		ipwireless_detach(link);
		return ret;
	}
	return 0;
}