/* Get the current statistics. This may be called with the device open or closed.  */
static struct net_device_stats* sonic_get_stats(struct net_device *dev)
/* Get the current statistics. This may be called with the device open or closed.  */
static struct net_device_stats* sonic_get_stats(struct net_device *dev)
{
	struct sonic_local *lp = netdev_priv(dev);
	lp->stats.rx_crc_errors += SONIC_READ(SONIC_CRCT);
	SONIC_WRITE(SONIC_CRCT, 0xffff);
	lp->stats.rx_frame_errors += SONIC_READ(SONIC_FAET);
	SONIC_WRITE(SONIC_FAET, 0xffff);
	lp->stats.rx_missed_errors += SONIC_READ(SONIC_MPT);
	SONIC_WRITE(SONIC_MPT, 0xffff);
	return &lp->stats;
}