Skip to content

Commit

Permalink
net: bcmasp: enable SW timestamping
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Justin Chen authored and Jakub Kicinski committed Oct 11, 2024
1 parent ea22f8e commit c531f22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/broadcom/asp2/bcmasp_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
3 changes: 3 additions & 0 deletions drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit c531f22

Please sign in to comment.