mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
net: pcs: xpcs: use mii_c73_to_linkmode() helper
Convert xpcs clause 73 reading to use the newly introduced mii_c73_to_linkmode() helper to translate the link partner advertisement to an ethtool bitmap. Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
6f7b89b45f
commit
3f0360e09c
1 changed files with 1 additions and 12 deletions
|
@ -529,18 +529,7 @@ static int xpcs_read_lpa_c73(struct dw_xpcs *xpcs,
|
|||
lpa[i] = ret;
|
||||
}
|
||||
|
||||
if (lpa[2] & DW_C73_2500KX)
|
||||
phylink_set(state->lp_advertising, 2500baseX_Full);
|
||||
if (lpa[1] & DW_C73_1000KX)
|
||||
phylink_set(state->lp_advertising, 1000baseKX_Full);
|
||||
if (lpa[1] & DW_C73_10000KX4)
|
||||
phylink_set(state->lp_advertising, 10000baseKX4_Full);
|
||||
if (lpa[1] & DW_C73_10000KR)
|
||||
phylink_set(state->lp_advertising, 10000baseKR_Full);
|
||||
if (lpa[0] & DW_C73_PAUSE)
|
||||
phylink_set(state->lp_advertising, Pause);
|
||||
if (lpa[0] & DW_C73_ASYM_PAUSE)
|
||||
phylink_set(state->lp_advertising, Asym_Pause);
|
||||
mii_c73_mod_linkmode(state->lp_advertising, lpa);
|
||||
|
||||
linkmode_and(state->lp_advertising, state->lp_advertising,
|
||||
state->advertising);
|
||||
|
|
Loading…
Reference in a new issue