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

Commit 9cae9e4f authored by Ajit Khaparde's avatar Ajit Khaparde Committed by David S. Miller
Browse files

be2net: fix bug in vlan rx path for big endian architecture



vlan traffic on big endian architecture is broken.
Need to swap the vid before giving packet to stack.
This patch fixes it.

Signed-off-by: default avatarAjit Khaparde <ajitk@serverengines.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8b93b710
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -807,7 +807,7 @@ static void be_rx_compl_process(struct be_adapter *adapter,
			return;
			return;
		}
		}
		vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp);
		vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp);
		vid = be16_to_cpu(vid);
		vid = swab16(vid);
		vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, vid);
		vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, vid);
	} else {
	} else {
		netif_receive_skb(skb);
		netif_receive_skb(skb);
@@ -884,7 +884,7 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter,
		napi_gro_frags(&eq_obj->napi);
		napi_gro_frags(&eq_obj->napi);
	} else {
	} else {
		vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp);
		vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp);
		vid = be16_to_cpu(vid);
		vid = swab16(vid);


		if (!adapter->vlan_grp || adapter->vlans_added == 0)
		if (!adapter->vlan_grp || adapter->vlans_added == 0)
			return;
			return;