datapath: Add version check for struct netdev_ops.
authorJesse Gross <jesse@nicira.com>
Wed, 21 Sep 2011 02:12:32 +0000 (19:12 -0700)
committerJesse Gross <jesse@nicira.com>
Tue, 18 Oct 2011 16:24:26 +0000 (09:24 -0700)
Linux 3.1 drops the symbol HAVE_NET_DEVICE_OPS that lets us know
whether struct netdev_ops is present.  As a result, we need to
replace it with an explicit version check.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/vport-internal_dev.c

index b503b87..2d46343 100644 (file)
 #include "vport-internal_dev.h"
 #include "vport-netdev.h"
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)
+#define HAVE_NET_DEVICE_OPS
+#endif
+
 struct internal_dev {
        struct vport *vport;
        struct net_device_stats stats;