mt76: remove skb_cow() to avoid unnecessary reallocations

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2016-01-14 01:42:17 +01:00
parent 54cb9c330c
commit 05511ea588
+2 -2
View File
@@ -30,8 +30,8 @@ int mt76_insert_hdr_pad(struct sk_buff *skb)
if (len % 4 == 0)
return 0;
ret = skb_cow(skb, 2);
if (ret)
if (skb_headroom(skb) < 2 &&
(ret = pskb_expand_head(skb, 2, 0, GFP_ATOMIC)) != 0)
return ret;
skb_push(skb, 2);