• Julian Wiedmann's avatar
    s390/qeth: improve selection of ethtool link modes · 235db527
    Julian Wiedmann authored
    The link mode is a combination of port speed and port mode. But we
    currently only consider the speed, and then typically select the
    corresponding TP-based link mode. For 1G and 10G Fibre links this means
    we display the wrong link modes.
    
    Move the SPEED_* switch statements inside the PORT_* cases, and only
    consider valid combinations where we can select the corresponding
    link mode. Add the relevant link modes (1000baseX, 10000baseSR and
    1000baseLR) that were introduced back with
    commit 5711a982 ("net: ethtool: add support for 1000BaseX and missing 10G link modes").
    
    To differentiate between 10000baseSR and 10000baseLR, use the detailed
    media_type information that QUERY OAT provides.
    Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    235db527
qeth_ethtool.c 13.3 KB