From 5220da39b4f6bd2ee69d298111ebebc0de886f2f Mon Sep 17 00:00:00 2001 From: Eliad Peller Date: Thu, 24 Nov 2011 16:50:00 +0200 Subject: [PATCH] mac80211: call skb_put() before copying the data (trivial) It doesn't have any actual effect here, but we should skb_put() *before* copying the data. Signed-off-by: Eliad Peller Signed-off-by: John W. Linville --- net/mac80211/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 6fad8fac3784..5a75fc020807 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -2265,10 +2265,10 @@ static void ieee80211_beacon_add_tim(struct ieee80211_if_ap *bss, /* Bitmap control */ *pos++ = n1 | aid0; /* Part Virt Bitmap */ + skb_put(skb, n2 - n1); memcpy(pos, bss->tim + n1, n2 - n1 + 1); tim[1] = n2 - n1 + 4; - skb_put(skb, n2 - n1); } else { *pos++ = aid0; /* Bitmap control */ *pos++ = 0; /* Part Virt Bitmap */ -- 2.20.1