提交 2371846b 编写于 作者: J Jose Abreu 提交者: Yang Yingliang

net: stmmac: gmac4+: Not all Unicast addresses may be available

[ Upstream commit 25683bab09a70542b9f8e3e28f79b3369e56701f ]

Some setups may not have all Unicast addresses filters available. Check
the number of available filters before trying to setup it.

Fixes: 477286b5 ("stmmac: add GMAC4 core support")
Signed-off-by: NJose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 edc96677
...@@ -443,7 +443,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw, ...@@ -443,7 +443,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
} }
/* Handle multiple unicast addresses */ /* 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 /* Switch to promiscuous mode if more than 128 addrs
* are required * are required
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册