fix vlan mapping for cpu port on the marvell switch
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 24 Apr 2008 01:09:47 +0000 (01:09 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 24 Apr 2008 01:09:47 +0000 (01:09 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10934 3c298f89-4303-0410-b956-a3cf2f4a3e73

target/linux/generic-2.6/files/drivers/net/phy/mvswitch.c

index 27c0920bb592993748e1e869972dde993d0abe39..834d31217d0533dabd5f662aab197cf695b42d69 100644 (file)
@@ -274,8 +274,8 @@ mvswitch_config_init(struct phy_device *pdev)
        }
 
        /* build the target list for the cpu port */
-       for (i = 0, vlmap = 0; i < ARRAY_SIZE(priv->vlans); i++)
-               vlmap |= priv->vlans[i];
+       for (i = 0; i < MV_PORTS; i++)
+               vlmap |= (1 << i);
 
        w16(pdev, MV_PORTREG(VLANMAP, MV_CPUPORT),
                MV_PORTVLAN_PORTS(vlmap)