Skip to contentSkip to conversation

p54: fix beacon template dtim IE corruption

PATCH In review Christian Lamparter 2 participants 4 messages Jul 4, 2009 – Jul 7, 2009 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 p54: fix beacon template dtim IE corruption

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.

---

drivers/net/wireless/p54/main.c +4 -4
index 42abf34..c9a0545 100644
@@ -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;
 }
 
#1 lore raw
Quoted 4 lines · Christian Lamparter

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.

I don't seem to have any record of that patch, and this one doesn't apply after the reorganization series from Larry (which is strange, since this file didn't seem to exist before that series)...

John

Signature · 3 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
			¡Viva Honduras Libre!
#2 lore raw
Quoted 7 lines · On Tuesday 07 July 2009 18:04:32 John W. Linville wrote:
Quoted 4 lines · Christian Lamparter

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.

I don't seem to have any record of that patch,

hmm, it's right here...
http://www.spinics.net/lists/linux-wireless/msg35201.html

maybe it was lost during the holiday, should I prepare a resend?

Regards,
Chr

#3 lore raw
Quoted 7 lines · Christian Lamparter
Quoted 6 lines · On Tuesday 07 July 2009 18:04:32 John W. Linville wrote:
Quoted 4 lines · Christian Lamparter

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.

Quoted 5 lines
Quoted 1 line

I don't seem to have any record of that patch,

hmm, it's right here...
http://www.spinics.net/lists/linux-wireless/msg35201.html

maybe it was lost during the holiday, should I prepare a resend?

Probably...perhaps I deleted it after reading this?

	http://www.spinics.net/lists/linux-wireless/msg35222.html

:-)

John

Signature · 3 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
			¡Viva Honduras Libre!