Commit a4f676b8 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

ns83820: do vlan cleanup

- unify vlan and nonvlan rx path
- kill dev->vlgrp and ns83820_vlan_rx_register
Signed-off-by: default avatarJiri Pirko <jpirko@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5da96be5
...@@ -430,10 +430,6 @@ struct ns83820 { ...@@ -430,10 +430,6 @@ struct ns83820 {
struct pci_dev *pci_dev; struct pci_dev *pci_dev;
struct net_device *ndev; struct net_device *ndev;
#ifdef NS83820_VLAN_ACCEL_SUPPORT
struct vlan_group *vlgrp;
#endif
struct rx_info rx_info; struct rx_info rx_info;
struct tasklet_struct rx_tasklet; struct tasklet_struct rx_tasklet;
...@@ -494,22 +490,6 @@ static inline void kick_rx(struct net_device *ndev) ...@@ -494,22 +490,6 @@ static inline void kick_rx(struct net_device *ndev)
#define start_tx_okay(dev) \ #define start_tx_okay(dev) \
(((NR_TX_DESC-2 + dev->tx_done_idx - dev->tx_free_idx) % NR_TX_DESC) > MIN_TX_DESC_FREE) (((NR_TX_DESC-2 + dev->tx_done_idx - dev->tx_free_idx) % NR_TX_DESC) > MIN_TX_DESC_FREE)
#ifdef NS83820_VLAN_ACCEL_SUPPORT
static void ns83820_vlan_rx_register(struct net_device *ndev, struct vlan_group *grp)
{
struct ns83820 *dev = PRIV(ndev);
spin_lock_irq(&dev->misc_lock);
spin_lock(&dev->tx_lock);
dev->vlgrp = grp;
spin_unlock(&dev->tx_lock);
spin_unlock_irq(&dev->misc_lock);
}
#endif
/* Packet Receiver /* Packet Receiver
* *
* The hardware supports linked lists of receive descriptors for * The hardware supports linked lists of receive descriptors for
...@@ -930,14 +910,12 @@ static void rx_irq(struct net_device *ndev) ...@@ -930,14 +910,12 @@ static void rx_irq(struct net_device *ndev)
#ifdef NS83820_VLAN_ACCEL_SUPPORT #ifdef NS83820_VLAN_ACCEL_SUPPORT
if(extsts & EXTSTS_VPKT) { if(extsts & EXTSTS_VPKT) {
unsigned short tag; unsigned short tag;
tag = ntohs(extsts & EXTSTS_VTG_MASK); tag = ntohs(extsts & EXTSTS_VTG_MASK);
rx_rc = vlan_hwaccel_rx(skb,dev->vlgrp,tag); __vlan_hwaccel_put_tag(skb, tag);
} else {
rx_rc = netif_rx(skb);
} }
#else
rx_rc = netif_rx(skb);
#endif #endif
rx_rc = netif_rx(skb);
if (NET_RX_DROP == rx_rc) { if (NET_RX_DROP == rx_rc) {
netdev_mangle_me_harder_failed: netdev_mangle_me_harder_failed:
ndev->stats.rx_dropped++; ndev->stats.rx_dropped++;
...@@ -1963,9 +1941,6 @@ static const struct net_device_ops netdev_ops = { ...@@ -1963,9 +1941,6 @@ static const struct net_device_ops netdev_ops = {
.ndo_validate_addr = eth_validate_addr, .ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr, .ndo_set_mac_address = eth_mac_addr,
.ndo_tx_timeout = ns83820_tx_timeout, .ndo_tx_timeout = ns83820_tx_timeout,
#ifdef NS83820_VLAN_ACCEL_SUPPORT
.ndo_vlan_rx_register = ns83820_vlan_rx_register,
#endif
}; };
static int __devinit ns83820_init_one(struct pci_dev *pci_dev, static int __devinit ns83820_init_one(struct pci_dev *pci_dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment