Skip to content

Commit

Permalink
wireless: Use eth_random_addr
Browse files Browse the repository at this point in the history
Convert the existing uses of random_ether_addr to
the new eth_random_addr.

Signed-off-by: Joe Perches <[email protected]>
Acked-by: Hin-Tak Leung <[email protected]>
Acked-by: Gertjan van Wingerde <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
JoePerches authored and davem330 committed Jul 17, 2012
1 parent c7e12ea commit f4f7f41
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/adm8211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1854,7 +1854,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
if (!is_valid_ether_addr(perm_addr)) {
printk(KERN_WARNING "%s (adm8211): Invalid hwaddr in EEPROM!\n",
pci_name(pdev));
random_ether_addr(perm_addr);
eth_random_addr(perm_addr);
}
SET_IEEE80211_PERM_ADDR(dev, perm_addr);

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/p54/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)

wiphy_warn(dev->wiphy,
"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);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rt2x00/rt2400pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ static int rt2400pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) {
random_ether_addr(mac);
eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rt2x00/rt2500pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1585,7 +1585,7 @@ static int rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) {
random_ether_addr(mac);
eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rt2x00/rt2500usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,7 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) {
random_ether_addr(mac);
eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rt2x00/rt2800lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -4335,7 +4335,7 @@ int rt2800_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) {
random_ether_addr(mac);
eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rt2x00/rt61pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2415,7 +2415,7 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) {
random_ether_addr(mac);
eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rt2x00/rt73usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1770,7 +1770,7 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
*/
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
if (!is_valid_ether_addr(mac)) {
random_ether_addr(mac);
eth_random_addr(mac);
EEPROM(rt2x00dev, "MAC: %pM\n", mac);
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rtl818x/rtl8180/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ static int __devinit rtl8180_probe(struct pci_dev *pdev,
if (!is_valid_ether_addr(mac_addr)) {
printk(KERN_WARNING "%s (rtl8180): Invalid hwaddr! Using"
" 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);

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/rtl818x/rtl8187/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
if (!is_valid_ether_addr(mac_addr)) {
printk(KERN_WARNING "rtl8187: Invalid hwaddr! Using randomly "
"generated MAC address\n");
random_ether_addr(mac_addr);
eth_random_addr(mac_addr);
}
SET_IEEE80211_PERM_ADDR(dev, mac_addr);

Expand Down

0 comments on commit f4f7f41

Please sign in to comment.