Skip to content

Commit

Permalink
Revert "net: core: 'ethtool' issue with querying phy settings"
Browse files Browse the repository at this point in the history
This reverts commit f96dee1.

It isn't right, ethtool is meant to manage one PHY instance
per netdevice at a time, and this is selected by the SET
command.  Therefore by definition the GET command must only
return the settings for the configured and selected PHY.

Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
davem330 committed Jun 1, 2015
1 parent c6e36d8 commit 18ec898
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions net/core/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,15 +359,7 @@ static int ethtool_get_settings(struct net_device *dev, void __user *useraddr)
int err;
struct ethtool_cmd cmd;

if (!dev->ethtool_ops->get_settings)
return -EOPNOTSUPP;

if (copy_from_user(&cmd, useraddr, sizeof(cmd)))
return -EFAULT;

cmd.cmd = ETHTOOL_GSET;

err = dev->ethtool_ops->get_settings(dev, &cmd);
err = __ethtool_get_settings(dev, &cmd);
if (err < 0)
return err;

Expand Down

0 comments on commit 18ec898

Please sign in to comment.