public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] asix: allow full size 8021Q frames to be received
@ 2012-05-29  8:31 Eric Dumazet
  2012-05-29 21:22 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2012-05-29  8:31 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, Greg Kroah-Hartman, Trond Wuellner, Grant Grundler,
	Paul Stewart, Allan Chou

From: Eric Dumazet <edumazet@google.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@google.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Allan Chou <allan@asix.com.tw>
CC: Trond Wuellner <trond@chromium.org>
CC: Grant Grundler <grundler@chromium.org>
CC: Paul Stewart <pstew@chromium.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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] asix: allow full size 8021Q frames to be received
  2012-05-29  8:31 [PATCH] asix: allow full size 8021Q frames to be received Eric Dumazet
@ 2012-05-29 21:22 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-05-29 21:22 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, gregkh, trond, grundler, pstew, allan

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 29 May 2012 10:31:41 +0200

> From: Eric Dumazet <edumazet@google.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@google.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-29 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-29  8:31 [PATCH] asix: allow full size 8021Q frames to be received Eric Dumazet
2012-05-29 21:22 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox