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

Commit 5b28beaf authored by Li Yang's avatar Li Yang Committed by David S. Miller
Browse files

gianfar: only check headroom when FCB is needed

parent 8ebaebca
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -1310,8 +1310,10 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)


	base = priv->tx_bd_base;
	base = priv->tx_bd_base;


	/* make space for additional header */
	/* make space for additional header when fcb is needed */
	if (skb_headroom(skb) < GMAC_FCB_LEN) {
	if (((skb->ip_summed == CHECKSUM_PARTIAL) ||
			(priv->vlgrp && vlan_tx_tag_present(skb))) &&
			(skb_headroom(skb) < GMAC_FCB_LEN)) {
		struct sk_buff *skb_new;
		struct sk_buff *skb_new;


		skb_new = skb_realloc_headroom(skb, GMAC_FCB_LEN);
		skb_new = skb_realloc_headroom(skb, GMAC_FCB_LEN);