aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel
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 /drivers/net/ethernet/intel
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 'drivers/net/ethernet/intel')
-rw-r--r--drivers/net/ethernet/intel/e1000/e1000_main.c16
-rw-r--r--drivers/net/ethernet/intel/e1000e/netdev.c10
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c18
-rw-r--r--drivers/net/ethernet/intel/igbvf/netdev.c6
-rw-r--r--drivers/net/ethernet/intel/ixgb/ixgb_main.c14
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c12
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c2
-rw-r--r--drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c6
8 files changed, 42 insertions, 42 deletions
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index d98e1d0996d4..8d0d0d420c21 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -809,10 +809,10 @@ static netdev_features_t e1000_fix_features(struct net_device *netdev,
809 /* Since there is no support for separate Rx/Tx vlan accel 809 /* Since there is no support for separate Rx/Tx vlan accel
810 * enable/disable make sure Tx flag is always in same state as Rx. 810 * enable/disable make sure Tx flag is always in same state as Rx.
811 */ 811 */
812 if (features & NETIF_F_HW_VLAN_RX) 812 if (features & NETIF_F_HW_VLAN_CTAG_RX)
813 features |= NETIF_F_HW_VLAN_TX; 813 features |= NETIF_F_HW_VLAN_CTAG_TX;
814 else 814 else
815 features &= ~NETIF_F_HW_VLAN_TX; 815 features &= ~NETIF_F_HW_VLAN_CTAG_TX;
816 816
817 return features; 817 return features;
818} 818}
@@ -823,7 +823,7 @@ static int e1000_set_features(struct net_device *netdev,
823 struct e1000_adapter *adapter = netdev_priv(netdev); 823 struct e1000_adapter *adapter = netdev_priv(netdev);
824 netdev_features_t changed = features ^ netdev->features; 824 netdev_features_t changed = features ^ netdev->features;
825 825
826 if (changed & NETIF_F_HW_VLAN_RX) 826 if (changed & NETIF_F_HW_VLAN_CTAG_RX)
827 e1000_vlan_mode(netdev, features); 827 e1000_vlan_mode(netdev, features);
828 828
829 if (!(changed & (NETIF_F_RXCSUM | NETIF_F_RXALL))) 829 if (!(changed & (NETIF_F_RXCSUM | NETIF_F_RXALL)))
@@ -1058,9 +1058,9 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1058 if (hw->mac_type >= e1000_82543) { 1058 if (hw->mac_type >= e1000_82543) {
1059 netdev->hw_features = NETIF_F_SG | 1059 netdev->hw_features = NETIF_F_SG |
1060 NETIF_F_HW_CSUM | 1060 NETIF_F_HW_CSUM |
1061 NETIF_F_HW_VLAN_RX; 1061 NETIF_F_HW_VLAN_CTAG_RX;
1062 netdev->features = NETIF_F_HW_VLAN_TX | 1062 netdev->features = NETIF_F_HW_VLAN_CTAG_TX |
1063 NETIF_F_HW_VLAN_FILTER; 1063 NETIF_F_HW_VLAN_CTAG_FILTER;
1064 } 1064 }
1065 1065
1066 if ((hw->mac_type >= e1000_82544) && 1066 if ((hw->mac_type >= e1000_82544) &&
@@ -4785,7 +4785,7 @@ static void __e1000_vlan_mode(struct e1000_adapter *adapter,
4785 u32 ctrl; 4785 u32 ctrl;
4786 4786
4787 ctrl = er32(CTRL); 4787 ctrl = er32(CTRL);
4788 if (features & NETIF_F_HW_VLAN_RX) { 4788 if (features & NETIF_F_HW_VLAN_CTAG_RX) {
4789 /* enable VLAN tag insert/strip */ 4789 /* enable VLAN tag insert/strip */
4790 ctrl |= E1000_CTRL_VME; 4790 ctrl |= E1000_CTRL_VME;
4791 } else { 4791 } else {
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index b18fad5b579e..a2e7db33bf9d 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -3373,7 +3373,7 @@ static void e1000e_set_rx_mode(struct net_device *netdev)
3373 3373
3374 ew32(RCTL, rctl); 3374 ew32(RCTL, rctl);
3375 3375
3376 if (netdev->features & NETIF_F_HW_VLAN_RX) 3376 if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX)
3377 e1000e_vlan_strip_enable(adapter); 3377 e1000e_vlan_strip_enable(adapter);
3378 else 3378 else
3379 e1000e_vlan_strip_disable(adapter); 3379 e1000e_vlan_strip_disable(adapter);
@@ -6418,7 +6418,7 @@ static int e1000_set_features(struct net_device *netdev,
6418 if (changed & (NETIF_F_TSO | NETIF_F_TSO6)) 6418 if (changed & (NETIF_F_TSO | NETIF_F_TSO6))
6419 adapter->flags |= FLAG_TSO_FORCE; 6419 adapter->flags |= FLAG_TSO_FORCE;
6420 6420
6421 if (!(changed & (NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_TX | 6421 if (!(changed & (NETIF_F_HW_VLAN_CTAG_RX | NETIF_F_HW_VLAN_CTAG_TX |
6422 NETIF_F_RXCSUM | NETIF_F_RXHASH | NETIF_F_RXFCS | 6422 NETIF_F_RXCSUM | NETIF_F_RXHASH | NETIF_F_RXFCS |
6423 NETIF_F_RXALL))) 6423 NETIF_F_RXALL)))
6424 return 0; 6424 return 0;
@@ -6629,8 +6629,8 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
6629 6629
6630 /* Set initial default active device features */ 6630 /* Set initial default active device features */
6631 netdev->features = (NETIF_F_SG | 6631 netdev->features = (NETIF_F_SG |
6632 NETIF_F_HW_VLAN_RX | 6632 NETIF_F_HW_VLAN_CTAG_RX |
6633 NETIF_F_HW_VLAN_TX | 6633 NETIF_F_HW_VLAN_CTAG_TX |
6634 NETIF_F_TSO | 6634 NETIF_F_TSO |
6635 NETIF_F_TSO6 | 6635 NETIF_F_TSO6 |
6636 NETIF_F_RXHASH | 6636 NETIF_F_RXHASH |
@@ -6644,7 +6644,7 @@ static int e1000_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
6644 netdev->hw_features |= NETIF_F_RXALL; 6644 netdev->hw_features |= NETIF_F_RXALL;
6645 6645
6646 if (adapter->flags & FLAG_HAS_HW_VLAN_FILTER) 6646 if (adapter->flags & FLAG_HAS_HW_VLAN_FILTER)
6647 netdev->features |= NETIF_F_HW_VLAN_FILTER; 6647 netdev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
6648 6648
6649 netdev->vlan_features |= (NETIF_F_SG | 6649 netdev->vlan_features |= (NETIF_F_SG |
6650 NETIF_F_TSO | 6650 NETIF_F_TSO |
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 38590252be64..b0b1777c0af6 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -1860,10 +1860,10 @@ static netdev_features_t igb_fix_features(struct net_device *netdev,
1860 /* Since there is no support for separate Rx/Tx vlan accel 1860 /* Since there is no support for separate Rx/Tx vlan accel
1861 * enable/disable make sure Tx flag is always in same state as Rx. 1861 * enable/disable make sure Tx flag is always in same state as Rx.
1862 */ 1862 */
1863 if (features & NETIF_F_HW_VLAN_RX) 1863 if (features & NETIF_F_HW_VLAN_CTAG_RX)
1864 features |= NETIF_F_HW_VLAN_TX; 1864 features |= NETIF_F_HW_VLAN_CTAG_TX;
1865 else 1865 else
1866 features &= ~NETIF_F_HW_VLAN_TX; 1866 features &= ~NETIF_F_HW_VLAN_CTAG_TX;
1867 1867
1868 return features; 1868 return features;
1869} 1869}
@@ -1874,7 +1874,7 @@ static int igb_set_features(struct net_device *netdev,
1874 netdev_features_t changed = netdev->features ^ features; 1874 netdev_features_t changed = netdev->features ^ features;
1875 struct igb_adapter *adapter = netdev_priv(netdev); 1875 struct igb_adapter *adapter = netdev_priv(netdev);
1876 1876
1877 if (changed & NETIF_F_HW_VLAN_RX) 1877 if (changed & NETIF_F_HW_VLAN_CTAG_RX)
1878 igb_vlan_mode(netdev, features); 1878 igb_vlan_mode(netdev, features);
1879 1879
1880 if (!(changed & NETIF_F_RXALL)) 1880 if (!(changed & NETIF_F_RXALL))
@@ -2127,15 +2127,15 @@ static int igb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2127 NETIF_F_TSO6 | 2127 NETIF_F_TSO6 |
2128 NETIF_F_RXHASH | 2128 NETIF_F_RXHASH |
2129 NETIF_F_RXCSUM | 2129 NETIF_F_RXCSUM |
2130 NETIF_F_HW_VLAN_RX | 2130 NETIF_F_HW_VLAN_CTAG_RX |
2131 NETIF_F_HW_VLAN_TX; 2131 NETIF_F_HW_VLAN_CTAG_TX;
2132 2132
2133 /* copy netdev features into list of user selectable features */ 2133 /* copy netdev features into list of user selectable features */
2134 netdev->hw_features |= netdev->features; 2134 netdev->hw_features |= netdev->features;
2135 netdev->hw_features |= NETIF_F_RXALL; 2135 netdev->hw_features |= NETIF_F_RXALL;
2136 2136
2137 /* set this bit last since it cannot be part of hw_features */ 2137 /* set this bit last since it cannot be part of hw_features */
2138 netdev->features |= NETIF_F_HW_VLAN_FILTER; 2138 netdev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
2139 2139
2140 netdev->vlan_features |= NETIF_F_TSO | 2140 netdev->vlan_features |= NETIF_F_TSO |
2141 NETIF_F_TSO6 | 2141 NETIF_F_TSO6 |
@@ -6674,7 +6674,7 @@ static void igb_process_skb_fields(struct igb_ring *rx_ring,
6674 6674
6675 igb_ptp_rx_hwtstamp(rx_ring->q_vector, rx_desc, skb); 6675 igb_ptp_rx_hwtstamp(rx_ring->q_vector, rx_desc, skb);
6676 6676
6677 if ((dev->features & NETIF_F_HW_VLAN_RX) && 6677 if ((dev->features & NETIF_F_HW_VLAN_CTAG_RX) &&
6678 igb_test_staterr(rx_desc, E1000_RXD_STAT_VP)) { 6678 igb_test_staterr(rx_desc, E1000_RXD_STAT_VP)) {
6679 u16 vid; 6679 u16 vid;
6680 if (igb_test_staterr(rx_desc, E1000_RXDEXT_STATERR_LB) && 6680 if (igb_test_staterr(rx_desc, E1000_RXDEXT_STATERR_LB) &&
@@ -6954,7 +6954,7 @@ static void igb_vlan_mode(struct net_device *netdev, netdev_features_t features)
6954 struct igb_adapter *adapter = netdev_priv(netdev); 6954 struct igb_adapter *adapter = netdev_priv(netdev);
6955 struct e1000_hw *hw = &adapter->hw; 6955 struct e1000_hw *hw = &adapter->hw;
6956 u32 ctrl, rctl; 6956 u32 ctrl, rctl;
6957 bool enable = !!(features & NETIF_F_HW_VLAN_RX); 6957 bool enable = !!(features & NETIF_F_HW_VLAN_CTAG_RX);
6958 6958
6959 if (enable) { 6959 if (enable) {
6960 /* enable VLAN tag insert/strip */ 6960 /* enable VLAN tag insert/strip */
diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index bea46bb26061..33e7b3069fb6 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -2722,9 +2722,9 @@ static int igbvf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2722 NETIF_F_RXCSUM; 2722 NETIF_F_RXCSUM;
2723 2723
2724 netdev->features = netdev->hw_features | 2724 netdev->features = netdev->hw_features |
2725 NETIF_F_HW_VLAN_TX | 2725 NETIF_F_HW_VLAN_CTAG_TX |
2726 NETIF_F_HW_VLAN_RX | 2726 NETIF_F_HW_VLAN_CTAG_RX |
2727 NETIF_F_HW_VLAN_FILTER; 2727 NETIF_F_HW_VLAN_CTAG_FILTER;
2728 2728
2729 if (pci_using_dac) 2729 if (pci_using_dac)
2730 netdev->features |= NETIF_F_HIGHDMA; 2730 netdev->features |= NETIF_F_HIGHDMA;
diff --git a/drivers/net/ethernet/intel/ixgb/ixgb_main.c b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
index 5dc119fd95a8..e65d9e910227 100644
--- a/drivers/net/ethernet/intel/ixgb/ixgb_main.c
+++ b/drivers/net/ethernet/intel/ixgb/ixgb_main.c
@@ -332,8 +332,8 @@ ixgb_fix_features(struct net_device *netdev, netdev_features_t features)
332 * Tx VLAN insertion does not work per HW design when Rx stripping is 332 * Tx VLAN insertion does not work per HW design when Rx stripping is
333 * disabled. 333 * disabled.
334 */ 334 */
335 if (!(features & NETIF_F_HW_VLAN_RX)) 335 if (!(features & NETIF_F_HW_VLAN_CTAG_RX))
336 features &= ~NETIF_F_HW_VLAN_TX; 336 features &= ~NETIF_F_HW_VLAN_CTAG_TX;
337 337
338 return features; 338 return features;
339} 339}
@@ -344,7 +344,7 @@ ixgb_set_features(struct net_device *netdev, netdev_features_t features)
344 struct ixgb_adapter *adapter = netdev_priv(netdev); 344 struct ixgb_adapter *adapter = netdev_priv(netdev);
345 netdev_features_t changed = features ^ netdev->features; 345 netdev_features_t changed = features ^ netdev->features;
346 346
347 if (!(changed & (NETIF_F_RXCSUM|NETIF_F_HW_VLAN_RX))) 347 if (!(changed & (NETIF_F_RXCSUM|NETIF_F_HW_VLAN_CTAG_RX)))
348 return 0; 348 return 0;
349 349
350 adapter->rx_csum = !!(features & NETIF_F_RXCSUM); 350 adapter->rx_csum = !!(features & NETIF_F_RXCSUM);
@@ -479,10 +479,10 @@ ixgb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
479 netdev->hw_features = NETIF_F_SG | 479 netdev->hw_features = NETIF_F_SG |
480 NETIF_F_TSO | 480 NETIF_F_TSO |
481 NETIF_F_HW_CSUM | 481 NETIF_F_HW_CSUM |
482 NETIF_F_HW_VLAN_TX | 482 NETIF_F_HW_VLAN_CTAG_TX |
483 NETIF_F_HW_VLAN_RX; 483 NETIF_F_HW_VLAN_CTAG_RX;
484 netdev->features = netdev->hw_features | 484 netdev->features = netdev->hw_features |
485 NETIF_F_HW_VLAN_FILTER; 485 NETIF_F_HW_VLAN_CTAG_FILTER;
486 netdev->hw_features |= NETIF_F_RXCSUM; 486 netdev->hw_features |= NETIF_F_RXCSUM;
487 487
488 if (pci_using_dac) { 488 if (pci_using_dac) {
@@ -1140,7 +1140,7 @@ ixgb_set_multi(struct net_device *netdev)
1140 } 1140 }
1141 1141
1142alloc_failed: 1142alloc_failed:
1143 if (netdev->features & NETIF_F_HW_VLAN_RX) 1143 if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX)
1144 ixgb_vlan_strip_enable(adapter); 1144 ixgb_vlan_strip_enable(adapter);
1145 else 1145 else
1146 ixgb_vlan_strip_disable(adapter); 1146 ixgb_vlan_strip_disable(adapter);
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index c022f9c417a6..0316b65dfe06 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -1488,7 +1488,7 @@ static void ixgbe_process_skb_fields(struct ixgbe_ring *rx_ring,
1488 1488
1489 ixgbe_ptp_rx_hwtstamp(rx_ring, rx_desc, skb); 1489 ixgbe_ptp_rx_hwtstamp(rx_ring, rx_desc, skb);
1490 1490
1491 if ((dev->features & NETIF_F_HW_VLAN_RX) && 1491 if ((dev->features & NETIF_F_HW_VLAN_CTAG_RX) &&
1492 ixgbe_test_staterr(rx_desc, IXGBE_RXD_STAT_VP)) { 1492 ixgbe_test_staterr(rx_desc, IXGBE_RXD_STAT_VP)) {
1493 u16 vid = le16_to_cpu(rx_desc->wb.upper.vlan); 1493 u16 vid = le16_to_cpu(rx_desc->wb.upper.vlan);
1494 __vlan_hwaccel_put_tag(skb, vid); 1494 __vlan_hwaccel_put_tag(skb, vid);
@@ -3722,7 +3722,7 @@ void ixgbe_set_rx_mode(struct net_device *netdev)
3722 3722
3723 IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl); 3723 IXGBE_WRITE_REG(hw, IXGBE_FCTRL, fctrl);
3724 3724
3725 if (netdev->features & NETIF_F_HW_VLAN_RX) 3725 if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX)
3726 ixgbe_vlan_strip_enable(adapter); 3726 ixgbe_vlan_strip_enable(adapter);
3727 else 3727 else
3728 ixgbe_vlan_strip_disable(adapter); 3728 ixgbe_vlan_strip_disable(adapter);
@@ -7024,7 +7024,7 @@ static int ixgbe_set_features(struct net_device *netdev,
7024 break; 7024 break;
7025 } 7025 }
7026 7026
7027 if (features & NETIF_F_HW_VLAN_RX) 7027 if (features & NETIF_F_HW_VLAN_CTAG_RX)
7028 ixgbe_vlan_strip_enable(adapter); 7028 ixgbe_vlan_strip_enable(adapter);
7029 else 7029 else
7030 ixgbe_vlan_strip_disable(adapter); 7030 ixgbe_vlan_strip_disable(adapter);
@@ -7431,9 +7431,9 @@ skip_sriov:
7431 netdev->features = NETIF_F_SG | 7431 netdev->features = NETIF_F_SG |
7432 NETIF_F_IP_CSUM | 7432 NETIF_F_IP_CSUM |
7433 NETIF_F_IPV6_CSUM | 7433 NETIF_F_IPV6_CSUM |
7434 NETIF_F_HW_VLAN_TX | 7434 NETIF_F_HW_VLAN_CTAG_TX |
7435 NETIF_F_HW_VLAN_RX | 7435 NETIF_F_HW_VLAN_CTAG_RX |
7436 NETIF_F_HW_VLAN_FILTER | 7436 NETIF_F_HW_VLAN_CTAG_FILTER |
7437 NETIF_F_TSO | 7437 NETIF_F_TSO |
7438 NETIF_F_TSO6 | 7438 NETIF_F_TSO6 |
7439 NETIF_F_RXHASH | 7439 NETIF_F_RXHASH |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index b3e6530637e3..2d4bdcc4fdbe 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -35,7 +35,7 @@
35#include <linux/ip.h> 35#include <linux/ip.h>
36#include <linux/tcp.h> 36#include <linux/tcp.h>
37#include <linux/ipv6.h> 37#include <linux/ipv6.h>
38#ifdef NETIF_F_HW_VLAN_TX 38#ifdef NETIF_F_HW_VLAN_CTAG_TX
39#include <linux/if_vlan.h> 39#include <linux/if_vlan.h>
40#endif 40#endif
41 41
diff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
index eeae9349f78b..8f907b7af319 100644
--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
@@ -3410,9 +3410,9 @@ static int ixgbevf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
3410 NETIF_F_RXCSUM; 3410 NETIF_F_RXCSUM;
3411 3411
3412 netdev->features = netdev->hw_features | 3412 netdev->features = netdev->hw_features |
3413 NETIF_F_HW_VLAN_TX | 3413 NETIF_F_HW_VLAN_CTAG_TX |
3414 NETIF_F_HW_VLAN_RX | 3414 NETIF_F_HW_VLAN_CTAG_RX |
3415 NETIF_F_HW_VLAN_FILTER; 3415 NETIF_F_HW_VLAN_CTAG_FILTER;
3416 3416
3417 netdev->vlan_features |= NETIF_F_TSO; 3417 netdev->vlan_features |= NETIF_F_TSO;
3418 netdev->vlan_features |= NETIF_F_TSO6; 3418 netdev->vlan_features |= NETIF_F_TSO6;