diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/benet/be.h | 2 | ||||
-rw-r--r-- | drivers/net/benet/be_cmds.c | 2 | ||||
-rw-r--r-- | drivers/net/benet/be_main.c | 18 |
3 files changed, 14 insertions, 8 deletions
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h index 66823eded7a3..2353eca32593 100644 --- a/drivers/net/benet/be.h +++ b/drivers/net/benet/be.h | |||
@@ -213,7 +213,7 @@ struct be_rx_stats { | |||
213 | 213 | ||
214 | struct be_rx_compl_info { | 214 | struct be_rx_compl_info { |
215 | u32 rss_hash; | 215 | u32 rss_hash; |
216 | u16 vid; | 216 | u16 vlan_tag; |
217 | u16 pkt_size; | 217 | u16 pkt_size; |
218 | u16 rxq_idx; | 218 | u16 rxq_idx; |
219 | u16 mac_id; | 219 | u16 mac_id; |
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c index 1e2d825bb94a..9dc9394fd4ca 100644 --- a/drivers/net/benet/be_cmds.c +++ b/drivers/net/benet/be_cmds.c | |||
@@ -132,7 +132,7 @@ static void be_async_grp5_pvid_state_process(struct be_adapter *adapter, | |||
132 | struct be_async_event_grp5_pvid_state *evt) | 132 | struct be_async_event_grp5_pvid_state *evt) |
133 | { | 133 | { |
134 | if (evt->enabled) | 134 | if (evt->enabled) |
135 | adapter->pvid = evt->tag; | 135 | adapter->pvid = le16_to_cpu(evt->tag); |
136 | else | 136 | else |
137 | adapter->pvid = 0; | 137 | adapter->pvid = 0; |
138 | } | 138 | } |
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 02a0443d1821..9187fb4e08f1 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -1018,7 +1018,8 @@ static void be_rx_compl_process(struct be_adapter *adapter, | |||
1018 | kfree_skb(skb); | 1018 | kfree_skb(skb); |
1019 | return; | 1019 | return; |
1020 | } | 1020 | } |
1021 | vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, rxcp->vid); | 1021 | vlan_hwaccel_receive_skb(skb, adapter->vlan_grp, |
1022 | rxcp->vlan_tag); | ||
1022 | } else { | 1023 | } else { |
1023 | netif_receive_skb(skb); | 1024 | netif_receive_skb(skb); |
1024 | } | 1025 | } |
@@ -1076,7 +1077,8 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter, | |||
1076 | if (likely(!rxcp->vlanf)) | 1077 | if (likely(!rxcp->vlanf)) |
1077 | napi_gro_frags(&eq_obj->napi); | 1078 | napi_gro_frags(&eq_obj->napi); |
1078 | else | 1079 | else |
1079 | vlan_gro_frags(&eq_obj->napi, adapter->vlan_grp, rxcp->vid); | 1080 | vlan_gro_frags(&eq_obj->napi, adapter->vlan_grp, |
1081 | rxcp->vlan_tag); | ||
1080 | } | 1082 | } |
1081 | 1083 | ||
1082 | static void be_parse_rx_compl_v1(struct be_adapter *adapter, | 1084 | static void be_parse_rx_compl_v1(struct be_adapter *adapter, |
@@ -1102,7 +1104,8 @@ static void be_parse_rx_compl_v1(struct be_adapter *adapter, | |||
1102 | rxcp->pkt_type = | 1104 | rxcp->pkt_type = |
1103 | AMAP_GET_BITS(struct amap_eth_rx_compl_v1, cast_enc, compl); | 1105 | AMAP_GET_BITS(struct amap_eth_rx_compl_v1, cast_enc, compl); |
1104 | rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vtm, compl); | 1106 | rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vtm, compl); |
1105 | rxcp->vid = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag, compl); | 1107 | rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v1, vlan_tag, |
1108 | compl); | ||
1106 | } | 1109 | } |
1107 | 1110 | ||
1108 | static void be_parse_rx_compl_v0(struct be_adapter *adapter, | 1111 | static void be_parse_rx_compl_v0(struct be_adapter *adapter, |
@@ -1128,7 +1131,8 @@ static void be_parse_rx_compl_v0(struct be_adapter *adapter, | |||
1128 | rxcp->pkt_type = | 1131 | rxcp->pkt_type = |
1129 | AMAP_GET_BITS(struct amap_eth_rx_compl_v0, cast_enc, compl); | 1132 | AMAP_GET_BITS(struct amap_eth_rx_compl_v0, cast_enc, compl); |
1130 | rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vtm, compl); | 1133 | rxcp->vtm = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vtm, compl); |
1131 | rxcp->vid = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag, compl); | 1134 | rxcp->vlan_tag = AMAP_GET_BITS(struct amap_eth_rx_compl_v0, vlan_tag, |
1135 | compl); | ||
1132 | } | 1136 | } |
1133 | 1137 | ||
1134 | static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo) | 1138 | static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo) |
@@ -1155,9 +1159,11 @@ static struct be_rx_compl_info *be_rx_compl_get(struct be_rx_obj *rxo) | |||
1155 | rxcp->vlanf = 0; | 1159 | rxcp->vlanf = 0; |
1156 | 1160 | ||
1157 | if (!lancer_chip(adapter)) | 1161 | if (!lancer_chip(adapter)) |
1158 | rxcp->vid = swab16(rxcp->vid); | 1162 | rxcp->vlan_tag = swab16(rxcp->vlan_tag); |
1159 | 1163 | ||
1160 | if ((adapter->pvid == rxcp->vid) && !adapter->vlan_tag[rxcp->vid]) | 1164 | if (((adapter->pvid & VLAN_VID_MASK) == |
1165 | (rxcp->vlan_tag & VLAN_VID_MASK)) && | ||
1166 | !adapter->vlan_tag[rxcp->vlan_tag]) | ||
1161 | rxcp->vlanf = 0; | 1167 | rxcp->vlanf = 0; |
1162 | 1168 | ||
1163 | /* As the compl has been parsed, reset it; we wont touch it again */ | 1169 | /* As the compl has been parsed, reset it; we wont touch it again */ |