Commit f4f7f414 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

wireless: 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>
Acked-by: default avatarHin-Tak Leung <htl10@users.sourceforge.net>
Acked-by: default avatarGertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c7e12ead
...@@ -1854,7 +1854,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev, ...@@ -1854,7 +1854,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
if (!is_valid_ether_addr(perm_addr)) { if (!is_valid_ether_addr(perm_addr)) {
printk(KERN_WARNING "%s (adm8211): Invalid hwaddr in EEPROM!\n", printk(KERN_WARNING "%s (adm8211): Invalid hwaddr in EEPROM!\n",
pci_name(pdev)); pci_name(pdev));
random_ether_addr(perm_addr); eth_random_addr(perm_addr);
} }
SET_IEEE80211_PERM_ADDR(dev, perm_addr); SET_IEEE80211_PERM_ADDR(dev, perm_addr);
......
...@@ -857,7 +857,7 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len) ...@@ -857,7 +857,7 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
wiphy_warn(dev->wiphy, wiphy_warn(dev->wiphy,
"Invalid hwaddr! Using randomly generated MAC addr\n"); "Invalid hwaddr! Using randomly generated MAC addr\n");
random_ether_addr(perm_addr); eth_random_addr(perm_addr);
SET_IEEE80211_PERM_ADDR(dev, perm_addr); SET_IEEE80211_PERM_ADDR(dev, perm_addr);
} }
......
...@@ -1455,7 +1455,7 @@ static int rt2400pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) ...@@ -1455,7 +1455,7 @@ static int rt2400pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/ */
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) { if (!is_valid_ether_addr(mac)) {
random_ether_addr(mac); eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac); EEPROM(rt2x00dev, "MAC: %pM\n", mac);
} }
......
...@@ -1585,7 +1585,7 @@ static int rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) ...@@ -1585,7 +1585,7 @@ static int rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/ */
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) { if (!is_valid_ether_addr(mac)) {
random_ether_addr(mac); eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac); EEPROM(rt2x00dev, "MAC: %pM\n", mac);
} }
......
...@@ -1352,7 +1352,7 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) ...@@ -1352,7 +1352,7 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/ */
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) { if (!is_valid_ether_addr(mac)) {
random_ether_addr(mac); eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac); EEPROM(rt2x00dev, "MAC: %pM\n", mac);
} }
......
...@@ -4335,7 +4335,7 @@ int rt2800_validate_eeprom(struct rt2x00_dev *rt2x00dev) ...@@ -4335,7 +4335,7 @@ int rt2800_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/ */
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) { if (!is_valid_ether_addr(mac)) {
random_ether_addr(mac); eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac); EEPROM(rt2x00dev, "MAC: %pM\n", mac);
} }
......
...@@ -2415,7 +2415,7 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) ...@@ -2415,7 +2415,7 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/ */
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) { if (!is_valid_ether_addr(mac)) {
random_ether_addr(mac); eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac); EEPROM(rt2x00dev, "MAC: %pM\n", mac);
} }
......
...@@ -1770,7 +1770,7 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) ...@@ -1770,7 +1770,7 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/ */
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) { if (!is_valid_ether_addr(mac)) {
random_ether_addr(mac); eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac); EEPROM(rt2x00dev, "MAC: %pM\n", mac);
} }
......
...@@ -1078,7 +1078,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev, ...@@ -1078,7 +1078,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
if (!is_valid_ether_addr(mac_addr)) { if (!is_valid_ether_addr(mac_addr)) {
printk(KERN_WARNING "%s (rtl8180): Invalid hwaddr! Using" printk(KERN_WARNING "%s (rtl8180): Invalid hwaddr! Using"
" randomly generated MAC addr\n", pci_name(pdev)); " randomly generated MAC addr\n", pci_name(pdev));
random_ether_addr(mac_addr); eth_random_addr(mac_addr);
} }
SET_IEEE80211_PERM_ADDR(dev, mac_addr); SET_IEEE80211_PERM_ADDR(dev, mac_addr);
......
...@@ -1486,7 +1486,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf, ...@@ -1486,7 +1486,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
if (!is_valid_ether_addr(mac_addr)) { if (!is_valid_ether_addr(mac_addr)) {
printk(KERN_WARNING "rtl8187: Invalid hwaddr! Using randomly " printk(KERN_WARNING "rtl8187: Invalid hwaddr! Using randomly "
"generated MAC address\n"); "generated MAC address\n");
random_ether_addr(mac_addr); eth_random_addr(mac_addr);
} }
SET_IEEE80211_PERM_ADDR(dev, mac_addr); SET_IEEE80211_PERM_ADDR(dev, mac_addr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment