]> git.ipfire.org Git - people/arne_f/kernel.git/blobdiff - drivers/net/hyperv/netvsc.c
hyperv: Add support for physically discontinuous receive buffer
[people/arne_f/kernel.git] / drivers / net / hyperv / netvsc.c
index 93b485b96249b32347586f6494b7e1d15ab3cc2a..03a2c6e171584ff5f639d686458fbb75b7dcfb47 100644 (file)
@@ -136,8 +136,7 @@ static int netvsc_destroy_recv_buf(struct netvsc_device *net_device)
 
        if (net_device->recv_buf) {
                /* Free up the receive buffer */
-               free_pages((unsigned long)net_device->recv_buf,
-                       get_order(net_device->recv_buf_size));
+               vfree(net_device->recv_buf);
                net_device->recv_buf = NULL;
        }
 
@@ -163,9 +162,7 @@ static int netvsc_init_recv_buf(struct hv_device *device)
                return -ENODEV;
        ndev = net_device->ndev;
 
-       net_device->recv_buf =
-               (void *)__get_free_pages(GFP_KERNEL|__GFP_ZERO,
-                               get_order(net_device->recv_buf_size));
+       net_device->recv_buf = vzalloc(net_device->recv_buf_size);
        if (!net_device->recv_buf) {
                netdev_err(ndev, "unable to allocate receive "
                        "buffer of size %d\n", net_device->recv_buf_size);