net: phy: Remove the call to phy_mii_ioctl in phy_hwstamp_get/set
[linux-2.6-block.git] / drivers / net / phy / phy.c
index d058316666ba0d06fe5cf9413f2910ce7ad61307..3376e58e2b88e58d2a9b17a018c58c5d4a9f6956 100644 (file)
@@ -486,7 +486,7 @@ int __phy_hwtstamp_get(struct phy_device *phydev,
        if (!phydev)
                return -ENODEV;
 
-       return phy_mii_ioctl(phydev, config->ifr, SIOCGHWTSTAMP);
+       return -EOPNOTSUPP;
 }
 
 /**
@@ -503,7 +503,10 @@ int __phy_hwtstamp_set(struct phy_device *phydev,
        if (!phydev)
                return -ENODEV;
 
-       return phy_mii_ioctl(phydev, config->ifr, SIOCSHWTSTAMP);
+       if (phydev->mii_ts && phydev->mii_ts->hwtstamp)
+               return phydev->mii_ts->hwtstamp(phydev->mii_ts, config, extack);
+
+       return -EOPNOTSUPP;
 }
 
 /**