aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/atheros
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
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')
-rw-r--r--drivers/net/ethernet/atheros/atl1c/atl1c_main.c22
-rw-r--r--drivers/net/ethernet/atheros/atl1e/atl1e_main.c14
-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
5 files changed, 33 insertions, 33 deletions
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 1f07fc633ab9..3565255cdd81 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -417,7 +417,7 @@ static void atl1c_set_multi(struct net_device *netdev)
417 417
418static void __atl1c_vlan_mode(netdev_features_t features, u32 *mac_ctrl_data) 418static void __atl1c_vlan_mode(netdev_features_t features, u32 *mac_ctrl_data)
419{ 419{
420 if (features & NETIF_F_HW_VLAN_RX) { 420 if (features & NETIF_F_HW_VLAN_CTAG_RX) {
421 /* enable VLAN tag insert/strip */ 421 /* enable VLAN tag insert/strip */
422 *mac_ctrl_data |= MAC_CTRL_RMV_VLAN; 422 *mac_ctrl_data |= MAC_CTRL_RMV_VLAN;
423 } else { 423 } else {
@@ -494,10 +494,10 @@ static netdev_features_t atl1c_fix_features(struct net_device *netdev,
494 * Since there is no support for separate rx/tx vlan accel 494 * Since there is no support for separate rx/tx vlan accel
495 * enable/disable make sure tx flag is always in same state as rx. 495 * enable/disable make sure tx flag is always in same state as rx.
496 */ 496 */
497 if (features & NETIF_F_HW_VLAN_RX) 497 if (features & NETIF_F_HW_VLAN_CTAG_RX)
498 features |= NETIF_F_HW_VLAN_TX; 498 features |= NETIF_F_HW_VLAN_CTAG_TX;
499 else 499 else
500 features &= ~NETIF_F_HW_VLAN_TX; 500 features &= ~NETIF_F_HW_VLAN_CTAG_TX;
501 501
502 if (netdev->mtu > MAX_TSO_FRAME_SIZE) 502 if (netdev->mtu > MAX_TSO_FRAME_SIZE)
503 features &= ~(NETIF_F_TSO | NETIF_F_TSO6); 503 features &= ~(NETIF_F_TSO | NETIF_F_TSO6);
@@ -510,7 +510,7 @@ static int atl1c_set_features(struct net_device *netdev,
510{ 510{
511 netdev_features_t changed = netdev->features ^ features; 511 netdev_features_t changed = netdev->features ^ features;
512 512
513 if (changed & NETIF_F_HW_VLAN_RX) 513 if (changed & NETIF_F_HW_VLAN_CTAG_RX)
514 atl1c_vlan_mode(netdev, features); 514 atl1c_vlan_mode(netdev, features);
515 515
516 return 0; 516 return 0;
@@ -2475,13 +2475,13 @@ static int atl1c_init_netdev(struct net_device *netdev, struct pci_dev *pdev)
2475 atl1c_set_ethtool_ops(netdev); 2475 atl1c_set_ethtool_ops(netdev);
2476 2476
2477 /* TODO: add when ready */ 2477 /* TODO: add when ready */
2478 netdev->hw_features = NETIF_F_SG | 2478 netdev->hw_features = NETIF_F_SG |
2479 NETIF_F_HW_CSUM | 2479 NETIF_F_HW_CSUM |
2480 NETIF_F_HW_VLAN_RX | 2480 NETIF_F_HW_VLAN_CTAG_RX |
2481 NETIF_F_TSO | 2481 NETIF_F_TSO |
2482 NETIF_F_TSO6; 2482 NETIF_F_TSO6;
2483 netdev->features = netdev->hw_features | 2483 netdev->features = netdev->hw_features |
2484 NETIF_F_HW_VLAN_TX; 2484 NETIF_F_HW_VLAN_CTAG_TX;
2485 return 0; 2485 return 0;
2486} 2486}
2487 2487
diff --git a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
index d058d0061ed0..598a61151668 100644
--- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c
@@ -315,7 +315,7 @@ static void atl1e_set_multi(struct net_device *netdev)
315 315
316static void __atl1e_vlan_mode(netdev_features_t features, u32 *mac_ctrl_data) 316static void __atl1e_vlan_mode(netdev_features_t features, u32 *mac_ctrl_data)
317{ 317{
318 if (features & NETIF_F_HW_VLAN_RX) { 318 if (features & NETIF_F_HW_VLAN_CTAG_RX) {
319 /* enable VLAN tag insert/strip */ 319 /* enable VLAN tag insert/strip */
320 *mac_ctrl_data |= MAC_CTRL_RMV_VLAN; 320 *mac_ctrl_data |= MAC_CTRL_RMV_VLAN;
321 } else { 321 } else {
@@ -378,10 +378,10 @@ static netdev_features_t atl1e_fix_features(struct net_device *netdev,
378 * Since there is no support for separate rx/tx vlan accel 378 * Since there is no support for separate rx/tx vlan accel
379 * enable/disable make sure tx flag is always in same state as rx. 379 * enable/disable make sure tx flag is always in same state as rx.
380 */ 380 */
381 if (features & NETIF_F_HW_VLAN_RX) 381 if (features & NETIF_F_HW_VLAN_CTAG_RX)
382 features |= NETIF_F_HW_VLAN_TX; 382 features |= NETIF_F_HW_VLAN_CTAG_TX;
383 else 383 else
384 features &= ~NETIF_F_HW_VLAN_TX; 384 features &= ~NETIF_F_HW_VLAN_CTAG_TX;
385 385
386 return features; 386 return features;
387} 387}
@@ -391,7 +391,7 @@ static int atl1e_set_features(struct net_device *netdev,
391{ 391{
392 netdev_features_t changed = netdev->features ^ features; 392 netdev_features_t changed = netdev->features ^ features;
393 393
394 if (changed & NETIF_F_HW_VLAN_RX) 394 if (changed & NETIF_F_HW_VLAN_CTAG_RX)
395 atl1e_vlan_mode(netdev, features); 395 atl1e_vlan_mode(netdev, features);
396 396
397 return 0; 397 return 0;
@@ -2198,9 +2198,9 @@ static int atl1e_init_netdev(struct net_device *netdev, struct pci_dev *pdev)
2198 atl1e_set_ethtool_ops(netdev); 2198 atl1e_set_ethtool_ops(netdev);
2199 2199
2200 netdev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_TSO | 2200 netdev->hw_features = NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_TSO |
2201 NETIF_F_HW_VLAN_RX; 2201 NETIF_F_HW_VLAN_CTAG_RX;
2202 netdev->features = netdev->hw_features | NETIF_F_LLTX | 2202 netdev->features = netdev->hw_features | NETIF_F_LLTX |
2203 NETIF_F_HW_VLAN_TX; 2203 NETIF_F_HW_VLAN_CTAG_TX;
2204 2204
2205 return 0; 2205 return 0;
2206} 2206}
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;