Subject: [PATCH 1/5] Cut off br_port fied from net_device

From: Pavel Emelyanov <[email-masked]>
Date: Mon, 22 Oct 2007 16:33:33 +0400

And add the forward declaration for br_handle_frame_hook in
include/linux/if_bridge.h

Signed-off-by: Pavel Emelyanov <[email-masked]>

---

diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h
index 58e43e5..a718586 100644
--- a/include/linux/if_bridge.h
+++ b/include/linux/if_bridge.h
@@ -104,6 +104,8 @@ struct __fdb_entry
 
 #include <linux/netdevice.h>
 
+struct net_bridge_port;
+
 extern void brioctl_set(int (*ioctl_hook)(struct net *, unsigned int, void __user *));
 extern struct sk_buff *(*br_handle_frame_hook)(struct net_bridge_port *p,
 					       struct sk_buff *skb);
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 4a3f54e..469e04f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -699,8 +699,10 @@ struct net_device
 	/* Network namespace this network device is inside */
 	struct net		*nd_net;
 
+#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
 	/* bridge stuff */
 	struct net_bridge_port	*br_port;
+#endif
 	/* macvlan */
 	struct macvlan_port	*macvlan_port;
 
-- 
1.5.3.4