diff options
author | Ondrej Zary <linux@rainbow-software.org> | 2010-09-11 07:40:16 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-14 05:02:53 +0200 |
commit | 441993da47777d961300c070fe1210600af48ad8 (patch) | |
tree | ac2722e8764426c9275f239db6f5492ce8705620 /drivers/net/usb | |
parent | cx82310_eth: check usb_string() return value for error (diff) | |
download | linux-441993da47777d961300c070fe1210600af48ad8.tar.xz linux-441993da47777d961300c070fe1210600af48ad8.zip |
cx82310_eth: allow empty URBs
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 <linux@rainbow-software.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/cx82310_eth.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/usb/cx82310_eth.c b/drivers/net/usb/cx82310_eth.c index 4d451789ea7c..8969f124c18c 100644 --- a/drivers/net/usb/cx82310_eth.c +++ b/drivers/net/usb/cx82310_eth.c @@ -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; @@ -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 */ |