diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-01-10 05:54:32 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-11 00:31:14 +0300 |
commit | c599bd6b9ac8926b03e6bf332a8c14ae2ffb43a3 (patch) | |
tree | 353f7dc0114794bb9b78ceae4c42c724ef0d10e2 /drivers/net | |
parent | 2d70a3d42de642e1d78355338b63cf064dc0f345 (diff) | |
download | linux-c599bd6b9ac8926b03e6bf332a8c14ae2ffb43a3.tar.xz |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bfin_mac.c | 7 | ||||
-rw-r--r-- | drivers/net/bfin_mac.h | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index e712be4a6433..0b9fc5173aef 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c @@ -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); @@ -1520,6 +1524,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); diff --git a/drivers/net/bfin_mac.h b/drivers/net/bfin_mac.h index 692187da99f0..f8559ac9a403 100644 --- a/drivers/net/bfin_mac.h +++ b/drivers/net/bfin_mac.h @@ -82,6 +82,9 @@ struct bfin_mac_local { struct timer_list tx_reclaim_timer; struct net_device *ndev; + /* Data for EMAC_VLAN1 regs */ + u16 vlan1_mask, vlan2_mask; + /* MII and PHY stuffs */ int old_link; /* used by bf537_adjust_link */ int old_speed; |