@@ -675,6 +675,9 @@ axienet_start_xmit(struct sk_buff *skb, struct net_device *ndev)
cur_p->skb = skb;
tail_p = lp->tx_bd_p + sizeof(*lp->tx_bd_v) * lp->tx_bd_tail;
+
+ skb_tx_timestamp(skb);
+
/* Start the transfer */
axienet_dma_out32(lp, XAXIDMA_TX_TDESC_OFFSET, tail_p);
if (++lp->tx_bd_tail >= lp->tx_bd_num)
@@ -736,7 +739,8 @@ static void axienet_recv(struct net_device *ndev)
skb->ip_summed = CHECKSUM_COMPLETE;
}
- netif_rx(skb);
+ if (!skb_defer_rx_timestamp(skb))
+ netif_rx(skb);
size += length;
packets++;
@@ -1367,6 +1371,7 @@ static const struct ethtool_ops axienet_ethtool_ops = {
.set_pauseparam = axienet_ethtools_set_pauseparam,
.get_coalesce = axienet_ethtools_get_coalesce,
.set_coalesce = axienet_ethtools_set_coalesce,
+ .get_ts_info = ethtool_op_get_ts_info,
.get_link_ksettings = axienet_ethtools_get_link_ksettings,
.set_link_ksettings = axienet_ethtools_set_link_ksettings,
};
MAC drivers are expected to invoke the transmit time stamping hook in order to support both software time stamping and PHY time stamping. This patch adds the missing hook. In addition, drivers calling netif_rx() should first check for PHY time stamping by calling skb_defer_rx_timestamp(). Signed-off-by: Richard Cochran <richardcochran@gmail.com> --- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)