ar71xx: add software transmit timestamp support
authorStephen Walker <stephendwalker+github@gmail.com>
Thu, 7 Jul 2016 00:23:15 +0000 (20:23 -0400)
committerFelix Fietkau <nbd@nbd.name>
Fri, 15 Jul 2016 12:19:32 +0000 (14:19 +0200)
Add software transmit timestamp and ethtool (-T) timestamp support

Signed-off-by: Stephen Walker <stephendwalker+github@gmail.com>
target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ethtool.c
target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c

index 3395cab..dfcbb54 100644 (file)
@@ -127,4 +127,5 @@ struct ethtool_ops ag71xx_ethtool_ops = {
        .get_ringparam  = ag71xx_ethtool_get_ringparam,
        .set_ringparam  = ag71xx_ethtool_set_ringparam,
        .get_link       = ethtool_op_get_link,
+       .get_ts_info    = ethtool_op_get_ts_info,
 };
index fc91b9f..a610406 100644 (file)
@@ -819,6 +819,8 @@ static netdev_tx_t ag71xx_hard_start_xmit(struct sk_buff *skb,
 
        netdev_sent_queue(dev, skb->len);
 
+       skb_tx_timestamp(skb);
+
        desc->ctrl &= ~DESC_EMPTY;
        ring->curr += n;