ethtool: provide timestamping information with TSINFO_GET request
Implement TSINFO_GET request to get timestamping information for a network device. This is traditionally available via ETHTOOL_GET_TS_INFO ioctl request. Move part of ethtool_get_ts_info() into common.c so that ioctl and netlink code use the same logic to get timestamping information from the device. v3: use "TSINFO" rather than "TIMESTAMP", suggested by Richard Cochran Signed-off-by: Michal Kubecek <mkubecek@suse.cz> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
f76510b458
commit
5b071c59ed
@@ -230,6 +230,7 @@ ethnl_default_requests[__ETHTOOL_MSG_USER_CNT] = {
|
||||
[ETHTOOL_MSG_COALESCE_GET] = ðnl_coalesce_request_ops,
|
||||
[ETHTOOL_MSG_PAUSE_GET] = ðnl_pause_request_ops,
|
||||
[ETHTOOL_MSG_EEE_GET] = ðnl_eee_request_ops,
|
||||
[ETHTOOL_MSG_TSINFO_GET] = ðnl_tsinfo_request_ops,
|
||||
};
|
||||
|
||||
static struct ethnl_dump_ctx *ethnl_dump_context(struct netlink_callback *cb)
|
||||
@@ -831,6 +832,13 @@ static const struct genl_ops ethtool_genl_ops[] = {
|
||||
.flags = GENL_UNS_ADMIN_PERM,
|
||||
.doit = ethnl_set_eee,
|
||||
},
|
||||
{
|
||||
.cmd = ETHTOOL_MSG_TSINFO_GET,
|
||||
.doit = ethnl_default_doit,
|
||||
.start = ethnl_default_start,
|
||||
.dumpit = ethnl_default_dumpit,
|
||||
.done = ethnl_default_done,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct genl_multicast_group ethtool_nl_mcgrps[] = {
|
||||
|
Reference in New Issue
Block a user