mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-02-20 06:54:43 +02:00
ar8216: use vlan configuration for connecting ports (forced to be untagged) even with vlan_enable=0, but keep them isolated before the switch has been configured
this makes enable_vlan=0 practical for vlan passthrough git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29719 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
25b268205a
commit
63c3f72940
@ -48,6 +48,8 @@ struct ar8216_priv {
|
|||||||
bool port4_phy;
|
bool port4_phy;
|
||||||
char buf[80];
|
char buf[80];
|
||||||
|
|
||||||
|
bool init;
|
||||||
|
|
||||||
/* all fields below are cleared on reset */
|
/* all fields below are cleared on reset */
|
||||||
bool vlan;
|
bool vlan;
|
||||||
u16 vlan_id[AR8X16_MAX_VLANS];
|
u16 vlan_id[AR8X16_MAX_VLANS];
|
||||||
@ -550,7 +552,7 @@ ar8216_hw_apply(struct switch_dev *dev)
|
|||||||
ar8216_vtu_op(priv, AR8216_VTU_OP_FLUSH, 0);
|
ar8216_vtu_op(priv, AR8216_VTU_OP_FLUSH, 0);
|
||||||
|
|
||||||
memset(portmask, 0, sizeof(portmask));
|
memset(portmask, 0, sizeof(portmask));
|
||||||
if (priv->vlan) {
|
if (!priv->init) {
|
||||||
/* calculate the port destination masks and load vlans
|
/* calculate the port destination masks and load vlans
|
||||||
* into the vlan translation unit */
|
* into the vlan translation unit */
|
||||||
for (j = 0; j < AR8X16_MAX_VLANS; j++) {
|
for (j = 0; j < AR8X16_MAX_VLANS; j++) {
|
||||||
@ -877,6 +879,8 @@ ar8216_config_init(struct phy_device *pdev)
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
priv->init = true;
|
||||||
|
|
||||||
if (priv->chip == AR8316) {
|
if (priv->chip == AR8316) {
|
||||||
ret = ar8316_hw_init(priv);
|
ret = ar8316_hw_init(priv);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
@ -912,6 +916,8 @@ ar8216_config_init(struct phy_device *pdev)
|
|||||||
dev->netdev_ops = &priv->ndo;
|
dev->netdev_ops = &priv->ndo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
priv->init = false;
|
||||||
|
|
||||||
done:
|
done:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user