hyperv: Report actual status in receive completion packet
[linux-2.6-block.git] / drivers / net / hyperv / netvsc_drv.c
index 8c5a1c43c81d257c09a67385e01da93f3c24465f..f825a629a699cfe5fac73803353da4b47ca18974 100644 (file)
@@ -265,6 +265,7 @@ int netvsc_recv_callback(struct hv_device *device_obj,
        if (!net) {
                netdev_err(net, "got receive callback but net device"
                        " not initialized yet\n");
+               packet->status = NVSP_STAT_FAIL;
                return 0;
        }
 
@@ -272,6 +273,7 @@ int netvsc_recv_callback(struct hv_device *device_obj,
        skb = netdev_alloc_skb_ip_align(net, packet->total_data_buflen);
        if (unlikely(!skb)) {
                ++net->stats.rx_dropped;
+               packet->status = NVSP_STAT_FAIL;
                return 0;
        }
 
@@ -400,7 +402,7 @@ static void netvsc_send_garp(struct work_struct *w)
        ndev_ctx = container_of(w, struct net_device_context, dwork.work);
        net_device = hv_get_drvdata(ndev_ctx->device_ctx);
        net = net_device->ndev;
-       netif_notify_peers(net);
+       netdev_notify_peers(net);
 }