aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-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 e8c9f27817b0..a804965e6542 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)
435 435
436 spin_lock_irqsave(&cp->lock, flags); 436 spin_lock_irqsave(&cp->lock, flags);
437 cp->vlgrp = grp; 437 cp->vlgrp = grp;
438 cp->cpcmd |= RxVlanOn; 438 if (grp)
439 cpw16(CpCmd, cp->cpcmd); 439 cp->cpcmd |= RxVlanOn;
440 spin_unlock_irqrestore(&cp->lock, flags); 440 else
441} 441 cp->cpcmd &= ~RxVlanOn;
442
443static void cp_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
444{
445 struct cp_private *cp = netdev_priv(dev);
446 unsigned long flags;
447 442
448 spin_lock_irqsave(&cp->lock, flags);
449 cp->cpcmd &= ~RxVlanOn;
450 cpw16(CpCmd, cp->cpcmd); 443 cpw16(CpCmd, cp->cpcmd);
451 vlan_group_set_device(cp->vlgrp, vid, NULL);
452 spin_unlock_irqrestore(&cp->lock, flags); 444 spin_unlock_irqrestore(&cp->lock, flags);
453} 445}
454#endif /* CP_VLAN_TAG_USED */ 446#endif /* CP_VLAN_TAG_USED */
@@ -1944,7 +1936,6 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1944#if CP_VLAN_TAG_USED 1936#if CP_VLAN_TAG_USED
1945 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; 1937 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
1946 dev->vlan_rx_register = cp_vlan_rx_register; 1938 dev->vlan_rx_register = cp_vlan_rx_register;
1947 dev->vlan_rx_kill_vid = cp_vlan_rx_kill_vid;
1948#endif 1939#endif
1949 1940
1950 if (pci_using_dac) 1941 if (pci_using_dac)