mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-24 01:01:52 +02:00
rtl8366_smi: backport vlan fix from r22856
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@22857 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
791b6f5100
commit
79bfb79ba6
@ -905,6 +905,7 @@ int rtl8366_sw_set_vlan_ports(struct switch_dev *dev, struct switch_val *val)
|
|||||||
struct switch_port *port;
|
struct switch_port *port;
|
||||||
u32 member = 0;
|
u32 member = 0;
|
||||||
u32 untag = 0;
|
u32 untag = 0;
|
||||||
|
int err;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!smi->ops->is_vlan_valid(smi, val->port_vlan))
|
if (!smi->ops->is_vlan_valid(smi, val->port_vlan))
|
||||||
@ -916,6 +917,14 @@ int rtl8366_sw_set_vlan_ports(struct switch_dev *dev, struct switch_val *val)
|
|||||||
|
|
||||||
if (!(port->flags & BIT(SWITCH_PORT_FLAG_TAGGED)))
|
if (!(port->flags & BIT(SWITCH_PORT_FLAG_TAGGED)))
|
||||||
untag |= BIT(port->id);
|
untag |= BIT(port->id);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* To ensure that we have a valid MC entry for this VLAN,
|
||||||
|
* initialize the port VLAN ID here.
|
||||||
|
*/
|
||||||
|
err = rtl8366_set_pvid(smi, port->id, val->port_vlan);
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
return rtl8366_set_vlan(smi, val->port_vlan, member, untag, 0);
|
return rtl8366_set_vlan(smi, val->port_vlan, member, untag, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user