Skip to contentSkip to conversation

net: ethernet: stmmac: dwmac-sun8i: enable support of unicast filtering

PATCH In review Corentin Labbe 3 participants 3 messages May 13, 2019

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: ethernet: stmmac: dwmac-sun8i: enable support of unicast filtering

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")
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c +2 -0
index ac19bf62db70..9d3112beb19f 100644
@@ -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)
Signature · 1 line
2.21.0
#1 lore raw

Hello!

Quoted 1 line · Corentin Labbe

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

Addresses?

Quoted 7 lines

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")

[...]

MBR, Sergei

maintainer
#2 lore raw
In reply to Corentin Labbe

From: Corentin Labbe <[email protected]>
Date: Mon, 13 May 2019 13:06:39 +0000

Quoted 8 lines

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")

Applied with s/address/addresses/

Thanks.