[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180914232320.GA30993@lunn.ch>
Date: Sat, 15 Sep 2018 01:23:20 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: netdev <netdev@...r.kernel.org>
Subject: Re: [PATH RFC net-next 3/8] net: phy: Add helper to convert MII ADV
register to a linkmode
On Fri, Sep 14, 2018 at 03:23:14PM -0700, Florian Fainelli wrote:
> On 09/14/2018 02:38 PM, Andrew Lunn wrote:
> > The phy_mii_ioctl can be used to write a value into the MII_ADVERTISE
> > register in the PHY. Since this changes the state of the PHY, we need
> > to make the same change to phydev->advertising. Add a helper which can
> > convert the register value to a linkmode.
>
> It would have been nice if we could eliminate the duplication between
> mii_adv_to_ethtool_adv_t() and mii_adv_to_linkmode_adv_t() but I don't
> really see how without changing the former function's signature.
Some of these functions are also used by non-phylib MAC drivers. So
the ethtool version cannot be eliminated.
And the UAPI for EEE still uses a u32 for which modes EEE is
advertised :-(
Andrew
Powered by blists - more mailing lists