aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2007-10-03 20:59:30 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:42 -0400
commit0795af5729b18218767fab27c44b1384f72dc9ad (patch)
tree67c16df84aa6ec219340b8ea1b5cfb0e8150a216 /drivers/net/wireless/rt2x00
parent95ea36275f3c9a1d3d04c217b4b576c657c4e70e (diff)
[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>
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c5
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c4
5 files changed, 16 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index 38e2188937c5..398c20105c81 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1362,8 +1362,10 @@ static int rt2400pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
1362 */ 1362 */
1363 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 1363 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
1364 if (!is_valid_ether_addr(mac)) { 1364 if (!is_valid_ether_addr(mac)) {
1365 DECLARE_MAC_BUF(macbuf);
1366
1365 random_ether_addr(mac); 1367 random_ether_addr(mac);
1366 EEPROM(rt2x00dev, "MAC: " MAC_FMT "\n", MAC_ARG(mac)); 1368 EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac));
1367 } 1369 }
1368 1370
1369 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); 1371 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index f6115c626fa7..e8d63aaab7bc 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -1509,8 +1509,11 @@ static int rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
1509 */ 1509 */
1510 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 1510 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
1511 if (!is_valid_ether_addr(mac)) { 1511 if (!is_valid_ether_addr(mac)) {
1512 DECLARE_MAC_BUF(macbuf);
1513
1512 random_ether_addr(mac); 1514 random_ether_addr(mac);
1513 EEPROM(rt2x00dev, "MAC: " MAC_FMT "\n", MAC_ARG(mac)); 1515 EEPROM(rt2x00dev, "MAC: %s\n",
1516 print_mac(macbuf, mac));
1514 } 1517 }
1515 1518
1516 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); 1519 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 847bd7f58eed..614600c5510d 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -1233,8 +1233,10 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
1233 */ 1233 */
1234 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 1234 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
1235 if (!is_valid_ether_addr(mac)) { 1235 if (!is_valid_ether_addr(mac)) {
1236 DECLARE_MAC_BUF(macbuf);
1237
1236 random_ether_addr(mac); 1238 random_ether_addr(mac);
1237 EEPROM(rt2x00dev, "MAC: " MAC_FMT "\n", MAC_ARG(mac)); 1239 EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac));
1238 } 1240 }
1239 1241
1240 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); 1242 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 730bed5a1984..09c8c96e2f83 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -2019,8 +2019,10 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev)
2019 */ 2019 */
2020 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 2020 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
2021 if (!is_valid_ether_addr(mac)) { 2021 if (!is_valid_ether_addr(mac)) {
2022 DECLARE_MAC_BUF(macbuf);
2023
2022 random_ether_addr(mac); 2024 random_ether_addr(mac);
2023 EEPROM(rt2x00dev, "MAC: " MAC_FMT "\n", MAC_ARG(mac)); 2025 EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac));
2024 } 2026 }
2025 2027
2026 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); 2028 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index b047c7c0f9ee..3397881bd63d 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1475,8 +1475,10 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev)
1475 */ 1475 */
1476 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); 1476 mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0);
1477 if (!is_valid_ether_addr(mac)) { 1477 if (!is_valid_ether_addr(mac)) {
1478 DECLARE_MAC_BUF(macbuf);
1479
1478 random_ether_addr(mac); 1480 random_ether_addr(mac);
1479 EEPROM(rt2x00dev, "MAC: " MAC_FMT "\n", MAC_ARG(mac)); 1481 EEPROM(rt2x00dev, "MAC: %s\n", print_mac(macbuf, mac));
1480 } 1482 }
1481 1483
1482 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); 1484 rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word);