mlxsw: spectrum: Fix autoneg status in ethtool
If link is down and autoneg is set to on/off, the status in ethtool does
The reason is when the link is down the function returns with zero
before changing autoneg value.
Move the checking of link state (up/down) to be performed after setting
autoneg value, in order to be sure that autoneg will change in any case.
Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
Signed-off-by: Amit Cohen <firstname.lastname@example.org>
Signed-off-by: Ido Schimmel <email@example.com>
Acked-by: Jiri Pirko <firstname.lastname@example.org>
Signed-off-by: David S. Miller <email@example.com>
1 file changed