Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netdev: bfin_mac: let boards set vlan masks

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Mike Frysinger and committed by
David S. Miller
c599bd6b 2d70a3d4

+11
+7
drivers/net/bfin_mac.c
··· 588 588 589 589 bfin_write_EMAC_MMC_CTL(RSTC | CROLL); 590 590 591 + /* Set vlan regs to let 1522 bytes long packets pass through */ 592 + bfin_write_EMAC_VLAN1(lp->vlan1_mask); 593 + bfin_write_EMAC_VLAN2(lp->vlan2_mask); 594 + 591 595 /* Initialize the TX DMA channel registers */ 592 596 bfin_write_DMA2_X_COUNT(0); 593 597 bfin_write_DMA2_X_MODIFY(4); ··· 1523 1519 dev_err(&pdev->dev, "MII Probe failed!\n"); 1524 1520 goto out_err_mii_probe; 1525 1521 } 1522 + 1523 + lp->vlan1_mask = ETH_P_8021Q | mii_bus_data->vlan1_mask; 1524 + lp->vlan2_mask = ETH_P_8021Q | mii_bus_data->vlan2_mask; 1526 1525 1527 1526 /* Fill in the fields of the device structure with ethernet values. */ 1528 1527 ether_setup(ndev);
+3
drivers/net/bfin_mac.h
··· 82 82 struct timer_list tx_reclaim_timer; 83 83 struct net_device *ndev; 84 84 85 + /* Data for EMAC_VLAN1 regs */ 86 + u16 vlan1_mask, vlan2_mask; 87 + 85 88 /* MII and PHY stuffs */ 86 89 int old_link; /* used by bf537_adjust_link */ 87 90 int old_speed;
+1
include/linux/bfin_mac.h
··· 24 24 const unsigned short *mac_peripherals; 25 25 int phy_mode; 26 26 unsigned int phy_mask; 27 + unsigned short vlan1_mask, vlan2_mask; 27 28 }; 28 29 29 30 #endif