 create_proc_read_entry ("driver/atmel", 0, NULL, atmel_read_proc, priv);  
 create_proc_read_entry ("driver/atmel", 0, NULL, atmel_read_proc, priv);  
struct net_device *init_atmel_card( unsigned short irq, unsigned long port, const AtmelFWType fw_type,  				    struct device *sys_dev, int (*card_present)(void *), void *card){	struct net_device *dev;	struct atmel_private *priv;	int rc;	/* Create the network device object. */        dev = alloc_etherdev(sizeof(*priv));        if (!dev) {		printk(KERN_ERR "atmel:  Couldn't alloc_etherdev\n");		return NULL;        }	if (dev_alloc_name(dev, dev->name) < 0) {		printk(KERN_ERR "atmel:  Couldn't get name!\n");		goto err_out_free;	}	priv = netdev_priv(dev);	priv->dev = dev;	priv->sys_dev = sys_dev;	priv->present_callback = card_present;	priv->card = card;	priv->firmware = NULL;	priv->firmware_id[0] = '\0';	priv->firmware_type = fw_type;	if (firmware) /* module parameter */		strcpy(priv->firmware_id, firmware);	priv->bus_type = card_present ? BUS_TYPE_PCCARD : BUS_TYPE_PCI;	priv->station_state = STATION_STATE_DOWN;	priv->do_rx_crc = 0;	/* For PCMCIA cards, some chips need CRC, some don't	   so we have to probe. */	if (priv->bus_type == BUS_TYPE_PCCARD) {		priv->probe_crc = 1;		priv->crc_ok_cnt = priv->crc_ko_cnt = 0;	} else		priv->probe_crc = 0;	memset(&priv->stats, 0, sizeof(priv->stats));	memset(&priv->wstats, 0, sizeof(priv->wstats));	priv->last_qual = jiffies;	priv->last_beacon_timestamp = 0;	memset(priv->frag_source, 0xff, sizeof(priv->frag_source));	memset(priv->BSSID, 0, 6);	priv->CurrentBSSID[0] = 0xFF; /* Initialize to something invalid.... */	priv->station_was_associated = 0;		priv->last_survey = jiffies;	priv->preamble = LONG_PREAMBLE;	priv->operating_mode = IW_MODE_INFRA;	priv->connect_to_any_BSS = 0;	priv->config_reg_domain = 0;	priv->reg_domain = 0;	priv->tx_rate = 3;	priv->auto_tx_rate = 1;	priv->channel = 4;	priv->power_mode = 0;	priv->SSID[0] = '\0';	priv->SSID_size = 0;	priv->new_SSID_size = 0;	priv->frag_threshold = 2346;	priv->rts_threshold = 2347;	priv->short_retry = 7;	priv->long_retry = 4;	priv->wep_is_on = 0;	priv->default_key = 0;	priv->encryption_level = 0;	priv->exclude_unencrypted = 0;	priv->group_cipher_suite = priv->pairwise_cipher_suite = CIPHER_SUITE_NONE;	priv->use_wpa = 0;	memset(priv->wep_keys, 0, sizeof(priv->wep_keys));	memset(priv->wep_key_len, 0, sizeof(priv->wep_key_len));	priv->default_beacon_period = priv->beacon_period = 100;	priv->listen_interval = 1;	init_timer(&priv->management_timer);	spin_lock_init(&priv->irqlock);	spin_lock_init(&priv->timerlock);	priv->management_timer.function = atmel_management_timer;	priv->management_timer.data = (unsigned long) dev;		dev->open = atmel_open;	dev->stop = atmel_close;	dev->change_mtu = atmel_change_mtu;	dev->set_mac_address = atmel_set_mac_address;	dev->hard_start_xmit = start_tx;	dev->get_stats = atmel_get_stats;	dev->wireless_handlers = (struct iw_handler_def *)&atmel_handler_def;	dev->do_ioctl = atmel_ioctl;	dev->irq = irq;	dev->base_addr = port;		SET_NETDEV_DEV(dev, sys_dev);		if ((rc = request_irq(dev->irq, service_interrupt, SA_SHIRQ, dev->name, dev))) {		printk(KERN_ERR "%s: register interrupt %d failed, rc %d\n", dev->name, irq, rc );		goto err_out_free;	}	if (!request_region(dev->base_addr, 32, 			    priv->bus_type == BUS_TYPE_PCCARD ?  "atmel_cs" : "atmel_pci")) {		goto err_out_irq;	}		if (register_netdev(dev))		goto err_out_res;		if (!probe_atmel_card(dev)){		unregister_netdev(dev);		goto err_out_res;	}		netif_carrier_off(dev);		create_proc_read_entry ("driver/atmel", 0, NULL, atmel_read_proc, priv);			printk(KERN_INFO "%s: Atmel at76c50x. Version %d.%d. MAC %.2x:%.2x:%.2x:%.2x:%.2x:%.2x\n",	       dev->name, DRIVER_MAJOR, DRIVER_MINOR,	       dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],	       dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5] );		SET_MODULE_OWNER(dev);	return dev;	 err_out_res:	release_region( dev->base_addr, 32); err_out_irq:	free_irq(dev->irq, dev); err_out_free:	free_netdev(dev);	return NULL;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4d791aadf63c9d605bc9a4144e79d5756fc29fb3/atmel.c/clean/drivers/net/wireless/atmel.c