Commit 9758eeb8 authored by John W. Linville's avatar John W. Linville Committed by Jeff Garzik

[PATCH] 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: default avatarJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
parent f560b735
......@@ -703,8 +703,10 @@ static void rtl8169_vlan_rx_register(struct net_device *dev,
unsigned long flags;
spin_lock_irqsave(&tp->lock, flags);
tp->vlgrp = grp;
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);
......@@ -713,13 +715,9 @@ static void rtl8169_vlan_rx_register(struct net_device *dev,
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment