From: Patrick McHardy <kaber@trash.net>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Linux Netdev List <netdev@vger.kernel.org>
Subject: [8139CP]: Fix VLAN unregistration
Date: Wed, 30 May 2007 09:52:55 +0200 [thread overview]
Message-ID: <465D2D57.2080900@trash.net> (raw)
[-- 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 */
reply other threads:[~2007-05-30 7:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=465D2D57.2080900@trash.net \
--to=kaber@trash.net \
--cc=jgarzik@pobox.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).