dev->do_ioctl = iss_net_ioctl; 
static int iss_net_configure(int index, char *init){	struct net_device *dev;	struct iss_net_private *lp;	int err;	if ((dev = alloc_etherdev(sizeof *lp)) == NULL) {		printk(KERN_ERR "eth_configure: failed to allocate device\n");		return 1;	}	/* Initialize private element. */	lp = dev->priv;	*lp = ((struct iss_net_private) {		.device_list		= LIST_HEAD_INIT(lp->device_list),		.opened_list		= LIST_HEAD_INIT(lp->opened_list),		.lock			= SPIN_LOCK_UNLOCKED,		.dev			= dev,		.index			= index,		//.fd                   = -1,		.mac			= { 0xfe, 0xfd, 0x0, 0x0, 0x0, 0x0 },		.have_mac		= 0,		});	/*	 * Try all transport protocols.	 * Note: more protocols can be added by adding '&& !X_init(lp, eth)'.	 */	if (!tuntap_probe(lp, index, init)) {		printk("Invalid arguments. Skipping device!\n");		goto errout;	}	printk(KERN_INFO "Netdevice %d ", index);	if (lp->have_mac)		printk("(%02x:%02x:%02x:%02x:%02x:%02x) ",				lp->mac[0], lp->mac[1],				lp->mac[2], lp->mac[3],				lp->mac[4], lp->mac[5]);	printk(": ");	/* sysfs register */	if (!driver_registered) {		driver_register(&iss_net_driver);		driver_registered = 1;	}	spin_lock(&devices_lock);	list_add(&lp->device_list, &devices);	spin_unlock(&devices_lock);	lp->pdev.id = index;	lp->pdev.name = DRIVER_NAME;	platform_device_register(&lp->pdev);	SET_NETDEV_DEV(dev,&lp->pdev.dev);	/*	 * If this name ends up conflicting with an existing registered	 * netdevice, that is OK, register_netdev{,ice}() will notice this	 * and fail.	 */	snprintf(dev->name, sizeof dev->name, "eth%d", index);	dev->mtu = lp->mtu;	dev->open = iss_net_open;	dev->hard_start_xmit = iss_net_start_xmit;	dev->stop = iss_net_close;	dev->get_stats = iss_net_get_stats;	dev->set_multicast_list = iss_net_set_multicast_list;	dev->tx_timeout = iss_net_tx_timeout;	dev->set_mac_address = iss_net_set_mac;	dev->change_mtu = iss_net_change_mtu;	dev->do_ioctl = iss_net_ioctl;	dev->watchdog_timeo = (HZ >> 1);	dev->irq = -1;	rtnl_lock();	err = register_netdevice(dev);	rtnl_unlock();	if (err) {		printk("Error registering net device!\n");		/* XXX: should we call ->remove() here? */		free_netdev(dev);		return 1;	}	init_timer(&lp->tl);	lp->tl.function = iss_net_user_timer_expire;#if 0	if (lp->have_mac)		set_ether_mac(dev, lp->mac);#endif	return 0;errout:	// FIXME: unregister; free, etc..	return -EIO;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/d3757472841cddfa2f905d1de76fabf1b98cfc1a/network.c/clean/arch/xtensa/platform-iss/network.c