Commit 0b12c73a authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

r8169: improve r8169_csum_workaround

Use helper skb_is_gso() and simplify access to tx_dropped.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent db4bad07
...@@ -5756,7 +5756,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb, ...@@ -5756,7 +5756,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
static void r8169_csum_workaround(struct rtl8169_private *tp, static void r8169_csum_workaround(struct rtl8169_private *tp,
struct sk_buff *skb) struct sk_buff *skb)
{ {
if (skb_shinfo(skb)->gso_size) { if (skb_is_gso(skb)) {
netdev_features_t features = tp->dev->features; netdev_features_t features = tp->dev->features;
struct sk_buff *segs, *nskb; struct sk_buff *segs, *nskb;
...@@ -5779,11 +5779,8 @@ static void r8169_csum_workaround(struct rtl8169_private *tp, ...@@ -5779,11 +5779,8 @@ static void r8169_csum_workaround(struct rtl8169_private *tp,
rtl8169_start_xmit(skb, tp->dev); rtl8169_start_xmit(skb, tp->dev);
} else { } else {
struct net_device_stats *stats;
drop: drop:
stats = &tp->dev->stats; tp->dev->stats.tx_dropped++;
stats->tx_dropped++;
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment