aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 3655ff927315..07a8e9dc43fc 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2435,13 +2435,13 @@ netdev_features_t netif_skb_features(struct sk_buff *skb)
2435 return harmonize_features(skb, protocol, features); 2435 return harmonize_features(skb, protocol, features);
2436 } 2436 }
2437 2437
2438 features &= (skb->dev->vlan_features | NETIF_F_HW_VLAN_TX); 2438 features &= (skb->dev->vlan_features | NETIF_F_HW_VLAN_CTAG_TX);
2439 2439
2440 if (protocol != htons(ETH_P_8021Q)) { 2440 if (protocol != htons(ETH_P_8021Q)) {
2441 return harmonize_features(skb, protocol, features); 2441 return harmonize_features(skb, protocol, features);
2442 } else { 2442 } else {
2443 features &= NETIF_F_SG | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST | 2443 features &= NETIF_F_SG | NETIF_F_HIGHDMA | NETIF_F_FRAGLIST |
2444 NETIF_F_GEN_CSUM | NETIF_F_HW_VLAN_TX; 2444 NETIF_F_GEN_CSUM | NETIF_F_HW_VLAN_CTAG_TX;
2445 return harmonize_features(skb, protocol, features); 2445 return harmonize_features(skb, protocol, features);
2446 } 2446 }
2447} 2447}
@@ -2482,7 +2482,7 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev,
2482 features = netif_skb_features(skb); 2482 features = netif_skb_features(skb);
2483 2483
2484 if (vlan_tx_tag_present(skb) && 2484 if (vlan_tx_tag_present(skb) &&
2485 !(features & NETIF_F_HW_VLAN_TX)) { 2485 !(features & NETIF_F_HW_VLAN_CTAG_TX)) {
2486 skb = __vlan_put_tag(skb, vlan_tx_tag_get(skb)); 2486 skb = __vlan_put_tag(skb, vlan_tx_tag_get(skb));
2487 if (unlikely(!skb)) 2487 if (unlikely(!skb))
2488 goto out; 2488 goto out;
@@ -5180,7 +5180,8 @@ int register_netdevice(struct net_device *dev)
5180 } 5180 }
5181 } 5181 }
5182 5182
5183 if (((dev->hw_features | dev->features) & NETIF_F_HW_VLAN_FILTER) && 5183 if (((dev->hw_features | dev->features) &
5184 NETIF_F_HW_VLAN_CTAG_FILTER) &&
5184 (!dev->netdev_ops->ndo_vlan_rx_add_vid || 5185 (!dev->netdev_ops->ndo_vlan_rx_add_vid ||
5185 !dev->netdev_ops->ndo_vlan_rx_kill_vid)) { 5186 !dev->netdev_ops->ndo_vlan_rx_kill_vid)) {
5186 netdev_WARN(dev, "Buggy VLAN acceleration in driver!\n"); 5187 netdev_WARN(dev, "Buggy VLAN acceleration in driver!\n");