be2net: fix bug in vlan rx path for big endian architecture
Subsystems (2)
PATCH 3/3 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 <[email protected]>
--- drivers/net/benet/be_main.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/benet/be_main.c +2 -2
@@ -807,7 +807,7 @@ static void be_rx_compl_process(struct be_adapter *adapter,return ; } 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); }else {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); }else { 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 )return ;
Signature · 1 line
1.6.3.3
From: Ajit Khaparde <[email protected]>
Date: Wed, 31 Mar 2010 17:30:32 +0530
Quoted 5 lines
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 <[email protected]>
Applied