aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/atheros/atlx
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/atheros/atlx
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/atheros/atlx')
-rw-r--r--drivers/net/ethernet/atheros/atlx/atl1.c4
-rw-r--r--drivers/net/ethernet/atheros/atlx/atl2.c16
-rw-r--r--drivers/net/ethernet/atheros/atlx/atlx.c10
3 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c
index 8338013ab33d..fd7d85044e4a 100644
--- a/drivers/net/ethernet/atheros/atlx/atl1.c
+++ b/drivers/net/ethernet/atheros/atlx/atl1.c
@@ -3018,10 +3018,10 @@ static int atl1_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
3018 3018
3019 netdev->features = NETIF_F_HW_CSUM; 3019 netdev->features = NETIF_F_HW_CSUM;
3020 netdev->features |= NETIF_F_SG; 3020 netdev->features |= NETIF_F_SG;
3021 netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); 3021 netdev->features |= (NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX);
3022 3022
3023 netdev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_TSO | 3023 netdev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_TSO |
3024 NETIF_F_HW_VLAN_RX; 3024 NETIF_F_HW_VLAN_CTAG_RX;
3025 3025
3026 /* is this valid? see atl1_setup_mac_ctrl() */ 3026 /* is this valid? see atl1_setup_mac_ctrl() */
3027 netdev->features |= NETIF_F_RXCSUM; 3027 netdev->features |= NETIF_F_RXCSUM;
diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c
index a046b6ff847c..6b2c08a89b7e 100644
--- a/drivers/net/ethernet/atheros/atlx/atl2.c
+++ b/drivers/net/ethernet/atheros/atlx/atl2.c
@@ -363,7 +363,7 @@ static inline void atl2_irq_disable(struct atl2_adapter *adapter)
363 363
364static void __atl2_vlan_mode(netdev_features_t features, u32 *ctrl) 364static void __atl2_vlan_mode(netdev_features_t features, u32 *ctrl)
365{ 365{
366 if (features & NETIF_F_HW_VLAN_RX) { 366 if (features & NETIF_F_HW_VLAN_CTAG_RX) {
367 /* enable VLAN tag insert/strip */ 367 /* enable VLAN tag insert/strip */
368 *ctrl |= MAC_CTRL_RMV_VLAN; 368 *ctrl |= MAC_CTRL_RMV_VLAN;
369 } else { 369 } else {
@@ -399,10 +399,10 @@ static netdev_features_t atl2_fix_features(struct net_device *netdev,
399 * Since there is no support for separate rx/tx vlan accel 399 * Since there is no support for separate rx/tx vlan accel
400 * enable/disable make sure tx flag is always in same state as rx. 400 * enable/disable make sure tx flag is always in same state as rx.
401 */ 401 */
402 if (features & NETIF_F_HW_VLAN_RX) 402 if (features & NETIF_F_HW_VLAN_CTAG_RX)
403 features |= NETIF_F_HW_VLAN_TX; 403 features |= NETIF_F_HW_VLAN_CTAG_TX;
404 else 404 else
405 features &= ~NETIF_F_HW_VLAN_TX; 405 features &= ~NETIF_F_HW_VLAN_CTAG_TX;
406 406
407 return features; 407 return features;
408} 408}
@@ -412,7 +412,7 @@ static int atl2_set_features(struct net_device *netdev,
412{ 412{
413 netdev_features_t changed = netdev->features ^ features; 413 netdev_features_t changed = netdev->features ^ features;
414 414
415 if (changed & NETIF_F_HW_VLAN_RX) 415 if (changed & NETIF_F_HW_VLAN_CTAG_RX)
416 atl2_vlan_mode(netdev, features); 416 atl2_vlan_mode(netdev, features);
417 417
418 return 0; 418 return 0;
@@ -887,7 +887,7 @@ static netdev_tx_t atl2_xmit_frame(struct sk_buff *skb,
887 skb->len-copy_len); 887 skb->len-copy_len);
888 offset = ((u32)(skb->len-copy_len + 3) & ~3); 888 offset = ((u32)(skb->len-copy_len + 3) & ~3);
889 } 889 }
890#ifdef NETIF_F_HW_VLAN_TX 890#ifdef NETIF_F_HW_VLAN_CTAG_TX
891 if (vlan_tx_tag_present(skb)) { 891 if (vlan_tx_tag_present(skb)) {
892 u16 vlan_tag = vlan_tx_tag_get(skb); 892 u16 vlan_tag = vlan_tx_tag_get(skb);
893 vlan_tag = (vlan_tag << 4) | 893 vlan_tag = (vlan_tag << 4) |
@@ -1413,8 +1413,8 @@ static int atl2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1413 1413
1414 err = -EIO; 1414 err = -EIO;
1415 1415
1416 netdev->hw_features = NETIF_F_SG | NETIF_F_HW_VLAN_RX; 1416 netdev->hw_features = NETIF_F_SG | NETIF_F_HW_VLAN_CTAG_RX;
1417 netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); 1417 netdev->features |= (NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_CTAG_RX);
1418 1418
1419 /* Init PHY as early as possible due to power saving issue */ 1419 /* Init PHY as early as possible due to power saving issue */
1420 atl2_phy_init(&adapter->hw); 1420 atl2_phy_init(&adapter->hw);
diff --git a/drivers/net/ethernet/atheros/atlx/atlx.c b/drivers/net/ethernet/atheros/atlx/atlx.c
index f82eb1699464..46a622cceee4 100644
--- a/drivers/net/ethernet/atheros/atlx/atlx.c
+++ b/drivers/net/ethernet/atheros/atlx/atlx.c
@@ -220,7 +220,7 @@ static void atlx_link_chg_task(struct work_struct *work)
220 220
221static void __atlx_vlan_mode(netdev_features_t features, u32 *ctrl) 221static void __atlx_vlan_mode(netdev_features_t features, u32 *ctrl)
222{ 222{
223 if (features & NETIF_F_HW_VLAN_RX) { 223 if (features & NETIF_F_HW_VLAN_CTAG_RX) {
224 /* enable VLAN tag insert/strip */ 224 /* enable VLAN tag insert/strip */
225 *ctrl |= MAC_CTRL_RMV_VLAN; 225 *ctrl |= MAC_CTRL_RMV_VLAN;
226 } else { 226 } else {
@@ -257,10 +257,10 @@ static netdev_features_t atlx_fix_features(struct net_device *netdev,
257 * Since there is no support for separate rx/tx vlan accel 257 * Since there is no support for separate rx/tx vlan accel
258 * enable/disable make sure tx flag is always in same state as rx. 258 * enable/disable make sure tx flag is always in same state as rx.
259 */ 259 */
260 if (features & NETIF_F_HW_VLAN_RX) 260 if (features & NETIF_F_HW_VLAN_CTAG_RX)
261 features |= NETIF_F_HW_VLAN_TX; 261 features |= NETIF_F_HW_VLAN_CTAG_TX;
262 else 262 else
263 features &= ~NETIF_F_HW_VLAN_TX; 263 features &= ~NETIF_F_HW_VLAN_CTAG_TX;
264 264
265 return features; 265 return features;
266} 266}
@@ -270,7 +270,7 @@ static int atlx_set_features(struct net_device *netdev,
270{ 270{
271 netdev_features_t changed = netdev->features ^ features; 271 netdev_features_t changed = netdev->features ^ features;
272 272
273 if (changed & NETIF_F_HW_VLAN_RX) 273 if (changed & NETIF_F_HW_VLAN_CTAG_RX)
274 atlx_vlan_mode(netdev, features); 274 atlx_vlan_mode(netdev, features);
275 275
276 return 0; 276 return 0;