Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: ethernet: adi: adin1110: use eth_broadcast_addr() to assign broadcast address

Use eth_broadcast_addr() to assign broadcast address instead
of memset().

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Yang Yingliang and committed by
David S. Miller
54024dbe 813f3662

+4 -4
+4 -4
drivers/net/ethernet/adi/adin1110.c
··· 739 739 u32 port_rules = 0; 740 740 u8 mask[ETH_ALEN]; 741 741 742 - memset(mask, 0xFF, ETH_ALEN); 742 + eth_broadcast_addr(mask); 743 743 744 744 if (accept_broadcast && port_priv->state == BR_STATE_FORWARDING) 745 745 port_rules = adin1110_port_rules(port_priv, true, true); ··· 760 760 return -EADDRNOTAVAIL; 761 761 762 762 eth_hw_addr_set(netdev, dev_addr); 763 - memset(mask, 0xFF, ETH_ALEN); 763 + eth_broadcast_addr(mask); 764 764 765 765 mac_slot = (!port_priv->nr) ? ADIN_MAC_P1_ADDR_SLOT : ADIN_MAC_P2_ADDR_SLOT; 766 766 port_rules = adin1110_port_rules(port_priv, true, false); ··· 1271 1271 goto out; 1272 1272 1273 1273 /* Allow only BPDUs to be passed to the CPU */ 1274 - memset(mask, 0xFF, ETH_ALEN); 1274 + eth_broadcast_addr(mask); 1275 1275 port_rules = adin1110_port_rules(port_priv, true, false); 1276 1276 ret = adin1110_write_mac_address(port_priv, mac_slot, mac, 1277 1277 mask, port_rules); ··· 1386 1386 1387 1387 other_port = priv->ports[!port_priv->nr]; 1388 1388 port_rules = adin1110_port_rules(port_priv, false, true); 1389 - memset(mask, 0xFF, ETH_ALEN); 1389 + eth_broadcast_addr(mask); 1390 1390 1391 1391 return adin1110_write_mac_address(other_port, mac_nr, (u8 *)fdb->addr, 1392 1392 mask, port_rules);