summaryrefslogtreecommitdiff
path: root/drivers/net/gianfar.c
diff options
context:
space:
mode:
authorLi Yang <leoli@freescale.com>2009-03-27 15:54:30 -0700
committerDavid S. Miller <davem@davemloft.net>2009-03-27 15:54:30 -0700
commit5b28beaf88436fa44fc25ee27a2fadffb75f222e (patch)
treef8e6b7da27f9a90ac22e0359696572cdb6020ebc /drivers/net/gianfar.c
parent8ebaebca7e9d371d79088190990f95e95e225b6d (diff)
gianfar: only check headroom when FCB is needed
Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r--drivers/net/gianfar.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 44cbf2622b46..6a38800be3f1 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -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);