diff options
author | Manfred Rudigier <Manfred.Rudigier@omicron.at> | 2010-04-08 23:10:03 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-13 08:41:31 (GMT) |
commit | cc772ab7cdcaa24d1fae332d92a1602788644f7a (patch) | |
tree | efbcb9bf8c1c9214f612d2044321a30ada230255 /drivers/net/gianfar.h | |
parent | e44171f115de3dedf34064646206deb91549865f (diff) | |
download | linux-cc772ab7cdcaa24d1fae332d92a1602788644f7a.tar.xz |
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.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h index 17d25e7..1ea287c 100644 --- a/drivers/net/gianfar.h +++ b/drivers/net/gianfar.h @@ -262,6 +262,7 @@ extern const char gfar_driver_version[]; #define next_bd(bdp, base, ring_size) skip_bd(bdp, 1, base, ring_size) +#define RCTRL_TS_ENABLE 0x01000000 #define RCTRL_PAL_MASK 0x001f0000 #define RCTRL_VLEX 0x00002000 #define RCTRL_FILREN 0x00001000 @@ -885,6 +886,7 @@ struct gfar { #define FSL_GIANFAR_DEV_HAS_MAGIC_PACKET 0x00000100 #define FSL_GIANFAR_DEV_HAS_BD_STASHING 0x00000200 #define FSL_GIANFAR_DEV_HAS_BUF_STASHING 0x00000400 +#define FSL_GIANFAR_DEV_HAS_TIMER 0x00000800 #if (MAXGROUPS == 2) #define DEFAULT_MAPPING 0xAA @@ -1100,6 +1102,9 @@ struct gfar_private { /* Network Statistics */ struct gfar_extra_stats extra_stats; + + /* HW time stamping enabled flag */ + int hwts_rx_en; }; extern unsigned int ftp_rqfpr[MAX_FILER_IDX + 1]; |