backfire: swconfig: Fix a bug in use of SWITCH_PORT_FLAG_TAGGED (backport of r21708)
authorGabor Juhos <juhosg@openwrt.org>
Sun, 20 Jun 2010 05:42:44 +0000 (05:42 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sun, 20 Jun 2010 05:42:44 +0000 (05:42 +0000)
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: 21847

target/linux/generic-2.6/files/drivers/net/phy/swconfig.c

index 1eebe87e560d91d1cf3739f0c9e6e783de9a5494..dea8e78b79b4fd61da2a32427d92811c77648206 100644 (file)
@@ -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);
        }