aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/virtio_net.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r--drivers/net/virtio_net.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 1fd43e461ba5..fc7eeaa1f1b6 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -142,10 +142,10 @@ drop:
142static void try_fill_recv(struct virtnet_info *vi) 142static void try_fill_recv(struct virtnet_info *vi)
143{ 143{
144 struct sk_buff *skb; 144 struct sk_buff *skb;
145 struct scatterlist sg[1+MAX_SKB_FRAGS]; 145 struct scatterlist sg[2+MAX_SKB_FRAGS];
146 int num, err; 146 int num, err;
147 147
148 sg_init_table(sg, 1+MAX_SKB_FRAGS); 148 sg_init_table(sg, 2+MAX_SKB_FRAGS);
149 for (;;) { 149 for (;;) {
150 skb = netdev_alloc_skb(vi->dev, MAX_PACKET_LEN); 150 skb = netdev_alloc_skb(vi->dev, MAX_PACKET_LEN);
151 if (unlikely(!skb)) 151 if (unlikely(!skb))
@@ -231,11 +231,11 @@ static int start_xmit(struct sk_buff *skb, struct net_device *dev)
231{ 231{
232 struct virtnet_info *vi = netdev_priv(dev); 232 struct virtnet_info *vi = netdev_priv(dev);
233 int num, err; 233 int num, err;
234 struct scatterlist sg[1+MAX_SKB_FRAGS]; 234 struct scatterlist sg[2+MAX_SKB_FRAGS];
235 struct virtio_net_hdr *hdr; 235 struct virtio_net_hdr *hdr;
236 const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest; 236 const unsigned char *dest = ((struct ethhdr *)skb->data)->h_dest;
237 237
238 sg_init_table(sg, 1+MAX_SKB_FRAGS); 238 sg_init_table(sg, 2+MAX_SKB_FRAGS);
239 239
240 pr_debug("%s: xmit %p " MAC_FMT "\n", dev->name, skb, 240 pr_debug("%s: xmit %p " MAC_FMT "\n", dev->name, skb,
241 dest[0], dest[1], dest[2], 241 dest[0], dest[1], dest[2],