Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6.git] / drivers / net / usb / usbnet.c
index 7177abc..a95c73d 100644 (file)
@@ -1069,12 +1069,15 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb,
         * NOTE:  strictly conforming cdc-ether devices should expect
         * the ZLP here, but ignore the one-byte packet.
         */
-       if (!(info->flags & FLAG_SEND_ZLP) && (length % dev->maxpacket) == 0) {
-               urb->transfer_buffer_length++;
-               if (skb_tailroom(skb)) {
-                       skb->data[skb->len] = 0;
-                       __skb_put(skb, 1);
-               }
+       if (length % dev->maxpacket == 0) {
+               if (!(info->flags & FLAG_SEND_ZLP)) {
+                       urb->transfer_buffer_length++;
+                       if (skb_tailroom(skb)) {
+                               skb->data[skb->len] = 0;
+                               __skb_put(skb, 1);
+                       }
+               } else
+                       urb->transfer_flags |= URB_ZERO_PACKET;
        }
 
        spin_lock_irqsave(&dev->txq.lock, flags);