realtek: replace RTL93xx GPIO patches
[openwrt/staging/ldir.git] / target / linux / realtek / patches-5.10 / 704-drivers-net-phy-eee-support-for-rtl838x.patch
1 --- a/drivers/net/phy/phylink.c
2 +++ b/drivers/net/phy/phylink.c
3 @@ -1449,6 +1449,11 @@ int phylink_ethtool_ksettings_set(struct
4 * the presence of a PHY, this should not be changed as that
5 * should be determined from the media side advertisement.
6 */
7 + if (pl->phydev->drv->get_port && pl->phydev->drv->set_port) {
8 + if(pl->phydev->drv->get_port(pl->phydev) != kset->base.port) {
9 + pl->phydev->drv->set_port(pl->phydev, kset->base.port);
10 + }
11 + }
12 return phy_ethtool_ksettings_set(pl->phydev, kset);
13 }
14
15 @@ -1750,8 +1755,11 @@ int phylink_ethtool_get_eee(struct phyli
16
17 ASSERT_RTNL();
18
19 - if (pl->phydev)
20 + if (pl->phydev) {
21 + if (pl->phydev->drv->get_eee)
22 + return pl->phydev->drv->get_eee(pl->phydev, eee);
23 ret = phy_ethtool_get_eee(pl->phydev, eee);
24 + }
25
26 return ret;
27 }
28 @@ -1768,8 +1776,11 @@ int phylink_ethtool_set_eee(struct phyli
29
30 ASSERT_RTNL();
31
32 - if (pl->phydev)
33 + if (pl->phydev) {
34 + if (pl->phydev->drv->set_eee)
35 + return pl->phydev->drv->set_eee(pl->phydev, eee);
36 ret = phy_ethtool_set_eee(pl->phydev, eee);
37 + }
38
39 return ret;
40 }