diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/ethtool.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index d8b1a8d85a96..927819d92248 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -1655,7 +1655,7 @@ static int ethtool_phys_id(struct net_device *dev, void __user *useraddr) | |||
1655 | static bool busy; | 1655 | static bool busy; |
1656 | int rc; | 1656 | int rc; |
1657 | 1657 | ||
1658 | if (!dev->ethtool_ops->set_phys_id && !dev->ethtool_ops->phys_id) | 1658 | if (!dev->ethtool_ops->set_phys_id) |
1659 | return -EOPNOTSUPP; | 1659 | return -EOPNOTSUPP; |
1660 | 1660 | ||
1661 | if (busy) | 1661 | if (busy) |
@@ -1664,10 +1664,6 @@ static int ethtool_phys_id(struct net_device *dev, void __user *useraddr) | |||
1664 | if (copy_from_user(&id, useraddr, sizeof(id))) | 1664 | if (copy_from_user(&id, useraddr, sizeof(id))) |
1665 | return -EFAULT; | 1665 | return -EFAULT; |
1666 | 1666 | ||
1667 | if (!dev->ethtool_ops->set_phys_id) | ||
1668 | /* Do it the old way */ | ||
1669 | return dev->ethtool_ops->phys_id(dev, id.data); | ||
1670 | |||
1671 | rc = dev->ethtool_ops->set_phys_id(dev, ETHTOOL_ID_ACTIVE); | 1667 | rc = dev->ethtool_ops->set_phys_id(dev, ETHTOOL_ID_ACTIVE); |
1672 | if (rc < 0) | 1668 | if (rc < 0) |
1673 | return rc; | 1669 | return rc; |