Skip to content

Commit

Permalink
net: ethernet: stmmac: dwmac-sun8i: enable support of unicast filtering
Browse files Browse the repository at this point in the history
When adding more MAC addresses 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: 9f93ac8 ("net-next: stmmac: Add dwmac-sun8i")
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
montjoie authored and davem330 committed May 13, 2019
1 parent a8577e1 commit d4c26eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,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)
Expand Down

0 comments on commit d4c26eb

Please sign in to comment.