if (pcmcia_get_first_tuple(local->link->handle, &tuple) || pcmcia_get_tuple_data(local->link->handle, &tuple) || pcmcia_parse_tuple(local->link->handle, &tuple, parse) || 
if (pcmcia_get_first_tuple(hw_priv->link->handle, &tuple) || pcmcia_get_tuple_data(hw_priv->link->handle, &tuple) || pcmcia_parse_tuple(hw_priv->link->handle, &tuple, parse) || 
static int sandisk_enable_wireless(struct net_device *dev){	int res, ret = 0;	conf_reg_t reg;	struct hostap_interface *iface = dev->priv;	local_info_t *local = iface->local;	tuple_t tuple;	cisparse_t *parse = NULL;	u_char buf[64];	if (local->link->io.NumPorts1 < 0x42) {		/* Not enough ports to be SanDisk multi-function card */		ret = -ENODEV;		goto done;	}	parse = kmalloc(sizeof(cisparse_t), GFP_KERNEL);	if (parse == NULL) {		ret = -ENOMEM;		goto done;	}	tuple.DesiredTuple = CISTPL_MANFID;	tuple.Attributes = TUPLE_RETURN_COMMON;	tuple.TupleData = buf;	tuple.TupleDataMax = sizeof(buf);	tuple.TupleOffset = 0;	if (pcmcia_get_first_tuple(local->link->handle, &tuple) ||	    pcmcia_get_tuple_data(local->link->handle, &tuple) ||	    pcmcia_parse_tuple(local->link->handle, &tuple, parse) ||	    parse->manfid.manf != 0xd601 || parse->manfid.card != 0x0101) {		/* No SanDisk manfid found */		ret = -ENODEV;		goto done;	}	tuple.DesiredTuple = CISTPL_LONGLINK_MFC;	if (pcmcia_get_first_tuple(local->link->handle, &tuple) ||	    pcmcia_get_tuple_data(local->link->handle, &tuple) ||	    pcmcia_parse_tuple(local->link->handle, &tuple, parse) ||		parse->longlink_mfc.nfn < 2) {		/* No multi-function links found */		ret = -ENODEV;		goto done;	}	printk(KERN_DEBUG "%s: Multi-function SanDisk ConnectPlus detected"	       " - using vendor-specific initialization\n", dev->name);	local->sandisk_connectplus = 1;	reg.Function = 0;	reg.Action = CS_WRITE;	reg.Offset = CISREG_COR;	reg.Value = COR_SOFT_RESET;	res = pcmcia_access_configuration_register(local->link->handle, &reg);	if (res != CS_SUCCESS) {		printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n",		       dev->name, res);		goto done;	}	mdelay(5);	reg.Function = 0;	reg.Action = CS_WRITE;	reg.Offset = CISREG_COR;	/*	 * Do not enable interrupts here to avoid some bogus events. Interrupts	 * will be enabled during the first cor_sreset call.	 */	reg.Value = COR_LEVEL_REQ | 0x8 | COR_ADDR_DECODE | COR_FUNC_ENA;	res = pcmcia_access_configuration_register(local->link->handle, &reg);	if (res != CS_SUCCESS) {		printk(KERN_DEBUG "%s: SanDisk - COR sreset failed (%d)\n",		       dev->name, res);		goto done;	}	mdelay(5);	sandisk_set_iobase(local);	HFA384X_OUTB(0xc5, SANDISK_WLAN_ACTIVATION_OFF);	udelay(10);	HFA384X_OUTB(0x4b, SANDISK_WLAN_ACTIVATION_OFF);	udelay(10);done:	kfree(parse);	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/67e0e473fb54e7657f6604236e42ef07fd7a2768/hostap_cs.c/clean/drivers/net/wireless/hostap/hostap_cs.c