diff options
author | Jiri Pirko <jpirko@redhat.com> | 2011-07-20 00:54:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-21 16:47:56 -0400 |
commit | a4f676b80f9ca2a76cb27b8378343a5f4f972d3f (patch) | |
tree | c4da256eb8543c24694e919c6a6f524e1b14af40 /drivers/net/ns83820.c | |
parent | 5da96be53a16a62488316810d0c7c5d58ce3ee4f (diff) |
ns83820: do vlan cleanup
- unify vlan and nonvlan rx path
- kill dev->vlgrp and ns83820_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/ns83820.c')
-rw-r--r-- | drivers/net/ns83820.c | 33 |
1 files changed, 4 insertions, 29 deletions
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c index d3afb458987e..e736aec588fc 100644 --- a/drivers/net/ns83820.c +++ b/drivers/net/ns83820.c | |||
@@ -430,10 +430,6 @@ struct ns83820 { | |||
430 | struct pci_dev *pci_dev; | 430 | struct pci_dev *pci_dev; |
431 | struct net_device *ndev; | 431 | struct net_device *ndev; |
432 | 432 | ||
433 | #ifdef NS83820_VLAN_ACCEL_SUPPORT | ||
434 | struct vlan_group *vlgrp; | ||
435 | #endif | ||
436 | |||
437 | struct rx_info rx_info; | 433 | struct rx_info rx_info; |
438 | struct tasklet_struct rx_tasklet; | 434 | struct tasklet_struct rx_tasklet; |
439 | 435 | ||
@@ -494,22 +490,6 @@ static inline void kick_rx(struct net_device *ndev) | |||
494 | #define start_tx_okay(dev) \ | 490 | #define start_tx_okay(dev) \ |
495 | (((NR_TX_DESC-2 + dev->tx_done_idx - dev->tx_free_idx) % NR_TX_DESC) > MIN_TX_DESC_FREE) | 491 | (((NR_TX_DESC-2 + dev->tx_done_idx - dev->tx_free_idx) % NR_TX_DESC) > MIN_TX_DESC_FREE) |
496 | 492 | ||
497 | |||
498 | #ifdef NS83820_VLAN_ACCEL_SUPPORT | ||
499 | static void ns83820_vlan_rx_register(struct net_device *ndev, struct vlan_group *grp) | ||
500 | { | ||
501 | struct ns83820 *dev = PRIV(ndev); | ||
502 | |||
503 | spin_lock_irq(&dev->misc_lock); | ||
504 | spin_lock(&dev->tx_lock); | ||
505 | |||
506 | dev->vlgrp = grp; | ||
507 | |||
508 | spin_unlock(&dev->tx_lock); | ||
509 | spin_unlock_irq(&dev->misc_lock); | ||
510 | } | ||
511 | #endif | ||
512 | |||
513 | /* Packet Receiver | 493 | /* Packet Receiver |
514 | * | 494 | * |
515 | * The hardware supports linked lists of receive descriptors for | 495 | * The hardware supports linked lists of receive descriptors for |
@@ -930,14 +910,12 @@ static void rx_irq(struct net_device *ndev) | |||
930 | #ifdef NS83820_VLAN_ACCEL_SUPPORT | 910 | #ifdef NS83820_VLAN_ACCEL_SUPPORT |
931 | if(extsts & EXTSTS_VPKT) { | 911 | if(extsts & EXTSTS_VPKT) { |
932 | unsigned short tag; | 912 | unsigned short tag; |
913 | |||
933 | tag = ntohs(extsts & EXTSTS_VTG_MASK); | 914 | tag = ntohs(extsts & EXTSTS_VTG_MASK); |
934 | rx_rc = vlan_hwaccel_rx(skb,dev->vlgrp,tag); | 915 | __vlan_hwaccel_put_tag(skb, tag); |
935 | } else { | ||
936 | rx_rc = netif_rx(skb); | ||
937 | } | 916 | } |
938 | #else | ||
939 | rx_rc = netif_rx(skb); | ||
940 | #endif | 917 | #endif |
918 | rx_rc = netif_rx(skb); | ||
941 | if (NET_RX_DROP == rx_rc) { | 919 | if (NET_RX_DROP == rx_rc) { |
942 | netdev_mangle_me_harder_failed: | 920 | netdev_mangle_me_harder_failed: |
943 | ndev->stats.rx_dropped++; | 921 | ndev->stats.rx_dropped++; |
@@ -1961,11 +1939,8 @@ static const struct net_device_ops netdev_ops = { | |||
1961 | .ndo_change_mtu = ns83820_change_mtu, | 1939 | .ndo_change_mtu = ns83820_change_mtu, |
1962 | .ndo_set_multicast_list = ns83820_set_multicast, | 1940 | .ndo_set_multicast_list = ns83820_set_multicast, |
1963 | .ndo_validate_addr = eth_validate_addr, | 1941 | .ndo_validate_addr = eth_validate_addr, |
1964 | .ndo_set_mac_address = eth_mac_addr, | 1942 | .ndo_set_mac_address = eth_mac_addr, |
1965 | .ndo_tx_timeout = ns83820_tx_timeout, | 1943 | .ndo_tx_timeout = ns83820_tx_timeout, |
1966 | #ifdef NS83820_VLAN_ACCEL_SUPPORT | ||
1967 | .ndo_vlan_rx_register = ns83820_vlan_rx_register, | ||
1968 | #endif | ||
1969 | }; | 1944 | }; |
1970 | 1945 | ||
1971 | static int __devinit ns83820_init_one(struct pci_dev *pci_dev, | 1946 | static int __devinit ns83820_init_one(struct pci_dev *pci_dev, |