Commit ba3fdfe3 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller
Browse files

ethernet: fec: use eth_hw_addr_gen()



Commit 406f42fa ("net-next: When a bond have a massive amount
of VLANs...") introduced a rbtree for faster Ethernet address look
up. To maintain netdev->dev_addr in this tree we need to make all
the writes to it got through appropriate helpers.

Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8eb8192e
Loading
Loading
Loading
Loading
+1 −4
Original line number Original line Diff line number Diff line
@@ -1768,11 +1768,8 @@ static int fec_get_mac(struct net_device *ndev)
		return 0;
		return 0;
	}
	}


	eth_hw_addr_set(ndev, iap);

	/* Adjust MAC if using macaddr */
	/* Adjust MAC if using macaddr */
	if (iap == macaddr)
	eth_hw_addr_gen(ndev, iap, iap == macaddr ? fep->dev_id : 0);
		 ndev->dev_addr[ETH_ALEN-1] = macaddr[ETH_ALEN-1] + fep->dev_id;


	return 0;
	return 0;
}
}