/* Collect the stats. This is called unlocked and from several contexts.  */
static struct net_device_stats * get_stats(struct net_device *dev)
/* Collect the stats. This is called unlocked and from several contexts.  */
static struct net_device_stats * get_stats(struct net_device *dev)
{
	long ioaddr = dev->base_addr;
	struct ei_device *ei_local = (struct ei_device *) netdev_priv(dev);
	unsigned long flags;
	if (!netif_running(dev))
		return &dev->stats;
	spin_lock_irqsave(&ei_local->page_lock,flags);
	dev->stats.rx_frame_errors += inb_p(ioaddr + EN0_COUNTER0);
	dev->stats.rx_crc_errors   += inb_p(ioaddr + EN0_COUNTER1);
	dev->stats.rx_missed_errors+= inb_p(ioaddr + EN0_COUNTER2);
	spin_unlock_irqrestore(&ei_local->page_lock, flags);
	return &dev->stats;
}