net: dsa: microchip: ptp: lan937x: add 2 step timestamping
authorArun Ramadoss <arun.ramadoss@microchip.com>
Tue, 10 Jan 2023 08:49:29 +0000 (14:19 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Jan 2023 08:40:41 +0000 (08:40 +0000)
commitd6261f0b80ba1f694e1303a507dfa046ee77b1e2
tree19f341858ea5c9b153f15216deb52e6c3a1820fd
parent343d3bd87a2835e61790ffb5d3638a070f12292b
net: dsa: microchip: ptp: lan937x: add 2 step timestamping

LAN937x series of switches support 2 step timestamping mechanism. There
are timestamp correction calculation performed in ksz_rcv_timestamp and
ksz_xmit_timestamp which are applicable only for p2p1step. To check
whether the 2 step is enabled or not in tag_ksz.c introduced the helper
function in taggger_data to query it from ksz_ptp.c. Based on whether 2
step is enabled or not, timestamp calculation are performed.

Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz_ptp.c