1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2014 Felix Fietkau <nbd@openwrt.org>
8 void mt76_remove_hdr_pad(struct sk_buff
*skb
)
10 int len
= ieee80211_get_hdrlen_from_skb(skb
);
12 memmove(skb
->data
+ 2, skb
->data
, len
);
16 int mt76_insert_hdr_pad(struct sk_buff
*skb
)
18 int len
= ieee80211_get_hdrlen_from_skb(skb
);
24 ret
= skb_cow(skb
, 2);
29 memmove(skb
->data
, skb
->data
+ 2, len
);
32 skb
->data
[len
+ 1] = 0;