aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-01-12 10:15:08 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-01-12 10:15:08 +0000
commitc33e016fa55f8f56d70289739c6668ef5a2aa07a (patch)
tree9c384ad28a9b6a83b0f468621beb8b25a691ca82
parentfbf81c8e799deefec9cc7773aae9e4701dea10d3 (diff)
downloadupstream-c33e016fa55f8f56d70289739c6668ef5a2aa07a.tar.gz
upstream-c33e016fa55f8f56d70289739c6668ef5a2aa07a.tar.bz2
upstream-c33e016fa55f8f56d70289739c6668ef5a2aa07a.zip
ar8216: do not strip vlan tags when running with vlan_enable=0
SVN-Revision: 29718
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c9
1 files changed, 6 insertions, 3 deletions
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;