net: fec: consolidate hwtstamp implementation
authorRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 8 Jul 2014 12:02:09 +0000 (13:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Jul 2014 03:57:46 +0000 (20:57 -0700)
commitbfd4ecdd87d350e19457fe0d02fa1e046774c44e
treeda520ead4d541c35cf29fc7c2c2e290b2d2a972b
parent96018f52c532b69424d354a848ac7812136650f6
net: fec: consolidate hwtstamp implementation

Both transmit and receive use the same infrastructure for calculating
the packet timestamp.  Rather than duplicating the code, provide a
function to do this common work.  Model this function in the Intel
e1000e version which avoids calling ns_to_ktime() within the spinlock;
the spinlock is critical for timecounter_cyc2time() but not
ns_to_ktime().

Acked-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec_main.c