mirror of
https://github.com/apache/nuttx.git
synced 2026-09-29 10:34:23 +00:00
Add the NETDEV_TX_STAMP capability flag to d_features, next to the existing NETDEV_RX_STAMP, so a driver can declare that it delivers hardware TX timestamps. SIOCETHTOOL and ETHTOOL_GET_TS_INFO were already defined but not implemented. Add struct ethtool_ts_info, with the same layout as Linux, and handle SIOCETHTOOL in netdev_ioctl.c so that userspace (such as ptpd) can query the timestamping capabilities of an interface the same way linuxptp/ptp4l does on Linux: - ETHTOOL_GET_TS_INFO fills so_timestamping from d_features: RX_HARDWARE | RAW_HARDWARE with NETDEV_RX_STAMP, otherwise RX_SOFTWARE | SOFTWARE (the stack stamps received packets with CLOCK_REALTIME), and TX_HARDWARE | RAW_HARDWARE with NETDEV_TX_STAMP. phc_index is -1, tx_types and rx_filters are zero. - Any other ethtool command is passed to the driver's d_ioctl when CONFIG_NETDEV_IOCTL is enabled, otherwise -ENOTTY is returned. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Daniel P. Carvalho <danieloak@gmail.com> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| Kconfig | ||
| Make.defs | ||
| netdev.h | ||
| netdev_carrier.c | ||
| netdev_checksum.c | ||
| netdev_count.c | ||
| netdev_default.c | ||
| netdev_findbyaddr.c | ||
| netdev_findbyindex.c | ||
| netdev_findbyname.c | ||
| netdev_foreach.c | ||
| netdev_ifconf.c | ||
| netdev_input.c | ||
| netdev_iob.c | ||
| netdev_ioctl.c | ||
| netdev_ipv6.c | ||
| netdev_lladdrsize.c | ||
| netdev_lock.c | ||
| netdev_notify_recvcpu.c | ||
| netdev_register.c | ||
| netdev_stats.c | ||
| netdev_txnotify.c | ||
| netdev_unregister.c | ||
| netdev_verify.c | ||
| netdown_notifier.c | ||