]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
Staging: hv: make the Hyper-V virtual network driver build
authorGreg Kroah-Hartman <gregkh@suse.de>
Tue, 14 Jul 2009 17:59:56 +0000 (10:59 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:01:45 +0000 (12:01 -0700)
The #define KERNEL_2_6_27 needs to be set, and I adjusted the include
directories a bit to get things to build properly.

The driver was changed to use net_device_ops, as that is needed to build
and operate properly now.

The hv_netvsc code should now build with no errors.

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/NetVsc.c
drivers/staging/hv/NetVsc.h
drivers/staging/hv/RndisFilter.c
drivers/staging/hv/RndisFilter.h
drivers/staging/hv/include/nvspprotocol.h
drivers/staging/hv/netvsc_drv.c

index 6cc31431f9b31431dad079504d40f03a77551d63..f9a3d185cafa28c155c73f95668e59891f2d2f3c 100644 (file)
@@ -20,8 +20,9 @@
  *
  */
 
+#define KERNEL_2_6_27
 
-#include "logging.h"
+#include "include/logging.h"
 #include "NetVsc.h"
 #include "RndisFilter.h"
 
index 37d07449849a266746bdbc67d5fa77d1a96a694e..e92cfc177facbe7d8467d499f66c5b5924fb7a0e 100644 (file)
 #ifndef _NETVSC_H_
 #define _NETVSC_H_
 
-#include "VmbusPacketFormat.h"
-#include "nvspprotocol.h"
+#include "include/VmbusPacketFormat.h"
+#include "include/nvspprotocol.h"
 
-#include "List.h"
+#include "include/List.h"
 
-#include "NetVscApi.h"
+#include "include/NetVscApi.h"
 //
 // #defines
 //
index 57b828b12c14c812931522f9a97c4b311f61a658..c2cac2180a4099a332b23182bf5f8e4dc32a8039 100644 (file)
  *
  */
 
+#define KERNEL_2_6_27
 
-#include "logging.h"
+#include "include/logging.h"
 
-#include "NetVscApi.h"
+#include "include/NetVscApi.h"
 #include "RndisFilter.h"
 
 //
index f31e7bc13684eb45eb38aad254946ddbe37dee13..1231d6fd94d99f24d2d1b2bc2c2b95fab12e644f 100644 (file)
 
 #define __struct_bcount(x)
 
-#include "osd.h"
+#include "include/osd.h"
 #include "NetVsc.h"
 
-#include "rndis.h"
+#include "include/rndis.h"
 
 #define RNDIS_HEADER_SIZE      (sizeof(RNDIS_MESSAGE) - sizeof(RNDIS_MESSAGE_CONTAINER))
 
index 834dbae6f5c7171d262bc39f76bbfab7d2e0cd7c..60091a4da45f3e2e90373c31cdbab74d26629f09 100644 (file)
@@ -24,7 +24,7 @@
 
 #pragma once
 
-#include <VmbusChannelInterface.h>
+#include "VmbusChannelInterface.h"
 
 #define NVSP_INVALID_PROTOCOL_VERSION           ((UINT32)0xFFFFFFFF)
 
index 1b3174a4457bfd3b4d45e53c3ac9a03d3a3c75b4..71931f5531939d0d0199a9117370c500dbde5ee7 100644 (file)
@@ -20,6 +20,7 @@
  *
  */
 
+#define KERNEL_2_6_27
 
 #include <linux/init.h>
 #include <linux/module.h>
 #include <net/sock.h>
 #include <net/pkt_sched.h>
 
-#include "logging.h"
-#include "vmbus.h"
+#include "include/logging.h"
+#include "include/vmbus.h"
 
-#include "NetVscApi.h"
+#include "include/NetVscApi.h"
 
 MODULE_LICENSE("GPL");
 
@@ -158,6 +159,14 @@ static void netvsc_set_multicast_list(UNUSED_VAR(struct net_device *net))
 }
 
 
+static const struct net_device_ops device_ops = {
+       .ndo_open = netvsc_open,
+       .ndo_stop = netvsc_close,
+       .ndo_start_xmit = netvsc_start_xmit,
+       .ndo_get_stats = netvsc_get_stats,
+       .ndo_set_multicast_list = netvsc_set_multicast_list,
+};
+
 /*++
 
 Name:  netvsc_probe()
@@ -225,11 +234,7 @@ static int netvsc_probe(struct device *device)
 
        memcpy(net->dev_addr, device_info.MacAddr, ETH_ALEN);
 
-       net->open                               = netvsc_open;
-       net->hard_start_xmit    = netvsc_start_xmit;
-       net->stop                               = netvsc_close;
-       net->get_stats                  = netvsc_get_stats;
-       net->set_multicast_list = netvsc_set_multicast_list;
+       net->netdev_ops = &device_ops;
 
 #if !defined(KERNEL_2_6_27)
        SET_MODULE_OWNER(net);