[patch netdev-2.6 2/2] r8169: fix RxVlan bit manipulation

From: John W. Linville
Date: Thu Oct 21 2004 - 20:36:26 EST


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@xxxxxxxxxxxxx>
---

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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/