mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-18 03:56:15 +02:00
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 <mj@ucw.cz> Signed-off-by: Patrick Horn <patrick.horn@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21847 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
445022bc75
commit
1abce0276c
@ -92,7 +92,7 @@ swconfig_set_vlan_ports(struct switch_dev *dev, const struct switch_attr *attr,
|
|||||||
if (ports[i].id >= dev->ports)
|
if (ports[i].id >= dev->ports)
|
||||||
return -EINVAL;
|
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);
|
dev->set_port_pvid(dev, ports[i].id, val->port_vlan);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user