diff options
-rw-r--r-- | net/core/dev.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 1444ed3861a0..4cd3e84e1294 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1971,16 +1971,14 @@ static void dev_gso_skb_destructor(struct sk_buff *skb) | |||
1971 | /** | 1971 | /** |
1972 | * dev_gso_segment - Perform emulated hardware segmentation on skb. | 1972 | * dev_gso_segment - Perform emulated hardware segmentation on skb. |
1973 | * @skb: buffer to segment | 1973 | * @skb: buffer to segment |
1974 | * @features: device features as applicable to this skb | ||
1974 | * | 1975 | * |
1975 | * This function segments the given skb and stores the list of segments | 1976 | * This function segments the given skb and stores the list of segments |
1976 | * in skb->next. | 1977 | * in skb->next. |
1977 | */ | 1978 | */ |
1978 | static int dev_gso_segment(struct sk_buff *skb) | 1979 | static int dev_gso_segment(struct sk_buff *skb, int features) |
1979 | { | 1980 | { |
1980 | struct net_device *dev = skb->dev; | ||
1981 | struct sk_buff *segs; | 1981 | struct sk_buff *segs; |
1982 | int features = dev->features & ~(illegal_highdma(dev, skb) ? | ||
1983 | NETIF_F_SG : 0); | ||
1984 | 1982 | ||
1985 | segs = skb_gso_segment(skb, features); | 1983 | segs = skb_gso_segment(skb, features); |
1986 | 1984 | ||
@@ -2112,7 +2110,7 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, | |||
2112 | } | 2110 | } |
2113 | 2111 | ||
2114 | if (netif_needs_gso(skb, features)) { | 2112 | if (netif_needs_gso(skb, features)) { |
2115 | if (unlikely(dev_gso_segment(skb))) | 2113 | if (unlikely(dev_gso_segment(skb, features))) |
2116 | goto out_kfree_skb; | 2114 | goto out_kfree_skb; |
2117 | if (skb->next) | 2115 | if (skb->next) |
2118 | goto gso; | 2116 | goto gso; |