]> Pileus Git - ~andy/linux/blobdiff - drivers/net/bfin_mac.c
rapidio: fix new kernel-doc warnings
[~andy/linux] / drivers / net / bfin_mac.c
index e712be4a6433292ad7fe3a6d49386e615556bc91..22abfb39d8131f4f9685fd4a914c0aa2873b525a 100644 (file)
@@ -588,6 +588,10 @@ static void setup_system_regs(struct net_device *dev)
 
        bfin_write_EMAC_MMC_CTL(RSTC | CROLL);
 
+       /* Set vlan regs to let 1522 bytes long packets pass through */
+       bfin_write_EMAC_VLAN1(lp->vlan1_mask);
+       bfin_write_EMAC_VLAN2(lp->vlan2_mask);
+
        /* Initialize the TX DMA channel registers */
        bfin_write_DMA2_X_COUNT(0);
        bfin_write_DMA2_X_MODIFY(4);
@@ -1280,19 +1284,12 @@ static void bfin_mac_multicast_hash(struct net_device *dev)
 {
        u32 emac_hashhi, emac_hashlo;
        struct netdev_hw_addr *ha;
-       char *addrs;
        u32 crc;
 
        emac_hashhi = emac_hashlo = 0;
 
        netdev_for_each_mc_addr(ha, dev) {
-               addrs = ha->addr;
-
-               /* skip non-multicast addresses */
-               if (!(*addrs & 1))
-                       continue;
-
-               crc = ether_crc(ETH_ALEN, addrs);
+               crc = ether_crc(ETH_ALEN, ha->addr);
                crc >>= 26;
 
                if (crc & 0x20)
@@ -1520,6 +1517,9 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev)
                goto out_err_mii_probe;
        }
 
+       lp->vlan1_mask = ETH_P_8021Q | mii_bus_data->vlan1_mask;
+       lp->vlan2_mask = ETH_P_8021Q | mii_bus_data->vlan2_mask;
+
        /* Fill in the fields of the device structure with ethernet values. */
        ether_setup(ndev);