From: Ian Coolidge <iancoolidge@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Felipe Balbi <balbi@ti.com>,
linux-usb@vger.kernel.org, netdev@vger.kernel.org
Cc: Ian Coolidge <iancoolidge@gmail.com>
Subject: [PATCH v2 2/2] net: usb: cdc_eem: Fix rx skb allocation for 802.1Q VLANs
Date: Wed, 7 Nov 2012 16:39:19 -0800 [thread overview]
Message-ID: <1352335159-8049-3-git-send-email-iancoolidge@gmail.com> (raw)
In-Reply-To: <1352335159-8049-1-git-send-email-iancoolidge@gmail.com>
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>
---
drivers/net/usb/cdc_eem.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c
index c81e278..08d55b6 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;
--
1.7.6.5
next prev parent reply other threads:[~2012-11-08 0:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-08 0:39 [PATCH v2 0/2] Fix CDC_EEM with 802.1Q VLAN and 1500 MTU Ian Coolidge
2012-11-08 0:39 ` Ian Coolidge [this message]
[not found] ` <1352335159-8049-1-git-send-email-iancoolidge-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-11-08 0:39 ` [PATCH v2 1/2] usb: gadget: g_ether: fix frame size check for 802.1Q Ian Coolidge
2012-11-08 2:27 ` [PATCH v2 0/2] Fix CDC_EEM with 802.1Q VLAN and 1500 MTU David Miller
2012-11-08 13:37 ` Felipe Balbi
[not found] ` <20121108133736.GA19533-S8G//mZuvNWo5Im9Ml3/Zg@public.gmane.org>
2012-11-08 19:58 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1352335159-8049-3-git-send-email-iancoolidge@gmail.com \
--to=iancoolidge@gmail.com \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.