Skip to content

Commit

Permalink
be2net: Avoid double insertion of vlan tags.
Browse files Browse the repository at this point in the history
Fix to avoid double insertion of  vlan tags into the packet while
handling an asic workaroud (issue introduced by net next Commit bc0c340)

Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sarveshwar Bandi authored and David S. Miller committed May 14, 2013
1 parent 950c54d commit efee8e8
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,26 +780,18 @@ static struct sk_buff *be_insert_vlan_in_pkt(struct be_adapter *adapter,
if (unlikely(!skb))
return skb;

if (vlan_tx_tag_present(skb)) {
if (vlan_tx_tag_present(skb))
vlan_tag = be_get_tx_vlan_tag(adapter, skb);
skb = __vlan_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
if (skb)
skb->vlan_tci = 0;
}

if (qnq_async_evt_rcvd(adapter) && adapter->pvid) {
if (!vlan_tag)
vlan_tag = adapter->pvid;
if (skip_hw_vlan)
*skip_hw_vlan = true;
}
else if (qnq_async_evt_rcvd(adapter) && adapter->pvid)
vlan_tag = adapter->pvid;

if (vlan_tag) {
skb = __vlan_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
if (unlikely(!skb))
return skb;

skb->vlan_tci = 0;
if (skip_hw_vlan)
*skip_hw_vlan = true;
}

/* Insert the outer VLAN, if any */
Expand Down

0 comments on commit efee8e8

Please sign in to comment.