Subject: Re: [PATCH] Fix IXP 2000 network driver building.

From: Ben Hutchings <[email-masked]>
Date: Mon, 12 Oct 2009 13:10:59 +0100

On Sun, 2009-10-11 at 16:55 +0100, Vincent Sanders wrote:
> The IXP 2000 network driver was failing to build as it has its own
> statistics gathering which was not compatible with the recent network
> device operations changes. This patch fixes the driver in the obvious
> way and has been compile tested. I have been unable to get the ixp2000
> maintainer to comment or test this fix.
[...]
> diff --git a/drivers/net/ixp2000/ixpdev.c
> b/drivers/net/ixp2000/ixpdev.c
> index 1272434..79cb6fa 100644
> --- a/drivers/net/ixp2000/ixpdev.c
> +++ b/drivers/net/ixp2000/ixpdev.c
> @@ -21,6 +21,7 @@
>  #include "ixp2400_tx.ucode"
>  #include "ixpdev_priv.h"
>  #include "ixpdev.h"
> +#include "pm3386.h"
>  
>  #define DRV_MODULE_VERSION     "0.2"
>  
> @@ -271,6 +272,15 @@ static int ixpdev_close(struct net_device *dev)
>         return 0;
>  }
>  
> +static struct net_device_stats *ixpdev_get_stats(struct net_device
> *dev)
> +{
> +       struct ixpdev_priv *ip = netdev_priv(dev);
> +
> +       pm3386_get_stats(ip->channel, &(ip->stats));
> +
> +       return &(ip->stats);
> +}
> +
[...]

Is there any reason you can't use dev->stats instead of this private
field?

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.