diff options
author | Eric Dumazet <edumazet@google.com> | 2012-05-28 22:31:41 +0000 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2012-06-10 14:42:10 +0100 |
commit | a466c7f9d6e61fb19c2d49f82007a0700724a1e3 (patch) | |
tree | 29c574c80788c0367577afd673a1b17219864ac6 | |
parent | 3798a7b34a19617eda5ce4b3025634b93b638de9 (diff) |
asix: allow full size 8021Q frames to be received
commit 9dae31009b1a00d926c6fe032d5a88099620adc3 upstream.
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.2: no offset used in asix_rx_fixup()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r-- | drivers/net/usb/asix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c index a9abee8851f..fc147a5ed89 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 "08-Nov-2011" #define DRIVER_NAME "asix" @@ -348,7 +349,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb) return 2; } - if (size > dev->net->mtu + ETH_HLEN) { + if (size > dev->net->mtu + ETH_HLEN + VLAN_HLEN) { netdev_err(dev->net, "asix_rx_fixup() Bad RX Length %d\n", size); return 0; |