Message ID | 20190612154438.22703-4-andrew@lunn.ch |
---|---|
State | RFC |
Delegated to: | David Miller |
Headers | show |
Series | RFC 2863 Testing Oper status | expand |
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)))
When an interface is executing a self test, put the interface into operative status testing. Signed-off-by: Andrew Lunn <andrew@lunn.ch> --- net/core/ethtool.c | 2 ++ 1 file changed, 2 insertions(+)