提交 5b28beaf 编写于 作者: L Li Yang 提交者: David S. Miller

gianfar: only check headroom when FCB is needed

Signed-off-by: NLi Yang <leoli@freescale.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 8ebaebca
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册