Use ETHTOOL_xLINKSETTINGS or ethtool_netlink instead of deprecated ETHTOOL_xSET to allow autoneg for 2500baseT Full Duplex
NetworkManager uses the deprecated ETHTOOL_GSET/SSET
API to change link settings. The advertising
member of its data structure is limited to 32bits which hides and disables all link mode flags that do not fit. The flag for 2500baseT Full Duplex is among those (0x800000000000
). As a result, auto-negotation for 2.5 Gbps networks does not work and falls backk to 1 Gbps.
This should be rewritten to prefer the newer ETHTOOL_GLINKSETTINGS/SLINKSETTINGS
and only use the old API as a fallback.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3f1ac7a700d039c61d8d8b99f28d605d489a60cf
An even better alternative may be the ethtool netlink api.
This is already mentioned as a FIXME in the code, but no tracking issue was created.