mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
net: stmmac: xgmac: Not all Unicast addresses may be available
Some setups may not have all Unicast addresses filters available. Let's
check this before trying to setup filters.
Fixes: 0efedbf11f ("net: stmmac: xgmac: Fix XGMAC selftests")
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
93c2fcb01a
commit
9a2ae7b396
|
|
@ -472,7 +472,7 @@ static void dwxgmac2_set_filter(struct mac_device_info *hw,
|
|||
dwxgmac2_set_mchash(ioaddr, mc_filter, mcbitslog2);
|
||||
|
||||
/* Handle multiple unicast addresses */
|
||||
if (netdev_uc_count(dev) > XGMAC_ADDR_MAX) {
|
||||
if (netdev_uc_count(dev) > hw->unicast_filter_entries) {
|
||||
value |= XGMAC_FILTER_PR;
|
||||
} else {
|
||||
struct netdev_hw_addr *ha;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user