From: Andrew Lunn Date: Sun, 19 Apr 2020 22:11:52 +0000 (+0200) Subject: net: ethtool: self_test: Mark interface in testing operative status X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=77e9b2ab451d32c81468ef679c377b2f831cd720;p=linux.git 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 Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c index 89d0b1827aaff..593fa665f8206 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)))