aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/usbnet.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb/usbnet.h')
-rw-r--r--include/linux/usb/usbnet.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h
index d9a4905e01d0..6e0ce8c7b8cb 100644
--- a/include/linux/usb/usbnet.h
+++ b/include/linux/usb/usbnet.h
@@ -227,9 +227,23 @@ struct skb_data { /* skb->cb is one of these */
227 struct urb *urb; 227 struct urb *urb;
228 struct usbnet *dev; 228 struct usbnet *dev;
229 enum skb_state state; 229 enum skb_state state;
230 size_t length; 230 long length;
231 unsigned long packets;
231}; 232};
232 233
234/* Drivers that set FLAG_MULTI_PACKET must call this in their
235 * tx_fixup method before returning an skb.
236 */
237static inline void
238usbnet_set_skb_tx_stats(struct sk_buff *skb,
239 unsigned long packets, long bytes_delta)
240{
241 struct skb_data *entry = (struct skb_data *) skb->cb;
242
243 entry->packets = packets;
244 entry->length = bytes_delta;
245}
246
233extern int usbnet_open(struct net_device *net); 247extern int usbnet_open(struct net_device *net);
234extern int usbnet_stop(struct net_device *net); 248extern int usbnet_stop(struct net_device *net);
235extern netdev_tx_t usbnet_start_xmit(struct sk_buff *skb, 249extern netdev_tx_t usbnet_start_xmit(struct sk_buff *skb,