net: dsa: mv88e6xxx: add rx/tx timestamping support
authorBrandon Streiff <brandon.streiff@ni.com>
Wed, 14 Feb 2018 00:07:50 +0000 (01:07 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Feb 2018 19:33:37 +0000 (14:33 -0500)
commitc6fe0ad2c3499cca7c7b3be83958e6f7e961f567
treec5a3dabef1ae524a28c919c913151cea97ae2825
parent90af1059c52c0031f3bfd8279c9ede153ca83275
net: dsa: mv88e6xxx: add rx/tx timestamping support

This patch implements RX/TX timestamping support.

The Marvell PTP hardware supports RX timestamping individual message
types, but for simplicity we only support the EVENT receive filter since
few if any clients bother with the more specific filter types.

checkpatch and reverse Christmas tree changes by Andrew Lunn.

Re-factor duplicated code paths and avoid IfOk anti-pattern, use the
common ptp worker thread from the class layer and time stamp UDP/IPv4
frames as well as Layer-2 frame by Richard Cochran.

Signed-off-by: Brandon Streiff <brandon.streiff@ni.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/Makefile
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h
drivers/net/dsa/mv88e6xxx/hwtstamp.c [new file with mode: 0644]
drivers/net/dsa/mv88e6xxx/hwtstamp.h [new file with mode: 0644]
drivers/net/dsa/mv88e6xxx/ptp.c
drivers/net/dsa/mv88e6xxx/ptp.h