diff options
Diffstat (limited to 'drivers/net/usb/usbnet.c')
| -rw-r--r-- | drivers/net/usb/usbnet.c | 16 | 
1 files changed, 10 insertions, 6 deletions
| diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 17b6a62d206e..a95c73de5824 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c | |||
| @@ -43,6 +43,7 @@ | |||
| 43 | #include <linux/mii.h> | 43 | #include <linux/mii.h> | 
| 44 | #include <linux/usb.h> | 44 | #include <linux/usb.h> | 
| 45 | #include <linux/usb/usbnet.h> | 45 | #include <linux/usb/usbnet.h> | 
| 46 | #include <linux/slab.h> | ||
| 46 | 47 | ||
| 47 | #define DRIVER_VERSION "22-Aug-2005" | 48 | #define DRIVER_VERSION "22-Aug-2005" | 
| 48 | 49 | ||
| @@ -1068,12 +1069,15 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, | |||
| 1068 | * NOTE: strictly conforming cdc-ether devices should expect | 1069 | * NOTE: strictly conforming cdc-ether devices should expect | 
| 1069 | * the ZLP here, but ignore the one-byte packet. | 1070 | * the ZLP here, but ignore the one-byte packet. | 
| 1070 | */ | 1071 | */ | 
| 1071 | if (!(info->flags & FLAG_SEND_ZLP) && (length % dev->maxpacket) == 0) { | 1072 | if (length % dev->maxpacket == 0) { | 
| 1072 | urb->transfer_buffer_length++; | 1073 | if (!(info->flags & FLAG_SEND_ZLP)) { | 
| 1073 | if (skb_tailroom(skb)) { | 1074 | urb->transfer_buffer_length++; | 
| 1074 | skb->data[skb->len] = 0; | 1075 | if (skb_tailroom(skb)) { | 
| 1075 | __skb_put(skb, 1); | 1076 | skb->data[skb->len] = 0; | 
| 1076 | } | 1077 | __skb_put(skb, 1); | 
| 1078 | } | ||
| 1079 | } else | ||
| 1080 | urb->transfer_flags |= URB_ZERO_PACKET; | ||
| 1077 | } | 1081 | } | 
| 1078 | 1082 | ||
| 1079 | spin_lock_irqsave(&dev->txq.lock, flags); | 1083 | spin_lock_irqsave(&dev->txq.lock, flags); | 
