aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.h
diff options
context:
space:
mode:
authorManfred Rudigier <Manfred.Rudigier@omicron.at>2010-04-08 19:10:03 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-13 04:41:31 -0400
commitcc772ab7cdcaa24d1fae332d92a1602788644f7a (patch)
treeefbcb9bf8c1c9214f612d2044321a30ada230255 /drivers/net/gianfar.h
parente44171f115de3dedf34064646206deb91549865f (diff)
gianfar: Add hardware RX timestamping support
The device is configured to insert hardware timestamps into all received packets. The RX timestamps are extracted from the padding alingment bytes during the clean_rx_ring operation and copied into the skb_shared_hwtstamps struct of the skb. This extraction only happens if the rx_filter was set to something else than HWTSTAMP_FILTER_NONE with the SIOCSHWTSTAMP ioctl command. Hardware timestamping is only supported for eTSEC devices. To indicate device support the new FSL_GIANFAR_DEV_HAS_TIMER flag was introduced. Signed-off-by: Manfred Rudigier <manfred.rudigier@omicron.at> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/gianfar.h')
-rw-r--r--drivers/net/gianfar.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
index 17d25e714236..1ea287cba231 100644
--- a/drivers/net/gianfar.h
+++ b/drivers/net/gianfar.h
@@ -262,6 +262,7 @@ extern const char gfar_driver_version[];
262 262
263#define next_bd(bdp, base, ring_size) skip_bd(bdp, 1, base, ring_size) 263#define next_bd(bdp, base, ring_size) skip_bd(bdp, 1, base, ring_size)
264 264
265#define RCTRL_TS_ENABLE 0x01000000
265#define RCTRL_PAL_MASK 0x001f0000 266#define RCTRL_PAL_MASK 0x001f0000
266#define RCTRL_VLEX 0x00002000 267#define RCTRL_VLEX 0x00002000
267#define RCTRL_FILREN 0x00001000 268#define RCTRL_FILREN 0x00001000
@@ -885,6 +886,7 @@ struct gfar {
885#define FSL_GIANFAR_DEV_HAS_MAGIC_PACKET 0x00000100 886#define FSL_GIANFAR_DEV_HAS_MAGIC_PACKET 0x00000100
886#define FSL_GIANFAR_DEV_HAS_BD_STASHING 0x00000200 887#define FSL_GIANFAR_DEV_HAS_BD_STASHING 0x00000200
887#define FSL_GIANFAR_DEV_HAS_BUF_STASHING 0x00000400 888#define FSL_GIANFAR_DEV_HAS_BUF_STASHING 0x00000400
889#define FSL_GIANFAR_DEV_HAS_TIMER 0x00000800
888 890
889#if (MAXGROUPS == 2) 891#if (MAXGROUPS == 2)
890#define DEFAULT_MAPPING 0xAA 892#define DEFAULT_MAPPING 0xAA
@@ -1100,6 +1102,9 @@ struct gfar_private {
1100 1102
1101 /* Network Statistics */ 1103 /* Network Statistics */
1102 struct gfar_extra_stats extra_stats; 1104 struct gfar_extra_stats extra_stats;
1105
1106 /* HW time stamping enabled flag */
1107 int hwts_rx_en;
1103}; 1108};
1104 1109
1105extern unsigned int ftp_rqfpr[MAX_FILER_IDX + 1]; 1110extern unsigned int ftp_rqfpr[MAX_FILER_IDX + 1];