From: Christian Lamparter <chunkeey@web.de>
To: "linux-wireless" <linux-wireless@vger.kernel.org>
Cc: "John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH] p54: fix beacon template dtim IE corruption
Date: Sat, 4 Jul 2009 18:24:07 +0200 [thread overview]
Message-ID: <200907041824.07655.chunkeey@web.de> (raw)
This patch fixes a regression that sneaked in with
"[PATCH] p54: re-enable power save feature".
When p54_beacon_format_ie_tim was divided up
and rewritten to use skb_* macros.
Signed-off-by: Christian Lamparter <chunkeey@web.de>
---
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c
index 42abf34..c9a0545 100644
--- a/drivers/net/wireless/p54/main.c
+++ b/drivers/net/wireless/p54/main.c
@@ -111,10 +111,6 @@ static int p54_beacon_format_ie_tim(struct sk_buff *skb)
return -EINVAL;
memmove(tim, next, skb_tail_pointer(skb) - next);
-
- if (dtim_len > 3)
- skb_trim(skb, skb->len - (dtim_len - 3));
-
tim = skb_tail_pointer(skb) - (dtim_len + 2);
/* add the dummy at the end */
@@ -123,6 +119,10 @@ static int p54_beacon_format_ie_tim(struct sk_buff *skb)
tim[2] = 0;
tim[3] = dtim_period;
tim[4] = 0;
+
+ if (dtim_len > 3)
+ skb_trim(skb, skb->len - (dtim_len - 3));
+
return 0;
}
next reply other threads:[~2009-07-04 16:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-04 16:24 Christian Lamparter [this message]
2009-07-07 16:04 ` [PATCH] p54: fix beacon template dtim IE corruption John W. Linville
2009-07-07 18:33 ` Christian Lamparter
2009-07-07 17:05 ` John W. Linville
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=200907041824.07655.chunkeey@web.de \
--to=chunkeey@web.de \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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).