mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 07:22:33 +00:00
42 lines
967 B
Diff
42 lines
967 B
Diff
|
--- a/drivers/net/phy/phylink.c
|
||
|
+++ b/drivers/net/phy/phylink.c
|
||
|
@@ -1244,6 +1244,11 @@
|
||
|
|
||
|
/* If we have a PHY, configure the phy */
|
||
|
if (pl->phydev) {
|
||
|
+ if (pl->phydev->drv->get_port && pl->phydev->drv->set_port) {
|
||
|
+ if(pl->phydev->drv->get_port(pl->phydev) != kset->base.port) {
|
||
|
+ pl->phydev->drv->set_port(pl->phydev, kset->base.port);
|
||
|
+ }
|
||
|
+ }
|
||
|
ret = phy_ethtool_ksettings_set(pl->phydev, &our_kset);
|
||
|
if (ret)
|
||
|
return ret;
|
||
|
@@ -1422,8 +1427,11 @@
|
||
|
|
||
|
ASSERT_RTNL();
|
||
|
|
||
|
- if (pl->phydev)
|
||
|
+ if (pl->phydev) {
|
||
|
+ if (pl->phydev->drv->get_eee)
|
||
|
+ return pl->phydev->drv->get_eee(pl->phydev, eee);
|
||
|
ret = phy_ethtool_get_eee(pl->phydev, eee);
|
||
|
+ }
|
||
|
|
||
|
return ret;
|
||
|
}
|
||
|
@@ -1440,9 +1448,11 @@
|
||
|
|
||
|
ASSERT_RTNL();
|
||
|
|
||
|
- if (pl->phydev)
|
||
|
+ if (pl->phydev) {
|
||
|
+ if (pl->phydev->drv->set_eee)
|
||
|
+ return pl->phydev->drv->set_eee(pl->phydev, eee);
|
||
|
ret = phy_ethtool_set_eee(pl->phydev, eee);
|
||
|
-
|
||
|
+ }
|
||
|
return ret;
|
||
|
}
|
||
|
EXPORT_SYMBOL_GPL(phylink_ethtool_set_eee);
|