Staging: hv: netvsc_drv: Directly get the size of rndis_filter_packet
authorK. Y. Srinivasan <kys@microsoft.com>
Fri, 13 May 2011 02:35:01 +0000 (19:35 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 May 2011 19:28:47 +0000 (12:28 -0700)
Directly get the size of rndis_filter_packet.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/netvsc_drv.c

index cade6e68335efa872ef716f7e8ecac7361fa864b..1b9820289175449bddb68df414557e1c42fe0c50 100644 (file)
@@ -127,8 +127,6 @@ static void netvsc_xmit_completion(void *context)
 static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
 {
        struct net_device_context *net_device_ctx = netdev_priv(net);
-       struct netvsc_driver *net_drv_obj =
-               drv_to_netvscdrv(net_device_ctx->device_ctx->device.driver);
        struct hv_netvsc_packet *packet;
        int ret;
        unsigned int i, num_pages;
@@ -141,7 +139,7 @@ static int netvsc_start_xmit(struct sk_buff *skb, struct net_device *net)
        /* Allocate a netvsc packet based on # of frags. */
        packet = kzalloc(sizeof(struct hv_netvsc_packet) +
                         (num_pages * sizeof(struct hv_page_buffer)) +
-                        net_drv_obj->req_ext_size, GFP_ATOMIC);
+                        sizeof(struct rndis_filter_packet), GFP_ATOMIC);
        if (!packet) {
                /* out of memory, silently drop packet */
                netdev_err(net, "unable to allocate hv_netvsc_packet\n");
This page took 0.025025 seconds and 5 git commands to generate.