if (!reset_atmel_card(dev)) 
if (!reset_atmel_card(dev)) 
int atmel_open (struct net_device *dev){	struct atmel_private *priv = netdev_priv(dev);	int i, channel;	/* any scheduled timer is no longer needed and might screw things up.. */	del_timer_sync(&priv->management_timer);		/* Interrupts will not touch the card once in this state... */	priv->station_state = STATION_STATE_DOWN;	if (priv->new_SSID_size) {		memcpy(priv->SSID, priv->new_SSID, priv->new_SSID_size);		priv->SSID_size = priv->new_SSID_size;		priv->new_SSID_size = 0;	}	priv->BSS_list_entries = 0;	priv->AuthenticationRequestRetryCnt = 0;	priv->AssociationRequestRetryCnt = 0;	priv->ReAssociationRequestRetryCnt = 0;	priv->CurrentAuthentTransactionSeqNum = 0x0001;	priv->ExpectedAuthentTransactionSeqNum = 0x0002;	priv->site_survey_state = SITE_SURVEY_IDLE;	priv->station_is_associated = 0;	if (!reset_atmel_card(dev)) 		return -EAGAIN;	if (priv->config_reg_domain) {		priv->reg_domain = priv->config_reg_domain;		atmel_set_mib8(priv, Phy_Mib_Type, PHY_MIB_REG_DOMAIN_POS, priv->reg_domain);	} else {		priv->reg_domain = atmel_get_mib8(priv, Phy_Mib_Type, PHY_MIB_REG_DOMAIN_POS);		for (i = 0; i < sizeof(channel_table)/sizeof(channel_table[0]); i++)			if (priv->reg_domain == channel_table[i].reg_domain)				break;		if (i == sizeof(channel_table)/sizeof(channel_table[0])) {			priv->reg_domain = REG_DOMAIN_MKK1;			printk(KERN_ALERT "%s: failed to get regulatory domain: assuming MKK1.\n", dev->name);		} 	}		if ((channel = atmel_validate_channel(priv, priv->channel)))		priv->channel = channel;	/* this moves station_state on.... */ 	atmel_scan(priv, 1);		atmel_set_gcr(priv->dev, GCR_ENINT); /* enable interrupts */	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4d791aadf63c9d605bc9a4144e79d5756fc29fb3/atmel.c/buggy/drivers/net/wireless/atmel.c