• Russell King's avatar
    net: phylink: improve clause 45 PHY ksettings_set implementation · 5d57c327
    Russell King authored
    While testing ethtool with the Methode DM7052 module, it was noticed
    that attempting to set the advertising mask results in the mask being
    truncated to the support offered by the currently chosen PHY interface
    mode.
    
    When a PHY dynamically changes the PHY interface mode, limiting the
    advertising mask in this way is not correct - if the PHY happened to
    negotiate 10GBASE-T, and selected 10GBASE-R as the host interface, we
    don't want to restrict the advertisement to just 10GBASE-* modes.
    
    Rework setting the advertisement to take account of this; do not pass
    the requested advertisement through phylink_validate(), but rely on
    the advertisement restriction (supported mask) set when the PHY was
    initially setup.
    Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5d57c327
phylink.c 52.5 KB