diff options
-rw-r--r-- | drivers/net/usb/usbnet.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 5b16d9a1269..a12f576391c 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -953,11 +953,14 @@ static int usbnet_start_xmit (struct sk_buff *skb, struct net_device *net) /* don't assume the hardware handles USB_ZERO_PACKET * NOTE: strictly conforming cdc-ether devices should expect * the ZLP here, but ignore the one-byte packet. - * - * FIXME zero that byte, if it doesn't require a new skb. */ - if ((length % dev->maxpacket) == 0) + if ((length % dev->maxpacket) == 0) { urb->transfer_buffer_length++; + if (skb_tailroom(skb)) { + skb->data[skb->len] = 0; + __skb_put(skb, 1); + } + } spin_lock_irqsave (&dev->txq.lock, flags); |