From: "John W. Linville" <linville@tuxdriver.com>
To: netdev@oss.sgi.com, linux-kernel@vger.kernel.org,
jgarzik@pobox.com, romieu@fr.zoreil.com
Subject: [patch netdev-2.6 2/2] r8169: fix RxVlan bit manipulation
Date: Thu, 21 Oct 2004 21:02:31 -0400 [thread overview]
Message-ID: <20041022010231.GC1945@tuxdriver.com> (raw)
In-Reply-To: <20041022005737.GA1945@tuxdriver.com>
Fix manipulation of RxVlan bit in rtl8169_vlan_rx_register(), and
remove it from rtl8169_vlan_rx_kill_vid().
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/r8169.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
--- netdev-2.6/drivers/net/r8169.c.netdev 2004-10-21 14:38:16.000000000 -0400
+++ netdev-2.6/drivers/net/r8169.c 2004-10-21 14:44:22.968783027 -0400
@@ -705,8 +705,10 @@ static void rtl8169_vlan_rx_register(str
unsigned long flags;
spin_lock_irqsave(&tp->lock, flags);
- tp->vlgrp = grp;
- tp->cp_cmd |= RxVlan;
+ if ((tp->vlgrp = grp))
+ tp->cp_cmd |= RxVlan;
+ else
+ tp->cp_cmd &= ~RxVlan;
RTL_W16(CPlusCmd, tp->cp_cmd);
RTL_R16(CPlusCmd);
spin_unlock_irqrestore(&tp->lock, flags);
@@ -715,13 +717,9 @@ static void rtl8169_vlan_rx_register(str
static void rtl8169_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
{
struct rtl8169_private *tp = netdev_priv(dev);
- void __iomem *ioaddr = tp->mmio_addr;
unsigned long flags;
spin_lock_irqsave(&tp->lock, flags);
- tp->cp_cmd &= ~RxVlan;
- RTL_W16(CPlusCmd, tp->cp_cmd);
- RTL_R16(CPlusCmd);
if (tp->vlgrp)
tp->vlgrp->vlan_devices[vid] = NULL;
spin_unlock_irqrestore(&tp->lock, flags);
next prev parent reply other threads:[~2004-10-22 1:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-22 0:57 [patch netdev-2.6 0/2] r8169: vlan hwaccel fixes John W. Linville
2004-10-22 1:00 ` [patch netdev-2.6 1/2] r8169: endian-swap return of rtl8169_tx_vlan_tag() John W. Linville
2004-10-22 1:02 ` John W. Linville [this message]
2004-10-22 20:28 ` [patch netdev-2.6 0/2] r8169: vlan hwaccel fixes Francois Romieu
2004-10-23 1:49 ` [patch netdev-2.6 3/3] r8169: simplify trick if() expression John W. Linville
2004-10-23 1:51 ` [patch netdev-2.6 0/2] r8169: vlan hwaccel fixes John W. Linville
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=20041022010231.GC1945@tuxdriver.com \
--to=linville@tuxdriver.com \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
--cc=romieu@fr.zoreil.com \
/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).