summaryrefslogtreecommitdiff
path: root/net/8021q
diff options
context:
space:
mode:
authorMaxim Georgiev <glipus@gmail.com>2023-08-01 17:28:14 +0300
committerJakub Kicinski <kuba@kernel.org>2023-08-02 19:11:05 -0700
commite47d01fea663b1fe58d0a493efc9ed667f70242e (patch)
tree9d115be60517a47b19211f774c71e1e48a805125 /net/8021q
parent66f7223039c0cef81221e9779520479895995815 (diff)
net: add hwtstamping helpers for stackable net devices
The stackable net devices with hwtstamping support (vlan, macvlan, bonding) only pass the hwtstamping ops to the lower (real) device. These drivers are the first that need to be converted to the new timestamping API, because if they aren't prepared to handle that, then no real device driver cannot be converted to the new API either. After studying what vlan_dev_ioctl(), macvlan_eth_ioctl() and bond_eth_ioctl() have in common, here we propose two generic implementations of ndo_hwtstamp_get() and ndo_hwtstamp_set() which can be called by those 3 drivers, with "dev" being their lower device. These helpers cover both cases, when the lower driver is converted to the new API or unconverted. We need some hacks in case of an unconverted driver, namely to stuff some pointers in struct kernel_hwtstamp_config which shouldn't have been there (since the new API isn't supposed to need it). These will be removed when all drivers will have been converted to the new API. Signed-off-by: Maxim Georgiev <glipus@gmail.com> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20230801142824.1772134-3-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/8021q')
0 files changed, 0 insertions, 0 deletions