Skip to content

Commit

Permalink
net: mscc: ocelot: use ether_addr_copy
Browse files Browse the repository at this point in the history
Since a helper is available for copying Ethernet addresses, let's use it.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Vladimir Oltean authored and Jakub Kicinski committed Oct 31, 2020
1 parent 7c31314 commit ebbd860
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/mscc/ocelot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit ebbd860

Please sign in to comment.