Skip to content

Commit

Permalink
gianfar: only check headroom when FCB is needed
Browse files Browse the repository at this point in the history
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Li Yang authored and David S. Miller committed Mar 27, 2009
1 parent 8ebaebc commit 5b28bea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -1310,8 +1310,10 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)

base = priv->tx_bd_base;

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

skb_new = skb_realloc_headroom(skb, GMAC_FCB_LEN);
Expand Down

0 comments on commit 5b28bea

Please sign in to comment.