Skip to content

Commit

Permalink
stmmac: platform: fix default values of the filter bins setting
Browse files Browse the repository at this point in the history
The commit 3b57de9 brought the support for a different amount of
the filter bins, but didn't update the platform driver that without
CONFIG_OF.

Fixes: 3b57de9 (net: stmmac: Support devicetree configs for mcast
and ucast filter entries)

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Huacai Chen authored and David S. Miller committed Nov 26, 2014
1 parent 2d5c57d commit 571dcfd
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,6 @@ static int stmmac_probe_config_dt(struct platform_device *pdev,
*/
plat->maxmtu = JUMBO_LEN;

/* 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;

/*
* Currently only the properties needed on SPEAr600
* are provided. All other properties should be added
Expand Down Expand Up @@ -270,6 +264,13 @@ static int stmmac_pltfr_probe(struct platform_device *pdev)
return PTR_ERR(addr);

plat_dat = dev_get_platdata(&pdev->dev);

/* Set default value for multicast hash bins */
plat_dat->multicast_filter_bins = HASH_TABLE_SIZE;

/* Set default value for unicast filter entries */
plat_dat->unicast_filter_entries = 1;

if (pdev->dev.of_node) {
if (!plat_dat)
plat_dat = devm_kzalloc(&pdev->dev,
Expand Down

0 comments on commit 571dcfd

Please sign in to comment.