bridge: move private brport flags to if_bridge.h so port drivers can use flags
authorScott Feldman <sfeldma@gmail.com>
Fri, 28 Nov 2014 13:34:22 +0000 (14:34 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Dec 2014 04:01:22 +0000 (20:01 -0800)
Signed-off-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_bridge.h
net/bridge/br_private.h

index fa2eca6251298850e75cb06c34b85686cf8c4c91..2c81a8efd24d7254bb7e5f33056a7cf1997a7450 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <linux/netdevice.h>
 #include <uapi/linux/if_bridge.h>
+#include <linux/bitops.h>
 
 struct br_ip {
        union {
@@ -32,6 +33,17 @@ struct br_ip_list {
        struct br_ip addr;
 };
 
+#define BR_HAIRPIN_MODE                BIT(0)
+#define BR_BPDU_GUARD          BIT(1)
+#define BR_ROOT_BLOCK          BIT(2)
+#define BR_MULTICAST_FAST_LEAVE        BIT(3)
+#define BR_ADMIN_COST          BIT(4)
+#define BR_LEARNING            BIT(5)
+#define BR_FLOOD               BIT(6)
+#define BR_AUTO_MASK           (BR_FLOOD | BR_LEARNING)
+#define BR_PROMISC             BIT(7)
+#define BR_PROXYARP            BIT(8)
+
 extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *));
 
 typedef int br_should_route_hook_t(struct sk_buff *skb);
index cc36fb3efbdd46578f9c07931920ed3048fc6dd6..aea3d1339b3f3d248a9d5517725dbe3732c03d8e 100644 (file)
@@ -164,16 +164,6 @@ struct net_bridge_port
        struct rcu_head                 rcu;
 
        unsigned long                   flags;
-#define BR_HAIRPIN_MODE                0x00000001
-#define BR_BPDU_GUARD           0x00000002
-#define BR_ROOT_BLOCK          0x00000004
-#define BR_MULTICAST_FAST_LEAVE        0x00000008
-#define BR_ADMIN_COST          0x00000010
-#define BR_LEARNING            0x00000020
-#define BR_FLOOD               0x00000040
-#define BR_AUTO_MASK (BR_FLOOD | BR_LEARNING)
-#define BR_PROMISC             0x00000080
-#define BR_PROXYARP            0x00000100
 
 #ifdef CONFIG_BRIDGE_IGMP_SNOOPING
        struct bridge_mcast_own_query   ip4_own_query;