From f0ee7acfcdd4169cee2fefc630de72deb5bc34b9 Mon Sep 17 00:00:00 2001 From: Manfred Rudigier Date: Thu, 8 Apr 2010 23:10:35 +0000 Subject: gianfar: Add hardware TX timestamping support If a packet has the skb_shared_tx->hardware flag set the device is instructed to generate a TX timestamp and write it back to memory after the frame is transmitted. During the clean_tx_ring operation the timestamp will be extracted and copied into the skb_shared_hwtstamps struct of the skb. TX timestamping is enabled by setting the tx_type to something else than HWTSTAMP_TX_OFF with the SIOCSHWTSTAMP ioctl command. It is only supported by eTSEC devices. Signed-off-by: Manfred Rudigier Signed-off-by: David S. Miller --- drivers/net/gianfar.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/net/gianfar.h') diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h index 1ea287cba231..ac4a92e08c09 100644 --- a/drivers/net/gianfar.h +++ b/drivers/net/gianfar.h @@ -540,7 +540,7 @@ struct txbd8 struct txfcb { u8 flags; - u8 reserved; + u8 ptp; /* Flag to enable tx timestamping */ u8 l4os; /* Level 4 Header Offset */ u8 l3os; /* Level 3 Header Offset */ u16 phcs; /* Pseudo-header Checksum */ @@ -1105,6 +1105,7 @@ struct gfar_private { /* HW time stamping enabled flag */ int hwts_rx_en; + int hwts_tx_en; }; extern unsigned int ftp_rqfpr[MAX_FILER_IDX + 1]; -- cgit v1.2.3-59-g8ed1b