aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be_main.c
diff options
context:
space:
mode:
authorAjit Khaparde <ajit.khaparde@emulex.com>2011-02-20 11:41:53 +0000
committerDavid S. Miller <davem@davemloft.net>2011-02-22 10:26:46 -0800
commit3968fa1e58896187ee5629db0720d93b9313ad9f (patch)
treeb2ec3d6fcc3342afad5a81e0c1a6380d493bffee /drivers/net/benet/be_main.c
parentbe2net: variable name change (diff)
downloadlinux-dev-3968fa1e58896187ee5629db0720d93b9313ad9f.tar.xz
linux-dev-3968fa1e58896187ee5629db0720d93b9313ad9f.zip
be2net: fix to ignore transparent vlan ids wrongly indicated by NIC
With transparent VLAN tagging, the ASIC wrongly indicates packets with VLAN ID. Strip them off in the driver. The VLAN Tag to be stripped will be given to the host as an async message. Signed-off-by: Ajit Khaparde <ajit.khaparde@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/benet/be_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index b9e170da12de..cd6fda776d8d 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -1047,6 +1047,9 @@ static void be_rx_compl_process(struct be_adapter *adapter,
if ((adapter->function_mode & 0x400) && !vtm)
vlanf = 0;
+ if ((adapter->pvid == vlanf) && !adapter->vlan_tag[vlanf])
+ vlanf = 0;
+
if (unlikely(vlanf)) {
if (!adapter->vlan_grp || adapter->vlans_added == 0) {
kfree_skb(skb);
@@ -1087,6 +1090,9 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter,
if ((adapter->function_mode & 0x400) && !vtm)
vlanf = 0;
+ if ((adapter->pvid == vlanf) && !adapter->vlan_tag[vlanf])
+ vlanf = 0;
+
skb = napi_get_frags(&eq_obj->napi);
if (!skb) {
be_rx_compl_discard(adapter, rxo, rxcp);