[PATCH] Linux Device Driver for Xilinx LL TEMAC 10/100/1000 Ethernet NIC
Ben Hutchings
bhutchings at solarflare.com
Tue Aug 19 00:36:51 EST 2008
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.
More information about the Linuxppc-embedded
mailing list