for (i =  LOOP_RETRY_LIMIT; i; i--) 
for (i = LOOP_RETRY_LIMIT; i; i--) 
static int probe_atmel_card(struct net_device *dev){	int rc = 0;	struct atmel_private *priv = netdev_priv(dev);	 	/* reset pccard */	if (priv->bus_type == BUS_TYPE_PCCARD) 		atmel_write16(dev, GCR, 0x0060);		atmel_write16(dev, GCR, 0x0040);	mdelay(500);		if (atmel_read16(dev, MR2) == 0) {		/* No stored firmware so load a small stub which just 		   tells us the MAC address */		int i;		priv->card_type = CARD_TYPE_EEPROM;		atmel_write16(dev, BSR, BSS_IRAM);		atmel_copy_to_card(dev, 0, mac_reader, sizeof(mac_reader));		atmel_set_gcr(dev, GCR_REMAP);		atmel_clear_gcr(priv->dev, 0x0040);		atmel_write16(dev, BSR, BSS_SRAM);		for (i =  LOOP_RETRY_LIMIT; i; i--) 			if (atmel_read16(dev, MR3) & MAC_BOOT_COMPLETE)				break;		if (i == 0) {			printk(KERN_ALERT "%s: MAC failed to boot MAC address reader.\n", dev->name);		} else {			atmel_copy_to_host(dev, dev->dev_addr, atmel_read16(dev, MR2), 6);			/* got address, now squash it again until the network			   interface is opened */			if (priv->bus_type == BUS_TYPE_PCCARD) 				atmel_write16(dev, GCR, 0x0060);			atmel_write16(dev, GCR, 0x0040);			rc = 1;		}	} else if (atmel_read16(dev, MR4) == 0) {		/* Mac address easy in this case. */		priv->card_type = CARD_TYPE_PARALLEL_FLASH;		atmel_write16(dev,  BSR, 1);			atmel_copy_to_host(dev, dev->dev_addr, 0xc000, 6);		atmel_write16(dev,  BSR, 0x200);		rc = 1;	} else {		/* Standard firmware in flash, boot it up and ask		   for the Mac Address */		priv->card_type = CARD_TYPE_SPI_FLASH;		if (atmel_wakeup_firmware(priv)) {			atmel_get_mib(priv, Mac_Address_Mib_Type, 0, dev->dev_addr, 6);						/* got address, now squash it again until the network			   interface is opened */			if (priv->bus_type == BUS_TYPE_PCCARD) 				atmel_write16(dev, GCR, 0x0060);			atmel_write16(dev, GCR, 0x0040);			rc = 1;		}	}		if (rc) {		if (dev->dev_addr[0] == 0xFF) {			u8 default_mac[] = {0x00,0x04, 0x25, 0x00, 0x00, 0x00};			printk(KERN_ALERT "%s: *** Invalid MAC address. UPGRADE Firmware ****\n", dev->name);			memcpy(dev->dev_addr, default_mac, 6);		}	}		return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4d791aadf63c9d605bc9a4144e79d5756fc29fb3/atmel.c/clean/drivers/net/wireless/atmel.c