summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut@gmail.com>2014-01-22 23:50:47 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-01-23 08:10:06 +0100
commitf5fa816cff580047d1e52d26c77aa38ccabf17a3 (patch)
treedf87dc94b81d9914048f47ea956786714faa831f /drivers
parentc827eb8ff343f6d9d5a70a5c82bcf0263f405f64 (diff)
downloadbarebox-f5fa816cff580047d1e52d26c77aa38ccabf17a3.tar.gz
barebox-f5fa816cff580047d1e52d26c77aa38ccabf17a3.tar.xz
net usb asix: Use only 11 bits of header for data size
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: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.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 8b73bf975d..003ebbaae5 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -408,11 +408,11 @@ static int asix_rx_fixup(struct usbnet *dev, void *buf, int len)
len -= 4;
while (len > 0) {
- if ((header & 0xffff) != ((~header >> 16) & 0xffff))
+ if ((header & 0x07ff) != ((~header >> 16) & 0x07ff))
dev_err(&dev->edev.dev, "asix_rx_fixup() Bad Header Length\n");
/* get the packet length */
- size = (unsigned short) (header & 0x0000ffff);
+ size = (unsigned short) (header & 0x07ff);
if (size > 1514) {
dev_err(&dev->edev.dev, "asix_rx_fixup() Bad RX Length %d\n", size);