diff options
author | Sarveshwar Bandi <sarveshwar.bandi@emulex.com> | 2013-05-13 22:28:20 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-14 20:32:04 +0200 |
commit | efee8e8712921279c3a5a687d5b65ee7fde7db89 (patch) | |
tree | 726383d408bfdd418e0fb6dac4c9ed101663a32c /drivers/net/ethernet | |
parent | sfc: Reduce RX scatter buffer size, and reduce alignment if appropriate (diff) | |
download | linux-efee8e8712921279c3a5a687d5b65ee7fde7db89.tar.xz linux-efee8e8712921279c3a5a687d5b65ee7fde7db89.zip |
be2net: Avoid double insertion of vlan tags.
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be_main.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c index a444110b060f..ca2967b0f18b 100644 --- a/drivers/net/ethernet/emulex/benet/be_main.c +++ b/drivers/net/ethernet/emulex/benet/be_main.c @@ -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 */ |