diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-02-12 01:48:36 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-13 13:42:07 -0500 |
commit | 1765a575334f1a232c1478accdee5c7d19f4b3e3 (patch) | |
tree | 6613f53ce9095b799048d891f0b4b6e34a479fe0 /include/linux/netdevice.h | |
parent | d59cfde2fb960b5970ccb5a38cea25d38b37a8e8 (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.h | 7 |
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; | |||
2377 | extern int netdev_tstamp_prequeue; | 2377 | extern int netdev_tstamp_prequeue; |
2378 | extern int weight_p; | 2378 | extern int weight_p; |
2379 | extern int netdev_set_master(struct net_device *dev, struct net_device *master); | 2379 | extern int netdev_set_master(struct net_device *dev, struct net_device *master); |
2380 | extern int netdev_set_bond_master(struct net_device *dev, | ||
2381 | struct net_device *master); | ||
2380 | extern int skb_checksum_help(struct sk_buff *skb); | 2382 | extern int skb_checksum_help(struct sk_buff *skb); |
2381 | extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, u32 features); | 2383 | extern 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 | ||
2442 | static inline int netif_is_bond_slave(struct net_device *dev) | ||
2443 | { | ||
2444 | return dev->flags & IFF_SLAVE && dev->priv_flags & IFF_BONDING; | ||
2445 | } | ||
2446 | |||
2440 | extern struct pernet_operations __net_initdata loopback_net_ops; | 2447 | extern struct pernet_operations __net_initdata loopback_net_ops; |
2441 | 2448 | ||
2442 | static inline int dev_ethtool_get_settings(struct net_device *dev, | 2449 | static inline int dev_ethtool_get_settings(struct net_device *dev, |