diff options
author | Ajit Khaparde <ajitk@serverengines.com> | 2010-03-30 22:00:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-01 20:25:59 -0400 |
commit | 9cae9e4f8b5887d8ef46fc56c7ca97814ae741ce (patch) | |
tree | 67e03e75d3f520ab65ef50bf0d9dc088ac385584 | |
parent | 8b93b710a9cd70d67013b4b0f00df7dfda058064 (diff) |
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: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/benet/be_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index b0faaa204c7..ec6ace80225 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -807,7 +807,7 @@ static void be_rx_compl_process(struct be_adapter *adapter, | |||
807 | return; | 807 | return; |
808 | } | 808 | } |
809 | vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp); | 809 | vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp); |
810 | vid = be16_to_cpu(vid); | 810 | vid = swab16(vid); |
811 | vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, vid); | 811 | vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, vid); |
812 | } else { | 812 | } else { |
813 | netif_receive_skb(skb); | 813 | netif_receive_skb(skb); |
@@ -884,7 +884,7 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter, | |||
884 | napi_gro_frags(&eq_obj->napi); | 884 | napi_gro_frags(&eq_obj->napi); |
885 | } else { | 885 | } else { |
886 | vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp); | 886 | vid = AMAP_GET_BITS(struct amap_eth_rx_compl, vlan_tag, rxcp); |
887 | vid = be16_to_cpu(vid); | 887 | vid = swab16(vid); |
888 | 888 | ||
889 | if (!adapter->vlan_grp || adapter->vlans_added == 0) | 889 | if (!adapter->vlan_grp || adapter->vlans_added == 0) |
890 | return; | 890 | return; |