X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/57b73bf423b68390a7ca428306ec0e30348e3401..78859ab57d15257d590d0f64873a420f08afa7fa:/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c 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 ab7abd9e5..0fc4ba708 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; }