summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerge Semin <fancer.lancer@gmail.com>2021-10-27 21:27:32 +0300
committerSerge Semin <fancer.lancer@gmail.com>2026-08-13 20:38:42 +0300
commit90b9a356d33393439f259f98443a85a19a09c3b5 (patch)
tree8c9d7ca8baafed709079725d9ebab49350445204
parent451f0f6a6e2e121cce69f24b702942ea4f4c245f (diff)
downloadlinux-90b9a356d33393439f259f98443a85a19a09c3b5.tar.gz
linux-90b9a356d33393439f259f98443a85a19a09c3b5.zip
net: stmmac: Permit having the multicast-filter table of zero size
At least for DW GMAC and DW x(L)GMAC it is possible to have the imperfect filtering disabled during the IP-core synthesize. In that case the functionality of the DA hash-based filter will be just unavailable. Let's cover that case by permitting the "snps,multicast-filter-bins" property to have a zero value. That will effectively disable the multicast filtering in the core-ops->set_filter() methods. Note this modification won't affect for the DW MAC100 HW code since by design it assumes that the hash-based filtering is always available with the table of 64-bins size. Without the HW-manual I can't say whether it's right or wrong so we have to leave it as is for now. Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index b02a557c67e5d..e912383156e7c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -40,6 +40,7 @@ static int dwmac1000_validate_mcast_bins(struct device *dev, int mcast_bins)
int x = mcast_bins;
switch (x) {
+ case 0:
case HASH_TABLE_SIZE:
case 128:
case 256: