aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2013-04-18 22:04:27 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-19 14:45:26 -0400
commitf646968f8f7c624587de729115d802372b9063dd (patch)
tree2b8c6604306f5e74af9e16c17e2b611610982b65 /net/core/dev.c
parentc2962897c94605bc8f158a37dee8d867dda9f116 (diff)
net: vlan: rename NETIF_F_HW_VLAN_* feature flags to NETIF_F_HW_VLAN_CTAG_*
Rename the hardware VLAN acceleration features to include "CTAG" to indicate that they only support CTAGs. Follow up patches will introduce 802.1ad server provider tagging (STAGs) and require the distinction for hardware not supporting acclerating both. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
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");