From: Eric Dumazet Date: Mon, 28 May 2012 22:31:41 +0000 (+0000) Subject: asix: allow full size 8021Q frames to be received X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9dae31009b1a00d926c6fe032d5a88099620adc3;p=linux-beck.git asix: allow full size 8021Q frames to be received 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 CC: Greg Kroah-Hartman CC: Allan Chou CC: Trond Wuellner CC: Grant Grundler CC: Paul Stewart Signed-off-by: David S. Miller --- diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index 71e2b0523bc2..3ae80eccd0ef 100644 --- a/drivers/net/usb/asix.c +++ b/drivers/net/usb/asix.c @@ -35,6 +35,7 @@ #include #include #include +#include #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);