Skip to content

Commit

Permalink
cxgb3: remove usage of dev->master
Browse files Browse the repository at this point in the history
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Jan 4, 2013
1 parent 49bd8fb commit 2eea05b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 2eea05b

Please sign in to comment.