net: mscc: ocelot: support PTP Sync one-step timestamping
Although HWTSTAMP_TX_ONESTEP_SYNC existed in ioctl for hardware timestamp configuration, the PTP Sync one-step timestamping had never been supported. This patch is to truely support it. - ocelot_port_txtstamp_request() This function handles tx timestamp request by storing ptp_cmd(tx timestamp type) in OCELOT_SKB_CB(skb)->ptp_cmd, and additionally for two-step timestamp storing ts_id in OCELOT_SKB_CB(clone)->ptp_cmd. - ocelot_ptp_rew_op() During xmit, this function is called to get rew_op (rewriter option) by checking skb->cb for tx timestamp request, and configure to transmitting. Non-onestep-Sync packet with one-step timestamp request falls back to use two-step timestamp. Signed-off-by:Yangbo Lu <yangbo.lu@nxp.com> Acked-by:
Richard Cochran <richardcochran@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- drivers/net/ethernet/mscc/ocelot.c 53 additions, 0 deletionsdrivers/net/ethernet/mscc/ocelot.c
- drivers/net/ethernet/mscc/ocelot_net.c 4 additions, 4 deletionsdrivers/net/ethernet/mscc/ocelot_net.c
- include/soc/mscc/ocelot.h 7 additions, 1 deletioninclude/soc/mscc/ocelot.h
- net/dsa/Kconfig 2 additions, 0 deletionsnet/dsa/Kconfig
- net/dsa/tag_ocelot.c 4 additions, 23 deletionsnet/dsa/tag_ocelot.c
- net/dsa/tag_ocelot_8021q.c 11 additions, 30 deletionsnet/dsa/tag_ocelot_8021q.c
Please register or sign in to comment