From: Peter Korsgaard <jacmet@sunsite.dk>
To: netdev@vger.kernel.org, jeff@garzik.org
Subject: [PATCH] dm9601: HW header size shouldn't be included in packet length
Date: Wed, 27 Jun 2007 08:14:50 +0200 [thread overview]
Message-ID: <873b0dgbz9.fsf@p4.be.48ers.dk> (raw)
The dm9601 driver was including the 2 byte hardware header in the
packet length, causing the HW to send 2 extra bytes of garbage on tx.
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
drivers/net/usb/dm9601.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: linux-2.6.22-rc6/drivers/net/usb/dm9601.c
===================================================================
--- linux-2.6.22-rc6.orig/drivers/net/usb/dm9601.c
+++ linux-2.6.22-rc6/drivers/net/usb/dm9601.c
@@ -489,6 +489,8 @@
b3..n: packet data
*/
+ len = skb->len;
+
if (skb_headroom(skb) < DM_TX_OVERHEAD) {
struct sk_buff *skb2;
@@ -501,10 +503,9 @@
__skb_push(skb, DM_TX_OVERHEAD);
- len = skb->len;
/* usbnet adds padding if length is a multiple of packet size
if so, adjust length value in header */
- if ((len % dev->maxpacket) == 0)
+ if ((skb->len % dev->maxpacket) == 0)
len++;
skb->data[0] = len;
--
Bye, Peter Korsgaard
next reply other threads:[~2007-06-27 6:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-27 6:14 Peter Korsgaard [this message]
2007-07-02 12:25 ` [PATCH] dm9601: HW header size shouldn't be included in packet length Jeff Garzik
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=873b0dgbz9.fsf@p4.be.48ers.dk \
--to=jacmet@sunsite.dk \
--cc=jeff@garzik.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).