diff options
author | Michael Riesch <michael@riesch.at> | 2011-09-29 00:06:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-09-29 14:46:49 -0400 |
commit | f9b491ecc47ead6a57576a1a40cb27fd79835cc2 (patch) | |
tree | 277f0de83c3e3ccc1acdd83a18a189ecbfd5905a /drivers/net/usb/usbnet.c | |
parent | 7f5c6addcdc039c1a7c435857e6284ecac5d97c8 (diff) |
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: Michael Riesch <michael@riesch.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/usbnet.c')
-rw-r--r-- | drivers/net/usb/usbnet.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index ce395fe5de26..cdb958875ba4 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
@@ -238,6 +238,10 @@ void usbnet_skb_return (struct usbnet *dev, struct sk_buff *skb) | |||
238 | netif_dbg(dev, rx_status, dev->net, "< rx, len %zu, type 0x%x\n", | 238 | netif_dbg(dev, rx_status, dev->net, "< rx, len %zu, type 0x%x\n", |
239 | skb->len + sizeof (struct ethhdr), skb->protocol); | 239 | skb->len + sizeof (struct ethhdr), skb->protocol); |
240 | memset (skb->cb, 0, sizeof (struct skb_data)); | 240 | memset (skb->cb, 0, sizeof (struct skb_data)); |
241 | |||
242 | if (skb_defer_rx_timestamp(skb)) | ||
243 | return; | ||
244 | |||
241 | status = netif_rx (skb); | 245 | status = netif_rx (skb); |
242 | if (status != NET_RX_SUCCESS) | 246 | if (status != NET_RX_SUCCESS) |
243 | netif_dbg(dev, rx_err, dev->net, | 247 | netif_dbg(dev, rx_err, dev->net, |
@@ -1053,6 +1057,8 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, | |||
1053 | unsigned long flags; | 1057 | unsigned long flags; |
1054 | int retval; | 1058 | int retval; |
1055 | 1059 | ||
1060 | skb_tx_timestamp(skb); | ||
1061 | |||
1056 | // some devices want funky USB-level framing, for | 1062 | // some devices want funky USB-level framing, for |
1057 | // win32 driver (usually) and/or hardware quirks | 1063 | // win32 driver (usually) and/or hardware quirks |
1058 | if (info->tx_fixup) { | 1064 | if (info->tx_fixup) { |