aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-01-14 17:37:09 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-14 17:42:42 -0500
commit0a379e21c503b2ff66b44d588df9f231e9b0b9ca (patch)
tree22b875fcf4b67fcd007726f00c5fc1748ce985d0 /drivers/net/macvlan.c
parenta49da8811e71c5355b52c65ee32976741d5834cd (diff)
parentfdc3452cd2c7b2bfe0f378f92123f4f9a98fa2bd (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 09ababe54a5b..8433de4509c7 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -299,7 +299,7 @@ static netdev_tx_t macvlan_start_xmit(struct sk_buff *skb,
299 299
300 if (vlan->fwd_priv) { 300 if (vlan->fwd_priv) {
301 skb->dev = vlan->lowerdev; 301 skb->dev = vlan->lowerdev;
302 ret = dev_hard_start_xmit(skb, skb->dev, NULL, vlan->fwd_priv); 302 ret = dev_queue_xmit_accel(skb, vlan->fwd_priv);
303 } else { 303 } else {
304 ret = macvlan_queue_xmit(skb, dev); 304 ret = macvlan_queue_xmit(skb, dev);
305 } 305 }
@@ -337,6 +337,8 @@ static const struct header_ops macvlan_hard_header_ops = {
337 .cache_update = eth_header_cache_update, 337 .cache_update = eth_header_cache_update,
338}; 338};
339 339
340static struct rtnl_link_ops macvlan_link_ops;
341
340static int macvlan_open(struct net_device *dev) 342static int macvlan_open(struct net_device *dev)
341{ 343{
342 struct macvlan_dev *vlan = netdev_priv(dev); 344 struct macvlan_dev *vlan = netdev_priv(dev);
@@ -352,7 +354,8 @@ static int macvlan_open(struct net_device *dev)
352 goto hash_add; 354 goto hash_add;
353 } 355 }
354 356
355 if (lowerdev->features & NETIF_F_HW_L2FW_DOFFLOAD) { 357 if (lowerdev->features & NETIF_F_HW_L2FW_DOFFLOAD &&
358 dev->rtnl_link_ops == &macvlan_link_ops) {
356 vlan->fwd_priv = 359 vlan->fwd_priv =
357 lowerdev->netdev_ops->ndo_dfwd_add_station(lowerdev, dev); 360 lowerdev->netdev_ops->ndo_dfwd_add_station(lowerdev, dev);
358 361
@@ -361,10 +364,8 @@ static int macvlan_open(struct net_device *dev)
361 */ 364 */
362 if (IS_ERR_OR_NULL(vlan->fwd_priv)) { 365 if (IS_ERR_OR_NULL(vlan->fwd_priv)) {
363 vlan->fwd_priv = NULL; 366 vlan->fwd_priv = NULL;
364 } else { 367 } else
365 dev->features &= ~NETIF_F_LLTX;
366 return 0; 368 return 0;
367 }
368 } 369 }
369 370
370 err = -EBUSY; 371 err = -EBUSY;
@@ -698,8 +699,7 @@ static netdev_features_t macvlan_fix_features(struct net_device *dev,
698 features = netdev_increment_features(vlan->lowerdev->features, 699 features = netdev_increment_features(vlan->lowerdev->features,
699 features, 700 features,
700 mask); 701 mask);
701 if (!vlan->fwd_priv) 702 features |= NETIF_F_LLTX;
702 features |= NETIF_F_LLTX;
703 703
704 return features; 704 return features;
705} 705}