diff options
author | Jiri Pirko <jiri@resnulli.us> | 2013-01-03 22:48:56 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-04 21:31:50 (GMT) |
commit | 2eea05b0de6bb83dc07ddd5154b1baccba773e6a (patch) | |
tree | 8450969e7c16ec21f12284c38ce4c524364c0dd7 /drivers/net/ethernet/chelsio/cxgb3 | |
parent | 49bd8fb0b18944fc0b6b11d999619d3687c3914a (diff) | |
download | linux-2eea05b0de6bb83dc07ddd5154b1baccba773e6a.tar.xz |
cxgb3: remove usage of dev->master
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb3')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c index 942dace..3f1f501 100644 --- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c +++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c @@ -182,14 +182,17 @@ static struct net_device *get_iff_from_mac(struct adapter *adapter, struct net_device *dev = adapter->port[i]; if (!memcmp(dev->dev_addr, mac, ETH_ALEN)) { + rcu_read_lock(); if (vlan && vlan != VLAN_VID_MASK) { - rcu_read_lock(); dev = __vlan_find_dev_deep(dev, vlan); - rcu_read_unlock(); } else if (netif_is_bond_slave(dev)) { - while (dev->master) - dev = dev->master; + struct net_device *upper_dev; + + while ((upper_dev = + netdev_master_upper_dev_get_rcu(dev))) + dev = upper_dev; } + rcu_read_unlock(); return dev; } } |