aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2011-07-26 16:44:47 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-11 09:36:38 -0800
commitf7f00215ba28400e0f61c55e14e3d619888231ae (patch)
tree5e3888165e56091c542623f32c05ab9fec894e1c /drivers
parent611778cd2a87a9b7376994caf4faa0caac9d1037 (diff)
downloadkernel_samsung_smdk4412-f7f00215ba28400e0f61c55e14e3d619888231ae.zip
kernel_samsung_smdk4412-f7f00215ba28400e0f61c55e14e3d619888231ae.tar.gz
kernel_samsung_smdk4412-f7f00215ba28400e0f61c55e14e3d619888231ae.tar.bz2
ASIX: Use only 11 bits of header for data size
commit bca0beb9363f8487ac902931a50eb00180a2d14a upstream. The AX88772B uses only 11 bits of the header for the actual size. The other bits are used for something else. This causes dmesg full of messages: asix_rx_fixup() Bad Header Length This patch trims the check to only 11 bits. I believe on older chips, the remaining 5 top bits are unused. 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')
-rw-r--r--drivers/net/usb/asix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index d5b62a4..c5c4b4d 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -314,11 +314,11 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
skb_pull(skb, 4);
while (skb->len > 0) {
- if ((header & 0xffff) != ((~header >> 16) & 0xffff))
+ if ((header & 0x07ff) != ((~header >> 16) & 0x07ff))
netdev_err(dev->net, "asix_rx_fixup() Bad Header Length\n");
/* get the packet length */
- size = (u16) (header & 0x0000ffff);
+ size = (u16) (header & 0x000007ff);
if ((skb->len) - ((size + 1) & 0xfffe) == 0) {
u8 alignment = (unsigned long)skb->data & 0x3;