aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-03-01 19:49:05 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-03-01 19:49:05 +0000
commitf265cbac9ee8ad0ddaa9502dce5a7e7f89732664 (patch)
treec3c729b5e62449892a40cb5d68f483502047f50d /target/linux
parent23c3f7941e51e2ef7e44397634135064d12dc611 (diff)
downloadupstream-f265cbac9ee8ad0ddaa9502dce5a7e7f89732664.tar.gz
upstream-f265cbac9ee8ad0ddaa9502dce5a7e7f89732664.tar.bz2
upstream-f265cbac9ee8ad0ddaa9502dce5a7e7f89732664.zip
ar71xx: ag71xx: keep VLAN tags if VLAN is not enabled
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30768 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c
index ab7abd9e5c..0fc4ba708f 100644
--- a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c
+++ b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c
@@ -631,11 +631,15 @@ static void ar7240sw_setup_port(struct ar7240sw *as, unsigned port, u8 portmask)
mode = AR7240_PORT_VLAN_MODE_PORT_ONLY;
}
- if (as->vlan && (as->vlan_tagged & BIT(port))) {
- ctrl |= AR7240_PORT_CTRL_VLAN_MODE_ADD <<
- AR7240_PORT_CTRL_VLAN_MODE_S;
+ if (as->vlan) {
+ if (as->vlan_tagged & BIT(port))
+ ctrl |= AR7240_PORT_CTRL_VLAN_MODE_ADD <<
+ AR7240_PORT_CTRL_VLAN_MODE_S;
+ else
+ ctrl |= AR7240_PORT_CTRL_VLAN_MODE_STRIP <<
+ AR7240_PORT_CTRL_VLAN_MODE_S;
} else {
- ctrl |= AR7240_PORT_CTRL_VLAN_MODE_STRIP <<
+ ctrl |= AR7240_PORT_CTRL_VLAN_MODE_KEEP <<
AR7240_PORT_CTRL_VLAN_MODE_S;
}