diff options
author | Andrew Lunn <andrew@lunn.ch> | 2020-04-20 00:11:52 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-20 12:43:24 -0700 |
commit | 77e9b2ab451d32c81468ef679c377b2f831cd720 (patch) | |
tree | a9cb964f6df47d76868f23e53672d648dc722743 /net/ethtool | |
parent | db30a57779b18b7cef092c21887ed2d23ad2bd35 (diff) | |
download | lwn-77e9b2ab451d32c81468ef679c377b2f831cd720.tar.gz lwn-77e9b2ab451d32c81468ef679c377b2f831cd720.zip |
net: ethtool: self_test: Mark interface in testing operative status
When an interface is executing a self test, put the interface into
operative status testing.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethtool')
-rw-r--r-- | net/ethtool/ioctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index 89d0b1827aaf..593fa665f820 100644 --- a/net/ethtool/ioctl.c +++ b/net/ethtool/ioctl.c @@ -1746,7 +1746,9 @@ static int ethtool_self_test(struct net_device *dev, char __user *useraddr) if (!data) return -ENOMEM; + netif_testing_on(dev); ops->self_test(dev, &test, data); + netif_testing_off(dev); ret = -EFAULT; if (copy_to_user(useraddr, &test, sizeof(test))) |