diff options
author | Yevgeny Petrilin <yevgenyp@mellanox.co.il> | 2008-10-22 20:44:46 +0200 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-10-22 20:44:46 +0200 |
commit | 2a2336f8228292b8197f4187e54b0748903e6645 (patch) | |
tree | 8c54c6d594a055bb5e0a83b2c9c8c2f6fcc03d22 /drivers/net/mlx4/main.c | |
parent | mlx4_core: Get ethernet MTU and default address from firmware (diff) | |
download | linux-2a2336f8228292b8197f4187e54b0748903e6645.tar.xz linux-2a2336f8228292b8197f4187e54b0748903e6645.zip |
mlx4_core: Ethernet MAC/VLAN management
Add support for managing MAC and VLAN filters for each port.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: Oren Duer <oren@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/net/mlx4/main.c')
-rw-r--r-- | drivers/net/mlx4/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/mlx4/main.c b/drivers/net/mlx4/main.c index 28f36b88de38..0a5c8bfb3f1f 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/net/mlx4/main.c @@ -780,11 +780,22 @@ no_msi: priv->eq_table.eq[i].irq = dev->pdev->irq; } +static void mlx4_init_port_info(struct mlx4_dev *dev, int port) +{ + struct mlx4_port_info *info = &mlx4_priv(dev)->port[port]; + + info->dev = dev; + info->port = port; + mlx4_init_mac_table(dev, &info->mac_table); + mlx4_init_vlan_table(dev, &info->vlan_table); +} + static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) { struct mlx4_priv *priv; struct mlx4_dev *dev; int err; + int port; printk(KERN_INFO PFX "Initializing %s\n", pci_name(pdev)); @@ -894,6 +905,9 @@ static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id) if (err) goto err_close; + for (port = 1; port <= dev->caps.num_ports; port++) + mlx4_init_port_info(dev, port); + err = mlx4_register_device(dev); if (err) goto err_cleanup; |