• Catherine Sullivan's avatar
    i40e/i40evf: Use advertised speed settings in ethtool and refactor get_settings · e827845c
    Catherine Sullivan authored
    Add a requested speed variable to the link_status struct to store the
    last speeds we requested from the firmware (the speeds the FW will be
    advertising with if autoneg is enabled).
    
    Use the advertised speed settings in get_settings in ethtool now that
    we have it.  Also set the requested speed settings in set_settings in
    ethtool as they are requested and initialize them in probe based on what
    the firmware remembers as the last requested speeds.
    
    To accommodate some longer lines in this new code, and improve
    readability I have added two functions i40e_get_settings_link_up
    and i40e_get_settings_link_down which get_settings now calls first.
    It then does all of the settings that happen regardless of link
    state. Some PHY types that supported the same settings were also combined.
    
    Also update the copyright year.
    
    Change-ID: Ica0c5ac81b6069ea6a7406fce7482f7816d4455c
    Signed-off-by: default avatarCatherine Sullivan <catherine.sullivan@intel.com>
    Tested-by: default avatarJim Young <james.m.young@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    e827845c
i40e_ethtool.c 69.4 KB