diff options
-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 4d451789ea7..8969f124c18 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) | |||
150 | 150 | ||
151 | /* | 151 | /* |
152 | * this must not include ethernet header as the device can send partial | 152 | * this must not include ethernet header as the device can send partial |
153 | * packets with no header (URB is at least 2 bytes long, so 2 is OK) | 153 | * packets with no header (and sometimes even empty URBs) |
154 | */ | 154 | */ |
155 | dev->net->hard_header_len = 2; | 155 | dev->net->hard_header_len = 0; |
156 | /* we can send at most 1514 bytes of data (+ 2-byte header) per URB */ | 156 | /* we can send at most 1514 bytes of data (+ 2-byte header) per URB */ |
157 | dev->hard_mtu = CX82310_MTU + dev->net->hard_header_len; | 157 | dev->hard_mtu = CX82310_MTU + 2; |
158 | /* we can receive URBs up to 4KB from the device */ | 158 | /* we can receive URBs up to 4KB from the device */ |
159 | dev->rx_urb_size = 4096; | 159 | dev->rx_urb_size = 4096; |
160 | 160 | ||
@@ -228,12 +228,6 @@ static int cx82310_rx_fixup(struct usbnet *dev, struct sk_buff *skb) | |||
228 | return 1; | 228 | return 1; |
229 | } | 229 | } |
230 | 230 | ||
231 | if (skb->len < 2) { | ||
232 | dev_err(&dev->udev->dev, "RX frame too short: %d B\n", | ||
233 | skb->len); | ||
234 | return 0; | ||
235 | } | ||
236 | |||
237 | /* a skb can contain multiple packets */ | 231 | /* a skb can contain multiple packets */ |
238 | while (skb->len > 1) { | 232 | while (skb->len > 1) { |
239 | /* first two bytes are packet length */ | 233 | /* first two bytes are packet length */ |