aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/phy.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index a602d06d85ab..eed433d6056a 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -382,6 +382,12 @@ int phy_mii_ioctl(struct phy_device *phydev,
382 phydev->duplex = DUPLEX_FULL; 382 phydev->duplex = DUPLEX_FULL;
383 else 383 else
384 phydev->duplex = DUPLEX_HALF; 384 phydev->duplex = DUPLEX_HALF;
385 if ((!phydev->autoneg) &&
386 (val & BMCR_SPEED1000))
387 phydev->speed = SPEED_1000;
388 else if ((!phydev->autoneg) &&
389 (val & BMCR_SPEED100))
390 phydev->speed = SPEED_100;
385 break; 391 break;
386 case MII_ADVERTISE: 392 case MII_ADVERTISE:
387 phydev->advertising = val; 393 phydev->advertising = val;