Subject: Re: [PATCH] Linux Device Driver for Xilinx LL TEMAC 10/100/1000 Ethernet NIC

From: Ben Hutchings <[email-masked]>
Date: Mon, 18 Aug 2008 15:36:51 +0100

I wrote:
> > +static struct net_device_stats *
> > +temac_get_stats(struct net_device *ndev)
> > +{
> > +    return netdev_priv(ndev);
> 
> Not even the right type.  Do you read your compiler warnings?

Sorry, I now see that this is correct, though it's very fragile - it will
silently break if struct temac_local is reordered.

struct net_device includes a stats buffer which you should be able to use
instead of adding your own in struct temac_local.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.