Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6cf0732 authored by Richard Cochran's avatar Richard Cochran Committed by David S. Miller
Browse files

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: default avatarRichard Cochran <richard.cochran@omicron.at>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 93e0ed15
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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,6 +436,7 @@ 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);
		if (!skb_defer_rx_timestamp(skb))
			netif_rx(rskb);

		spin_lock(&priv->lock);