summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-06-01 23:43:50 +0200
committerDavid S. Miller <davem@davemloft.net>2015-06-01 23:43:50 +0200
commit18ec898ee54e03a9aab8b54db50cb2b36209d313 (patch)
tree7ddf23ada91fcd6057b951a7d61ef39fed8e63ef /net
parentbnx2x: Move statistics implementation into semaphores (diff)
downloadlinux-18ec898ee54e03a9aab8b54db50cb2b36209d313.tar.xz
linux-18ec898ee54e03a9aab8b54db50cb2b36209d313.zip
Revert "net: core: 'ethtool' issue with querying phy settings"
This reverts commit f96dee13b8e10f00840124255bed1d8b4c6afd6f. 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>
Diffstat (limited to 'net')
-rw-r--r--net/core/ethtool.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index 1347e11f5cc9..1d00b8922902 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -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;