2 * Copyright (C) 2014 Felix Fietkau <nbd@openwrt.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2
6 * as published by the Free Software Foundation
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
16 void mt76_remove_hdr_pad(struct sk_buff *skb)
18 int len = ieee80211_get_hdrlen_from_skb(skb);
20 memmove(skb->data + 2, skb->data, len);
24 int mt76_insert_hdr_pad(struct sk_buff *skb)
26 int len = ieee80211_get_hdrlen_from_skb(skb);
32 ret = skb_cow(skb, 2);
37 memmove(skb->data, skb->data + 2, len);
40 skb->data[len + 1] = 0;