linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] p54: fix beacon template dtim IE corruption
@ 2009-07-04 16:24 Christian Lamparter
  2009-07-07 16:04 ` John W. Linville
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Lamparter @ 2009-07-04 16:24 UTC (permalink / raw)
  To: linux-wireless; +Cc: John W. Linville

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;
 }
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-07 17:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-04 16:24 [PATCH] p54: fix beacon template dtim IE corruption Christian Lamparter
2009-07-07 16:04 ` John W. Linville
2009-07-07 18:33   ` Christian Lamparter
2009-07-07 17:05     ` John W. Linville

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).