be2net: Storing the 'vid' got by the grp5 event instead of storing the vlan_tag
authorSomnath Kotur <somnath.kotur@emulex.com>
Fri, 19 Aug 2011 04:51:49 +0000 (21:51 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Aug 2011 04:51:49 +0000 (21:51 -0700)
Signed-off-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_cmds.c
drivers/net/ethernet/emulex/benet/be_main.c

index 427859532f02815f62d4839b33f4263f463624dd..bec039d27714260754bfd002de7930a55013e927 100644 (file)
@@ -140,7 +140,7 @@ static void be_async_grp5_pvid_state_process(struct be_adapter *adapter,
                struct be_async_event_grp5_pvid_state *evt)
 {
        if (evt->enabled)
-               adapter->pvid = le16_to_cpu(evt->tag);
+               adapter->pvid = le16_to_cpu(evt->tag) & VLAN_VID_MASK;
        else
                adapter->pvid = 0;
 }
index 7c98d8e99508aaaa0592213f85d318b5f794eb34..ef62594a19cdd5cf837c60ca4aa533af6c324667 100644 (file)
@@ -1277,8 +1277,7 @@ static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo)
                if (!lancer_chip(adapter))
                        rxcp->vlan_tag = swab16(rxcp->vlan_tag);
 
-               if (((adapter->pvid & VLAN_VID_MASK) ==
-                    (rxcp->vlan_tag & VLAN_VID_MASK)) &&
+               if (adapter->pvid == (rxcp->vlan_tag & VLAN_VID_MASK) &&
                    !adapter->vlan_tag[rxcp->vlan_tag])
                        rxcp->vlanf = 0;
        }