]> git.baikalelectronics.ru Git - kernel.git/commit
ptp: Add generic ptp message type function
authorKurt Kanzenbach <kurt@linutronix.de>
Tue, 18 Aug 2020 10:32:44 +0000 (12:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Aug 2020 23:07:49 +0000 (16:07 -0700)
commit2787f07d51d6020c7a7085d4a48df7ff60facc0a
treeb09208c59aaca9fa858cdae2e4070a269bdca702
parentd980a9fae571908f168cb5f84ceda15158e35dc7
ptp: Add generic ptp message type function

The message type is located at different offsets within the ptp header depending
on the ptp version (v1 or v2). Therefore, drivers which also deal with ptp v1
have some code for it.

Extract this into a helper function for drivers to be used.

Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ptp_classify.h