diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-14 03:42:17 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-14 03:42:17 +0300 |
commit | 05511ea5881a4fcc80d6123ce27e83f76e0412ca (patch) | |
tree | 13ead9c09625abd9af6945d4a153390f6d5267a6 /util.c | |
parent | 54cb9c330ca31f55f5aa3fa6cf00bf512c21834b (diff) |
mt76: remove skb_cow() to avoid unnecessary reallocations
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |