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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 3b6225a2c7d2..fe576e75a538 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -288,7 +288,7 @@ static void try_fill_recv_maxbufs(struct virtnet_info *vi)
288 skb_put(skb, MAX_PACKET_LEN); 288 skb_put(skb, MAX_PACKET_LEN);
289 289
290 hdr = skb_vnet_hdr(skb); 290 hdr = skb_vnet_hdr(skb);
291 sg_init_one(sg, hdr, sizeof(*hdr)); 291 sg_set_buf(sg, hdr, sizeof(*hdr));
292 292
293 if (vi->big_packets) { 293 if (vi->big_packets) {
294 for (i = 0; i < MAX_SKB_FRAGS; i++) { 294 for (i = 0; i < MAX_SKB_FRAGS; i++) {
@@ -489,9 +489,9 @@ static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb)
489 489
490 /* Encode metadata header at front. */ 490 /* Encode metadata header at front. */
491 if (vi->mergeable_rx_bufs) 491 if (vi->mergeable_rx_bufs)
492 sg_init_one(sg, mhdr, sizeof(*mhdr)); 492 sg_set_buf(sg, mhdr, sizeof(*mhdr));
493 else 493 else
494 sg_init_one(sg, hdr, sizeof(*hdr)); 494 sg_set_buf(sg, hdr, sizeof(*hdr));
495 495
496 num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; 496 num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1;
497 497