Skip to content

Commit

Permalink
mt76x2: remove unnecessary headroom check
Browse files Browse the repository at this point in the history
Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Feb 7, 2017
1 parent a5eaeb2 commit 03e44dc
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions mt76x2_tx.c
Expand Up @@ -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);

Expand Down

0 comments on commit 03e44dc

Please sign in to comment.