]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: Correct set_filter for multicast and unicast cases
authorVince Bridgers <vbridgers2013@gmail.com>
Thu, 31 Jul 2014 20:49:14 +0000 (15:49 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Jul 2014 21:13:29 +0000 (14:13 -0700)
commit18bfb11c766265cca6d9f91d1d82643e276906f2
tree57adfc251ad63f55d491aa2136277d9fa50527b7
parente53d0c1d96caec4965bbb3a77faa42457e80fea9
net: stmmac: Correct set_filter for multicast and unicast cases

This patch removes the check for the number of mulitcast addresses
when using hash based filtering since it's not necessary. If the number
of multicast addresses in the list exceeds the number of multicast hash
bins, the bins will "fold" over into one of the bins configured and
enabled for the particular component instance.

The default number of maximum unicast addresses was changed from 32 to 1
since this number is not dependent on the component revision. The maximum
number of multicast and unicast addresses is dependent on the configuration
of the Synopsys EMAC configured by the SOC architect at the time the
features were selected and configured for a particular component. Sadly,
Synopsys does not provide a way to query the precise number supported
by a particular component, so we must fall back on a devicetree entry.
This configuration could vary from vendor to vendor (such as STMicro,
Altera, etc).

The multicast bins are set for every possible filtering case (including
no entries) - previously the bits were set only if multicast filter entries
were present.

Signed-off-by: Vince Bridgers <vbridgers2013@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/common.h
drivers/net/ethernet/stmicro/stmmac/dwmac1000.h
drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
drivers/net/ethernet/stmicro/stmmac/dwmac100_core.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c