aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJesse Gross <jesse@nicira.com>2010-10-20 09:56:03 -0400
committerDavid S. Miller <davem@davemloft.net>2010-10-21 04:26:52 -0400
commiteab6d18d20fc5b5ba04a7e7fcd6f357197870e51 (patch)
tree8a52538666747998dd16bc68a2102b05ebfe6873 /drivers
parentb738127dfb469bb9f595cdace30e7f881e8146b2 (diff)
vlan: Don't check for vlan group before vlan_tx_tag_present.
Many (but not all) drivers check to see whether there is a vlan group configured before using a tag stored in the skb. There's not much point in this check since it just throws away data that should only be present in the expected circumstances. However, it will soon be legal and expected to get a vlan tag when no vlan group is configured, so remove this check from all drivers to avoid dropping the tags. Signed-off-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/8139cp.c2
-rw-r--r--drivers/net/amd8111e.c2
-rw-r--r--drivers/net/atl1c/atl1c_main.c2
-rw-r--r--drivers/net/atl1e/atl1e_main.c2
-rw-r--r--drivers/net/atlx/atl1.c2
-rw-r--r--drivers/net/atlx/atl2.c2
-rw-r--r--drivers/net/benet/be_main.c7
-rw-r--r--drivers/net/bna/bnad.c2
-rw-r--r--drivers/net/bnx2.c2
-rw-r--r--drivers/net/bnx2x/bnx2x_cmn.c3
-rw-r--r--drivers/net/chelsio/sge.c2
-rw-r--r--drivers/net/cxgb3/sge.c4
-rw-r--r--drivers/net/e1000/e1000_main.c2
-rw-r--r--drivers/net/e1000e/netdev.c2
-rw-r--r--drivers/net/ehea/ehea_main.c2
-rw-r--r--drivers/net/enic/enic_main.c2
-rw-r--r--drivers/net/forcedeth.c11
-rw-r--r--drivers/net/gianfar.c4
-rw-r--r--drivers/net/igb/igb_main.c2
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c2
-rw-r--r--drivers/net/ixgbevf/ixgbevf_main.c2
-rw-r--r--drivers/net/mlx4/en_tx.c4
-rw-r--r--drivers/net/qlge/qlge_main.c2
-rw-r--r--drivers/net/r8169.c2
-rw-r--r--drivers/net/s2io.c2
-rw-r--r--drivers/net/sky2.c2
-rw-r--r--drivers/net/tg3.c4
-rw-r--r--drivers/net/via-velocity.c2
-rw-r--r--drivers/net/vxge/vxge-main.c2
29 files changed, 38 insertions, 43 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 237d4ea5a416..ac422cd332ea 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -754,7 +754,7 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb,
754 } 754 }
755 755
756#if CP_VLAN_TAG_USED 756#if CP_VLAN_TAG_USED
757 if (cp->vlgrp && vlan_tx_tag_present(skb)) 757 if (vlan_tx_tag_present(skb))
758 vlan_tag = TxVlanTag | swab16(vlan_tx_tag_get(skb)); 758 vlan_tag = TxVlanTag | swab16(vlan_tx_tag_get(skb));
759#endif 759#endif
760 760
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c
index 58a0ab4923ee..2ca880b4c0db 100644
--- a/drivers/net/amd8111e.c
+++ b/drivers/net/amd8111e.c
@@ -1315,7 +1315,7 @@ static netdev_tx_t amd8111e_start_xmit(struct sk_buff *skb,
1315 lp->tx_ring[tx_index].tx_flags = 0; 1315 lp->tx_ring[tx_index].tx_flags = 0;
1316 1316
1317#if AMD8111E_VLAN_TAG_USED 1317#if AMD8111E_VLAN_TAG_USED
1318 if((lp->vlgrp != NULL) && vlan_tx_tag_present(skb)){ 1318 if (vlan_tx_tag_present(skb)) {
1319 lp->tx_ring[tx_index].tag_ctrl_cmd |= 1319 lp->tx_ring[tx_index].tag_ctrl_cmd |=
1320 cpu_to_le16(TCC_VLAN_INSERT); 1320 cpu_to_le16(TCC_VLAN_INSERT);
1321 lp->tx_ring[tx_index].tag_ctrl_info = 1321 lp->tx_ring[tx_index].tag_ctrl_info =
diff --git a/drivers/net/atl1c/atl1c_main.c b/drivers/net/atl1c/atl1c_main.c
index 553230eb365c..99ffcf667d1f 100644
--- a/drivers/net/atl1c/atl1c_main.c
+++ b/drivers/net/atl1c/atl1c_main.c
@@ -2243,7 +2243,7 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb,
2243 return NETDEV_TX_OK; 2243 return NETDEV_TX_OK;
2244 } 2244 }
2245 2245
2246 if (unlikely(adapter->vlgrp && vlan_tx_tag_present(skb))) { 2246 if (unlikely(vlan_tx_tag_present(skb))) {
2247 u16 vlan = vlan_tx_tag_get(skb); 2247 u16 vlan = vlan_tx_tag_get(skb);
2248 __le16 tag; 2248 __le16 tag;
2249 2249
diff --git a/drivers/net/atl1e/atl1e_main.c b/drivers/net/atl1e/atl1e_main.c
index 56ace3fbe40d..ef6349bf3b33 100644
--- a/drivers/net/atl1e/atl1e_main.c
+++ b/drivers/net/atl1e/atl1e_main.c
@@ -1814,7 +1814,7 @@ static netdev_tx_t atl1e_xmit_frame(struct sk_buff *skb,
1814 1814
1815 tpd = atl1e_get_tpd(adapter); 1815 tpd = atl1e_get_tpd(adapter);
1816 1816
1817 if (unlikely(adapter->vlgrp && vlan_tx_tag_present(skb))) { 1817 if (unlikely(vlan_tx_tag_present(skb))) {
1818 u16 vlan_tag = vlan_tx_tag_get(skb); 1818 u16 vlan_tag = vlan_tx_tag_get(skb);
1819 u16 atl1e_vlan_tag; 1819 u16 atl1e_vlan_tag;
1820 1820
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index b8c053f76878..dbd27b8e66bd 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -2408,7 +2408,7 @@ static netdev_tx_t atl1_xmit_frame(struct sk_buff *skb,
2408 (u16) atomic_read(&tpd_ring->next_to_use)); 2408 (u16) atomic_read(&tpd_ring->next_to_use));
2409 memset(ptpd, 0, sizeof(struct tx_packet_desc)); 2409 memset(ptpd, 0, sizeof(struct tx_packet_desc));
2410 2410
2411 if (adapter->vlgrp && vlan_tx_tag_present(skb)) { 2411 if (vlan_tx_tag_present(skb)) {
2412 vlan_tag = vlan_tx_tag_get(skb); 2412 vlan_tag = vlan_tx_tag_get(skb);
2413 vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) | 2413 vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) |
2414 ((vlan_tag >> 9) & 0x8); 2414 ((vlan_tag >> 9) & 0x8);
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
index 29c0265ccc5d..35b14bec1207 100644
--- a/drivers/net/atlx/atl2.c
+++ b/drivers/net/atlx/atl2.c
@@ -870,7 +870,7 @@ static netdev_tx_t atl2_xmit_frame(struct sk_buff *skb,
870 offset = ((u32)(skb->len-copy_len + 3) & ~3); 870 offset = ((u32)(skb->len-copy_len + 3) & ~3);
871 } 871 }
872#ifdef NETIF_F_HW_VLAN_TX 872#ifdef NETIF_F_HW_VLAN_TX
873 if (adapter->vlgrp && vlan_tx_tag_present(skb)) { 873 if (vlan_tx_tag_present(skb)) {
874 u16 vlan_tag = vlan_tx_tag_get(skb); 874 u16 vlan_tag = vlan_tx_tag_get(skb);
875 vlan_tag = (vlan_tag << 4) | 875 vlan_tag = (vlan_tag << 4) |
876 (vlan_tag >> 13) | 876 (vlan_tag >> 13) |
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 4b59e53890b2..d5e796832fdd 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -430,7 +430,7 @@ static inline void wrb_fill(struct be_eth_wrb *wrb, u64 addr, int len)
430} 430}
431 431
432static void wrb_fill_hdr(struct be_eth_hdr_wrb *hdr, struct sk_buff *skb, 432static void wrb_fill_hdr(struct be_eth_hdr_wrb *hdr, struct sk_buff *skb,
433 bool vlan, u32 wrb_cnt, u32 len) 433 u32 wrb_cnt, u32 len)
434{ 434{
435 memset(hdr, 0, sizeof(*hdr)); 435 memset(hdr, 0, sizeof(*hdr));
436 436
@@ -449,7 +449,7 @@ static void wrb_fill_hdr(struct be_eth_hdr_wrb *hdr, struct sk_buff *skb,
449 AMAP_SET_BITS(struct amap_eth_hdr_wrb, udpcs, hdr, 1); 449 AMAP_SET_BITS(struct amap_eth_hdr_wrb, udpcs, hdr, 1);
450 } 450 }
451 451
452 if (vlan && vlan_tx_tag_present(skb)) { 452 if (vlan_tx_tag_present(skb)) {
453 AMAP_SET_BITS(struct amap_eth_hdr_wrb, vlan, hdr, 1); 453 AMAP_SET_BITS(struct amap_eth_hdr_wrb, vlan, hdr, 1);
454 AMAP_SET_BITS(struct amap_eth_hdr_wrb, vlan_tag, 454 AMAP_SET_BITS(struct amap_eth_hdr_wrb, vlan_tag,
455 hdr, vlan_tx_tag_get(skb)); 455 hdr, vlan_tx_tag_get(skb));
@@ -532,8 +532,7 @@ static int make_tx_wrbs(struct be_adapter *adapter,
532 queue_head_inc(txq); 532 queue_head_inc(txq);
533 } 533 }
534 534
535 wrb_fill_hdr(hdr, first_skb, adapter->vlan_grp ? true : false, 535 wrb_fill_hdr(hdr, first_skb, wrb_cnt, copied);
536 wrb_cnt, copied);
537 be_dws_cpu_to_le(hdr, sizeof(*hdr)); 536 be_dws_cpu_to_le(hdr, sizeof(*hdr));
538 537
539 return copied; 538 return copied;
diff --git a/drivers/net/bna/bnad.c b/drivers/net/bna/bnad.c
index 74c64d6c8801..7e839b9cec22 100644
--- a/drivers/net/bna/bnad.c
+++ b/drivers/net/bna/bnad.c
@@ -2501,7 +2501,7 @@ bnad_start_xmit(struct sk_buff *skb, struct net_device *netdev)
2501 htons((skb_is_gso(skb) ? BNA_TXQ_WI_SEND_LSO : 2501 htons((skb_is_gso(skb) ? BNA_TXQ_WI_SEND_LSO :
2502 BNA_TXQ_WI_SEND)); 2502 BNA_TXQ_WI_SEND));
2503 2503
2504 if (bnad->vlan_grp && vlan_tx_tag_present(skb)) { 2504 if (vlan_tx_tag_present(skb)) {
2505 vlan_tag = (u16) vlan_tx_tag_get(skb); 2505 vlan_tag = (u16) vlan_tx_tag_get(skb);
2506 flags |= (BNA_TXQ_WI_CF_INS_PRIO | BNA_TXQ_WI_CF_INS_VLAN); 2506 flags |= (BNA_TXQ_WI_CF_INS_PRIO | BNA_TXQ_WI_CF_INS_VLAN);
2507 } 2507 }
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index ae894bca4afb..363ca8bcc974 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6429,7 +6429,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
6429 } 6429 }
6430 6430
6431#ifdef BCM_VLAN 6431#ifdef BCM_VLAN
6432 if (bp->vlgrp && vlan_tx_tag_present(skb)) { 6432 if (vlan_tx_tag_present(skb)) {
6433 vlan_tag_flags |= 6433 vlan_tag_flags |=
6434 (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16)); 6434 (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16));
6435 } 6435 }
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c
index 1966ceeefcd4..6905b2e0609e 100644
--- a/drivers/net/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/bnx2x/bnx2x_cmn.c
@@ -2026,8 +2026,7 @@ netdev_tx_t bnx2x_start_xmit(struct sk_buff *skb, struct net_device *dev)
2026 pkt_prod, tx_buf, fp->tx_pkt_prod, bd_prod, tx_start_bd); 2026 pkt_prod, tx_buf, fp->tx_pkt_prod, bd_prod, tx_start_bd);
2027 2027
2028#ifdef BCM_VLAN 2028#ifdef BCM_VLAN
2029 if ((bp->vlgrp != NULL) && vlan_tx_tag_present(skb) && 2029 if (vlan_tx_tag_present(skb)) {
2030 (bp->flags & HW_VLAN_TX_FLAG)) {
2031 tx_start_bd->vlan_or_ethertype = 2030 tx_start_bd->vlan_or_ethertype =
2032 cpu_to_le16(vlan_tx_tag_get(skb)); 2031 cpu_to_le16(vlan_tx_tag_get(skb));
2033 tx_start_bd->bd_flags.as_bitfield |= 2032 tx_start_bd->bd_flags.as_bitfield |=
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c
index 340b537dc97e..70221ca32683 100644
--- a/drivers/net/chelsio/sge.c
+++ b/drivers/net/chelsio/sge.c
@@ -1870,7 +1870,7 @@ netdev_tx_t t1_start_xmit(struct sk_buff *skb, struct net_device *dev)
1870 cpl->iff = dev->if_port; 1870 cpl->iff = dev->if_port;
1871 1871
1872#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) 1872#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
1873 if (adapter->vlan_grp && vlan_tx_tag_present(skb)) { 1873 if (vlan_tx_tag_present(skb)) {
1874 cpl->vlan_valid = 1; 1874 cpl->vlan_valid = 1;
1875 cpl->vlan = htons(vlan_tx_tag_get(skb)); 1875 cpl->vlan = htons(vlan_tx_tag_get(skb));
1876 st->vlan_insert++; 1876 st->vlan_insert++;
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
index c5a142bea5e9..7ad4625dac62 100644
--- a/drivers/net/cxgb3/sge.c
+++ b/drivers/net/cxgb3/sge.c
@@ -1145,7 +1145,7 @@ static void write_tx_pkt_wr(struct adapter *adap, struct sk_buff *skb,
1145 cpl->len = htonl(skb->len); 1145 cpl->len = htonl(skb->len);
1146 cntrl = V_TXPKT_INTF(pi->port_id); 1146 cntrl = V_TXPKT_INTF(pi->port_id);
1147 1147
1148 if (vlan_tx_tag_present(skb) && pi->vlan_grp) 1148 if (vlan_tx_tag_present(skb))
1149 cntrl |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(vlan_tx_tag_get(skb)); 1149 cntrl |= F_TXPKT_VLAN_VLD | V_TXPKT_VLAN(vlan_tx_tag_get(skb));
1150 1150
1151 tso_info = V_LSO_MSS(skb_shinfo(skb)->gso_size); 1151 tso_info = V_LSO_MSS(skb_shinfo(skb)->gso_size);
@@ -1279,7 +1279,7 @@ netdev_tx_t t3_eth_xmit(struct sk_buff *skb, struct net_device *dev)
1279 qs->port_stats[SGE_PSTAT_TX_CSUM]++; 1279 qs->port_stats[SGE_PSTAT_TX_CSUM]++;
1280 if (skb_shinfo(skb)->gso_size) 1280 if (skb_shinfo(skb)->gso_size)
1281 qs->port_stats[SGE_PSTAT_TSO]++; 1281 qs->port_stats[SGE_PSTAT_TSO]++;
1282 if (vlan_tx_tag_present(skb) && pi->vlan_grp) 1282 if (vlan_tx_tag_present(skb))
1283 qs->port_stats[SGE_PSTAT_VLANINS]++; 1283 qs->port_stats[SGE_PSTAT_VLANINS]++;
1284 1284
1285 /* 1285 /*
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 232ac2dcb497..a117f2a0252e 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -3119,7 +3119,7 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
3119 } 3119 }
3120 } 3120 }
3121 3121
3122 if (unlikely(adapter->vlgrp && vlan_tx_tag_present(skb))) { 3122 if (unlikely(vlan_tx_tag_present(skb))) {
3123 tx_flags |= E1000_TX_FLAGS_VLAN; 3123 tx_flags |= E1000_TX_FLAGS_VLAN;
3124 tx_flags |= (vlan_tx_tag_get(skb) << E1000_TX_FLAGS_VLAN_SHIFT); 3124 tx_flags |= (vlan_tx_tag_get(skb) << E1000_TX_FLAGS_VLAN_SHIFT);
3125 } 3125 }
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 5d6cdea0eb14..ec8cf3f51423 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -4800,7 +4800,7 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
4800 if (e1000_maybe_stop_tx(netdev, count + 2)) 4800 if (e1000_maybe_stop_tx(netdev, count + 2))
4801 return NETDEV_TX_BUSY; 4801 return NETDEV_TX_BUSY;
4802 4802
4803 if (adapter->vlgrp && vlan_tx_tag_present(skb)) { 4803 if (vlan_tx_tag_present(skb)) {
4804 tx_flags |= E1000_TX_FLAGS_VLAN; 4804 tx_flags |= E1000_TX_FLAGS_VLAN;
4805 tx_flags |= (vlan_tx_tag_get(skb) << E1000_TX_FLAGS_VLAN_SHIFT); 4805 tx_flags |= (vlan_tx_tag_get(skb) << E1000_TX_FLAGS_VLAN_SHIFT);
4806 } 4806 }
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 6932578816d3..a0d117022be6 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -2272,7 +2272,7 @@ static int ehea_start_xmit(struct sk_buff *skb, struct net_device *dev)
2272 } 2272 }
2273 pr->swqe_id_counter += 1; 2273 pr->swqe_id_counter += 1;
2274 2274
2275 if (port->vgrp && vlan_tx_tag_present(skb)) { 2275 if (vlan_tx_tag_present(skb)) {
2276 swqe->tx_control |= EHEA_SWQE_VLAN_INSERT; 2276 swqe->tx_control |= EHEA_SWQE_VLAN_INSERT;
2277 swqe->vlan_tag = vlan_tx_tag_get(skb); 2277 swqe->vlan_tag = vlan_tx_tag_get(skb);
2278 } 2278 }
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index f47fbb63d8b6..a466ef91dd43 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -805,7 +805,7 @@ static inline void enic_queue_wq_skb(struct enic *enic,
805 int vlan_tag_insert = 0; 805 int vlan_tag_insert = 0;
806 int loopback = 0; 806 int loopback = 0;
807 807
808 if (enic->vlan_group && vlan_tx_tag_present(skb)) { 808 if (vlan_tx_tag_present(skb)) {
809 /* VLAN tag from trunking driver */ 809 /* VLAN tag from trunking driver */
810 vlan_tag_insert = 1; 810 vlan_tag_insert = 1;
811 vlan_tag = vlan_tx_tag_get(skb); 811 vlan_tag = vlan_tx_tag_get(skb);
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index ddac63cefbaa..0fa1776563a3 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -2321,14 +2321,11 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb,
2321 NV_TX2_CHECKSUM_L3 | NV_TX2_CHECKSUM_L4 : 0; 2321 NV_TX2_CHECKSUM_L3 | NV_TX2_CHECKSUM_L4 : 0;
2322 2322
2323 /* vlan tag */ 2323 /* vlan tag */
2324 if (likely(!np->vlangrp)) { 2324 if (vlan_tx_tag_present(skb))
2325 start_tx->txvlan = cpu_to_le32(NV_TX3_VLAN_TAG_PRESENT |
2326 vlan_tx_tag_get(skb));
2327 else
2325 start_tx->txvlan = 0; 2328 start_tx->txvlan = 0;
2326 } else {
2327 if (vlan_tx_tag_present(skb))
2328 start_tx->txvlan = cpu_to_le32(NV_TX3_VLAN_TAG_PRESENT | vlan_tx_tag_get(skb));
2329 else
2330 start_tx->txvlan = 0;
2331 }
2332 2329
2333 spin_lock_irqsave(&np->lock, flags); 2330 spin_lock_irqsave(&np->lock, flags);
2334 2331
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 6180089bf67a..4c4cc80ec0a1 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -2075,7 +2075,7 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
2075 2075
2076 /* make space for additional header when fcb is needed */ 2076 /* make space for additional header when fcb is needed */
2077 if (((skb->ip_summed == CHECKSUM_PARTIAL) || 2077 if (((skb->ip_summed == CHECKSUM_PARTIAL) ||
2078 (priv->vlgrp && vlan_tx_tag_present(skb)) || 2078 vlan_tx_tag_present(skb) ||
2079 unlikely(do_tstamp)) && 2079 unlikely(do_tstamp)) &&
2080 (skb_headroom(skb) < GMAC_FCB_LEN)) { 2080 (skb_headroom(skb) < GMAC_FCB_LEN)) {
2081 struct sk_buff *skb_new; 2081 struct sk_buff *skb_new;
@@ -2161,7 +2161,7 @@ static int gfar_start_xmit(struct sk_buff *skb, struct net_device *dev)
2161 gfar_tx_checksum(skb, fcb); 2161 gfar_tx_checksum(skb, fcb);
2162 } 2162 }
2163 2163
2164 if (priv->vlgrp && vlan_tx_tag_present(skb)) { 2164 if (vlan_tx_tag_present(skb)) {
2165 if (unlikely(NULL == fcb)) { 2165 if (unlikely(NULL == fcb)) {
2166 fcb = gfar_add_fcb(skb); 2166 fcb = gfar_add_fcb(skb);
2167 lstatus |= BD_LFLAG(TXBD_TOE); 2167 lstatus |= BD_LFLAG(TXBD_TOE);
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 0f0939caf091..75155a27fdde 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -4128,7 +4128,7 @@ netdev_tx_t igb_xmit_frame_ring_adv(struct sk_buff *skb,
4128 tx_flags |= IGB_TX_FLAGS_TSTAMP; 4128 tx_flags |= IGB_TX_FLAGS_TSTAMP;
4129 } 4129 }
4130 4130
4131 if (vlan_tx_tag_present(skb) && adapter->vlgrp) { 4131 if (vlan_tx_tag_present(skb)) {
4132 tx_flags |= IGB_TX_FLAGS_VLAN; 4132 tx_flags |= IGB_TX_FLAGS_VLAN;
4133 tx_flags |= (vlan_tx_tag_get(skb) << IGB_TX_FLAGS_VLAN_SHIFT); 4133 tx_flags |= (vlan_tx_tag_get(skb) << IGB_TX_FLAGS_VLAN_SHIFT);
4134 } 4134 }
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 1d424428079f..998debe8023b 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -6311,7 +6311,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb, struct net_device *netdev
6311 int count = 0; 6311 int count = 0;
6312 unsigned int f; 6312 unsigned int f;
6313 6313
6314 if (adapter->vlgrp && vlan_tx_tag_present(skb)) { 6314 if (vlan_tx_tag_present(skb)) {
6315 tx_flags |= vlan_tx_tag_get(skb); 6315 tx_flags |= vlan_tx_tag_get(skb);
6316 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { 6316 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
6317 tx_flags &= ~IXGBE_TX_FLAGS_VLAN_PRIO_MASK; 6317 tx_flags &= ~IXGBE_TX_FLAGS_VLAN_PRIO_MASK;
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c
index 78bfbe42ca9b..dc03c9652389 100644
--- a/drivers/net/ixgbevf/ixgbevf_main.c
+++ b/drivers/net/ixgbevf/ixgbevf_main.c
@@ -3134,7 +3134,7 @@ static int ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
3134 3134
3135 tx_ring = &adapter->tx_ring[r_idx]; 3135 tx_ring = &adapter->tx_ring[r_idx];
3136 3136
3137 if (adapter->vlgrp && vlan_tx_tag_present(skb)) { 3137 if (vlan_tx_tag_present(skb)) {
3138 tx_flags |= vlan_tx_tag_get(skb); 3138 tx_flags |= vlan_tx_tag_get(skb);
3139 tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT; 3139 tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT;
3140 tx_flags |= IXGBE_TX_FLAGS_VLAN; 3140 tx_flags |= IXGBE_TX_FLAGS_VLAN;
diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c
index 98dd620042a8..a680cd4a5ab6 100644
--- a/drivers/net/mlx4/en_tx.c
+++ b/drivers/net/mlx4/en_tx.c
@@ -583,7 +583,7 @@ u16 mlx4_en_select_queue(struct net_device *dev, struct sk_buff *skb)
583 /* If we support per priority flow control and the packet contains 583 /* If we support per priority flow control and the packet contains
584 * a vlan tag, send the packet to the TX ring assigned to that priority 584 * a vlan tag, send the packet to the TX ring assigned to that priority
585 */ 585 */
586 if (priv->prof->rx_ppp && priv->vlgrp && vlan_tx_tag_present(skb)) { 586 if (priv->prof->rx_ppp && vlan_tx_tag_present(skb)) {
587 vlan_tag = vlan_tx_tag_get(skb); 587 vlan_tag = vlan_tx_tag_get(skb);
588 return MLX4_EN_NUM_TX_RINGS + (vlan_tag >> 13); 588 return MLX4_EN_NUM_TX_RINGS + (vlan_tag >> 13);
589 } 589 }
@@ -634,7 +634,7 @@ netdev_tx_t mlx4_en_xmit(struct sk_buff *skb, struct net_device *dev)
634 634
635 tx_ind = skb->queue_mapping; 635 tx_ind = skb->queue_mapping;
636 ring = &priv->tx_ring[tx_ind]; 636 ring = &priv->tx_ring[tx_ind];
637 if (priv->vlgrp && vlan_tx_tag_present(skb)) 637 if (vlan_tx_tag_present(skb))
638 vlan_tag = vlan_tx_tag_get(skb); 638 vlan_tag = vlan_tx_tag_get(skb);
639 639
640 /* Check available TXBBs And 2K spare for prefetch */ 640 /* Check available TXBBs And 2K spare for prefetch */
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c
index 4ffebe83d883..ba0053d8515e 100644
--- a/drivers/net/qlge/qlge_main.c
+++ b/drivers/net/qlge/qlge_main.c
@@ -2572,7 +2572,7 @@ static netdev_tx_t qlge_send(struct sk_buff *skb, struct net_device *ndev)
2572 2572
2573 mac_iocb_ptr->frame_len = cpu_to_le16((u16) skb->len); 2573 mac_iocb_ptr->frame_len = cpu_to_le16((u16) skb->len);
2574 2574
2575 if (qdev->vlgrp && vlan_tx_tag_present(skb)) { 2575 if (vlan_tx_tag_present(skb)) {
2576 netif_printk(qdev, tx_queued, KERN_DEBUG, qdev->ndev, 2576 netif_printk(qdev, tx_queued, KERN_DEBUG, qdev->ndev,
2577 "Adding a vlan tag %d.\n", vlan_tx_tag_get(skb)); 2577 "Adding a vlan tag %d.\n", vlan_tx_tag_get(skb));
2578 mac_iocb_ptr->flags3 |= OB_MAC_IOCB_V; 2578 mac_iocb_ptr->flags3 |= OB_MAC_IOCB_V;
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 1760533852a4..242748b2c357 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1034,7 +1034,7 @@ static int rtl8169_set_rx_csum(struct net_device *dev, u32 data)
1034static inline u32 rtl8169_tx_vlan_tag(struct rtl8169_private *tp, 1034static inline u32 rtl8169_tx_vlan_tag(struct rtl8169_private *tp,
1035 struct sk_buff *skb) 1035 struct sk_buff *skb)
1036{ 1036{
1037 return (tp->vlgrp && vlan_tx_tag_present(skb)) ? 1037 return (vlan_tx_tag_present(skb)) ?
1038 TxVlanTag | swab16(vlan_tx_tag_get(skb)) : 0x00; 1038 TxVlanTag | swab16(vlan_tx_tag_get(skb)) : 0x00;
1039} 1039}
1040 1040
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index c70ad515383a..ecc25aab896a 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -4101,7 +4101,7 @@ static netdev_tx_t s2io_xmit(struct sk_buff *skb, struct net_device *dev)
4101 } 4101 }
4102 4102
4103 queue = 0; 4103 queue = 0;
4104 if (sp->vlgrp && vlan_tx_tag_present(skb)) 4104 if (vlan_tx_tag_present(skb))
4105 vlan_tag = vlan_tx_tag_get(skb); 4105 vlan_tag = vlan_tx_tag_get(skb);
4106 if (sp->config.tx_steering_type == TX_DEFAULT_STEERING) { 4106 if (sp->config.tx_steering_type == TX_DEFAULT_STEERING) {
4107 if (skb->protocol == htons(ETH_P_IP)) { 4107 if (skb->protocol == htons(ETH_P_IP)) {
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 3ef9b67ac6e6..d6577084ce70 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1782,7 +1782,7 @@ static netdev_tx_t sky2_xmit_frame(struct sk_buff *skb,
1782 ctrl = 0; 1782 ctrl = 0;
1783#ifdef SKY2_VLAN_TAG_USED 1783#ifdef SKY2_VLAN_TAG_USED
1784 /* Add VLAN tag, can piggyback on LRGLEN or ADDR64 */ 1784 /* Add VLAN tag, can piggyback on LRGLEN or ADDR64 */
1785 if (sky2->vlgrp && vlan_tx_tag_present(skb)) { 1785 if (vlan_tx_tag_present(skb)) {
1786 if (!le) { 1786 if (!le) {
1787 le = get_tx_le(sky2, &slot); 1787 le = get_tx_le(sky2, &slot);
1788 le->addr = 0; 1788 le->addr = 0;
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 5b4c510dbced..22720eeabddb 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -5745,7 +5745,7 @@ static netdev_tx_t tg3_start_xmit(struct sk_buff *skb,
5745 } 5745 }
5746 5746
5747#if TG3_VLAN_TAG_USED 5747#if TG3_VLAN_TAG_USED
5748 if (tp->vlgrp != NULL && vlan_tx_tag_present(skb)) 5748 if (vlan_tx_tag_present(skb))
5749 base_flags |= (TXD_FLAG_VLAN | 5749 base_flags |= (TXD_FLAG_VLAN |
5750 (vlan_tx_tag_get(skb) << 16)); 5750 (vlan_tx_tag_get(skb) << 16));
5751#endif 5751#endif
@@ -5991,7 +5991,7 @@ static netdev_tx_t tg3_start_xmit_dma_bug(struct sk_buff *skb,
5991 } 5991 }
5992 } 5992 }
5993#if TG3_VLAN_TAG_USED 5993#if TG3_VLAN_TAG_USED
5994 if (tp->vlgrp != NULL && vlan_tx_tag_present(skb)) 5994 if (vlan_tx_tag_present(skb))
5995 base_flags |= (TXD_FLAG_VLAN | 5995 base_flags |= (TXD_FLAG_VLAN |
5996 (vlan_tx_tag_get(skb) << 16)); 5996 (vlan_tx_tag_get(skb) << 16));
5997#endif 5997#endif
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index f1995615dc84..cab96ad49e60 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -2592,7 +2592,7 @@ static netdev_tx_t velocity_xmit(struct sk_buff *skb,
2592 2592
2593 td_ptr->tdesc1.cmd = TCPLS_NORMAL + (tdinfo->nskb_dma + 1) * 16; 2593 td_ptr->tdesc1.cmd = TCPLS_NORMAL + (tdinfo->nskb_dma + 1) * 16;
2594 2594
2595 if (vptr->vlgrp && vlan_tx_tag_present(skb)) { 2595 if (vlan_tx_tag_present(skb)) {
2596 td_ptr->tdesc1.vlan = cpu_to_le16(vlan_tx_tag_get(skb)); 2596 td_ptr->tdesc1.vlan = cpu_to_le16(vlan_tx_tag_get(skb));
2597 td_ptr->tdesc1.TCR |= TCR0_VETAG; 2597 td_ptr->tdesc1.TCR |= TCR0_VETAG;
2598 } 2598 }
diff --git a/drivers/net/vxge/vxge-main.c b/drivers/net/vxge/vxge-main.c
index 0bda7fe05d4b..a69542ecb68d 100644
--- a/drivers/net/vxge/vxge-main.c
+++ b/drivers/net/vxge/vxge-main.c
@@ -822,7 +822,7 @@ vxge_xmit(struct sk_buff *skb, struct net_device *dev)
822 dev->name, __func__, __LINE__, 822 dev->name, __func__, __LINE__,
823 fifo_hw, dtr, dtr_priv); 823 fifo_hw, dtr, dtr_priv);
824 824
825 if (vdev->vlgrp && vlan_tx_tag_present(skb)) { 825 if (vlan_tx_tag_present(skb)) {
826 u16 vlan_tag = vlan_tx_tag_get(skb); 826 u16 vlan_tag = vlan_tx_tag_get(skb);
827 vxge_hw_fifo_txdl_vlan_set(dtr, vlan_tag); 827 vxge_hw_fifo_txdl_vlan_set(dtr, vlan_tag);
828 } 828 }