diff options
author | Joe Perches <joe@perches.com> | 2012-07-12 15:33:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-17 01:38:27 -0400 |
commit | 7efd26d0db5917b9e53d72e76e52338b2600ae20 (patch) | |
tree | 3a9b9bec98380b2ef02f6441e7304b7255884a1c /drivers/net/ethernet | |
parent | 0a4dd594982a321699000218715e28664ec49169 (diff) |
ethernet: Use eth_random_addr
Convert the existing uses of random_ether_addr to
the new eth_random_addr.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/atheros/atl1c/atl1c_hw.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atl1.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/atheros/atlx/atl2.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/ethoc.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_main.c | 4 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/lantiq_etop.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/micrel/ks8851.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/micrel/ks8851_mll.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/smsc/smsc911x.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/ti/cpsw.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/tile/tilegx.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/wiznet/w5100.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/wiznet/w5300.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 |
15 files changed, 16 insertions, 16 deletions
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c index 801f0126512d..21e261ffbe10 100644 --- a/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_hw.c | |||
@@ -199,7 +199,7 @@ int atl1c_read_mac_addr(struct atl1c_hw *hw) | |||
199 | 199 | ||
200 | err = atl1c_get_permanent_address(hw); | 200 | err = atl1c_get_permanent_address(hw); |
201 | if (err) | 201 | if (err) |
202 | random_ether_addr(hw->perm_mac_addr); | 202 | eth_random_addr(hw->perm_mac_addr); |
203 | 203 | ||
204 | memcpy(hw->mac_addr, hw->perm_mac_addr, sizeof(hw->perm_mac_addr)); | 204 | memcpy(hw->mac_addr, hw->perm_mac_addr, sizeof(hw->perm_mac_addr)); |
205 | return err; | 205 | return err; |
diff --git a/drivers/net/ethernet/atheros/atlx/atl1.c b/drivers/net/ethernet/atheros/atlx/atl1.c index f2402f355cec..7bae2ad7a7c0 100644 --- a/drivers/net/ethernet/atheros/atlx/atl1.c +++ b/drivers/net/ethernet/atheros/atlx/atl1.c | |||
@@ -538,7 +538,7 @@ static s32 atl1_read_mac_addr(struct atl1_hw *hw) | |||
538 | u16 i; | 538 | u16 i; |
539 | 539 | ||
540 | if (atl1_get_permanent_address(hw)) { | 540 | if (atl1_get_permanent_address(hw)) { |
541 | random_ether_addr(hw->perm_mac_addr); | 541 | eth_random_addr(hw->perm_mac_addr); |
542 | ret = 1; | 542 | ret = 1; |
543 | } | 543 | } |
544 | 544 | ||
diff --git a/drivers/net/ethernet/atheros/atlx/atl2.c b/drivers/net/ethernet/atheros/atlx/atl2.c index 7c0b7e2bcb66..57d64b80fd72 100644 --- a/drivers/net/ethernet/atheros/atlx/atl2.c +++ b/drivers/net/ethernet/atheros/atlx/atl2.c | |||
@@ -2346,7 +2346,7 @@ static s32 atl2_read_mac_addr(struct atl2_hw *hw) | |||
2346 | { | 2346 | { |
2347 | if (get_permanent_address(hw)) { | 2347 | if (get_permanent_address(hw)) { |
2348 | /* for test */ | 2348 | /* for test */ |
2349 | /* FIXME: shouldn't we use random_ether_addr() here? */ | 2349 | /* FIXME: shouldn't we use eth_random_addr() here? */ |
2350 | hw->perm_mac_addr[0] = 0x00; | 2350 | hw->perm_mac_addr[0] = 0x00; |
2351 | hw->perm_mac_addr[1] = 0x13; | 2351 | hw->perm_mac_addr[1] = 0x13; |
2352 | hw->perm_mac_addr[2] = 0x74; | 2352 | hw->perm_mac_addr[2] = 0x74; |
diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c index 20297881f8eb..94b7bfcdb24e 100644 --- a/drivers/net/ethernet/ethoc.c +++ b/drivers/net/ethernet/ethoc.c | |||
@@ -1057,7 +1057,7 @@ static int __devinit ethoc_probe(struct platform_device *pdev) | |||
1057 | /* Check the MAC again for validity, if it still isn't choose and | 1057 | /* Check the MAC again for validity, if it still isn't choose and |
1058 | * program a random one. */ | 1058 | * program a random one. */ |
1059 | if (!is_valid_ether_addr(netdev->dev_addr)) { | 1059 | if (!is_valid_ether_addr(netdev->dev_addr)) { |
1060 | random_ether_addr(netdev->dev_addr); | 1060 | eth_random_addr(netdev->dev_addr); |
1061 | random_mac = true; | 1061 | random_mac = true; |
1062 | } | 1062 | } |
1063 | 1063 | ||
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 60e307548f4e..8adeca9787ca 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c | |||
@@ -5008,7 +5008,7 @@ static int igb_vf_configure(struct igb_adapter *adapter, int vf) | |||
5008 | unsigned int device_id; | 5008 | unsigned int device_id; |
5009 | u16 thisvf_devfn; | 5009 | u16 thisvf_devfn; |
5010 | 5010 | ||
5011 | random_ether_addr(mac_addr); | 5011 | eth_random_addr(mac_addr); |
5012 | igb_set_vf_mac(adapter, vf, mac_addr); | 5012 | igb_set_vf_mac(adapter, vf, mac_addr); |
5013 | 5013 | ||
5014 | switch (adapter->hw.mac.type) { | 5014 | switch (adapter->hw.mac.type) { |
@@ -5417,7 +5417,7 @@ static void igb_vf_reset_event(struct igb_adapter *adapter, u32 vf) | |||
5417 | 5417 | ||
5418 | /* generate a new mac address as we were hotplug removed/added */ | 5418 | /* generate a new mac address as we were hotplug removed/added */ |
5419 | if (!(adapter->vf_data[vf].flags & IGB_VF_FLAG_PF_SET_MAC)) | 5419 | if (!(adapter->vf_data[vf].flags & IGB_VF_FLAG_PF_SET_MAC)) |
5420 | random_ether_addr(vf_mac); | 5420 | eth_random_addr(vf_mac); |
5421 | 5421 | ||
5422 | /* process remaining reset events */ | 5422 | /* process remaining reset events */ |
5423 | igb_vf_reset(adapter, vf); | 5423 | igb_vf_reset(adapter, vf); |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c index 2d971d18696e..eb3f67c854a7 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | |||
@@ -467,7 +467,7 @@ int ixgbe_vf_configuration(struct pci_dev *pdev, unsigned int event_mask) | |||
467 | bool enable = ((event_mask & 0x10000000U) != 0); | 467 | bool enable = ((event_mask & 0x10000000U) != 0); |
468 | 468 | ||
469 | if (enable) { | 469 | if (enable) { |
470 | random_ether_addr(vf_mac_addr); | 470 | eth_random_addr(vf_mac_addr); |
471 | e_info(probe, "IOV: VF %d is enabled MAC %pM\n", | 471 | e_info(probe, "IOV: VF %d is enabled MAC %pM\n", |
472 | vfn, vf_mac_addr); | 472 | vfn, vf_mac_addr); |
473 | /* | 473 | /* |
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c index 9fa39ebf545d..003c5bc7189f 100644 --- a/drivers/net/ethernet/lantiq_etop.c +++ b/drivers/net/ethernet/lantiq_etop.c | |||
@@ -645,7 +645,7 @@ ltq_etop_init(struct net_device *dev) | |||
645 | memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr)); | 645 | memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr)); |
646 | if (!is_valid_ether_addr(mac.sa_data)) { | 646 | if (!is_valid_ether_addr(mac.sa_data)) { |
647 | pr_warn("etop: invalid MAC, using random\n"); | 647 | pr_warn("etop: invalid MAC, using random\n"); |
648 | random_ether_addr(mac.sa_data); | 648 | eth_random_addr(mac.sa_data); |
649 | random_mac = true; | 649 | random_mac = true; |
650 | } | 650 | } |
651 | 651 | ||
diff --git a/drivers/net/ethernet/micrel/ks8851.c b/drivers/net/ethernet/micrel/ks8851.c index 5e313e9a252f..1540ebeb8669 100644 --- a/drivers/net/ethernet/micrel/ks8851.c +++ b/drivers/net/ethernet/micrel/ks8851.c | |||
@@ -422,7 +422,7 @@ static void ks8851_read_mac_addr(struct net_device *dev) | |||
422 | * | 422 | * |
423 | * Get or create the initial mac address for the device and then set that | 423 | * Get or create the initial mac address for the device and then set that |
424 | * into the station address register. If there is an EEPROM present, then | 424 | * into the station address register. If there is an EEPROM present, then |
425 | * we try that. If no valid mac address is found we use random_ether_addr() | 425 | * we try that. If no valid mac address is found we use eth_random_addr() |
426 | * to create a new one. | 426 | * to create a new one. |
427 | */ | 427 | */ |
428 | static void ks8851_init_mac(struct ks8851_net *ks) | 428 | static void ks8851_init_mac(struct ks8851_net *ks) |
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c index 59ef568d5dd5..38529edfe350 100644 --- a/drivers/net/ethernet/micrel/ks8851_mll.c +++ b/drivers/net/ethernet/micrel/ks8851_mll.c | |||
@@ -1609,7 +1609,7 @@ static int __devinit ks8851_probe(struct platform_device *pdev) | |||
1609 | memcpy(ks->mac_addr, pdata->mac_addr, 6); | 1609 | memcpy(ks->mac_addr, pdata->mac_addr, 6); |
1610 | if (!is_valid_ether_addr(ks->mac_addr)) { | 1610 | if (!is_valid_ether_addr(ks->mac_addr)) { |
1611 | /* Use random MAC address if none passed */ | 1611 | /* Use random MAC address if none passed */ |
1612 | random_ether_addr(ks->mac_addr); | 1612 | eth_random_addr(ks->mac_addr); |
1613 | netdev_info(netdev, "Using random mac address\n"); | 1613 | netdev_info(netdev, "Using random mac address\n"); |
1614 | } | 1614 | } |
1615 | netdev_info(netdev, "Mac address is: %pM\n", ks->mac_addr); | 1615 | netdev_info(netdev, "Mac address is: %pM\n", ks->mac_addr); |
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 54ca99dbb406..62d1baf111ea 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c | |||
@@ -2488,7 +2488,7 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) | |||
2488 | eth_hw_addr_random(dev); | 2488 | eth_hw_addr_random(dev); |
2489 | smsc911x_set_hw_mac_address(pdata, dev->dev_addr); | 2489 | smsc911x_set_hw_mac_address(pdata, dev->dev_addr); |
2490 | SMSC_TRACE(pdata, probe, | 2490 | SMSC_TRACE(pdata, probe, |
2491 | "MAC Address is set to random_ether_addr"); | 2491 | "MAC Address is set to eth_random_addr"); |
2492 | } | 2492 | } |
2493 | } | 2493 | } |
2494 | 2494 | ||
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c index 6685bbb5705a..ca381d3f9fa8 100644 --- a/drivers/net/ethernet/ti/cpsw.c +++ b/drivers/net/ethernet/ti/cpsw.c | |||
@@ -748,7 +748,7 @@ static int __devinit cpsw_probe(struct platform_device *pdev) | |||
748 | memcpy(priv->mac_addr, data->slave_data[0].mac_addr, ETH_ALEN); | 748 | memcpy(priv->mac_addr, data->slave_data[0].mac_addr, ETH_ALEN); |
749 | pr_info("Detected MACID = %pM", priv->mac_addr); | 749 | pr_info("Detected MACID = %pM", priv->mac_addr); |
750 | } else { | 750 | } else { |
751 | random_ether_addr(priv->mac_addr); | 751 | eth_random_addr(priv->mac_addr); |
752 | pr_info("Random MACID = %pM", priv->mac_addr); | 752 | pr_info("Random MACID = %pM", priv->mac_addr); |
753 | } | 753 | } |
754 | 754 | ||
diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c index 83b4b388ad49..7f500288f6b3 100644 --- a/drivers/net/ethernet/tile/tilegx.c +++ b/drivers/net/ethernet/tile/tilegx.c | |||
@@ -1844,7 +1844,7 @@ static void tile_net_dev_init(const char *name, const uint8_t *mac) | |||
1844 | memcpy(dev->dev_addr, mac, 6); | 1844 | memcpy(dev->dev_addr, mac, 6); |
1845 | dev->addr_len = 6; | 1845 | dev->addr_len = 6; |
1846 | } else { | 1846 | } else { |
1847 | random_ether_addr(dev->dev_addr); | 1847 | eth_random_addr(dev->dev_addr); |
1848 | } | 1848 | } |
1849 | 1849 | ||
1850 | /* Register the network device. */ | 1850 | /* Register the network device. */ |
diff --git a/drivers/net/ethernet/wiznet/w5100.c b/drivers/net/ethernet/wiznet/w5100.c index a75e9ef5a4ce..a5826a3111a6 100644 --- a/drivers/net/ethernet/wiznet/w5100.c +++ b/drivers/net/ethernet/wiznet/w5100.c | |||
@@ -637,7 +637,7 @@ static int __devinit w5100_hw_probe(struct platform_device *pdev) | |||
637 | if (data && is_valid_ether_addr(data->mac_addr)) { | 637 | if (data && is_valid_ether_addr(data->mac_addr)) { |
638 | memcpy(ndev->dev_addr, data->mac_addr, ETH_ALEN); | 638 | memcpy(ndev->dev_addr, data->mac_addr, ETH_ALEN); |
639 | } else { | 639 | } else { |
640 | random_ether_addr(ndev->dev_addr); | 640 | eth_random_addr(ndev->dev_addr); |
641 | ndev->addr_assign_type |= NET_ADDR_RANDOM; | 641 | ndev->addr_assign_type |= NET_ADDR_RANDOM; |
642 | } | 642 | } |
643 | 643 | ||
diff --git a/drivers/net/ethernet/wiznet/w5300.c b/drivers/net/ethernet/wiznet/w5300.c index 3306a20ec211..bdd8891c215a 100644 --- a/drivers/net/ethernet/wiznet/w5300.c +++ b/drivers/net/ethernet/wiznet/w5300.c | |||
@@ -557,7 +557,7 @@ static int __devinit w5300_hw_probe(struct platform_device *pdev) | |||
557 | if (data && is_valid_ether_addr(data->mac_addr)) { | 557 | if (data && is_valid_ether_addr(data->mac_addr)) { |
558 | memcpy(ndev->dev_addr, data->mac_addr, ETH_ALEN); | 558 | memcpy(ndev->dev_addr, data->mac_addr, ETH_ALEN); |
559 | } else { | 559 | } else { |
560 | random_ether_addr(ndev->dev_addr); | 560 | eth_random_addr(ndev->dev_addr); |
561 | ndev->addr_assign_type |= NET_ADDR_RANDOM; | 561 | ndev->addr_assign_type |= NET_ADDR_RANDOM; |
562 | } | 562 | } |
563 | 563 | ||
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index 9c365e192a31..0793299bd39e 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c | |||
@@ -312,7 +312,7 @@ static void axienet_set_mac_address(struct net_device *ndev, void *address) | |||
312 | if (address) | 312 | if (address) |
313 | memcpy(ndev->dev_addr, address, ETH_ALEN); | 313 | memcpy(ndev->dev_addr, address, ETH_ALEN); |
314 | if (!is_valid_ether_addr(ndev->dev_addr)) | 314 | if (!is_valid_ether_addr(ndev->dev_addr)) |
315 | random_ether_addr(ndev->dev_addr); | 315 | eth_random_addr(ndev->dev_addr); |
316 | 316 | ||
317 | /* Set up unicast MAC address filter set its mac address */ | 317 | /* Set up unicast MAC address filter set its mac address */ |
318 | axienet_iow(lp, XAE_UAW0_OFFSET, | 318 | axienet_iow(lp, XAE_UAW0_OFFSET, |