aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2013-01-03 17:48:56 -0500
committerDavid S. Miller <davem@davemloft.net>2013-01-04 16:31:50 -0500
commit2eea05b0de6bb83dc07ddd5154b1baccba773e6a (patch)
tree8450969e7c16ec21f12284c38ce4c524364c0dd7 /drivers/net/ethernet
parent49bd8fb0b18944fc0b6b11d999619d3687c3914a (diff)
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')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c11
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 942dace361d2..3f1f5018c66e 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,
182 struct net_device *dev = adapter->port[i]; 182 struct net_device *dev = adapter->port[i];
183 183
184 if (!memcmp(dev->dev_addr, mac, ETH_ALEN)) { 184 if (!memcmp(dev->dev_addr, mac, ETH_ALEN)) {
185 rcu_read_lock();
185 if (vlan && vlan != VLAN_VID_MASK) { 186 if (vlan && vlan != VLAN_VID_MASK) {
186 rcu_read_lock();
187 dev = __vlan_find_dev_deep(dev, vlan); 187 dev = __vlan_find_dev_deep(dev, vlan);
188 rcu_read_unlock();
189 } else if (netif_is_bond_slave(dev)) { 188 } else if (netif_is_bond_slave(dev)) {
190 while (dev->master) 189 struct net_device *upper_dev;
191 dev = dev->master; 190
191 while ((upper_dev =
192 netdev_master_upper_dev_get_rcu(dev)))
193 dev = upper_dev;
192 } 194 }
195 rcu_read_unlock();
193 return dev; 196 return dev;
194 } 197 }
195 } 198 }