nuttx/net/netdev
Claude 6e14c8cfe5 net/netdev: add NETDEV_TX_STAMP and handle SIOCETHTOOL ETHTOOL_GET_TS_INFO
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>
2026-09-28 12:53:24 -03:00
..
CMakeLists.txt netdev: delete macro CONFIG_NETDEV_CHECKSUM with nuttx 2026-01-19 23:22:46 +08:00
Kconfig arch/arm/src/imxrt: Unify FlexCAN TX work and add SIOCGCANERRORS. 2026-09-01 17:40:47 +08:00
Make.defs netdev: delete macro CONFIG_NETDEV_CHECKSUM with nuttx 2026-01-19 23:22:46 +08:00
netdev.h net: skip TCP/UDP pseudo-header checksum with hardware offload 2026-01-19 23:22:46 +08:00
netdev_carrier.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
netdev_checksum.c netdev: delete macro CONFIG_NETDEV_CHECKSUM with nuttx 2026-01-19 23:22:46 +08:00
netdev_count.c net/netdev: separate netdev_list_lock from net_lock 2025-12-29 09:42:18 +08:00
netdev_default.c netdev:When running, proto stack can exchange packets with device 2026-01-06 16:04:03 +08:00
netdev_findbyaddr.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
netdev_findbyindex.c net/netdev: separate netdev_list_lock from net_lock 2025-12-29 09:42:18 +08:00
netdev_findbyname.c net/netdev: separate netdev_list_lock from net_lock 2025-12-29 09:42:18 +08:00
netdev_foreach.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
netdev_ifconf.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
netdev_input.c net: add NETDEV_RX_STAMP flag in d_features 2026-09-18 20:00:49 +08:00
netdev_iob.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
netdev_ioctl.c net/netdev: add NETDEV_TX_STAMP and handle SIOCETHTOOL ETHTOOL_GET_TS_INFO 2026-09-28 12:53:24 -03:00
netdev_ipv6.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
netdev_lladdrsize.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
netdev_lock.c net/utils/net_lock.c: add api to lock conn and netdev 2025-12-29 09:42:18 +08:00
netdev_notify_recvcpu.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
netdev_register.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
netdev_stats.c net: migrate to SPDX identifier 2024-09-12 01:08:11 +08:00
netdev_txnotify.c net/netdev/netdev_txnotify.c: add debug log with interface name 2026-05-06 01:16:40 +08:00
netdev_unregister.c include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
netdev_verify.c net/netdev: separate netdev_list_lock from net_lock 2025-12-29 09:42:18 +08:00
netdown_notifier.c net:modify check condition from IFF_UP to IFF_RUNNING in the sending process 2026-01-09 21:48:18 +08:00