aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2011-02-12 01:48:36 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-13 13:42:07 -0500
commit1765a575334f1a232c1478accdee5c7d19f4b3e3 (patch)
tree6613f53ce9095b799048d891f0b4b6e34a479fe0 /include/linux/netdevice.h
parentd59cfde2fb960b5970ccb5a38cea25d38b37a8e8 (diff)
net: make dev->master general
dev->master is now tightly connected to bonding driver. This patch makes this pointer more general and ready to be used by others. - netdev_set_master() - bond specifics moved to new function netdev_set_bond_master() - introduced netif_is_bond_slave() to check if device is a bonding slave Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 5a5baeaaa50f..5a42b1003767 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2377,6 +2377,8 @@ extern int netdev_max_backlog;
2377extern int netdev_tstamp_prequeue; 2377extern int netdev_tstamp_prequeue;
2378extern int weight_p; 2378extern int weight_p;
2379extern int netdev_set_master(struct net_device *dev, struct net_device *master); 2379extern int netdev_set_master(struct net_device *dev, struct net_device *master);
2380extern int netdev_set_bond_master(struct net_device *dev,
2381 struct net_device *master);
2380extern int skb_checksum_help(struct sk_buff *skb); 2382extern int skb_checksum_help(struct sk_buff *skb);
2381extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, u32 features); 2383extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, u32 features);
2382#ifdef CONFIG_BUG 2384#ifdef CONFIG_BUG
@@ -2437,6 +2439,11 @@ static inline void netif_set_gso_max_size(struct net_device *dev,
2437 dev->gso_max_size = size; 2439 dev->gso_max_size = size;
2438} 2440}
2439 2441
2442static inline int netif_is_bond_slave(struct net_device *dev)
2443{
2444 return dev->flags & IFF_SLAVE && dev->priv_flags & IFF_BONDING;
2445}
2446
2440extern struct pernet_operations __net_initdata loopback_net_ops; 2447extern struct pernet_operations __net_initdata loopback_net_ops;
2441 2448
2442static inline int dev_ethtool_get_settings(struct net_device *dev, 2449static inline int dev_ethtool_get_settings(struct net_device *dev,