Skip to content

Commit

Permalink
net: ethtool: self_test: Mark interface in testing operative status
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrew Lunn authored and David S. Miller committed Apr 20, 2020
1 parent db30a57 commit 77e9b2a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/ethtool/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 77e9b2a

Please sign in to comment.