diff options
| author | Ingo Molnar <mingo@kernel.org> | 2018-10-09 08:50:10 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2018-10-09 08:50:10 +0200 |
| commit | fc8eaa85681fa72dc6a4e46f01c92e4fba83d0ab (patch) | |
| tree | b044fab426f2167ceeb37ed6fe58f7f11b10cebd /net/core/ethtool.c | |
| parent | 2cc81c6992248ea37d0241bc325977bab310bc3b (diff) | |
| parent | 49e00eee00612b1357596fed8a88b621a7648c14 (diff) | |
Merge branch 'x86/urgent' into x86/cache, to pick up dependent fix
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'net/core/ethtool.c')
| -rw-r--r-- | net/core/ethtool.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 234a0ec2e932..0762aaf8e964 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c @@ -1483,6 +1483,7 @@ static int ethtool_get_wol(struct net_device *dev, char __user *useraddr) static int ethtool_set_wol(struct net_device *dev, char __user *useraddr) { struct ethtool_wolinfo wol; + int ret; if (!dev->ethtool_ops->set_wol) return -EOPNOTSUPP; @@ -1490,7 +1491,13 @@ static int ethtool_set_wol(struct net_device *dev, char __user *useraddr) if (copy_from_user(&wol, useraddr, sizeof(wol))) return -EFAULT; - return dev->ethtool_ops->set_wol(dev, &wol); + ret = dev->ethtool_ops->set_wol(dev, &wol); + if (ret) + return ret; + + dev->wol_enabled = !!wol.wolopts; + + return 0; } static int ethtool_get_eee(struct net_device *dev, char __user *useraddr) |
