ar71xx: ag71xx: keep VLAN tags if VLAN is not enabled
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 1 Mar 2012 19:49:05 +0000 (19:49 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 1 Mar 2012 19:49:05 +0000 (19:49 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30768 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c

index ab7abd9..0fc4ba7 100644 (file)
@@ -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;
        }
 
This page took 0.029049 seconds and 4 git commands to generate.