From: Zhi Yong Wu Date: Mon, 18 Nov 2013 13:19:27 +0000 (+0800) Subject: net, virtio_net: replace the magic value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0f13b66b01c6e2ec4913a7812414183844d1cc4f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git net, virtio_net: replace the magic value It is more appropriate to use # of queue pairs currently used by the driver instead of a magic value. Signed-off-by: Zhi Yong Wu Acked-by: Michael S. Tsirkin Signed-off-by: David S. Miller --- diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 69fb225e59a6..69ad42ba1538 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -1606,8 +1606,8 @@ static int virtnet_probe(struct virtio_device *vdev) if (err) goto free_stats; - netif_set_real_num_tx_queues(dev, 1); - netif_set_real_num_rx_queues(dev, 1); + netif_set_real_num_tx_queues(dev, vi->curr_queue_pairs); + netif_set_real_num_rx_queues(dev, vi->curr_queue_pairs); err = register_netdev(dev); if (err) {