Subject: Re: [PATCH] Add ethtool to mii advertisment conversion helpers

From: "Matt Carlson" <[email-masked]>
Date: Wed, 16 Nov 2011 14:56:32 -0800

On Wed, Nov 16, 2011 at 02:36:18PM -0800, David Miller wrote:
> From: "Matt Carlson" <[email-masked]>
> Date: Tue, 15 Nov 2011 14:00:53 -0800
> 
> > Translating between ethtool advertisement settings and MII
> > advertisements are common operations for ethernet drivers.  This patch
> > adds a set of helper functions that implements the conversion.  The
> > patch then modifies a couple of the drivers to use the new functions.
> > 
> > Signed-off-by: Matt Carlson <[email-masked]>
> > Signed-off-by: Michael Chan <[email-masked]>
> 
> Doesn't build:
> 
> In file included from drivers/net/ethernet/3com/3c59x.c:82:0:
> include/linux/mii.h: In function ?ethtool_adv_to_mii_100bt?:
> include/linux/mii.h:254:15: error: ?ADVERTISED_10baseT_Half? undeclared (first use in this function)
> include/linux/mii.h:254:15: note: each undeclared identifier is reported only once for each function it appears in
> include/linux/mii.h:256:15: error: ?ADVERTISED_10baseT_Full? undeclared (first use in this function)
> include/linux/mii.h:258:15: error: ?ADVERTISED_100baseT_Half? undeclared (first use in this function)
> include/linux/mii.h:260:15: error: ?ADVERTISED_100baseT_Full? undeclared (first use in this function)
> include/linux/mii.h:262:15: error: ?ADVERTISED_Pause? undeclared (first use in this function)
> include/linux/mii.h:264:15: error: ?ADVERTISED_Asym_Pause? undeclared (first use in this function)

I forgot to add '#include <linux\ethtool.h>' to mii.h.  I guess for the
drivers I enabled, ethtool.h was already included.  New patch on its
way.