• Sean Anderson's avatar
    net: phylink: Adjust link settings based on rate matching · ae0e4bb2
    Sean Anderson authored
    If the phy is configured to use pause-based rate matching, ensure that
    the link is full duplex with pause frame reception enabled. As
    suggested, if pause-based rate matching is enabled by the phy, then
    pause reception is unconditionally enabled.
    
    The interface duplex is determined based on the rate matching type.
    When rate matching is enabled, so is the speed. We assume the maximum
    interface speed is used. This is only relevant for MLO_AN_PHY. For
    MLO_AN_INBAND, the MAC/PCS's view of the interface speed will be used.
    
    Although there are no RATE_ADAPT_CRS phys in-tree, it has been added for
    comparison (and the implementation is quite simple).
    Co-developed-by: default avatarRussell King <linux@armlinux.org.uk>
    Signed-off-by: default avatarSean Anderson <sean.anderson@seco.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ae0e4bb2
phylink.c 90.3 KB