Commit f9b491ec authored by Michael Riesch's avatar Michael Riesch Committed by David S. Miller

usbnet: add timestamping support

In order to make USB-to-Ethernet-adapters (depending on usbnet) support
timestamping, the "skb_defer_rx_timestamp" and "skb_tx_timestamp" function
calls are added.
Signed-off-by: default avatarMichael Riesch <michael@riesch.at>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7f5c6add
...@@ -238,6 +238,10 @@ void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb) ...@@ -238,6 +238,10 @@ void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb)
netif_dbg(dev, rx_status, dev->net, "< rx, len %zu, type 0x%x\n", netif_dbg(dev, rx_status, dev->net, "< rx, len %zu, type 0x%x\n",
skb->len + sizeof (struct ethhdr), skb->protocol); skb->len + sizeof (struct ethhdr), skb->protocol);
memset (skb->cb, 0, sizeof (struct skb_data)); memset (skb->cb, 0, sizeof (struct skb_data));
if (skb_defer_rx_timestamp(skb))
return;
status = netif_rx (skb); status = netif_rx (skb);
if (status != NET_RX_SUCCESS) if (status != NET_RX_SUCCESS)
netif_dbg(dev, rx_err, dev->net, netif_dbg(dev, rx_err, dev->net,
...@@ -1053,6 +1057,8 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, ...@@ -1053,6 +1057,8 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
unsigned long flags; unsigned long flags;
int retval; int retval;
skb_tx_timestamp(skb);
// some devices want funky USB-level framing, for // some devices want funky USB-level framing, for
// win32 driver (usually) and/or hardware quirks // win32 driver (usually) and/or hardware quirks
if (info->tx_fixup) { if (info->tx_fixup) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment