aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet
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/net/benet
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/net/benet')
-rw-r--r--drivers/net/benet/be_main.c7
1 files changed, 3 insertions, 4 deletions
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;