aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c9
-rw-r--r--net/core/ethtool.c25
-rw-r--r--net/core/netpoll.c2
3 files changed, 19 insertions, 17 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");
diff --git a/net/core/ethtool.c b/net/core/ethtool.c
index adc1351e6873..b87712cfd26c 100644
--- a/net/core/ethtool.c
+++ b/net/core/ethtool.c
@@ -60,10 +60,10 @@ static const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN]
60 [NETIF_F_IPV6_CSUM_BIT] = "tx-checksum-ipv6", 60 [NETIF_F_IPV6_CSUM_BIT] = "tx-checksum-ipv6",
61 [NETIF_F_HIGHDMA_BIT] = "highdma", 61 [NETIF_F_HIGHDMA_BIT] = "highdma",
62 [NETIF_F_FRAGLIST_BIT] = "tx-scatter-gather-fraglist", 62 [NETIF_F_FRAGLIST_BIT] = "tx-scatter-gather-fraglist",
63 [NETIF_F_HW_VLAN_TX_BIT] = "tx-vlan-hw-insert", 63 [NETIF_F_HW_VLAN_CTAG_TX_BIT] = "tx-vlan-ctag-hw-insert",
64 64
65 [NETIF_F_HW_VLAN_RX_BIT] = "rx-vlan-hw-parse", 65 [NETIF_F_HW_VLAN_CTAG_RX_BIT] = "rx-vlan-ctag-hw-parse",
66 [NETIF_F_HW_VLAN_FILTER_BIT] = "rx-vlan-filter", 66 [NETIF_F_HW_VLAN_CTAG_FILTER_BIT] = "rx-vlan-ctag-filter",
67 [NETIF_F_VLAN_CHALLENGED_BIT] = "vlan-challenged", 67 [NETIF_F_VLAN_CHALLENGED_BIT] = "vlan-challenged",
68 [NETIF_F_GSO_BIT] = "tx-generic-segmentation", 68 [NETIF_F_GSO_BIT] = "tx-generic-segmentation",
69 [NETIF_F_LLTX_BIT] = "tx-lockless", 69 [NETIF_F_LLTX_BIT] = "tx-lockless",
@@ -267,18 +267,19 @@ static int ethtool_set_one_feature(struct net_device *dev,
267 267
268#define ETH_ALL_FLAGS (ETH_FLAG_LRO | ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN | \ 268#define ETH_ALL_FLAGS (ETH_FLAG_LRO | ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN | \
269 ETH_FLAG_NTUPLE | ETH_FLAG_RXHASH) 269 ETH_FLAG_NTUPLE | ETH_FLAG_RXHASH)
270#define ETH_ALL_FEATURES (NETIF_F_LRO | NETIF_F_HW_VLAN_RX | \ 270#define ETH_ALL_FEATURES (NETIF_F_LRO | NETIF_F_HW_VLAN_CTAG_RX | \
271 NETIF_F_HW_VLAN_TX | NETIF_F_NTUPLE | NETIF_F_RXHASH) 271 NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_NTUPLE | \
272 NETIF_F_RXHASH)
272 273
273static u32 __ethtool_get_flags(struct net_device *dev) 274static u32 __ethtool_get_flags(struct net_device *dev)
274{ 275{
275 u32 flags = 0; 276 u32 flags = 0;
276 277
277 if (dev->features & NETIF_F_LRO) flags |= ETH_FLAG_LRO; 278 if (dev->features & NETIF_F_LRO) flags |= ETH_FLAG_LRO;
278 if (dev->features & NETIF_F_HW_VLAN_RX) flags |= ETH_FLAG_RXVLAN; 279 if (dev->features & NETIF_F_HW_VLAN_CTAG_RX) flags |= ETH_FLAG_RXVLAN;
279 if (dev->features & NETIF_F_HW_VLAN_TX) flags |= ETH_FLAG_TXVLAN; 280 if (dev->features & NETIF_F_HW_VLAN_CTAG_TX) flags |= ETH_FLAG_TXVLAN;
280 if (dev->features & NETIF_F_NTUPLE) flags |= ETH_FLAG_NTUPLE; 281 if (dev->features & NETIF_F_NTUPLE) flags |= ETH_FLAG_NTUPLE;
281 if (dev->features & NETIF_F_RXHASH) flags |= ETH_FLAG_RXHASH; 282 if (dev->features & NETIF_F_RXHASH) flags |= ETH_FLAG_RXHASH;
282 283
283 return flags; 284 return flags;
284} 285}
@@ -291,8 +292,8 @@ static int __ethtool_set_flags(struct net_device *dev, u32 data)
291 return -EINVAL; 292 return -EINVAL;
292 293
293 if (data & ETH_FLAG_LRO) features |= NETIF_F_LRO; 294 if (data & ETH_FLAG_LRO) features |= NETIF_F_LRO;
294 if (data & ETH_FLAG_RXVLAN) features |= NETIF_F_HW_VLAN_RX; 295 if (data & ETH_FLAG_RXVLAN) features |= NETIF_F_HW_VLAN_CTAG_RX;
295 if (data & ETH_FLAG_TXVLAN) features |= NETIF_F_HW_VLAN_TX; 296 if (data & ETH_FLAG_TXVLAN) features |= NETIF_F_HW_VLAN_CTAG_TX;
296 if (data & ETH_FLAG_NTUPLE) features |= NETIF_F_NTUPLE; 297 if (data & ETH_FLAG_NTUPLE) features |= NETIF_F_NTUPLE;
297 if (data & ETH_FLAG_RXHASH) features |= NETIF_F_RXHASH; 298 if (data & ETH_FLAG_RXHASH) features |= NETIF_F_RXHASH;
298 299
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index a3a17aed3639..8de961e67cf7 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -383,7 +383,7 @@ void netpoll_send_skb_on_dev(struct netpoll *np, struct sk_buff *skb,
383 if (__netif_tx_trylock(txq)) { 383 if (__netif_tx_trylock(txq)) {
384 if (!netif_xmit_stopped(txq)) { 384 if (!netif_xmit_stopped(txq)) {
385 if (vlan_tx_tag_present(skb) && 385 if (vlan_tx_tag_present(skb) &&
386 !(netif_skb_features(skb) & NETIF_F_HW_VLAN_TX)) { 386 !(netif_skb_features(skb) & NETIF_F_HW_VLAN_CTAG_TX)) {
387 skb = __vlan_put_tag(skb, vlan_tx_tag_get(skb)); 387 skb = __vlan_put_tag(skb, vlan_tx_tag_get(skb));
388 if (unlikely(!skb)) 388 if (unlikely(!skb))
389 break; 389 break;