Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eab6d18d authored by Jesse Gross's avatar Jesse Gross Committed by David S. Miller
Browse files

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: default avatarJesse Gross <jesse@nicira.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b738127d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -754,7 +754,7 @@ static netdev_tx_t cp_start_xmit (struct sk_buff *skb,
	}

#if CP_VLAN_TAG_USED
	if (cp->vlgrp && vlan_tx_tag_present(skb))
	if (vlan_tx_tag_present(skb))
		vlan_tag = TxVlanTag | swab16(vlan_tx_tag_get(skb));
#endif

+1 −1
Original line number Diff line number Diff line
@@ -1315,7 +1315,7 @@ static netdev_tx_t amd8111e_start_xmit(struct sk_buff *skb,
	lp->tx_ring[tx_index].tx_flags = 0;

#if AMD8111E_VLAN_TAG_USED
	if((lp->vlgrp != NULL) && vlan_tx_tag_present(skb)){
	if (vlan_tx_tag_present(skb)) {
		lp->tx_ring[tx_index].tag_ctrl_cmd |=
				cpu_to_le16(TCC_VLAN_INSERT);
		lp->tx_ring[tx_index].tag_ctrl_info =
+1 −1
Original line number Diff line number Diff line
@@ -2243,7 +2243,7 @@ static netdev_tx_t atl1c_xmit_frame(struct sk_buff *skb,
		return NETDEV_TX_OK;
	}

	if (unlikely(adapter->vlgrp && vlan_tx_tag_present(skb))) {
	if (unlikely(vlan_tx_tag_present(skb))) {
		u16 vlan = vlan_tx_tag_get(skb);
		__le16 tag;

+1 −1
Original line number Diff line number Diff line
@@ -1814,7 +1814,7 @@ static netdev_tx_t atl1e_xmit_frame(struct sk_buff *skb,

	tpd = atl1e_get_tpd(adapter);

	if (unlikely(adapter->vlgrp && vlan_tx_tag_present(skb))) {
	if (unlikely(vlan_tx_tag_present(skb))) {
		u16 vlan_tag = vlan_tx_tag_get(skb);
		u16 atl1e_vlan_tag;

+1 −1
Original line number Diff line number Diff line
@@ -2408,7 +2408,7 @@ static netdev_tx_t atl1_xmit_frame(struct sk_buff *skb,
		(u16) atomic_read(&tpd_ring->next_to_use));
	memset(ptpd, 0, sizeof(struct tx_packet_desc));

	if (adapter->vlgrp && vlan_tx_tag_present(skb)) {
	if (vlan_tx_tag_present(skb)) {
		vlan_tag = vlan_tx_tag_get(skb);
		vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) |
			((vlan_tag >> 9) & 0x8);
Loading