Re: [PATCH net-next v3 1/3] net: dp83869: Add ability to advertise Fiber connection

From: Andrew Lunn
Date: Thu Sep 10 2020 - 14:11:45 EST


> The note in the ethtool.h says
>
>     /* Last allowed bit for __ETHTOOL_LINK_MODE_LEGACY_MASK is bit
>      * 31. Please do NOT define any SUPPORTED_* or ADVERTISED_*
>      * macro for bits > 31. The only way to use indices > 31 is to
>      * use the new ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API.
>      */
>
> Which was added by Heiner
>
> I guess I would prefer to add this in a separate patchset once I figure out
> how the ETHTOOL_GLINKSETTINGS/ETHTOOL_SLINKSETTINGS API works

The phydev supported value is no longer a u32, it is now a bitmap. So
you can do something like

linkmode_set_bit(ETHTOOL_LINK_MODE_100BaseFX_Full_BIT, &supported);

Andrew