net: lan743x: Fixup EEE
authorAndrew Lunn <andrew@lunn.ch>
Sat, 6 Apr 2024 20:16:00 +0000 (15:16 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2024 13:04:16 +0000 (14:04 +0100)
commitef460a8986fa0dae1cdcb158a06127f7af27c92d
tree31ff1c4b9688f0109d9fc4235331788720abd4a6
parenta00bbd15a5af98d310792d3a7e052168ba088f08
net: lan743x: Fixup EEE

The enabling/disabling of EEE in the MAC should happen as a result of
auto negotiation. So move the enable/disable into
lan743x_phy_link_status_change() which gets called by phylib when
there is a change in link status.

lan743x_ethtool_set_eee() now just programs the hardware with the LTI
timer value, and passed everything else to phylib, so it can correctly
setup the PHY.

lan743x_ethtool_get_eee() relies on phylib doing most of the work, the
MAC driver just adds the LTI timer value.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/microchip/lan743x_ethtool.c
drivers/net/ethernet/microchip/lan743x_main.c