aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/nvidia/forcedeth.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 /drivers/net/ethernet/nvidia/forcedeth.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 'drivers/net/ethernet/nvidia/forcedeth.c')
-rw-r--r--drivers/net/ethernet/nvidia/forcedeth.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index 5ae124719790..fcad64081d74 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -2961,11 +2961,11 @@ static int nv_rx_process_optimized(struct net_device *dev, int limit)
2961 vlanflags = le32_to_cpu(np->get_rx.ex->buflow); 2961 vlanflags = le32_to_cpu(np->get_rx.ex->buflow);
2962 2962
2963 /* 2963 /*
2964 * There's need to check for NETIF_F_HW_VLAN_RX here. 2964 * There's need to check for NETIF_F_HW_VLAN_CTAG_RX
2965 * Even if vlan rx accel is disabled, 2965 * here. Even if vlan rx accel is disabled,
2966 * NV_RX3_VLAN_TAG_PRESENT is pseudo randomly set. 2966 * NV_RX3_VLAN_TAG_PRESENT is pseudo randomly set.
2967 */ 2967 */
2968 if (dev->features & NETIF_F_HW_VLAN_RX && 2968 if (dev->features & NETIF_F_HW_VLAN_CTAG_RX &&
2969 vlanflags & NV_RX3_VLAN_TAG_PRESENT) { 2969 vlanflags & NV_RX3_VLAN_TAG_PRESENT) {
2970 u16 vid = vlanflags & NV_RX3_VLAN_TAG_MASK; 2970 u16 vid = vlanflags & NV_RX3_VLAN_TAG_MASK;
2971 2971
@@ -4816,7 +4816,7 @@ static netdev_features_t nv_fix_features(struct net_device *dev,
4816 netdev_features_t features) 4816 netdev_features_t features)
4817{ 4817{
4818 /* vlan is dependent on rx checksum offload */ 4818 /* vlan is dependent on rx checksum offload */
4819 if (features & (NETIF_F_HW_VLAN_TX|NETIF_F_HW_VLAN_RX)) 4819 if (features & (NETIF_F_HW_VLAN_CTAG_TX|NETIF_F_HW_VLAN_CTAG_RX))
4820 features |= NETIF_F_RXCSUM; 4820 features |= NETIF_F_RXCSUM;
4821 4821
4822 return features; 4822 return features;
@@ -4828,12 +4828,12 @@ static void nv_vlan_mode(struct net_device *dev, netdev_features_t features)
4828 4828
4829 spin_lock_irq(&np->lock); 4829 spin_lock_irq(&np->lock);
4830 4830
4831 if (features & NETIF_F_HW_VLAN_RX) 4831 if (features & NETIF_F_HW_VLAN_CTAG_RX)
4832 np->txrxctl_bits |= NVREG_TXRXCTL_VLANSTRIP; 4832 np->txrxctl_bits |= NVREG_TXRXCTL_VLANSTRIP;
4833 else 4833 else
4834 np->txrxctl_bits &= ~NVREG_TXRXCTL_VLANSTRIP; 4834 np->txrxctl_bits &= ~NVREG_TXRXCTL_VLANSTRIP;
4835 4835
4836 if (features & NETIF_F_HW_VLAN_TX) 4836 if (features & NETIF_F_HW_VLAN_CTAG_TX)
4837 np->txrxctl_bits |= NVREG_TXRXCTL_VLANINS; 4837 np->txrxctl_bits |= NVREG_TXRXCTL_VLANINS;
4838 else 4838 else
4839 np->txrxctl_bits &= ~NVREG_TXRXCTL_VLANINS; 4839 np->txrxctl_bits &= ~NVREG_TXRXCTL_VLANINS;
@@ -4870,7 +4870,7 @@ static int nv_set_features(struct net_device *dev, netdev_features_t features)
4870 spin_unlock_irq(&np->lock); 4870 spin_unlock_irq(&np->lock);
4871 } 4871 }
4872 4872
4873 if (changed & (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX)) 4873 if (changed & (NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX))
4874 nv_vlan_mode(dev, features); 4874 nv_vlan_mode(dev, features);
4875 4875
4876 return 0; 4876 return 0;
@@ -5705,7 +5705,8 @@ static int nv_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
5705 np->vlanctl_bits = 0; 5705 np->vlanctl_bits = 0;
5706 if (id->driver_data & DEV_HAS_VLAN) { 5706 if (id->driver_data & DEV_HAS_VLAN) {
5707 np->vlanctl_bits = NVREG_VLANCONTROL_ENABLE; 5707 np->vlanctl_bits = NVREG_VLANCONTROL_ENABLE;
5708 dev->hw_features |= NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_TX; 5708 dev->hw_features |= NETIF_F_HW_VLAN_CTAG_RX |
5709 NETIF_F_HW_VLAN_CTAG_TX;
5709 } 5710 }
5710 5711
5711 dev->features |= dev->hw_features; 5712 dev->features |= dev->hw_features;
@@ -5996,7 +5997,8 @@ static int nv_probe(struct pci_dev *pci_dev, const struct pci_device_id *id)
5996 dev->features & NETIF_F_HIGHDMA ? "highdma " : "", 5997 dev->features & NETIF_F_HIGHDMA ? "highdma " : "",
5997 dev->features & (NETIF_F_IP_CSUM | NETIF_F_SG) ? 5998 dev->features & (NETIF_F_IP_CSUM | NETIF_F_SG) ?
5998 "csum " : "", 5999 "csum " : "",
5999 dev->features & (NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_TX) ? 6000 dev->features & (NETIF_F_HW_VLAN_CTAG_RX |
6001 NETIF_F_HW_VLAN_CTAG_TX) ?
6000 "vlan " : "", 6002 "vlan " : "",
6001 dev->features & (NETIF_F_LOOPBACK) ? 6003 dev->features & (NETIF_F_LOOPBACK) ?
6002 "loopback " : "", 6004 "loopback " : "",