aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
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/infiniband
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/infiniband')
-rw-r--r--drivers/infiniband/hw/nes/nes_nic.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/nes/nes_nic.c b/drivers/infiniband/hw/nes/nes_nic.c
index 85cf4d1ac442..49eb5111d2cd 100644
--- a/drivers/infiniband/hw/nes/nes_nic.c
+++ b/drivers/infiniband/hw/nes/nes_nic.c
@@ -1599,7 +1599,7 @@ static void nes_vlan_mode(struct net_device *netdev, struct nes_device *nesdev,
1599 1599
1600 /* Enable/Disable VLAN Stripping */ 1600 /* Enable/Disable VLAN Stripping */
1601 u32temp = nes_read_indexed(nesdev, NES_IDX_PCIX_DIAG); 1601 u32temp = nes_read_indexed(nesdev, NES_IDX_PCIX_DIAG);
1602 if (features & NETIF_F_HW_VLAN_RX) 1602 if (features & NETIF_F_HW_VLAN_CTAG_RX)
1603 u32temp &= 0xfdffffff; 1603 u32temp &= 0xfdffffff;
1604 else 1604 else
1605 u32temp |= 0x02000000; 1605 u32temp |= 0x02000000;
@@ -1614,10 +1614,10 @@ static netdev_features_t nes_fix_features(struct net_device *netdev, netdev_feat
1614 * Since there is no support for separate rx/tx vlan accel 1614 * Since there is no support for separate rx/tx vlan accel
1615 * enable/disable make sure tx flag is always in same state as rx. 1615 * enable/disable make sure tx flag is always in same state as rx.
1616 */ 1616 */
1617 if (features & NETIF_F_HW_VLAN_RX) 1617 if (features & NETIF_F_HW_VLAN_CTAG_RX)
1618 features |= NETIF_F_HW_VLAN_TX; 1618 features |= NETIF_F_HW_VLAN_CTAG_TX;
1619 else 1619 else
1620 features &= ~NETIF_F_HW_VLAN_TX; 1620 features &= ~NETIF_F_HW_VLAN_CTAG_TX;
1621 1621
1622 return features; 1622 return features;
1623} 1623}
@@ -1628,7 +1628,7 @@ static int nes_set_features(struct net_device *netdev, netdev_features_t feature
1628 struct nes_device *nesdev = nesvnic->nesdev; 1628 struct nes_device *nesdev = nesvnic->nesdev;
1629 u32 changed = netdev->features ^ features; 1629 u32 changed = netdev->features ^ features;
1630 1630
1631 if (changed & NETIF_F_HW_VLAN_RX) 1631 if (changed & NETIF_F_HW_VLAN_CTAG_RX)
1632 nes_vlan_mode(netdev, nesdev, features); 1632 nes_vlan_mode(netdev, nesdev, features);
1633 1633
1634 return 0; 1634 return 0;
@@ -1706,11 +1706,11 @@ struct net_device *nes_netdev_init(struct nes_device *nesdev,
1706 netdev->dev_addr[4] = (u8)(u64temp>>8); 1706 netdev->dev_addr[4] = (u8)(u64temp>>8);
1707 netdev->dev_addr[5] = (u8)u64temp; 1707 netdev->dev_addr[5] = (u8)u64temp;
1708 1708
1709 netdev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_RXCSUM | NETIF_F_HW_VLAN_RX; 1709 netdev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_RXCSUM | NETIF_F_HW_VLAN_CTAG_RX;
1710 if ((nesvnic->logical_port < 2) || (nesdev->nesadapter->hw_rev != NE020_REV)) 1710 if ((nesvnic->logical_port < 2) || (nesdev->nesadapter->hw_rev != NE020_REV))
1711 netdev->hw_features |= NETIF_F_TSO; 1711 netdev->hw_features |= NETIF_F_TSO;
1712 1712
1713 netdev->features = netdev->hw_features | NETIF_F_HIGHDMA | NETIF_F_HW_VLAN_TX; 1713 netdev->features = netdev->hw_features | NETIF_F_HIGHDMA | NETIF_F_HW_VLAN_CTAG_TX;
1714 netdev->hw_features |= NETIF_F_LRO; 1714 netdev->hw_features |= NETIF_F_LRO;
1715 1715
1716 nes_debug(NES_DBG_INIT, "nesvnic = %p, reported features = 0x%lX, QPid = %d," 1716 nes_debug(NES_DBG_INIT, "nesvnic = %p, reported features = 0x%lX, QPid = %d,"