diff options
author | Richard Cochran <richardcochran@gmail.com> | 2011-06-19 21:51:27 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-20 13:56:54 -0700 |
commit | d6cf07327e691e8f7c0f08af69d0dd3887aa1e4f (patch) | |
tree | d1bc19e1a19925d71bb967d00b057e1eea1d1b65 /drivers/net/fec_mpc52xx.c | |
parent | 93e0ed158c15b3d3d76125de6364f8f95528c25a (diff) |
fec_mpc52xx: enable transmit and receive time stamping.
This patch enables software (and phy device) time stamping. Software
time stamping using the SO_TIMESTAMPING API was tested and found to be
working on the LITE5200B board.
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Richard Cochran <richard.cochran@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/fec_mpc52xx.c')
-rw-r--r-- | drivers/net/fec_mpc52xx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index eba0f696a51f..cecc3b1eb486 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c @@ -336,6 +336,7 @@ static int mpc52xx_fec_start_xmit(struct sk_buff *skb, struct net_device *dev) bd->skb_pa = dma_map_single(dev->dev.parent, skb->data, skb->len, DMA_TO_DEVICE); + skb_tx_timestamp(skb); bcom_submit_next_buffer(priv->tx_dmatsk, skb); spin_unlock_irqrestore(&priv->lock, flags); @@ -435,7 +436,8 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id) length = status & BCOM_FEC_RX_BD_LEN_MASK; skb_put(rskb, length - 4); /* length without CRC32 */ rskb->protocol = eth_type_trans(rskb, dev); - netif_rx(rskb); + if (!skb_defer_rx_timestamp(skb)) + netif_rx(rskb); spin_lock(&priv->lock); } |