提交 ebbd860e 编写于 作者: V Vladimir Oltean 提交者: Jakub Kicinski

net: mscc: ocelot: use ether_addr_copy

Since a helper is available for copying Ethernet addresses, let's use it.
Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NJakub Kicinski <kuba@kernel.org>
上级 7c313143
......@@ -997,7 +997,7 @@ static void ocelot_encode_ports_to_mdb(unsigned char *addr,
struct ocelot_multicast *mc,
enum macaccess_entry_type entry_type)
{
memcpy(addr, mc->addr, ETH_ALEN);
ether_addr_copy(addr, mc->addr);
if (entry_type == ENTRYTYPE_MACv4) {
addr[0] = 0;
......@@ -1042,7 +1042,7 @@ int ocelot_port_mdb_add(struct ocelot *ocelot, int port,
if (!mc)
return -ENOMEM;
memcpy(mc->addr, mdb->addr, ETH_ALEN);
ether_addr_copy(mc->addr, mdb->addr);
mc->vid = vid;
mc->pgid = pgid;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册