summaryrefslogtreecommitdiff
path: root/target/linux/generic/files
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 /target/linux/generic/files
parentfbf81c8e799deefec9cc7773aae9e4701dea10d3 (diff)
downloadmtk-20170518-c33e016fa55f8f56d70289739c6668ef5a2aa07a.zip
mtk-20170518-c33e016fa55f8f56d70289739c6668ef5a2aa07a.tar.gz
mtk-20170518-c33e016fa55f8f56d70289739c6668ef5a2aa07a.tar.bz2
ar8216: do not strip vlan tags when running with vlan_enable=0
SVN-Revision: 29718
Diffstat (limited to 'target/linux/generic/files')
-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 c79a92a..57088a9 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;