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@xxxxxx> --- 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; } -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html