]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: bcmasp: enable SW timestamping
authorJustin Chen <justin.chen@broadcom.com>
Thu, 10 Oct 2024 22:15:06 +0000 (15:15 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 11 Oct 2024 23:03:31 +0000 (16:03 -0700)
Add skb_tx_timestamp() call and enable support for SW
timestamping.

Signed-off-by: Justin Chen <justin.chen@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://patch.msgid.link/20241010221506.802730-1-justin.chen@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/broadcom/asp2/bcmasp_ethtool.c
drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c

index ca163c8e372972bf567d864e770e4640086b761f..67928b5d8a268d4e36e300a9f0cd37f9db1c4715 100644 (file)
@@ -496,4 +496,5 @@ const struct ethtool_ops bcmasp_ethtool_ops = {
        .get_strings            = bcmasp_get_strings,
        .get_ethtool_stats      = bcmasp_get_ethtool_stats,
        .get_sset_count         = bcmasp_get_sset_count,
+       .get_ts_info            = ethtool_op_get_ts_info,
 };
index 82768b0e90262b80b949b959b40151a0ddd0b6a9..34f14d6059af9d7cd0d2c7431ac267b5c3bfb87e 100644 (file)
@@ -364,6 +364,9 @@ static netdev_tx_t bcmasp_xmit(struct sk_buff *skb, struct net_device *dev)
 
        intf->tx_spb_index = spb_index;
        intf->tx_spb_dma_valid = valid;
+
+       skb_tx_timestamp(skb);
+
        bcmasp_intf_tx_write(intf, intf->tx_spb_dma_valid);
 
        if (tx_spb_ring_full(intf, MAX_SKB_FRAGS + 1))