net: stmmac: Fallback to VLAN Perfect filtering if HASH is not available
authorJose Abreu <joabreu@synopsys.com>
Sun, 6 Oct 2019 11:17:12 +0000 (13:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 6 Oct 2019 16:46:31 +0000 (18:46 +0200)
commitc7ab0b8088d7f023f543013963f23aecc7e47efb
treecd9f3861b9c65fa9c0fdae0d6843a6bc635131f7
parent04c1b4c70de958c229fc3d63298b807909a6f31a
net: stmmac: Fallback to VLAN Perfect filtering if HASH is not available

If VLAN Hash Filtering is not available we can fallback to perfect
filtering instead. Let's implement this in XGMAC and GMAC cores and let
the user use this filter.

VLAN VID=0 always passes filter so we check if more than 2 VLANs are
created and return proper error code if so because perfect filtering
only supports 1 VID at a time.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
drivers/net/ethernet/stmicro/stmmac/hwif.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c