aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet/be_main.c
diff options
context:
space:
mode:
authorAjit Khaparde <ajit.khaparde@emulex.com>2011-02-20 06:41:53 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-22 13:26:46 -0500
commit3968fa1e58896187ee5629db0720d93b9313ad9f (patch)
treeb2ec3d6fcc3342afad5a81e0c1a6380d493bffee /drivers/net/benet/be_main.c
parentb2aebe6d8102ed55c161371a6ac4d945c95c334c (diff)
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 'drivers/net/benet/be_main.c')
-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,
1047 if ((adapter->function_mode & 0x400) && !vtm) 1047 if ((adapter->function_mode & 0x400) && !vtm)
1048 vlanf = 0; 1048 vlanf = 0;
1049 1049
1050 if ((adapter->pvid == vlanf) && !adapter->vlan_tag[vlanf])
1051 vlanf = 0;
1052
1050 if (unlikely(vlanf)) { 1053 if (unlikely(vlanf)) {
1051 if (!adapter->vlan_grp || adapter->vlans_added == 0) { 1054 if (!adapter->vlan_grp || adapter->vlans_added == 0) {
1052 kfree_skb(skb); 1055 kfree_skb(skb);
@@ -1087,6 +1090,9 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter,
1087 if ((adapter->function_mode & 0x400) && !vtm) 1090 if ((adapter->function_mode & 0x400) && !vtm)
1088 vlanf = 0; 1091 vlanf = 0;
1089 1092
1093 if ((adapter->pvid == vlanf) && !adapter->vlan_tag[vlanf])
1094 vlanf = 0;
1095
1090 skb = napi_get_frags(&eq_obj->napi); 1096 skb = napi_get_frags(&eq_obj->napi);
1091 if (!skb) { 1097 if (!skb) {
1092 be_rx_compl_discard(adapter, rxo, rxcp); 1098 be_rx_compl_discard(adapter, rxo, rxcp);