From: Felix Fietkau Date: Thu, 12 Jan 2012 10:15:08 +0000 (+0000) Subject: ar8216: do not strip vlan tags when running with vlan_enable=0 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c33e016fa55f8f56d70289739c6668ef5a2aa07a;p=librecmc%2Flibrecmc.git ar8216: do not strip vlan tags when running with vlan_enable=0 SVN-Revision: 29718 --- diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index c79a92a0a1..57088a9748 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -593,10 +593,13 @@ ar8216_hw_apply(struct switch_dev *dev) pvid = i; } - if (priv->vlan && (priv->vlan_tagged & (1 << i))) { - egress = AR8216_OUT_ADD_VLAN; + if (priv->vlan) { + if (priv->vlan_tagged & (1 << i)) + egress = AR8216_OUT_ADD_VLAN; + else + egress = AR8216_OUT_STRIP_VLAN; } else { - egress = AR8216_OUT_STRIP_VLAN; + egress = AR8216_OUT_KEEP; } if (priv->vlan) { ingress = AR8216_IN_SECURE;