lkml.org 
[lkml]   [2004]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch netdev-2.6 2/2] r8169: fix RxVlan bit manipulation
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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.050 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site