[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Esse commit está contido em:
@@ -1362,8 +1362,10 @@ static int rt2400pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
|
||||
*/
|
||||
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
|
||||
if (!is_valid_ether_addr(mac)) {
|
||||
DECLARE_MAC_BUF(macbuf);
|
||||
|
||||
random_ether_addr(mac);
|
||||
EEPROM(rt2x00dev, "MAC: " MAC_FMT "\n", MAC_ARG(mac));
|
||||
EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac));
|
||||
}
|
||||
|
||||
rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
|
||||
|
@@ -1509,8 +1509,11 @@ static int rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
|
||||
*/
|
||||
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
|
||||
if (!is_valid_ether_addr(mac)) {
|
||||
DECLARE_MAC_BUF(macbuf);
|
||||
|
||||
random_ether_addr(mac);
|
||||
EEPROM(rt2x00dev, "MAC: " MAC_FMT "\n", MAC_ARG(mac));
|
||||
EEPROM(rt2x00dev, "MAC: %s\n",
|
||||
print_mac(macbuf, mac));
|
||||
}
|
||||
|
||||
rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
|
||||
|
@@ -1233,8 +1233,10 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
|
||||
*/
|
||||
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
|
||||
if (!is_valid_ether_addr(mac)) {
|
||||
DECLARE_MAC_BUF(macbuf);
|
||||
|
||||
random_ether_addr(mac);
|
||||
EEPROM(rt2x00dev, "MAC: " MAC_FMT "\n", MAC_ARG(mac));
|
||||
EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac));
|
||||
}
|
||||
|
||||
rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
|
||||
|
@@ -2019,8 +2019,10 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
|
||||
*/
|
||||
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
|
||||
if (!is_valid_ether_addr(mac)) {
|
||||
DECLARE_MAC_BUF(macbuf);
|
||||
|
||||
random_ether_addr(mac);
|
||||
EEPROM(rt2x00dev, "MAC: " MAC_FMT "\n", MAC_ARG(mac));
|
||||
EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac));
|
||||
}
|
||||
|
||||
rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
|
||||
|
@@ -1475,8 +1475,10 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
|
||||
*/
|
||||
mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
|
||||
if (!is_valid_ether_addr(mac)) {
|
||||
DECLARE_MAC_BUF(macbuf);
|
||||
|
||||
random_ether_addr(mac);
|
||||
EEPROM(rt2x00dev, "MAC: " MAC_FMT "\n", MAC_ARG(mac));
|
||||
EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac));
|
||||
}
|
||||
|
||||
rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
|
||||
|
Referência em uma nova issue
Block a user