diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2011-07-26 16:44:46 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-11 09:36:38 -0800 |
commit | 611778cd2a87a9b7376994caf4faa0caac9d1037 (patch) | |
tree | 73170641b3b6fbbaae323ddd0664b0e79630e258 /drivers/net/usb/asix.c | |
parent | 1a0a3b4ea5782d6f1ca10f3254b56d7be24ec4d0 (diff) | |
download | kernel_samsung_smdk4412-611778cd2a87a9b7376994caf4faa0caac9d1037.tar.gz kernel_samsung_smdk4412-611778cd2a87a9b7376994caf4faa0caac9d1037.tar.bz2 kernel_samsung_smdk4412-611778cd2a87a9b7376994caf4faa0caac9d1037.zip |
ASIX: Simplify condition in rx_fixup()
commit bc466e678d0a98f445bf3f9c76fedf18e7dcc6b0 upstream.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net/usb/asix.c')
-rw-r--r-- | drivers/net/usb/asix.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index 52502883523..d5b62a46340 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c @@ -314,10 +314,9 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb) skb_pull(skb, 4); while (skb->len > 0) { - if ((short)(header & 0x0000ffff) != - ~((short)((header & 0xffff0000) >> 16))) { + if ((header & 0xffff) != ((~header >> 16) & 0xffff)) netdev_err(dev->net, "asix_rx_fixup() Bad Header Length\n"); - } + /* get the packet length */ size = (u16) (header & 0x0000ffff); |