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 3395cab1f7d08094dbc796949cff2cdb381ea47a..dfcbb54e93a298eee7858d6b26e533e0aeefb00b 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 fc91b9f060a72434ae3a63dd7b1075071fdfa6ac..a610406502d7511c094f0b75d43c69386f6a92dc 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;