Kernel to userspace:
- ===================================== ================================
+ ===================================== =================================
``ETHTOOL_MSG_STRSET_GET_REPLY`` string set contents
``ETHTOOL_MSG_LINKINFO_GET_REPLY`` link settings
``ETHTOOL_MSG_LINKINFO_NTF`` link settings notification
``ETHTOOL_MSG_DEBUG_GET_REPLY`` debugging settings
``ETHTOOL_MSG_DEBUG_NTF`` debugging settings notification
``ETHTOOL_MSG_WOL_GET_REPLY`` wake-on-lan settings
- ===================================== ================================
+ ``ETHTOOL_MSG_WOL_NTF`` wake-on-lan settings notification
+ ===================================== =================================
``GET`` requests are sent by userspace applications to retrieve device
information. They usually do not contain any message specific attributes.
ETHTOOL_MSG_DEBUG_GET_REPLY,
ETHTOOL_MSG_DEBUG_NTF,
ETHTOOL_MSG_WOL_GET_REPLY,
+ ETHTOOL_MSG_WOL_NTF,
/* add new constants above here */
__ETHTOOL_MSG_KERNEL_CNT,
return ret;
dev->wol_enabled = !!wol.wolopts;
+ ethtool_notify(dev, ETHTOOL_MSG_WOL_NTF, NULL);
return 0;
}
[ETHTOOL_MSG_LINKINFO_NTF] = ðnl_linkinfo_request_ops,
[ETHTOOL_MSG_LINKMODES_NTF] = ðnl_linkmodes_request_ops,
[ETHTOOL_MSG_DEBUG_NTF] = ðnl_debug_request_ops,
+ [ETHTOOL_MSG_WOL_NTF] = ðnl_wol_request_ops,
};
/* default notification handler */
[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)
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;
}
if (ret)
goto out_ops;
dev->wol_enabled = !!wol.wolopts;
+ ethtool_notify(dev, ETHTOOL_MSG_WOL_NTF, NULL);
out_ops:
ethnl_ops_complete(dev);