netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: stmmac: dwmac-sun8i: enable support of unicast filtering
@ 2019-05-13 13:06 Corentin Labbe
  2019-05-13 15:36 ` Sergei Shtylyov
  2019-05-13 17:00 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Corentin Labbe @ 2019-05-13 13:06 UTC (permalink / raw)
  To: alexandre.torgue, davem, joabreu, maxime.ripard, peppe.cavallaro, wens
  Cc: linux-kernel, netdev, linux-sunxi, Corentin Labbe

When adding more MAC address to a dwmac-sun8i interface, the device goes
directly in promiscuous mode.
This is due to IFF_UNICAST_FLT missing flag.

So since the hardware support unicast filtering, let's add IFF_UNICAST_FLT.

Fixes: 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i")
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index ac19bf62db70..9d3112beb19f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -1018,6 +1018,8 @@ static struct mac_device_info *sun8i_dwmac_setup(void *ppriv)
 	mac->mac = &sun8i_dwmac_ops;
 	mac->dma = &sun8i_dwmac_dma_ops;
 
+	priv->dev->priv_flags |= IFF_UNICAST_FLT;
+
 	/* The loopback bit seems to be re-set when link change
 	 * Simply mask it each time
 	 * Speed 10/100/1000 are set in BIT(2)/BIT(3)
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: ethernet: stmmac: dwmac-sun8i: enable support of unicast filtering
  2019-05-13 13:06 [PATCH] net: ethernet: stmmac: dwmac-sun8i: enable support of unicast filtering Corentin Labbe
@ 2019-05-13 15:36 ` Sergei Shtylyov
  2019-05-13 17:00 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2019-05-13 15:36 UTC (permalink / raw)
  To: Corentin Labbe, alexandre.torgue, davem, joabreu, maxime.ripard,
	peppe.cavallaro, wens
  Cc: linux-kernel, netdev, linux-sunxi

Hello!

On 05/13/2019 04:06 PM, Corentin Labbe wrote:

> When adding more MAC address to a dwmac-sun8i interface, the device goes

   Addresses?

> directly in promiscuous mode.
> This is due to IFF_UNICAST_FLT missing flag.
> 
> So since the hardware support unicast filtering, let's add IFF_UNICAST_FLT.
> 
> Fixes: 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i")
> Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
[...]

MBR, Sergei

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: ethernet: stmmac: dwmac-sun8i: enable support of unicast filtering
  2019-05-13 13:06 [PATCH] net: ethernet: stmmac: dwmac-sun8i: enable support of unicast filtering Corentin Labbe
  2019-05-13 15:36 ` Sergei Shtylyov
@ 2019-05-13 17:00 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-05-13 17:00 UTC (permalink / raw)
  To: clabbe
  Cc: alexandre.torgue, joabreu, maxime.ripard, peppe.cavallaro, wens,
	linux-kernel, netdev, linux-sunxi

From: Corentin Labbe <clabbe@baylibre.com>
Date: Mon, 13 May 2019 13:06:39 +0000

> When adding more MAC address to a dwmac-sun8i interface, the device goes
> directly in promiscuous mode.
> This is due to IFF_UNICAST_FLT missing flag.
> 
> So since the hardware support unicast filtering, let's add IFF_UNICAST_FLT.
> 
> Fixes: 9f93ac8d4085 ("net-next: stmmac: Add dwmac-sun8i")
> Signed-off-by: Corentin Labbe <clabbe@baylibre.com>

Applied with s/address/addresses/

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-13 17:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-13 13:06 [PATCH] net: ethernet: stmmac: dwmac-sun8i: enable support of unicast filtering Corentin Labbe
2019-05-13 15:36 ` Sergei Shtylyov
2019-05-13 17:00 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).