From: Heiner Kallweit Date: Fri, 31 May 2019 17:17:15 +0000 (+0200) Subject: r8169: improve r8169_csum_workaround X-Git-Tag: v5.4-rc1~616^2~363 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b12c73a81b312f1f44ab3968b684f58f9bdbda7;p=platform%2Fkernel%2Flinux-rpi.git r8169: improve r8169_csum_workaround Use helper skb_is_gso() and simplify access to tx_dropped. Signed-off-by: Heiner Kallweit Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 962ef3d..13620bc 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c @@ -5756,7 +5756,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb, static void r8169_csum_workaround(struct rtl8169_private *tp, struct sk_buff *skb) { - if (skb_shinfo(skb)->gso_size) { + if (skb_is_gso(skb)) { netdev_features_t features = tp->dev->features; struct sk_buff *segs, *nskb; @@ -5779,11 +5779,8 @@ static void r8169_csum_workaround(struct rtl8169_private *tp, rtl8169_start_xmit(skb, tp->dev); } else { - struct net_device_stats *stats; - drop: - stats = &tp->dev->stats; - stats->tx_dropped++; + tp->dev->stats.tx_dropped++; dev_kfree_skb_any(skb); } }