diff options
-rw-r--r-- | net/core/ethtool.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 1d00b8922902..1347e11f5cc9 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -359,7 +359,15 @@ static int ethtool_get_settings(struct net_device *dev, void __user *useraddr) | |||
359 | int err; | 359 | int err; |
360 | struct ethtool_cmd cmd; | 360 | struct ethtool_cmd cmd; |
361 | 361 | ||
362 | err = __ethtool_get_settings(dev, &cmd); | 362 | if (!dev->ethtool_ops->get_settings) |
363 | return -EOPNOTSUPP; | ||
364 | |||
365 | if (copy_from_user(&cmd, useraddr, sizeof(cmd))) | ||
366 | return -EFAULT; | ||
367 | |||
368 | cmd.cmd = ETHTOOL_GSET; | ||
369 | |||
370 | err = dev->ethtool_ops->get_settings(dev, &cmd); | ||
363 | if (err < 0) | 371 | if (err < 0) |
364 | return err; | 372 | return err; |
365 | 373 | ||