summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan McDowell <noodles@earth.li>2020-08-12 20:37:01 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-21 10:53:05 +0200
commit37708e6faac40ad493e054b2d58d67510a6b79df (patch)
tree2437a3e0cc523cb17fc3415e55b25b266ae889c1
parent42f964c4f2b27686877be9b806301436bf36feb6 (diff)
downloadlinux-stable-37708e6faac40ad493e054b2d58d67510a6b79df.tar.gz
linux-stable-37708e6faac40ad493e054b2d58d67510a6b79df.tar.bz2
linux-stable-37708e6faac40ad493e054b2d58d67510a6b79df.zip
net: stmmac: dwmac1000: provide multicast filter fallback
commit 592d751c1e174df5ff219946908b005eb48934b3 upstream. If we don't have a hardware multicast filter available then instead of silently failing to listen for the requested ethernet broadcast addresses fall back to receiving all multicast packets, in a similar fashion to other drivers with no multicast filter. Cc: stable@vger.kernel.org Signed-off-by: Jonathan McDowell <noodles@earth.li> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
index b535f6c37838..ac08031c481f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
@@ -146,6 +146,9 @@ static void dwmac1000_set_filter(struct mac_device_info *hw,
value = GMAC_FRAME_FILTER_PR;
} else if (dev->flags & IFF_ALLMULTI) {
value = GMAC_FRAME_FILTER_PM; /* pass all multi */
+ } else if (!netdev_mc_empty(dev) && (mcbitslog2 == 0)) {
+ /* Fall back to all multicast if we've no filter */
+ value = GMAC_FRAME_FILTER_PM;
} else if (!netdev_mc_empty(dev)) {
struct netdev_hw_addr *ha;