aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Yasevich <vyasevic@redhat.com>2013-05-22 03:49:34 -0400
committerDavid S. Miller <davem@davemloft.net>2013-05-23 21:54:30 -0400
commit161f65ba3583b84b4714f21dbee263f99824c516 (patch)
tree0061ebe913e19ca1f0914d417ec99fd17b976d79
parent7a9d645e132d46f2a47221434b852e038e7c53e0 (diff)
bridge: Set vlan_features to allow offloads on vlans.
When vlan device is configured on top of the brige, it does not support any offload capabilities because the bridge device does not initiliaze vlan_fatures. Set vlan_fatures to be equivalent to hw_fatures. Signed-off-by: Vlad Yasevich <vyasevic@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/bridge/br_device.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 967312803e41..75f3239130f8 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -22,6 +22,9 @@
22#include <asm/uaccess.h> 22#include <asm/uaccess.h>
23#include "br_private.h" 23#include "br_private.h"
24 24
25#define COMMON_FEATURES (NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | \
26 NETIF_F_GSO_MASK | NETIF_F_HW_CSUM)
27
25/* net device transmit always called with BH disabled */ 28/* net device transmit always called with BH disabled */
26netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev) 29netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
27{ 30{
@@ -346,12 +349,10 @@ void br_dev_setup(struct net_device *dev)
346 dev->tx_queue_len = 0; 349 dev->tx_queue_len = 0;
347 dev->priv_flags = IFF_EBRIDGE; 350 dev->priv_flags = IFF_EBRIDGE;
348 351
349 dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | 352 dev->features = COMMON_FEATURES | NETIF_F_LLTX | NETIF_F_NETNS_LOCAL |
350 NETIF_F_GSO_MASK | NETIF_F_HW_CSUM | NETIF_F_LLTX | 353 NETIF_F_HW_VLAN_CTAG_TX;
351 NETIF_F_NETNS_LOCAL | NETIF_F_HW_VLAN_CTAG_TX; 354 dev->hw_features = COMMON_FEATURES | NETIF_F_HW_VLAN_CTAG_TX;
352 dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST | NETIF_F_HIGHDMA | 355 dev->vlan_features = COMMON_FEATURES;
353 NETIF_F_GSO_MASK | NETIF_F_HW_CSUM |
354 NETIF_F_HW_VLAN_CTAG_TX;
355 356
356 br->dev = dev; 357 br->dev = dev;
357 spin_lock_init(&br->lock); 358 spin_lock_init(&br->lock);