aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/8139cp.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-06-01 09:43:59 -0700
committerJeff Garzik <jeff@garzik.org>2007-06-03 11:44:20 -0400
commit7b332244a63dc1f408fd2ebb2636d58ac69a4916 (patch)
treef22a724108d8c6ff3433b7b68c65f3925b5d40a0 /drivers/net/8139cp.c
parent3d4e66f5cd217160da9c3a2e3ec27b22e743bd25 (diff)
downloadkernel_samsung_smdk4412-7b332244a63dc1f408fd2ebb2636d58ac69a4916.zip
kernel_samsung_smdk4412-7b332244a63dc1f408fd2ebb2636d58ac69a4916.tar.gz
kernel_samsung_smdk4412-7b332244a63dc1f408fd2ebb2636d58ac69a4916.tar.bz2
8139cp: fix VLAN unregistration
The 8139cp driver did VLAN unregistration incorrectly. It disables VLAN completely when the first VID is unregistered. It should instead disable VLAN when the group is unregistered by calling cp_vlan_rx_register with a NULL grp. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/8139cp.c')
-rw-r--r--drivers/net/8139cp.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index e8c9f27..a804965 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -435,20 +435,12 @@ static void cp_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
spin_lock_irqsave(&cp->lock, flags);
cp->vlgrp = grp;
- cp->cpcmd |= RxVlanOn;
- cpw16(CpCmd, cp->cpcmd);
- spin_unlock_irqrestore(&cp->lock, flags);
-}
-
-static void cp_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
-{
- struct cp_private *cp = netdev_priv(dev);
- unsigned long flags;
+ if (grp)
+ cp->cpcmd |= RxVlanOn;
+ else
+ cp->cpcmd &= ~RxVlanOn;
- spin_lock_irqsave(&cp->lock, flags);
- cp->cpcmd &= ~RxVlanOn;
cpw16(CpCmd, cp->cpcmd);
- vlan_group_set_device(cp->vlgrp, vid, NULL);
spin_unlock_irqrestore(&cp->lock, flags);
}
#endif /* CP_VLAN_TAG_USED */
@@ -1944,7 +1936,6 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
#if CP_VLAN_TAG_USED
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
dev->vlan_rx_register = cp_vlan_rx_register;
- dev->vlan_rx_kill_vid = cp_vlan_rx_kill_vid;
#endif
if (pci_using_dac)