ar8216: set the pvid based on runtime state instead of port number to fix learning with enable_vlan = 0

Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 42753
master
Felix Fietkau 10 years ago
parent 64e3cb9fe8
commit 156b296b20
  1. 4
      target/linux/generic/files/drivers/net/phy/ar8216.c

@ -1763,14 +1763,12 @@ ar8327_setup_port(struct ar8xxx_priv *priv, int port, u32 members)
{ {
u32 t; u32 t;
u32 egress, ingress; u32 egress, ingress;
u32 pvid; u32 pvid = priv->vlan_id[priv->pvid[port]];
if (priv->vlan) { if (priv->vlan) {
pvid = priv->vlan_id[priv->pvid[port]];
egress = AR8327_PORT_VLAN1_OUT_MODE_UNMOD; egress = AR8327_PORT_VLAN1_OUT_MODE_UNMOD;
ingress = AR8216_IN_SECURE; ingress = AR8216_IN_SECURE;
} else { } else {
pvid = port;
egress = AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH; egress = AR8327_PORT_VLAN1_OUT_MODE_UNTOUCH;
ingress = AR8216_IN_PORT_ONLY; ingress = AR8216_IN_PORT_ONLY;
} }

Loading…
Cancel
Save