From: Gertjan van Wingerde <gwingerde@gmail.com>
To: users@rt2x00.serialmonkey.com, linux-wireless@vger.kernel.org
Cc: Ivo van Doorn <ivdoorn@gmail.com>,
Benoit Papillault <benoit.papillault@free.fr>,
Gertjan van Wingerde <gwingerde@gmail.com>
Subject: [PATCH] rt2x00: Fix trimming of L2 padded frames.
Date: Fri, 4 Dec 2009 22:36:17 +0100 [thread overview]
Message-ID: <1259962577-25135-1-git-send-email-gwingerde@gmail.com> (raw)
Ensure that frames without payload are properly trimmed in
rt2x00queue_insert_l2pad.
This should fix the bug reported by Benoit Papillault in:
http://marc.info/?l=linux-wireless&m=125974773006734&w=2
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
---
drivers/net/wireless/rt2x00/rt2x00queue.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 7452fa8..3d8fb68 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -180,7 +180,7 @@ void rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length)
unsigned int payload_length = skb->len - header_length;
unsigned int header_align = ALIGN_SIZE(skb, 0);
unsigned int payload_align = ALIGN_SIZE(skb, header_length);
- unsigned int l2pad = L2PAD_SIZE(header_length);
+ unsigned int l2pad = payload_length ? L2PAD_SIZE(header_length) : 0;
/*
* Adjust the header alignment if the payload needs to be moved more
--
1.6.5.3
next reply other threads:[~2009-12-04 21:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-04 21:36 Gertjan van Wingerde [this message]
2009-12-05 8:32 ` [PATCH] rt2x00: Fix trimming of L2 padded frames Ivo van Doorn
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=1259962577-25135-1-git-send-email-gwingerde@gmail.com \
--to=gwingerde@gmail.com \
--cc=benoit.papillault@free.fr \
--cc=ivdoorn@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=users@rt2x00.serialmonkey.com \
/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).