From: juhosg Date: Sun, 20 Jun 2010 05:42:44 +0000 (+0000) Subject: backfire: swconfig: Fix a bug in use of SWITCH_PORT_FLAG_TAGGED (backport of r21708) X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=commitdiff_plain;h=1abce0276c65d357ac591f7c50cf3bf7b46ff754 backfire: swconfig: Fix a bug in use of SWITCH_PORT_FLAG_TAGGED (backport of r21708) SWITCH_PORT_FLAG_TAGGED is a bit index, not a bit mask. Signed-off-by: Martin Mares Signed-off-by: Patrick Horn git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21847 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- 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 1eebe87e5..dea8e78b7 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); }