mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
ethtool: add a new command for getting PHC virtual clocks
Add an interface for getting PHC (PTP Hardware Clock) virtual clocks, which are based on PHC physical clock providing hardware timestamp to network packets. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
acb288e804
commit
c156174a67
8 changed files with 167 additions and 1 deletions
|
@ -248,6 +248,7 @@ ethnl_default_requests[__ETHTOOL_MSG_USER_CNT] = {
|
|||
[ETHTOOL_MSG_TSINFO_GET] = ðnl_tsinfo_request_ops,
|
||||
[ETHTOOL_MSG_MODULE_EEPROM_GET] = ðnl_module_eeprom_request_ops,
|
||||
[ETHTOOL_MSG_STATS_GET] = ðnl_stats_request_ops,
|
||||
[ETHTOOL_MSG_PHC_VCLOCKS_GET] = ðnl_phc_vclocks_request_ops,
|
||||
};
|
||||
|
||||
static struct ethnl_dump_ctx *ethnl_dump_context(struct netlink_callback *cb)
|
||||
|
@ -958,6 +959,15 @@ static const struct genl_ops ethtool_genl_ops[] = {
|
|||
.policy = ethnl_stats_get_policy,
|
||||
.maxattr = ARRAY_SIZE(ethnl_stats_get_policy) - 1,
|
||||
},
|
||||
{
|
||||
.cmd = ETHTOOL_MSG_PHC_VCLOCKS_GET,
|
||||
.doit = ethnl_default_doit,
|
||||
.start = ethnl_default_start,
|
||||
.dumpit = ethnl_default_dumpit,
|
||||
.done = ethnl_default_done,
|
||||
.policy = ethnl_phc_vclocks_get_policy,
|
||||
.maxattr = ARRAY_SIZE(ethnl_phc_vclocks_get_policy) - 1,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct genl_multicast_group ethtool_nl_mcgrps[] = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue