1
0
Fork 0

r8169: improve r8169_csum_workaround

Use helper skb_is_gso() and simplify access to tx_dropped.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
alistair/sunxi64-5.4-dsi
Heiner Kallweit 2019-05-31 19:17:15 +02:00 committed by David S. Miller
parent db4bad0737
commit 0b12c73a81
1 changed files with 2 additions and 5 deletions

View File

@ -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);
}
}