diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-07-20 00:54:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-21 16:47:55 -0400 |
commit | 5043f5057773ba8b539eb51b9a4007e99599824f (patch) | |
tree | 006f66ba49915e10cb0bc374752e0a8beefb00bd /drivers/net/jme.c | |
parent | a0f1d603ee4186081fda0ad48ccf6163c2009f10 (diff) |
jme: do vlan cleanup
- unify vlan and nonvlan rx path
- kill jme->vlgrp and jme_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/jme.c')
-rw-r--r-- | drivers/net/jme.c | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/drivers/net/jme.c b/drivers/net/jme.c index 6b2a5e744255..85a11e0fa548 100644 --- a/drivers/net/jme.c +++ b/drivers/net/jme.c | |||
@@ -1048,16 +1048,12 @@ jme_alloc_and_feed_skb(struct jme_adapter *jme, int idx) | |||
1048 | skb_checksum_none_assert(skb); | 1048 | skb_checksum_none_assert(skb); |
1049 | 1049 | ||
1050 | if (rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_TAGON)) { | 1050 | if (rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_TAGON)) { |
1051 | if (jme->vlgrp) { | 1051 | u16 vid = le16_to_cpu(rxdesc->descwb.vlan); |
1052 | jme->jme_vlan_rx(skb, jme->vlgrp, | 1052 | |
1053 | le16_to_cpu(rxdesc->descwb.vlan)); | 1053 | __vlan_hwaccel_put_tag(skb, vid); |
1054 | NET_STAT(jme).rx_bytes += 4; | 1054 | NET_STAT(jme).rx_bytes += 4; |
1055 | } else { | ||
1056 | dev_kfree_skb(skb); | ||
1057 | } | ||
1058 | } else { | ||
1059 | jme->jme_rx(skb); | ||
1060 | } | 1055 | } |
1056 | jme->jme_rx(skb); | ||
1061 | 1057 | ||
1062 | if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_DEST)) == | 1058 | if ((rxdesc->descwb.flags & cpu_to_le16(RXWBFLAG_DEST)) == |
1063 | cpu_to_le16(RXWBFLAG_DEST_MUL)) | 1059 | cpu_to_le16(RXWBFLAG_DEST_MUL)) |
@@ -2282,16 +2278,6 @@ static inline void jme_resume_rx(struct jme_adapter *jme) | |||
2282 | } | 2278 | } |
2283 | 2279 | ||
2284 | static void | 2280 | static void |
2285 | jme_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp) | ||
2286 | { | ||
2287 | struct jme_adapter *jme = netdev_priv(netdev); | ||
2288 | |||
2289 | jme_pause_rx(jme); | ||
2290 | jme->vlgrp = grp; | ||
2291 | jme_resume_rx(jme); | ||
2292 | } | ||
2293 | |||
2294 | static void | ||
2295 | jme_get_drvinfo(struct net_device *netdev, | 2281 | jme_get_drvinfo(struct net_device *netdev, |
2296 | struct ethtool_drvinfo *info) | 2282 | struct ethtool_drvinfo *info) |
2297 | { | 2283 | { |
@@ -2401,7 +2387,6 @@ jme_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ecmd) | |||
2401 | test_bit(JME_FLAG_POLL, &jme->flags)) { | 2387 | test_bit(JME_FLAG_POLL, &jme->flags)) { |
2402 | clear_bit(JME_FLAG_POLL, &jme->flags); | 2388 | clear_bit(JME_FLAG_POLL, &jme->flags); |
2403 | jme->jme_rx = netif_rx; | 2389 | jme->jme_rx = netif_rx; |
2404 | jme->jme_vlan_rx = vlan_hwaccel_rx; | ||
2405 | dpi->cur = PCC_P1; | 2390 | dpi->cur = PCC_P1; |
2406 | dpi->attempt = PCC_P1; | 2391 | dpi->attempt = PCC_P1; |
2407 | dpi->cnt = 0; | 2392 | dpi->cnt = 0; |
@@ -2411,7 +2396,6 @@ jme_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *ecmd) | |||
2411 | !(test_bit(JME_FLAG_POLL, &jme->flags))) { | 2396 | !(test_bit(JME_FLAG_POLL, &jme->flags))) { |
2412 | set_bit(JME_FLAG_POLL, &jme->flags); | 2397 | set_bit(JME_FLAG_POLL, &jme->flags); |
2413 | jme->jme_rx = netif_receive_skb; | 2398 | jme->jme_rx = netif_receive_skb; |
2414 | jme->jme_vlan_rx = vlan_hwaccel_receive_skb; | ||
2415 | jme_interrupt_mode(jme); | 2399 | jme_interrupt_mode(jme); |
2416 | } | 2400 | } |
2417 | 2401 | ||
@@ -2850,7 +2834,6 @@ static const struct net_device_ops jme_netdev_ops = { | |||
2850 | .ndo_set_multicast_list = jme_set_multi, | 2834 | .ndo_set_multicast_list = jme_set_multi, |
2851 | .ndo_change_mtu = jme_change_mtu, | 2835 | .ndo_change_mtu = jme_change_mtu, |
2852 | .ndo_tx_timeout = jme_tx_timeout, | 2836 | .ndo_tx_timeout = jme_tx_timeout, |
2853 | .ndo_vlan_rx_register = jme_vlan_rx_register, | ||
2854 | .ndo_fix_features = jme_fix_features, | 2837 | .ndo_fix_features = jme_fix_features, |
2855 | .ndo_set_features = jme_set_features, | 2838 | .ndo_set_features = jme_set_features, |
2856 | }; | 2839 | }; |
@@ -2933,7 +2916,6 @@ jme_init_one(struct pci_dev *pdev, | |||
2933 | jme->pdev = pdev; | 2916 | jme->pdev = pdev; |
2934 | jme->dev = netdev; | 2917 | jme->dev = netdev; |
2935 | jme->jme_rx = netif_rx; | 2918 | jme->jme_rx = netif_rx; |
2936 | jme->jme_vlan_rx = vlan_hwaccel_rx; | ||
2937 | jme->old_mtu = netdev->mtu = 1500; | 2919 | jme->old_mtu = netdev->mtu = 1500; |
2938 | jme->phylink = 0; | 2920 | jme->phylink = 0; |
2939 | jme->tx_ring_size = 1 << 10; | 2921 | jme->tx_ring_size = 1 << 10; |