}
/* 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)
);
}
+ /* init switch control */
+ w16(pdev, MV_SWITCHREG(CTRL),
+ MV_SWITCHCTL_MSIZE |
+ MV_SWITCHCTL_DROP
+ );
+
/* hook into the tx function */
priv->hardstart = dev->hard_start_xmit;
pdev->netif_receive_skb = mvswitch_netif_receive_skb;