提交 efd58adf 编写于 作者: B Biao Huang 提交者: David S. Miller

net: stmmac: dwmac4: mac address array boudary violation issue

The mac address array size is GMAC_MAX_PERFECT_ADDRESSES,
so the 'reg' should be less than it, or will affect other registers.
Signed-off-by: NBiao Huang <biao.huang@mediatek.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6ec3d4d2
......@@ -454,7 +454,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
reg++;
}
while (reg <= GMAC_MAX_PERFECT_ADDRESSES) {
while (reg < GMAC_MAX_PERFECT_ADDRESSES) {
writel(0, ioaddr + GMAC_ADDR_HIGH(reg));
writel(0, ioaddr + GMAC_ADDR_LOW(reg));
reg++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册