mirror of https://gitee.com/openkylin/linux.git
net: stmmac: gmac4+: Not all Unicast addresses may be available
Some setups may not have all Unicast addresses filters available. Check
the number of available filters before trying to setup it.
Fixes: 477286b53f
("stmmac: add GMAC4 core support")
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b870b0f867
commit
25683bab09
|
@ -448,7 +448,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
|
|||
value |= GMAC_PACKET_FILTER_HPF;
|
||||
|
||||
/* Handle multiple unicast addresses */
|
||||
if (netdev_uc_count(dev) > GMAC_MAX_PERFECT_ADDRESSES) {
|
||||
if (netdev_uc_count(dev) > hw->unicast_filter_entries) {
|
||||
/* Switch to promiscuous mode if more than 128 addrs
|
||||
* are required
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue