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 /drivers/net/cxgb3 | |
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 'drivers/net/cxgb3')
-rw-r--r-- | drivers/net/cxgb3/cxgb3_offload.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/cxgb3/cxgb3_offload.c b/drivers/net/cxgb3/cxgb3_offload.c index 7ea94b5205f8..862804f32b6e 100644 --- a/drivers/net/cxgb3/cxgb3_offload.c +++ b/drivers/net/cxgb3/cxgb3_offload.c | |||
@@ -186,9 +186,10 @@ static struct net_device *get_iff_from_mac(struct adapter *adapter, | |||
186 | dev = NULL; | 186 | dev = NULL; |
187 | if (grp) | 187 | if (grp) |
188 | dev = vlan_group_get_device(grp, vlan); | 188 | dev = vlan_group_get_device(grp, vlan); |
189 | } else | 189 | } else if (netif_is_bond_slave(dev)) { |
190 | while (dev->master) | 190 | while (dev->master) |
191 | dev = dev->master; | 191 | dev = dev->master; |
192 | } | ||
192 | return dev; | 193 | return dev; |
193 | } | 194 | } |
194 | } | 195 | } |