diff mbox

[4/5] stmmac: pci: set default filter bins

Message ID 1413909333-16380-5-git-send-email-andriy.shevchenko@linux.intel.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Andy Shevchenko Oct. 21, 2014, 4:35 p.m. UTC
The commit 3b57de958e2a bring a support for different amount of filter bins,
but didn't update PCI driver accordingly. This patch append default values when
device is enumerated via PCI bus.

Fixes: 3b57de958e2a (net: stmmac: Support devicetree configs for mcast and ucast filter entries)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
index c16f74b..22cb5ff 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
@@ -67,6 +67,7 @@  static int stmmac_pci_probe(struct pci_dev *pdev,
 	int ret = 0;
 	struct stmmac_priv *priv = NULL;
 	int pci_bar = 0;
+	struct plat_stmmacenet_data *plat = &plat_dat;
 
 	/* Enable pci device */
 	ret = pcim_enable_device(pdev);
@@ -83,7 +84,13 @@  static int stmmac_pci_probe(struct pci_dev *pdev,
 
 	stmmac_default_data();
 
-	priv = stmmac_dvr_probe(&pdev->dev, &plat_dat,
+	/* Set default value for multicast hash bins */
+	plat->multicast_filter_bins = HASH_TABLE_SIZE;
+
+	/* Set default value for unicast filter entries */
+	plat->unicast_filter_entries = 1;
+
+	priv = stmmac_dvr_probe(&pdev->dev, plat,
 				pcim_iomap_table(pdev)[pci_bar]);
 	if (IS_ERR(priv)) {
 		dev_err(&pdev->dev, "%s: main driver probe failed\n", __func__);