summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIan Coolidge <iancoolidge@gmail.com>2012-11-07 14:39:19 +0000
committerDavid S. Miller <davem@davemloft.net>2012-11-07 21:12:26 -0500
commita66fe1653f4e81c007a68ca975067432a42df05b (patch)
tree236cf01306c151e26b6759414aef249961ff04a3 /drivers
parent4fe5f079b499d7ff34fd49f4005f09018c4e80aa (diff)
downloadlinux-3.10-a66fe1653f4e81c007a68ca975067432a42df05b.tar.gz
linux-3.10-a66fe1653f4e81c007a68ca975067432a42df05b.tar.bz2
linux-3.10-a66fe1653f4e81c007a68ca975067432a42df05b.zip
net: usb: cdc_eem: Fix rx skb allocation for 802.1Q VLANs
cdc_eem frames might need to contain 802.1Q VLAN Ethernet frames. URB/skb sizing from usbnet will default to the hard_mtu, so account for the VLAN header by expanding that via hard_header_len Signed-off-by: Ian Coolidge <iancoolidge@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/usb/cdc_eem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c
index c81e278629f..08d55b6bf27 100644
--- a/drivers/net/usb/cdc_eem.c
+++ b/drivers/net/usb/cdc_eem.c
@@ -31,6 +31,7 @@
#include <linux/usb/cdc.h>
#include <linux/usb/usbnet.h>
#include <linux/gfp.h>
+#include <linux/if_vlan.h>
/*
@@ -92,7 +93,7 @@ static int eem_bind(struct usbnet *dev, struct usb_interface *intf)
/* no jumbogram (16K) support for now */
- dev->net->hard_header_len += EEM_HEAD + ETH_FCS_LEN;
+ dev->net->hard_header_len += EEM_HEAD + ETH_FCS_LEN + VLAN_HLEN;
dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len;
return 0;