summaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/netvsc_drv.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2009-07-14 19:59:56 +0200
committerGreg Kroah-Hartman2009-09-15 21:01:45 +0200
commitc86f3e2a73f4924b20ed7a56ebdaf874af861911 (patch)
tree66ab90f9b58bfa0f79d4a2799b64256464b45d98 /drivers/staging/hv/netvsc_drv.c
parentStaging: hv: blkvsc: fix up driver_data usage (diff)
downloadkernel-qcow2-linux-c86f3e2a73f4924b20ed7a56ebdaf874af861911.tar.gz
kernel-qcow2-linux-c86f3e2a73f4924b20ed7a56ebdaf874af861911.tar.xz
kernel-qcow2-linux-c86f3e2a73f4924b20ed7a56ebdaf874af861911.zip
Staging: hv: make the Hyper-V virtual network driver build
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>
Diffstat (limited to 'drivers/staging/hv/netvsc_drv.c')
-rw-r--r--drivers/staging/hv/netvsc_drv.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c
index 1b3174a4457b..71931f553193 100644
--- a/drivers/staging/hv/netvsc_drv.c
+++ b/drivers/staging/hv/netvsc_drv.c
@@ -20,6 +20,7 @@
*
*/
+#define KERNEL_2_6_27
#include <linux/init.h>
#include <linux/module.h>
@@ -41,10 +42,10 @@
#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);