Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7efd26d0 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller
Browse files

ethernet: Use eth_random_addr



Convert the existing uses of random_ether_addr to
the new eth_random_addr.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0a4dd594
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -199,7 +199,7 @@ int atl1c_read_mac_addr(struct atl1c_hw *hw)

	err = atl1c_get_permanent_address(hw);
	if (err)
		random_ether_addr(hw->perm_mac_addr);
		eth_random_addr(hw->perm_mac_addr);

	memcpy(hw->mac_addr, hw->perm_mac_addr, sizeof(hw->perm_mac_addr));
	return err;
+1 −1
Original line number Diff line number Diff line
@@ -538,7 +538,7 @@ static s32 atl1_read_mac_addr(struct atl1_hw *hw)
	u16 i;

	if (atl1_get_permanent_address(hw)) {
		random_ether_addr(hw->perm_mac_addr);
		eth_random_addr(hw->perm_mac_addr);
		ret = 1;
	}

+1 −1
Original line number Diff line number Diff line
@@ -2346,7 +2346,7 @@ static s32 atl2_read_mac_addr(struct atl2_hw *hw)
{
	if (get_permanent_address(hw)) {
		/* for test */
		/* FIXME: shouldn't we use random_ether_addr() here? */
		/* FIXME: shouldn't we use eth_random_addr() here? */
		hw->perm_mac_addr[0] = 0x00;
		hw->perm_mac_addr[1] = 0x13;
		hw->perm_mac_addr[2] = 0x74;
+1 −1
Original line number Diff line number Diff line
@@ -1057,7 +1057,7 @@ static int __devinit ethoc_probe(struct platform_device *pdev)
	/* Check the MAC again for validity, if it still isn't choose and
	 * program a random one. */
	if (!is_valid_ether_addr(netdev->dev_addr)) {
		random_ether_addr(netdev->dev_addr);
		eth_random_addr(netdev->dev_addr);
		random_mac = true;
	}

+2 −2
Original line number Diff line number Diff line
@@ -5008,7 +5008,7 @@ static int igb_vf_configure(struct igb_adapter *adapter, int vf)
	unsigned int device_id;
	u16 thisvf_devfn;

	random_ether_addr(mac_addr);
	eth_random_addr(mac_addr);
	igb_set_vf_mac(adapter, vf, mac_addr);

	switch (adapter->hw.mac.type) {
@@ -5417,7 +5417,7 @@ static void igb_vf_reset_event(struct igb_adapter *adapter, u32 vf)

	/* generate a new mac address as we were hotplug removed/added */
	if (!(adapter->vf_data[vf].flags & IGB_VF_FLAG_PF_SET_MAC))
		random_ether_addr(vf_mac);
		eth_random_addr(vf_mac);

	/* process remaining reset events */
	igb_vf_reset(adapter, vf);
Loading