diff options
author | Maxim Georgiev <glipus@gmail.com> | 2023-08-01 17:28:13 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-08-02 19:11:05 -0700 |
commit | 66f7223039c0cef81221e9779520479895995815 (patch) | |
tree | f961a7a07220462f726e1102f442ab7d2ff92d3b /drivers/bus | |
parent | 72c1a28473fb132f08a2a447dd1425a472696cd9 (diff) | |
download | linux-stable-66f7223039c0cef81221e9779520479895995815.tar.gz linux-stable-66f7223039c0cef81221e9779520479895995815.tar.bz2 linux-stable-66f7223039c0cef81221e9779520479895995815.zip |
net: add NDOs for configuring hardware timestamping
Current hardware timestamping API for NICs requires implementing
.ndo_eth_ioctl() for SIOCGHWTSTAMP and SIOCSHWTSTAMP.
That API has some boilerplate such as request parameter translation
between user and kernel address spaces, handling possible translation
failures correctly, etc. Since it is the same all across the board, it
would be desirable to handle it through generic code.
Here we introduce .ndo_hwtstamp_get() and .ndo_hwtstamp_set(), which
implement that boilerplate and allow drivers to just act upon requests.
Suggested-by: Jakub Kicinski <kuba@kernel.org>
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>
Tested-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Link: https://lore.kernel.org/r/20230801142824.1772134-2-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/bus')
0 files changed, 0 insertions, 0 deletions