aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex/benet/be_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/emulex/benet/be_main.c')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c18
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,
780 if (unlikely(!skb)) 780 if (unlikely(!skb))
781 return skb; 781 return skb;
782 782
783 if (vlan_tx_tag_present(skb)) { 783 if (vlan_tx_tag_present(skb))
784 vlan_tag = be_get_tx_vlan_tag(adapter, skb); 784 vlan_tag = be_get_tx_vlan_tag(adapter, skb);
785 skb = __vlan_put_tag(skb, htons(ETH_P_8021Q), vlan_tag); 785 else if (qnq_async_evt_rcvd(adapter) && adapter->pvid)
786 if (skb) 786 vlan_tag = adapter->pvid;
787 skb->vlan_tci = 0;
788 }
789
790 if (qnq_async_evt_rcvd(adapter) && adapter->pvid) {
791 if (!vlan_tag)
792 vlan_tag = adapter->pvid;
793 if (skip_hw_vlan)
794 *skip_hw_vlan = true;
795 }
796 787
797 if (vlan_tag) { 788 if (vlan_tag) {
798 skb = __vlan_put_tag(skb, htons(ETH_P_8021Q), vlan_tag); 789 skb = __vlan_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
799 if (unlikely(!skb)) 790 if (unlikely(!skb))
800 return skb; 791 return skb;
801
802 skb->vlan_tci = 0; 792 skb->vlan_tci = 0;
793 if (skip_hw_vlan)
794 *skip_hw_vlan = true;
803 } 795 }
804 796
805 /* Insert the outer VLAN, if any */ 797 /* Insert the outer VLAN, if any */