[ewg] [PATCH] compat: Addition to compat-2.6.39.h
Tatyana Nikolova
Tatyana.E.Nikolova at intel.com
Wed May 30 12:40:06 PDT 2012
backport netif_is_bond_slave() < 2.6.39
Signed-off-by: Tatyana Nikolova <Tatyana.E.Nikolova at intel.com>
---
include/linux/compat-2.6.39.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/linux/compat-2.6.39.h b/include/linux/compat-2.6.39.h
index 961e91c..92edbd4 100644
--- a/include/linux/compat-2.6.39.h
+++ b/include/linux/compat-2.6.39.h
@@ -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)
@@ -16,6 +17,10 @@
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);
--
1.7.1
More information about the ewg
mailing list