mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 18:37:58 -04:00
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: Biao Huang <biao.huang@mediatek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
6ec3d4d225
commit
efd58adf8f
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user