mt76x2: remove unnecessary headroom check

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2017-02-07 21:13:16 +01:00
parent a5eaeb27d6
commit 03e44dcdb2
-7
View File
@@ -129,17 +129,10 @@ void mt76x2_tx_set_txpwr_auto(struct mt76x2_dev *dev, s8 txpwr)
static int mt76x2_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);
if (ret != 0)
return ret;
}
skb_push(skb, 2);
memmove(skb->data, skb->data + 2, len);