[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1338280301.4120.0.camel@edumazet-glaptop>
Date: Tue, 29 May 2012 10:31:41 +0200
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: netdev <netdev@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Trond Wuellner <trond@...omium.org>,
Grant Grundler <grundler@...omium.org>,
Paul Stewart <pstew@...omium.org>,
Allan Chou <allan@...x.com.tw>
Subject: [PATCH] asix: allow full size 8021Q frames to be received
From: Eric Dumazet <edumazet@...gle.com>
asix driver drops 8021Q full size frames because it doesn't take into
account VLAN header size.
Tested on AX88772 adapter.
Signed-off-by: Eric Dumazet <edumazet@...gle.com>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: Allan Chou <allan@...x.com.tw>
CC: Trond Wuellner <trond@...omium.org>
CC: Grant Grundler <grundler@...omium.org>
CC: Paul Stewart <pstew@...omium.org>
---
drivers/net/usb/asix.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index 71e2b05..3ae80ec 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -35,6 +35,7 @@
#include <linux/crc32.h>
#include <linux/usb/usbnet.h>
#include <linux/slab.h>
+#include <linux/if_vlan.h>
#define DRIVER_VERSION "22-Dec-2011"
#define DRIVER_NAME "asix"
@@ -321,7 +322,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
return 0;
}
- if ((size > dev->net->mtu + ETH_HLEN) ||
+ if ((size > dev->net->mtu + ETH_HLEN + VLAN_HLEN) ||
(size + offset > skb->len)) {
netdev_err(dev->net, "asix_rx_fixup() Bad RX Length %d\n",
size);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists