move mt76_insert_hdr_pad to mt76x2_tx.c

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2016-09-04 18:06:48 +02:00
parent 01c63035b6
commit 05e961782d
3 changed files with 21 additions and 23 deletions
-21
View File
@@ -17,27 +17,6 @@
#include <linux/module.h>
#include "mt76.h"
int mt76_insert_hdr_pad(struct sk_buff *skb)
{
int len = ieee80211_get_hdrlen_from_skb(skb);
int ret;
if (len % 4 == 0)
return 0;
if (skb_headroom(skb) < 2 &&
(ret = pskb_expand_head(skb, 2, 0, GFP_ATOMIC)) != 0)
return ret;
skb_push(skb, 2);
memmove(skb->data, skb->data + 2, len);
skb->data[len] = 0;
skb->data[len + 1] = 0;
return 2;
}
EXPORT_SYMBOL_GPL(mt76_insert_hdr_pad);
bool __mt76_poll(struct mt76_dev *dev, u32 offset, u32 mask, u32 val,
int timeout)
{