1 --- a/drivers/net/usb/usbnet.c
2 +++ b/drivers/net/usb/usbnet.c
3 @@ -1310,6 +1310,7 @@ EXPORT_SYMBOL_GPL(usbnet_tx_timeout);
5 /*-------------------------------------------------------------------------*/
7 +#if LINUX_VERSION_IS_GEQ(3,35,0)
8 static int build_dma_sg(const struct sk_buff *skb, struct urb *urb)
10 unsigned num_sgs, total_len = 0;
11 @@ -1342,6 +1343,12 @@ static int build_dma_sg(const struct sk_
16 +static int build_dma_sg(const struct sk_buff *skb, struct urb *urb)
22 netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
23 struct net_device *net)
24 @@ -1398,12 +1405,19 @@ netdev_tx_t usbnet_start_xmit (struct sk
25 if (!(info->flags & FLAG_SEND_ZLP)) {
26 if (!(info->flags & FLAG_MULTI_PACKET)) {
28 +#if LINUX_VERSION_IS_GEQ(3,35,0)
29 if (skb_tailroom(skb) && !urb->num_sgs) {
30 skb->data[skb->len] = 0;
32 } else if (urb->num_sgs)
33 sg_set_buf(&urb->sg[urb->num_sgs++],
36 + if (skb_tailroom(skb)) {
37 + skb->data[skb->len] = 0;
43 urb->transfer_flags |= URB_ZERO_PACKET;
44 @@ -1470,7 +1484,9 @@ not_drop:
46 dev_kfree_skb_any (skb);
48 +#if LINUX_VERSION_IS_GEQ(3,35,0)
54 @@ -1523,7 +1539,9 @@ static void usbnet_bh (unsigned long par
55 rx_process (dev, skb);
58 +#if LINUX_VERSION_IS_GEQ(3,35,0)
59 kfree(entry->urb->sg);
62 usb_free_urb (entry->urb);
64 @@ -1892,7 +1910,9 @@ int usbnet_resume (struct usb_interface
65 retval = usb_submit_urb(res, GFP_ATOMIC);
67 dev_kfree_skb_any(skb);
68 +#if LINUX_VERSION_IS_GEQ(3,35,0)
72 usb_autopm_put_interface_async(dev->intf);