mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76x2: remove unnecessary headroom check
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user