File datapath-add-support-for-linux-3.11.patch of Package openvswitch.openSUSE_13.1_Update

Index: datapath/dp_notify.c
===================================================================
--- datapath/dp_notify.c.orig
+++ datapath/dp_notify.c
@@ -77,7 +77,7 @@ static int dp_device_event(struct notifi
 			   void *ptr)
 {
 	struct ovs_net *ovs_net;
-	struct net_device *dev = ptr;
+	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
 	struct vport *vport = NULL;
 
 	if (!ovs_is_internal_dev(dev))
Index: datapath/linux/compat/include/linux/netdevice.h
===================================================================
--- datapath/linux/compat/include/linux/netdevice.h.orig
+++ datapath/linux/compat/include/linux/netdevice.h
@@ -154,6 +154,17 @@ static inline int rpl_netif_needs_gso(st
 }
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
+
+/* Simply pass through the passed parameter for Linux < 3.11.0 */
+static inline struct net_device *
+netdev_notifier_info_to_dev(void *info)
+{
+	return info;
+}
+
+#endif
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
 typedef u32 netdev_features_t;
 #endif
openSUSE Build Service is sponsored by