2009-07-04 16:24:06

by Christian Lamparter

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Christian Lamparter <[email protected]>
---
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;
}



2009-07-07 17:15:52

by John W. Linville

[permalink] [raw]
Subject: Re: [PATCH] p54: fix beacon template dtim IE corruption

On Tue, Jul 07, 2009 at 08:33:10PM +0200, Christian Lamparter wrote:
> On Tuesday 07 July 2009 18:04:32 John W. Linville wrote:
> > On Sat, Jul 04, 2009 at 06:24:07PM +0200, Christian Lamparter wrote:
> > > 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?

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

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

:-)

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

2009-07-07 16:33:20

by Christian Lamparter

[permalink] [raw]
Subject: Re: [PATCH] p54: fix beacon template dtim IE corruption

On Tuesday 07 July 2009 18:04:32 John W. Linville wrote:
> On Sat, Jul 04, 2009 at 06:24:07PM +0200, Christian Lamparter wrote:
> > 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

2009-07-07 16:15:51

by John W. Linville

[permalink] [raw]
Subject: Re: [PATCH] p54: fix beacon template dtim IE corruption

On Sat, Jul 04, 2009 at 06:24:07PM +0200, Christian Lamparter wrote:
> 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
--
John W. Linville Someday the world will need a hero, and you
[email protected] might be all we have. Be ready.
?Viva Honduras Libre!