diff options
| author | Patrick McHardy <kaber@trash.net> | 2010-04-20 10:02:01 -0400 |
|---|---|---|
| committer | Patrick McHardy <kaber@trash.net> | 2010-04-20 10:02:01 -0400 |
| commit | 62910554656cdcd6b6f84a5154c4155aae4ca231 (patch) | |
| tree | dcf14004f6fd2ef7154362ff948bfeba0f3ea92d /drivers/net/usb/usbnet.c | |
| parent | 22265a5c3c103cf8c50be62e6c90d045eb649e6d (diff) | |
| parent | ab9304717f7624c41927f442e6b6d418b2d8b3e4 (diff) | |
Merge branch 'master' of /repos/git/net-next-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
net/ipv6/netfilter/ip6t_REJECT.c
net/netfilter/xt_limit.c
Signed-off-by: Patrick McHardy <kaber@trash.net>
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); |
