]> git.openfabrics.org - ~emulex/for-vlad/old/compat.git/commitdiff
compat: Addition to compat-2.6.39.h
authorTatyana Nikolova <Tatyana.E.Nikolova@intel.com>
Wed, 30 May 2012 19:40:06 +0000 (14:40 -0500)
committerVladimir Sokolovsky <vlad@mellanox.com>
Thu, 31 May 2012 07:27:57 +0000 (10:27 +0300)
backport netif_is_bond_slave() < 2.6.39

Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com>
include/linux/compat-2.6.39.h

index 961e91c2a15716c308b823790d6a30bf1881e67a..92edbd4e7451ad9d414fdb72b5bfc99020e8fe58 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/tty.h>
 #include <linux/irq.h>
 #include <linux/kernel.h>
+#include <linux/netdevice.h>
 
 #define tiocmget(tty) tiocmget(tty, NULL)
 #define tiocmset(tty, set, clear) tiocmset(tty, NULL, set, clear)
 extern int tty_set_termios(struct tty_struct *tty, struct ktermios *kt);
 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)) */
 
+static inline int netif_is_bond_slave(struct net_device *dev)
+{
+       return dev->flags & IFF_SLAVE && dev->priv_flags & IFF_BONDING;
+}
 static inline int irq_set_irq_wake(unsigned int irq, unsigned int on)
 {
        return set_irq_wake(irq, on);