diff options
author | françois romieu <romieu@fr.zoreil.com> | 2014-03-29 12:26:26 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-29 17:49:47 -0400 |
commit | ba4e6d19202a6aaa7207fde08310961df5197981 (patch) | |
tree | 503cedcf9b169d14e05498cf16c99da2d24c7422 /drivers | |
parent | d8e4435e1644308b8f024630bdf5ecd111bafe20 (diff) | |
download | linux-ba4e6d19202a6aaa7207fde08310961df5197981.tar.gz |
jme: remove open-coded skb_cow_head.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/jme.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/net/ethernet/jme.c b/drivers/net/ethernet/jme.c index 14ff8d64257d..b0c6050479eb 100644 --- a/drivers/net/ethernet/jme.c +++ b/drivers/net/ethernet/jme.c @@ -2054,19 +2054,6 @@ jme_map_tx_skb(struct jme_adapter *jme, struct sk_buff *skb, int idx) } static int -jme_expand_header(struct jme_adapter *jme, struct sk_buff *skb) -{ - if (unlikely(skb_shinfo(skb)->gso_size && - skb_header_cloned(skb) && - pskb_expand_head(skb, 0, 0, GFP_ATOMIC))) { - dev_kfree_skb_any(skb); - return -1; - } - - return 0; -} - -static int jme_tx_tso(struct sk_buff *skb, __le16 *mss, u8 *flags) { *mss = cpu_to_le16(skb_shinfo(skb)->gso_size << TXDESC_MSS_SHIFT); @@ -2225,7 +2212,8 @@ jme_start_xmit(struct sk_buff *skb, struct net_device *netdev) struct jme_adapter *jme = netdev_priv(netdev); int idx; - if (unlikely(jme_expand_header(jme, skb))) { + if (unlikely(skb_is_gso(skb) && skb_cow_head(skb, 0))) { + dev_kfree_skb_any(skb); ++(NET_STAT(jme).tx_dropped); return NETDEV_TX_OK; } |