summaryrefslogtreecommitdiff
path: root/net/ethtool
diff options
context:
space:
mode:
Diffstat (limited to 'net/ethtool')
-rw-r--r--net/ethtool/ioctl.c1
-rw-r--r--net/ethtool/netlink.c2
-rw-r--r--net/ethtool/wol.c4
3 files changed, 6 insertions, 1 deletions
diff --git a/net/ethtool/ioctl.c b/net/ethtool/ioctl.c
index 46e0b31782fc..b88dd14e41c6 100644
--- a/net/ethtool/ioctl.c
+++ b/net/ethtool/ioctl.c
@@ -1316,6 +1316,7 @@ static int ethtool_set_wol(struct net_device *dev, char __user *useraddr)
return ret;
dev->wol_enabled = !!wol.wolopts;
+ ethtool_notify(dev, ETHTOOL_MSG_WOL_NTF, NULL);
return 0;
}
diff --git a/net/ethtool/netlink.c b/net/ethtool/netlink.c
index 2c375f9095fe..180c194fab07 100644
--- a/net/ethtool/netlink.c
+++ b/net/ethtool/netlink.c
@@ -526,6 +526,7 @@ ethnl_default_notify_ops[ETHTOOL_MSG_KERNEL_MAX + 1] = {
[ETHTOOL_MSG_LINKINFO_NTF] = &ethnl_linkinfo_request_ops,
[ETHTOOL_MSG_LINKMODES_NTF] = &ethnl_linkmodes_request_ops,
[ETHTOOL_MSG_DEBUG_NTF] = &ethnl_debug_request_ops,
+ [ETHTOOL_MSG_WOL_NTF] = &ethnl_wol_request_ops,
};
/* default notification handler */
@@ -610,6 +611,7 @@ static const ethnl_notify_handler_t ethnl_notify_handlers[] = {
[ETHTOOL_MSG_LINKINFO_NTF] = ethnl_default_notify,
[ETHTOOL_MSG_LINKMODES_NTF] = ethnl_default_notify,
[ETHTOOL_MSG_DEBUG_NTF] = ethnl_default_notify,
+ [ETHTOOL_MSG_WOL_NTF] = ethnl_default_notify,
};
void ethtool_notify(struct net_device *dev, unsigned int cmd, const void *data)
diff --git a/net/ethtool/wol.c b/net/ethtool/wol.c
index a2724378fac4..e1b8a65b64c4 100644
--- a/net/ethtool/wol.c
+++ b/net/ethtool/wol.c
@@ -41,7 +41,8 @@ static int wol_prepare_data(const struct ethnl_req_info *req_base,
return ret;
dev->ethtool_ops->get_wol(dev, &data->wol);
ethnl_ops_complete(dev);
- data->show_sopass = data->wol.supported & WAKE_MAGICSECURE;
+ /* do not include password in notifications */
+ data->show_sopass = info && (data->wol.supported & WAKE_MAGICSECURE);
return 0;
}
@@ -165,6 +166,7 @@ int ethnl_set_wol(struct sk_buff *skb, struct genl_info *info)
if (ret)
goto out_ops;
dev->wol_enabled = !!wol.wolopts;
+ ethtool_notify(dev, ETHTOOL_MSG_WOL_NTF, NULL);
out_ops:
ethnl_ops_complete(dev);