]> git.openfabrics.org - compat-rdma/compat.git/commitdiff
netdevice.h: Use [un]register_netdevice_notifier_rh if exist
authorVladimir Sokolovsky <vlad@mellanox.com>
Mon, 23 Jul 2018 19:18:04 +0000 (14:18 -0500)
committerVladimir Sokolovsky <vlad@mellanox.com>
Mon, 23 Jul 2018 19:59:32 +0000 (14:59 -0500)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
include/linux/netdevice.h

index 4de00eb9fcf5624f810d87f187c9bef5fa51b927..cd82256f630191542bd31fa72cdcbf4d1dc18772 100644 (file)
@@ -6,6 +6,10 @@
 
 #include_next <linux/netdevice.h>
 
+#ifdef HAVE_REGISTER_NETDEVICE_NOTIFIER_RH
+#define register_netdevice_notifier register_netdevice_notifier_rh
+#define unregister_netdevice_notifier unregister_netdevice_notifier_rh
+#endif
 
 #if IS_ENABLED(CONFIG_VXLAN) && (defined(HAVE_NDO_ADD_VXLAN_PORT) || defined(HAVE_NDO_UDP_TUNNEL_ADD))
 #define HAVE_KERNEL_WITH_VXLAN_SUPPORT_ON
@@ -33,6 +37,7 @@ static inline const char *netdev_reg_state(const struct net_device *dev)
 
 #ifndef HAVE_TC_SETUP_QDISC_MQPRIO
 #define TC_SETUP_QDISC_MQPRIO TC_SETUP_MQPRIO
+#endif
 
 #ifndef netdev_WARN_ONCE
 
@@ -67,6 +72,5 @@ do {                                                          \
                  netdev_reg_state(dev), ##args)
 
 #endif /* netdev_WARN_ONCE */
-#endif
 
 #endif /* _COMPAT_LINUX_NETDEVICE_H */