[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200122090936.28555-5-boon.leong.ong@intel.com>
Date: Wed, 22 Jan 2020 17:09:35 +0800
From: Ong Boon Leong <boon.leong.ong@...el.com>
To: netdev@...r.kernel.org
Cc: Tan Tee Min <tee.min.tan@...el.com>,
Voon Weifeng <weifeng.voon@...el.com>,
Giuseppe Cavallaro <peppe.cavallaro@...com>,
Alexandre TORGUE <alexandre.torgue@...com>,
Jose Abreu <Jose.Abreu@...opsys.com>,
"David S . Miller" <davem@...emloft.net>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Joao Pinto <Joao.Pinto@...opsys.com>,
Arnd Bergmann <arnd@...db.de>,
Alexandru Ardelean <alexandru.ardelean@...log.com>,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH net v3 4/5] net: stmmac: xgmac: fix missing IFF_MULTICAST checki in dwxgmac2_set_filter
From: "Tan, Tee Min" <tee.min.tan@...el.com>
Without checking for IFF_MULTICAST flag, it is wrong to assume multicast
filtering is always enabled. By checking against IFF_MULTICAST, now
the driver behaves correctly when the multicast support is toggled by below
command:-
ip link set <devname> multicast off|on
Fixes: 0efedbf11f07a ("net: stmmac: xgmac: Fix XGMAC selftests")
Signed-off-by: Tan, Tee Min <tee.min.tan@...el.com>
Signed-off-by: Ong Boon Leong <boon.leong.ong@...el.com>
---
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
index 082f5ee9e525..13a153386c18 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
@@ -458,7 +458,7 @@ static void dwxgmac2_set_filter(struct mac_device_info *hw,
for (i = 0; i < XGMAC_MAX_HASH_TABLE; i++)
writel(~0x0, ioaddr + XGMAC_HASH_TABLE(i));
- } else if (!netdev_mc_empty(dev)) {
+ } else if (!netdev_mc_empty(dev) && (dev->flags & IFF_MULTICAST)) {
struct netdev_hw_addr *ha;
value |= XGMAC_FILTER_HMC;
--
2.17.1
Powered by blists - more mailing lists