Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28f7936c authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller
Browse files

niu: Use eth_skb_pad helper



Replace the standard layout for padding an ethernet frame with the
eth_skb_pad call.

Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 74b6939d
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -6651,13 +6651,8 @@ static netdev_tx_t niu_start_xmit(struct sk_buff *skb,
		return NETDEV_TX_BUSY;
	}

	if (skb->len < ETH_ZLEN) {
		unsigned int pad_bytes = ETH_ZLEN - skb->len;

		if (skb_pad(skb, pad_bytes))
	if (eth_skb_pad(skb))
		goto out;
		skb_put(skb, pad_bytes);
	}

	len = sizeof(struct tx_pkt_hdr) + 15;
	if (skb_headroom(skb) < len) {