diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-07-20 00:54:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-21 16:47:55 -0400 |
commit | 6ede746b62627b6f03fe88afad1a07d38917b85d (patch) | |
tree | 4503071c254468584399ae0077444ce23d647996 /drivers/net/enic/enic_main.c | |
parent | c74ea2f75e40776607f614afde67f1241e283ed6 (diff) |
enic: do vlan cleanup
- unify vlan and nonvlan rx path
- kill enic->vlan_group and enic_vlan_rx_register
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/enic/enic_main.c')
-rw-r--r-- | drivers/net/enic/enic_main.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index e25800fa96ca..67a27cd304dd 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c | |||
@@ -1029,14 +1029,6 @@ static void enic_set_rx_mode(struct net_device *netdev) | |||
1029 | } | 1029 | } |
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | /* rtnl lock is held */ | ||
1033 | static void enic_vlan_rx_register(struct net_device *netdev, | ||
1034 | struct vlan_group *vlan_group) | ||
1035 | { | ||
1036 | struct enic *enic = netdev_priv(netdev); | ||
1037 | enic->vlan_group = vlan_group; | ||
1038 | } | ||
1039 | |||
1040 | /* netif_tx_lock held, BHs disabled */ | 1032 | /* netif_tx_lock held, BHs disabled */ |
1041 | static void enic_tx_timeout(struct net_device *netdev) | 1033 | static void enic_tx_timeout(struct net_device *netdev) |
1042 | { | 1034 | { |
@@ -1264,23 +1256,13 @@ static void enic_rq_indicate_buf(struct vnic_rq *rq, | |||
1264 | 1256 | ||
1265 | skb->dev = netdev; | 1257 | skb->dev = netdev; |
1266 | 1258 | ||
1267 | if (vlan_stripped) { | 1259 | if (vlan_stripped) |
1268 | 1260 | __vlan_hwaccel_put_tag(skb, vlan_tci); | |
1269 | if (netdev->features & NETIF_F_GRO) | ||
1270 | vlan_gro_receive(&enic->napi[q_number], | ||
1271 | enic->vlan_group, vlan_tci, skb); | ||
1272 | else | ||
1273 | vlan_hwaccel_receive_skb(skb, | ||
1274 | enic->vlan_group, vlan_tci); | ||
1275 | 1261 | ||
1276 | } else { | 1262 | if (netdev->features & NETIF_F_GRO) |
1277 | 1263 | napi_gro_receive(&enic->napi[q_number], skb); | |
1278 | if (netdev->features & NETIF_F_GRO) | 1264 | else |
1279 | napi_gro_receive(&enic->napi[q_number], skb); | 1265 | netif_receive_skb(skb); |
1280 | else | ||
1281 | netif_receive_skb(skb); | ||
1282 | |||
1283 | } | ||
1284 | } else { | 1266 | } else { |
1285 | 1267 | ||
1286 | /* Buffer overflow | 1268 | /* Buffer overflow |
@@ -2124,7 +2106,6 @@ static const struct net_device_ops enic_netdev_dynamic_ops = { | |||
2124 | .ndo_set_multicast_list = enic_set_rx_mode, | 2106 | .ndo_set_multicast_list = enic_set_rx_mode, |
2125 | .ndo_set_mac_address = enic_set_mac_address_dynamic, | 2107 | .ndo_set_mac_address = enic_set_mac_address_dynamic, |
2126 | .ndo_change_mtu = enic_change_mtu, | 2108 | .ndo_change_mtu = enic_change_mtu, |
2127 | .ndo_vlan_rx_register = enic_vlan_rx_register, | ||
2128 | .ndo_vlan_rx_add_vid = enic_vlan_rx_add_vid, | 2109 | .ndo_vlan_rx_add_vid = enic_vlan_rx_add_vid, |
2129 | .ndo_vlan_rx_kill_vid = enic_vlan_rx_kill_vid, | 2110 | .ndo_vlan_rx_kill_vid = enic_vlan_rx_kill_vid, |
2130 | .ndo_tx_timeout = enic_tx_timeout, | 2111 | .ndo_tx_timeout = enic_tx_timeout, |
@@ -2146,7 +2127,6 @@ static const struct net_device_ops enic_netdev_ops = { | |||
2146 | .ndo_set_rx_mode = enic_set_rx_mode, | 2127 | .ndo_set_rx_mode = enic_set_rx_mode, |
2147 | .ndo_set_multicast_list = enic_set_rx_mode, | 2128 | .ndo_set_multicast_list = enic_set_rx_mode, |
2148 | .ndo_change_mtu = enic_change_mtu, | 2129 | .ndo_change_mtu = enic_change_mtu, |
2149 | .ndo_vlan_rx_register = enic_vlan_rx_register, | ||
2150 | .ndo_vlan_rx_add_vid = enic_vlan_rx_add_vid, | 2130 | .ndo_vlan_rx_add_vid = enic_vlan_rx_add_vid, |
2151 | .ndo_vlan_rx_kill_vid = enic_vlan_rx_kill_vid, | 2131 | .ndo_vlan_rx_kill_vid = enic_vlan_rx_kill_vid, |
2152 | .ndo_tx_timeout = enic_tx_timeout, | 2132 | .ndo_tx_timeout = enic_tx_timeout, |