aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-06-08 20:17:03 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-06-08 20:17:03 +0000
commitc0c0a607188c4948f1f8648ecca9ea2110837b66 (patch)
treeda9841b26ec657c1c9a40473938a340961e0c0eb
parentcfa9a1f6d6874f3cd1601e15664281c5184ce8ea (diff)
downloadupstream-c0c0a607188c4948f1f8648ecca9ea2110837b66.tar.gz
upstream-c0c0a607188c4948f1f8648ecca9ea2110837b66.tar.bz2
upstream-c0c0a607188c4948f1f8648ecca9ea2110837b66.zip
swconfig: Fix a bug in use of SWITCH_PORT_FLAG_TAGGED
SWITCH_PORT_FLAG_TAGGED is a bit index, not a bit mask. Signed-off-by: Martin Mares <mj@ucw.cz> Signed-off-by: Patrick Horn <patrick.horn@gmail.com> SVN-Revision: 21708
-rw-r--r--target/linux/generic-2.6/files/drivers/net/phy/swconfig.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/generic-2.6/files/drivers/net/phy/swconfig.c b/target/linux/generic-2.6/files/drivers/net/phy/swconfig.c
index 376dec16f9..bda2e2d619 100644
--- a/target/linux/generic-2.6/files/drivers/net/phy/swconfig.c
+++ b/target/linux/generic-2.6/files/drivers/net/phy/swconfig.c
@@ -92,7 +92,7 @@ swconfig_set_vlan_ports(struct switch_dev *dev, const struct switch_attr *attr,
if (ports[i].id >= dev->ports)
return -EINVAL;
- if (dev->set_port_pvid && !(ports[i].flags & SWITCH_PORT_FLAG_TAGGED))
+ if (dev->set_port_pvid && !(ports[i].flags & (1 << SWITCH_PORT_FLAG_TAGGED)))
dev->set_port_pvid(dev, ports[i].id, val->port_vlan);
}