diff options
Diffstat (limited to 'net/core/ethtool.c')
-rw-r--r-- | net/core/ethtool.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index cbf033dcaf1f..4d64cc2e3fa9 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -1426,18 +1426,6 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) | |||
1426 | if (copy_from_user(ðcmd, useraddr, sizeof(ethcmd))) | 1426 | if (copy_from_user(ðcmd, useraddr, sizeof(ethcmd))) |
1427 | return -EFAULT; | 1427 | return -EFAULT; |
1428 | 1428 | ||
1429 | if (!dev->ethtool_ops) { | ||
1430 | /* A few commands do not require any driver support, | ||
1431 | * are unprivileged, and do not change anything, so we | ||
1432 | * can take a shortcut to them. */ | ||
1433 | if (ethcmd == ETHTOOL_GDRVINFO) | ||
1434 | return ethtool_get_drvinfo(dev, useraddr); | ||
1435 | else if (ethcmd == ETHTOOL_GET_TS_INFO) | ||
1436 | return ethtool_get_ts_info(dev, useraddr); | ||
1437 | else | ||
1438 | return -EOPNOTSUPP; | ||
1439 | } | ||
1440 | |||
1441 | /* Allow some commands to be done by anyone */ | 1429 | /* Allow some commands to be done by anyone */ |
1442 | switch (ethcmd) { | 1430 | switch (ethcmd) { |
1443 | case ETHTOOL_GSET: | 1431 | case ETHTOOL_GSET: |