When an interface is executing a self test, put the interface into operative status testing.
Signed-off-by: Andrew Lunn <[email protected]> --- net/core/ethtool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/core/ethtool.c b/net/core/ethtool.c index d08b1e19ce9c..f86070effd61 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -1765,7 +1765,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))) -- 2.20.1
