提交 9dae3100 编写于 作者: E Eric Dumazet 提交者: David S. Miller

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: NEric 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: NDavid S. Miller <davem@davemloft.net>
上级 a0c6ffbc
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include <linux/crc32.h> #include <linux/crc32.h>
#include <linux/usb/usbnet.h> #include <linux/usb/usbnet.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/if_vlan.h>
#define DRIVER_VERSION "22-Dec-2011" #define DRIVER_VERSION "22-Dec-2011"
#define DRIVER_NAME "asix" #define DRIVER_NAME "asix"
...@@ -321,7 +322,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb) ...@@ -321,7 +322,7 @@ static int asix_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
return 0; return 0;
} }
if ((size > dev->net->mtu + ETH_HLEN) || if ((size > dev->net->mtu + ETH_HLEN + VLAN_HLEN) ||
(size + offset > skb->len)) { (size + offset > skb->len)) {
netdev_err(dev->net, "asix_rx_fixup() Bad RX Length %d\n", netdev_err(dev->net, "asix_rx_fixup() Bad RX Length %d\n",
size); size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册