diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2023-08-16 12:40:52 +0100 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2024-02-08 11:43:01 +0000 |
commit | 818c2f67c032e90dc9b694f3267057f053da74ca (patch) | |
tree | 718cf874815eeec3081feb9de1207319057dd3e0 /drivers/net/ethernet/mediatek/mtk_eth_soc.h | |
parent | 3a629c672d480956fd2c815785ebaa5eb4f6514b (diff) |
net: dsa: b53: remove eee_enabled/eee_active in b53_get_mac_eee()net-nextnet-merged
b53_get_mac_eee() sets both eee_enabled and eee_active, and then
returns zero.
dsa_user_get_eee(), which calls this function, will then continue to
call phylink_ethtool_get_eee(), which will return -EOPNOTSUPP if there
is no PHY present, otherwise calling phy_ethtool_get_eee() which in
turn will call genphy_c45_ethtool_get_eee().
genphy_c45_ethtool_get_eee() will overwrite eee_enabled and eee_active
with its own interpretation from the PHYs settings and negotiation
result.
Thus, when there is no PHY, dsa_user_get_eee() will fail with
-EOPNOTSUPP, meaning eee_enabled and eee_active will not be returned to
userspace. When there is a PHY, eee_enabled and eee_active will be
overwritten by phylib, making the setting of these members in
b53_get_mac_eee() entirely unnecessary.
Remove this code, thus simplifying b53_get_mac_eee().
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'drivers/net/ethernet/mediatek/mtk_eth_soc.h')
0 files changed, 0 insertions, 0 deletions