* [8139CP]: Fix VLAN unregistration
@ 2007-05-30 7:52 Patrick McHardy
0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2007-05-30 7:52 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 132 bytes --]
Fix 8139cp disabling VLAN completely once the first vid is unregistered.
Compile-tested only since I don't own one of these cards.
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1508 bytes --]
[8139CP]: Fix VLAN unregistration
8139cp 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 grp = NULL.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit b91a2ac4f5a148bfa9778f2bf0e9a46ed3a4aca9
tree bdf13171526857e7a15fdb31db8b58706a10b34f
parent 62d7f463e185a0b65915110d25d8c4c732e67c0a
author Patrick McHardy <kaber@trash.net> Wed, 30 May 2007 09:49:20 +0200
committer Patrick McHardy <kaber@trash.net> Wed, 30 May 2007 09:49:20 +0200
drivers/net/8139cp.c | 14 +++++---------
1 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index e8c9f27..5cc961e 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -435,21 +435,17 @@ 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;
+ if (grp)
+ cp->cpcmd |= RxVlanOn;
+ else
+ 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;
-
- 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);
+ return;
}
#endif /* CP_VLAN_TAG_USED */
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-05-30 7:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-30 7:52 [8139CP]: Fix VLAN unregistration Patrick McHardy
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.