ptp: Add generic ptp v2 header parsing function
authorKurt Kanzenbach <kurt@linutronix.de>
Tue, 18 Aug 2020 10:32:43 +0000 (12:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Aug 2020 23:07:49 +0000 (16:07 -0700)
commitbdfbb63c314a6fb7d27dddd62f5a3e4f062b92bb
tree40323ad304ef541518009a986fda4b571c0b0785
parentf3ae59c0c01530ab48faf72cc678f92ad8aa7b4f
ptp: Add generic ptp v2 header parsing function

Reason: A lot of the ptp drivers - which implement hardware time stamping - need
specific fields such as the sequence id from the ptp v2 header. Currently all
drivers implement that themselves.

Introduce a generic function to retrieve a pointer to the start of the ptp v2
header.

Suggested-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ptp_classify.h
net/core/ptp_classifier.c