Skip to content

Commit

Permalink
cx82310_eth: allow empty URBs
Browse files Browse the repository at this point in the history
Empty received URBs are currently counted as errors but the device sends them
sometimes as part of regular traffic - so remove this check.

Signed-off-by: Ondrej Zary <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Ondrej Zary authored and davem330 committed Sep 14, 2010
1 parent 7dbfdc2 commit 441993d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions drivers/net/usb/cx82310_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,11 @@ static int cx82310_bind(struct usbnet *dev, struct usb_interface *intf)

/*
* this must not include ethernet header as the device can send partial
* packets with no header (URB is at least 2 bytes long, so 2 is OK)
* packets with no header (and sometimes even empty URBs)
*/
dev->net->hard_header_len = 2;
dev->net->hard_header_len = 0;
/* we can send at most 1514 bytes of data (+ 2-byte header) per URB */
dev->hard_mtu = CX82310_MTU + dev->net->hard_header_len;
dev->hard_mtu = CX82310_MTU + 2;
/* we can receive URBs up to 4KB from the device */
dev->rx_urb_size = 4096;

Expand Down Expand Up @@ -228,12 +228,6 @@ static int cx82310_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
return 1;
}

if (skb->len < 2) {
dev_err(&dev->udev->dev, "RX frame too short: %d B\n",
skb->len);
return 0;
}

/* a skb can contain multiple packets */
while (skb->len > 1) {
/* first two bytes are packet length */
Expand Down

0 comments on commit 441993d

Please sign in to comment.