aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/asix.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/usb/asix.c')
-rw-r--r--drivers/net/usb/asix.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 52502883523e..c5c4b4def7fb 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -314,12 +314,11 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
314 skb_pull(skb, 4); 314 skb_pull(skb, 4);
315 315
316 while (skb->len > 0) { 316 while (skb->len > 0) {
317 if ((short)(header & 0x0000ffff) != 317 if ((header & 0x07ff) != ((~header >> 16) & 0x07ff))
318 ~((short)((header & 0xffff0000) >> 16))) {
319 netdev_err(dev->net, "asix_rx_fixup() Bad Header Length\n"); 318 netdev_err(dev->net, "asix_rx_fixup() Bad Header Length\n");
320 } 319
321 /* get the packet length */ 320 /* get the packet length */
322 size = (u16) (header & 0x0000ffff); 321 size = (u16) (header & 0x000007ff);
323 322
324 if ((skb->len) - ((size + 1) & 0xfffe) == 0) { 323 if ((skb->len) - ((size + 1) & 0xfffe) == 0) {
325 u8 alignment = (unsigned long)skb->data & 0x3; 324 u8 alignment = (unsigned long)skb->data & 0x3;