diff options
author | Joe Perches <joe@perches.com> | 2013-04-19 11:33:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-04-22 15:20:26 -0400 |
commit | ec9c498991880b387e4783a6eb071ed8d01e45a3 (patch) | |
tree | a1ce721f0f0a4c64390dbd002283481f21723461 | |
parent | 624708b85ebe095744f87270dcd8569c9b4ef487 (diff) |
rt2x00: Use more current logging styles, shrink object size
Reduce object space ~2% using more current logging styles.
Neaten and simplify logging macros.
Use wiphy_<level> where appropriate.
Coalesce formats.
Convert ERROR/WARNING/INFO macros to rt2x00_<level>
Convert EEPROM to rt2x00_eeprom_dbg
Convert PROBE_ERROR to rt2x00_probe_err
Convert DEBUG to rt2x00_dbg
Convert EEPROM to rt2x00_eeprom_dbg
$ size drivers/net/wireless/rt2x00/built-in.o*
text data bss dec hex filename
245639 71696 69584 386919 5e767 drivers/net/wireless/rt2x00/built-in.o.new
240609 70096 68944 379649 5cb01 drivers/net/wireless/rt2x00/built-in.o.new.nodyndbg
240609 70096 68944 379649 5cb01 drivers/net/wireless/rt2x00/built-in.o.new.no_rt2x00_debug
249198 70096 70352 389646 5f20e drivers/net/wireless/rt2x00/built-in.o.old
249198 70096 70352 389646 5f20e drivers/net/wireless/rt2x00/built-in.o.old.nodyndbg
244222 70096 69712 384030 5dc1e drivers/net/wireless/rt2x00/built-in.o.old.no_rt2x00_debug
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 35 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 35 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 26 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 41 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 72 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00debug.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00firmware.c | 25 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00leds.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mac.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00mmio.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 41 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00soc.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 33 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 30 |
19 files changed, 228 insertions, 240 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index d1b10d457230..f7143733d7e9 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -920,7 +920,7 @@ static int rt2400pci_wait_bbp_ready(struct rt2x00_dev *rt2x00dev) | |||
920 | udelay(REGISTER_BUSY_DELAY); | 920 | udelay(REGISTER_BUSY_DELAY); |
921 | } | 921 | } |
922 | 922 | ||
923 | ERROR(rt2x00dev, "BBP register access failed, aborting.\n"); | 923 | rt2x00_err(rt2x00dev, "BBP register access failed, aborting\n"); |
924 | return -EACCES; | 924 | return -EACCES; |
925 | } | 925 | } |
926 | 926 | ||
@@ -1093,8 +1093,8 @@ static int rt2400pci_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
1093 | } | 1093 | } |
1094 | 1094 | ||
1095 | if (unlikely(retval)) | 1095 | if (unlikely(retval)) |
1096 | ERROR(rt2x00dev, "Device failed to enter state %d (%d).\n", | 1096 | rt2x00_err(rt2x00dev, "Device failed to enter state %d (%d)\n", |
1097 | state, retval); | 1097 | state, retval); |
1098 | 1098 | ||
1099 | return retval; | 1099 | return retval; |
1100 | } | 1100 | } |
@@ -1188,7 +1188,7 @@ static void rt2400pci_write_beacon(struct queue_entry *entry, | |||
1188 | rt2x00mmio_register_write(rt2x00dev, CSR14, reg); | 1188 | rt2x00mmio_register_write(rt2x00dev, CSR14, reg); |
1189 | 1189 | ||
1190 | if (rt2x00queue_map_txskb(entry)) { | 1190 | if (rt2x00queue_map_txskb(entry)) { |
1191 | ERROR(rt2x00dev, "Fail to map beacon, aborting\n"); | 1191 | rt2x00_err(rt2x00dev, "Fail to map beacon, aborting\n"); |
1192 | goto out; | 1192 | goto out; |
1193 | } | 1193 | } |
1194 | /* | 1194 | /* |
@@ -1464,12 +1464,12 @@ static int rt2400pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1464 | mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); | 1464 | mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); |
1465 | if (!is_valid_ether_addr(mac)) { | 1465 | if (!is_valid_ether_addr(mac)) { |
1466 | eth_random_addr(mac); | 1466 | eth_random_addr(mac); |
1467 | EEPROM(rt2x00dev, "MAC: %pM\n", mac); | 1467 | rt2x00_eeprom_dbg(rt2x00dev, "MAC: %pM\n", mac); |
1468 | } | 1468 | } |
1469 | 1469 | ||
1470 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); | 1470 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); |
1471 | if (word == 0xffff) { | 1471 | if (word == 0xffff) { |
1472 | ERROR(rt2x00dev, "Invalid EEPROM data detected.\n"); | 1472 | rt2x00_err(rt2x00dev, "Invalid EEPROM data detected\n"); |
1473 | return -EINVAL; | 1473 | return -EINVAL; |
1474 | } | 1474 | } |
1475 | 1475 | ||
@@ -1496,7 +1496,7 @@ static int rt2400pci_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1496 | rt2x00_get_field32(reg, CSR0_REVISION)); | 1496 | rt2x00_get_field32(reg, CSR0_REVISION)); |
1497 | 1497 | ||
1498 | if (!rt2x00_rf(rt2x00dev, RF2420) && !rt2x00_rf(rt2x00dev, RF2421)) { | 1498 | if (!rt2x00_rf(rt2x00dev, RF2420) && !rt2x00_rf(rt2x00dev, RF2421)) { |
1499 | ERROR(rt2x00dev, "Invalid RF chipset detected.\n"); | 1499 | rt2x00_err(rt2x00dev, "Invalid RF chipset detected\n"); |
1500 | return -ENODEV; | 1500 | return -ENODEV; |
1501 | } | 1501 | } |
1502 | 1502 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 9ba14570fcfd..77e45b223d15 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1058,7 +1058,7 @@ static int rt2500pci_wait_bbp_ready(struct rt2x00_dev *rt2x00dev) | |||
1058 | udelay(REGISTER_BUSY_DELAY); | 1058 | udelay(REGISTER_BUSY_DELAY); |
1059 | } | 1059 | } |
1060 | 1060 | ||
1061 | ERROR(rt2x00dev, "BBP register access failed, aborting.\n"); | 1061 | rt2x00_err(rt2x00dev, "BBP register access failed, aborting\n"); |
1062 | return -EACCES; | 1062 | return -EACCES; |
1063 | } | 1063 | } |
1064 | 1064 | ||
@@ -1246,8 +1246,8 @@ static int rt2500pci_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
1246 | } | 1246 | } |
1247 | 1247 | ||
1248 | if (unlikely(retval)) | 1248 | if (unlikely(retval)) |
1249 | ERROR(rt2x00dev, "Device failed to enter state %d (%d).\n", | 1249 | rt2x00_err(rt2x00dev, "Device failed to enter state %d (%d)\n", |
1250 | state, retval); | 1250 | state, retval); |
1251 | 1251 | ||
1252 | return retval; | 1252 | return retval; |
1253 | } | 1253 | } |
@@ -1340,7 +1340,7 @@ static void rt2500pci_write_beacon(struct queue_entry *entry, | |||
1340 | rt2x00mmio_register_write(rt2x00dev, CSR14, reg); | 1340 | rt2x00mmio_register_write(rt2x00dev, CSR14, reg); |
1341 | 1341 | ||
1342 | if (rt2x00queue_map_txskb(entry)) { | 1342 | if (rt2x00queue_map_txskb(entry)) { |
1343 | ERROR(rt2x00dev, "Fail to map beacon, aborting\n"); | 1343 | rt2x00_err(rt2x00dev, "Fail to map beacon, aborting\n"); |
1344 | goto out; | 1344 | goto out; |
1345 | } | 1345 | } |
1346 | 1346 | ||
@@ -1590,7 +1590,7 @@ static int rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1590 | mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); | 1590 | mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); |
1591 | if (!is_valid_ether_addr(mac)) { | 1591 | if (!is_valid_ether_addr(mac)) { |
1592 | eth_random_addr(mac); | 1592 | eth_random_addr(mac); |
1593 | EEPROM(rt2x00dev, "MAC: %pM\n", mac); | 1593 | rt2x00_eeprom_dbg(rt2x00dev, "MAC: %pM\n", mac); |
1594 | } | 1594 | } |
1595 | 1595 | ||
1596 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); | 1596 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); |
@@ -1606,7 +1606,7 @@ static int rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1606 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); | 1606 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); |
1607 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF2522); | 1607 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF2522); |
1608 | rt2x00_eeprom_write(rt2x00dev, EEPROM_ANTENNA, word); | 1608 | rt2x00_eeprom_write(rt2x00dev, EEPROM_ANTENNA, word); |
1609 | EEPROM(rt2x00dev, "Antenna: 0x%04x\n", word); | 1609 | rt2x00_eeprom_dbg(rt2x00dev, "Antenna: 0x%04x\n", word); |
1610 | } | 1610 | } |
1611 | 1611 | ||
1612 | rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &word); | 1612 | rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &word); |
@@ -1615,7 +1615,7 @@ static int rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1615 | rt2x00_set_field16(&word, EEPROM_NIC_DYN_BBP_TUNE, 0); | 1615 | rt2x00_set_field16(&word, EEPROM_NIC_DYN_BBP_TUNE, 0); |
1616 | rt2x00_set_field16(&word, EEPROM_NIC_CCK_TX_POWER, 0); | 1616 | rt2x00_set_field16(&word, EEPROM_NIC_CCK_TX_POWER, 0); |
1617 | rt2x00_eeprom_write(rt2x00dev, EEPROM_NIC, word); | 1617 | rt2x00_eeprom_write(rt2x00dev, EEPROM_NIC, word); |
1618 | EEPROM(rt2x00dev, "NIC: 0x%04x\n", word); | 1618 | rt2x00_eeprom_dbg(rt2x00dev, "NIC: 0x%04x\n", word); |
1619 | } | 1619 | } |
1620 | 1620 | ||
1621 | rt2x00_eeprom_read(rt2x00dev, EEPROM_CALIBRATE_OFFSET, &word); | 1621 | rt2x00_eeprom_read(rt2x00dev, EEPROM_CALIBRATE_OFFSET, &word); |
@@ -1623,7 +1623,8 @@ static int rt2500pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1623 | rt2x00_set_field16(&word, EEPROM_CALIBRATE_OFFSET_RSSI, | 1623 | rt2x00_set_field16(&word, EEPROM_CALIBRATE_OFFSET_RSSI, |
1624 | DEFAULT_RSSI_OFFSET); | 1624 | DEFAULT_RSSI_OFFSET); |
1625 | rt2x00_eeprom_write(rt2x00dev, EEPROM_CALIBRATE_OFFSET, word); | 1625 | rt2x00_eeprom_write(rt2x00dev, EEPROM_CALIBRATE_OFFSET, word); |
1626 | EEPROM(rt2x00dev, "Calibrate offset: 0x%04x\n", word); | 1626 | rt2x00_eeprom_dbg(rt2x00dev, "Calibrate offset: 0x%04x\n", |
1627 | word); | ||
1627 | } | 1628 | } |
1628 | 1629 | ||
1629 | return 0; | 1630 | return 0; |
@@ -1654,7 +1655,7 @@ static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1654 | !rt2x00_rf(rt2x00dev, RF2525) && | 1655 | !rt2x00_rf(rt2x00dev, RF2525) && |
1655 | !rt2x00_rf(rt2x00dev, RF2525E) && | 1656 | !rt2x00_rf(rt2x00dev, RF2525E) && |
1656 | !rt2x00_rf(rt2x00dev, RF5222)) { | 1657 | !rt2x00_rf(rt2x00dev, RF5222)) { |
1657 | ERROR(rt2x00dev, "Invalid RF chipset detected.\n"); | 1658 | rt2x00_err(rt2x00dev, "Invalid RF chipset detected\n"); |
1658 | return -ENODEV; | 1659 | return -ENODEV; |
1659 | } | 1660 | } |
1660 | 1661 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 6b2e1e431dd2..a7f7b365eff4 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -134,8 +134,8 @@ static int rt2500usb_regbusy_read(struct rt2x00_dev *rt2x00dev, | |||
134 | udelay(REGISTER_BUSY_DELAY); | 134 | udelay(REGISTER_BUSY_DELAY); |
135 | } | 135 | } |
136 | 136 | ||
137 | ERROR(rt2x00dev, "Indirect register access failed: " | 137 | rt2x00_err(rt2x00dev, "Indirect register access failed: offset=0x%.08x, value=0x%.08x\n", |
138 | "offset=0x%.08x, value=0x%.08x\n", offset, *reg); | 138 | offset, *reg); |
139 | *reg = ~0; | 139 | *reg = ~0; |
140 | 140 | ||
141 | return 0; | 141 | return 0; |
@@ -916,7 +916,7 @@ static int rt2500usb_wait_bbp_ready(struct rt2x00_dev *rt2x00dev) | |||
916 | udelay(REGISTER_BUSY_DELAY); | 916 | udelay(REGISTER_BUSY_DELAY); |
917 | } | 917 | } |
918 | 918 | ||
919 | ERROR(rt2x00dev, "BBP register access failed, aborting.\n"); | 919 | rt2x00_err(rt2x00dev, "BBP register access failed, aborting\n"); |
920 | return -EACCES; | 920 | return -EACCES; |
921 | } | 921 | } |
922 | 922 | ||
@@ -1069,8 +1069,8 @@ static int rt2500usb_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
1069 | } | 1069 | } |
1070 | 1070 | ||
1071 | if (unlikely(retval)) | 1071 | if (unlikely(retval)) |
1072 | ERROR(rt2x00dev, "Device failed to enter state %d (%d).\n", | 1072 | rt2x00_err(rt2x00dev, "Device failed to enter state %d (%d)\n", |
1073 | state, retval); | 1073 | state, retval); |
1074 | 1074 | ||
1075 | return retval; | 1075 | return retval; |
1076 | } | 1076 | } |
@@ -1353,7 +1353,7 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1353 | mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); | 1353 | mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); |
1354 | if (!is_valid_ether_addr(mac)) { | 1354 | if (!is_valid_ether_addr(mac)) { |
1355 | eth_random_addr(mac); | 1355 | eth_random_addr(mac); |
1356 | EEPROM(rt2x00dev, "MAC: %pM\n", mac); | 1356 | rt2x00_eeprom_dbg(rt2x00dev, "MAC: %pM\n", mac); |
1357 | } | 1357 | } |
1358 | 1358 | ||
1359 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); | 1359 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); |
@@ -1369,7 +1369,7 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1369 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); | 1369 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); |
1370 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF2522); | 1370 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF2522); |
1371 | rt2x00_eeprom_write(rt2x00dev, EEPROM_ANTENNA, word); | 1371 | rt2x00_eeprom_write(rt2x00dev, EEPROM_ANTENNA, word); |
1372 | EEPROM(rt2x00dev, "Antenna: 0x%04x\n", word); | 1372 | rt2x00_eeprom_dbg(rt2x00dev, "Antenna: 0x%04x\n", word); |
1373 | } | 1373 | } |
1374 | 1374 | ||
1375 | rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &word); | 1375 | rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &word); |
@@ -1378,7 +1378,7 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1378 | rt2x00_set_field16(&word, EEPROM_NIC_DYN_BBP_TUNE, 0); | 1378 | rt2x00_set_field16(&word, EEPROM_NIC_DYN_BBP_TUNE, 0); |
1379 | rt2x00_set_field16(&word, EEPROM_NIC_CCK_TX_POWER, 0); | 1379 | rt2x00_set_field16(&word, EEPROM_NIC_CCK_TX_POWER, 0); |
1380 | rt2x00_eeprom_write(rt2x00dev, EEPROM_NIC, word); | 1380 | rt2x00_eeprom_write(rt2x00dev, EEPROM_NIC, word); |
1381 | EEPROM(rt2x00dev, "NIC: 0x%04x\n", word); | 1381 | rt2x00_eeprom_dbg(rt2x00dev, "NIC: 0x%04x\n", word); |
1382 | } | 1382 | } |
1383 | 1383 | ||
1384 | rt2x00_eeprom_read(rt2x00dev, EEPROM_CALIBRATE_OFFSET, &word); | 1384 | rt2x00_eeprom_read(rt2x00dev, EEPROM_CALIBRATE_OFFSET, &word); |
@@ -1386,14 +1386,15 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1386 | rt2x00_set_field16(&word, EEPROM_CALIBRATE_OFFSET_RSSI, | 1386 | rt2x00_set_field16(&word, EEPROM_CALIBRATE_OFFSET_RSSI, |
1387 | DEFAULT_RSSI_OFFSET); | 1387 | DEFAULT_RSSI_OFFSET); |
1388 | rt2x00_eeprom_write(rt2x00dev, EEPROM_CALIBRATE_OFFSET, word); | 1388 | rt2x00_eeprom_write(rt2x00dev, EEPROM_CALIBRATE_OFFSET, word); |
1389 | EEPROM(rt2x00dev, "Calibrate offset: 0x%04x\n", word); | 1389 | rt2x00_eeprom_dbg(rt2x00dev, "Calibrate offset: 0x%04x\n", |
1390 | word); | ||
1390 | } | 1391 | } |
1391 | 1392 | ||
1392 | rt2x00_eeprom_read(rt2x00dev, EEPROM_BBPTUNE, &word); | 1393 | rt2x00_eeprom_read(rt2x00dev, EEPROM_BBPTUNE, &word); |
1393 | if (word == 0xffff) { | 1394 | if (word == 0xffff) { |
1394 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_THRESHOLD, 45); | 1395 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_THRESHOLD, 45); |
1395 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE, word); | 1396 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE, word); |
1396 | EEPROM(rt2x00dev, "BBPtune: 0x%04x\n", word); | 1397 | rt2x00_eeprom_dbg(rt2x00dev, "BBPtune: 0x%04x\n", word); |
1397 | } | 1398 | } |
1398 | 1399 | ||
1399 | /* | 1400 | /* |
@@ -1408,7 +1409,7 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1408 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_VGCUPPER, 0x40); | 1409 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_VGCUPPER, 0x40); |
1409 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_VGCLOWER, bbp); | 1410 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_VGCLOWER, bbp); |
1410 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_VGC, word); | 1411 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_VGC, word); |
1411 | EEPROM(rt2x00dev, "BBPtune vgc: 0x%04x\n", word); | 1412 | rt2x00_eeprom_dbg(rt2x00dev, "BBPtune vgc: 0x%04x\n", word); |
1412 | } else { | 1413 | } else { |
1413 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_VGCLOWER, bbp); | 1414 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_VGCLOWER, bbp); |
1414 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_VGC, word); | 1415 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_VGC, word); |
@@ -1419,7 +1420,7 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1419 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R17_LOW, 0x48); | 1420 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R17_LOW, 0x48); |
1420 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R17_HIGH, 0x41); | 1421 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R17_HIGH, 0x41); |
1421 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_R17, word); | 1422 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_R17, word); |
1422 | EEPROM(rt2x00dev, "BBPtune r17: 0x%04x\n", word); | 1423 | rt2x00_eeprom_dbg(rt2x00dev, "BBPtune r17: 0x%04x\n", word); |
1423 | } | 1424 | } |
1424 | 1425 | ||
1425 | rt2x00_eeprom_read(rt2x00dev, EEPROM_BBPTUNE_R24, &word); | 1426 | rt2x00_eeprom_read(rt2x00dev, EEPROM_BBPTUNE_R24, &word); |
@@ -1427,7 +1428,7 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1427 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R24_LOW, 0x40); | 1428 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R24_LOW, 0x40); |
1428 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R24_HIGH, 0x80); | 1429 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R24_HIGH, 0x80); |
1429 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_R24, word); | 1430 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_R24, word); |
1430 | EEPROM(rt2x00dev, "BBPtune r24: 0x%04x\n", word); | 1431 | rt2x00_eeprom_dbg(rt2x00dev, "BBPtune r24: 0x%04x\n", word); |
1431 | } | 1432 | } |
1432 | 1433 | ||
1433 | rt2x00_eeprom_read(rt2x00dev, EEPROM_BBPTUNE_R25, &word); | 1434 | rt2x00_eeprom_read(rt2x00dev, EEPROM_BBPTUNE_R25, &word); |
@@ -1435,7 +1436,7 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1435 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R25_LOW, 0x40); | 1436 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R25_LOW, 0x40); |
1436 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R25_HIGH, 0x50); | 1437 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R25_HIGH, 0x50); |
1437 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_R25, word); | 1438 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_R25, word); |
1438 | EEPROM(rt2x00dev, "BBPtune r25: 0x%04x\n", word); | 1439 | rt2x00_eeprom_dbg(rt2x00dev, "BBPtune r25: 0x%04x\n", word); |
1439 | } | 1440 | } |
1440 | 1441 | ||
1441 | rt2x00_eeprom_read(rt2x00dev, EEPROM_BBPTUNE_R61, &word); | 1442 | rt2x00_eeprom_read(rt2x00dev, EEPROM_BBPTUNE_R61, &word); |
@@ -1443,7 +1444,7 @@ static int rt2500usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1443 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R61_LOW, 0x60); | 1444 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R61_LOW, 0x60); |
1444 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R61_HIGH, 0x6d); | 1445 | rt2x00_set_field16(&word, EEPROM_BBPTUNE_R61_HIGH, 0x6d); |
1445 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_R61, word); | 1446 | rt2x00_eeprom_write(rt2x00dev, EEPROM_BBPTUNE_R61, word); |
1446 | EEPROM(rt2x00dev, "BBPtune r61: 0x%04x\n", word); | 1447 | rt2x00_eeprom_dbg(rt2x00dev, "BBPtune r61: 0x%04x\n", word); |
1447 | } | 1448 | } |
1448 | 1449 | ||
1449 | return 0; | 1450 | return 0; |
@@ -1468,7 +1469,7 @@ static int rt2500usb_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1468 | rt2x00_set_chip(rt2x00dev, RT2570, value, reg); | 1469 | rt2x00_set_chip(rt2x00dev, RT2570, value, reg); |
1469 | 1470 | ||
1470 | if (((reg & 0xfff0) != 0) || ((reg & 0x0000000f) == 0)) { | 1471 | if (((reg & 0xfff0) != 0) || ((reg & 0x0000000f) == 0)) { |
1471 | ERROR(rt2x00dev, "Invalid RT chipset detected.\n"); | 1472 | rt2x00_err(rt2x00dev, "Invalid RT chipset detected\n"); |
1472 | return -ENODEV; | 1473 | return -ENODEV; |
1473 | } | 1474 | } |
1474 | 1475 | ||
@@ -1478,7 +1479,7 @@ static int rt2500usb_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1478 | !rt2x00_rf(rt2x00dev, RF2525) && | 1479 | !rt2x00_rf(rt2x00dev, RF2525) && |
1479 | !rt2x00_rf(rt2x00dev, RF2525E) && | 1480 | !rt2x00_rf(rt2x00dev, RF2525E) && |
1480 | !rt2x00_rf(rt2x00dev, RF5222)) { | 1481 | !rt2x00_rf(rt2x00dev, RF5222)) { |
1481 | ERROR(rt2x00dev, "Invalid RF chipset detected.\n"); | 1482 | rt2x00_err(rt2x00dev, "Invalid RF chipset detected\n"); |
1482 | return -ENODEV; | 1483 | return -ENODEV; |
1483 | } | 1484 | } |
1484 | 1485 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 830560775a44..b52d70c75e1a 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -80,7 +80,7 @@ static inline bool rt2800_is_305x_soc(struct rt2x00_dev *rt2x00dev) | |||
80 | rt2x00_rf(rt2x00dev, RF3022)) | 80 | rt2x00_rf(rt2x00dev, RF3022)) |
81 | return true; | 81 | return true; |
82 | 82 | ||
83 | WARNING(rt2x00dev, "Unknown RF chipset on rt305x\n"); | 83 | rt2x00_warn(rt2x00dev, "Unknown RF chipset on rt305x\n"); |
84 | return false; | 84 | return false; |
85 | } | 85 | } |
86 | 86 | ||
@@ -328,7 +328,7 @@ int rt2800_wait_csr_ready(struct rt2x00_dev *rt2x00dev) | |||
328 | msleep(1); | 328 | msleep(1); |
329 | } | 329 | } |
330 | 330 | ||
331 | ERROR(rt2x00dev, "Unstable hardware.\n"); | 331 | rt2x00_err(rt2x00dev, "Unstable hardware\n"); |
332 | return -EBUSY; | 332 | return -EBUSY; |
333 | } | 333 | } |
334 | EXPORT_SYMBOL_GPL(rt2800_wait_csr_ready); | 334 | EXPORT_SYMBOL_GPL(rt2800_wait_csr_ready); |
@@ -351,7 +351,7 @@ int rt2800_wait_wpdma_ready(struct rt2x00_dev *rt2x00dev) | |||
351 | msleep(10); | 351 | msleep(10); |
352 | } | 352 | } |
353 | 353 | ||
354 | ERROR(rt2x00dev, "WPDMA TX/RX busy [0x%08x].\n", reg); | 354 | rt2x00_err(rt2x00dev, "WPDMA TX/RX busy [0x%08x]\n", reg); |
355 | return -EACCES; | 355 | return -EACCES; |
356 | } | 356 | } |
357 | EXPORT_SYMBOL_GPL(rt2800_wait_wpdma_ready); | 357 | EXPORT_SYMBOL_GPL(rt2800_wait_wpdma_ready); |
@@ -512,7 +512,7 @@ int rt2800_load_firmware(struct rt2x00_dev *rt2x00dev, | |||
512 | } | 512 | } |
513 | 513 | ||
514 | if (i == REGISTER_BUSY_COUNT) { | 514 | if (i == REGISTER_BUSY_COUNT) { |
515 | ERROR(rt2x00dev, "PBF system register not ready.\n"); | 515 | rt2x00_err(rt2x00dev, "PBF system register not ready\n"); |
516 | return -EBUSY; | 516 | return -EBUSY; |
517 | } | 517 | } |
518 | 518 | ||
@@ -811,7 +811,7 @@ void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc) | |||
811 | */ | 811 | */ |
812 | padding_len = roundup(entry->skb->len, 4) - entry->skb->len; | 812 | padding_len = roundup(entry->skb->len, 4) - entry->skb->len; |
813 | if (padding_len && skb_pad(entry->skb, padding_len)) { | 813 | if (padding_len && skb_pad(entry->skb, padding_len)) { |
814 | ERROR(rt2x00dev, "Failure padding beacon, aborting\n"); | 814 | rt2x00_err(rt2x00dev, "Failure padding beacon, aborting\n"); |
815 | /* skb freed by skb_pad() on failure */ | 815 | /* skb freed by skb_pad() on failure */ |
816 | entry->skb = NULL; | 816 | entry->skb = NULL; |
817 | rt2800_register_write(rt2x00dev, BCN_TIME_CFG, orig_reg); | 817 | rt2800_register_write(rt2x00dev, BCN_TIME_CFG, orig_reg); |
@@ -3869,7 +3869,7 @@ static int rt2800_wait_bbp_rf_ready(struct rt2x00_dev *rt2x00dev) | |||
3869 | udelay(REGISTER_BUSY_DELAY); | 3869 | udelay(REGISTER_BUSY_DELAY); |
3870 | } | 3870 | } |
3871 | 3871 | ||
3872 | ERROR(rt2x00dev, "BBP/RF register access failed, aborting.\n"); | 3872 | rt2x00_err(rt2x00dev, "BBP/RF register access failed, aborting\n"); |
3873 | return -EACCES; | 3873 | return -EACCES; |
3874 | } | 3874 | } |
3875 | 3875 | ||
@@ -3893,7 +3893,7 @@ static int rt2800_wait_bbp_ready(struct rt2x00_dev *rt2x00dev) | |||
3893 | udelay(REGISTER_BUSY_DELAY); | 3893 | udelay(REGISTER_BUSY_DELAY); |
3894 | } | 3894 | } |
3895 | 3895 | ||
3896 | ERROR(rt2x00dev, "BBP register access failed, aborting.\n"); | 3896 | rt2x00_err(rt2x00dev, "BBP register access failed, aborting\n"); |
3897 | return -EACCES; | 3897 | return -EACCES; |
3898 | } | 3898 | } |
3899 | 3899 | ||
@@ -5353,7 +5353,7 @@ static int rt2800_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
5353 | mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); | 5353 | mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); |
5354 | if (!is_valid_ether_addr(mac)) { | 5354 | if (!is_valid_ether_addr(mac)) { |
5355 | eth_random_addr(mac); | 5355 | eth_random_addr(mac); |
5356 | EEPROM(rt2x00dev, "MAC: %pM\n", mac); | 5356 | rt2x00_eeprom_dbg(rt2x00dev, "MAC: %pM\n", mac); |
5357 | } | 5357 | } |
5358 | 5358 | ||
5359 | rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF0, &word); | 5359 | rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF0, &word); |
@@ -5362,7 +5362,7 @@ static int rt2800_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
5362 | rt2x00_set_field16(&word, EEPROM_NIC_CONF0_TXPATH, 1); | 5362 | rt2x00_set_field16(&word, EEPROM_NIC_CONF0_TXPATH, 1); |
5363 | rt2x00_set_field16(&word, EEPROM_NIC_CONF0_RF_TYPE, RF2820); | 5363 | rt2x00_set_field16(&word, EEPROM_NIC_CONF0_RF_TYPE, RF2820); |
5364 | rt2x00_eeprom_write(rt2x00dev, EEPROM_NIC_CONF0, word); | 5364 | rt2x00_eeprom_write(rt2x00dev, EEPROM_NIC_CONF0, word); |
5365 | EEPROM(rt2x00dev, "Antenna: 0x%04x\n", word); | 5365 | rt2x00_eeprom_dbg(rt2x00dev, "Antenna: 0x%04x\n", word); |
5366 | } else if (rt2x00_rt(rt2x00dev, RT2860) || | 5366 | } else if (rt2x00_rt(rt2x00dev, RT2860) || |
5367 | rt2x00_rt(rt2x00dev, RT2872)) { | 5367 | rt2x00_rt(rt2x00dev, RT2872)) { |
5368 | /* | 5368 | /* |
@@ -5391,14 +5391,14 @@ static int rt2800_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
5391 | rt2x00_set_field16(&word, EEPROM_NIC_CONF1_BT_COEXIST, 0); | 5391 | rt2x00_set_field16(&word, EEPROM_NIC_CONF1_BT_COEXIST, 0); |
5392 | rt2x00_set_field16(&word, EEPROM_NIC_CONF1_DAC_TEST, 0); | 5392 | rt2x00_set_field16(&word, EEPROM_NIC_CONF1_DAC_TEST, 0); |
5393 | rt2x00_eeprom_write(rt2x00dev, EEPROM_NIC_CONF1, word); | 5393 | rt2x00_eeprom_write(rt2x00dev, EEPROM_NIC_CONF1, word); |
5394 | EEPROM(rt2x00dev, "NIC: 0x%04x\n", word); | 5394 | rt2x00_eeprom_dbg(rt2x00dev, "NIC: 0x%04x\n", word); |
5395 | } | 5395 | } |
5396 | 5396 | ||
5397 | rt2x00_eeprom_read(rt2x00dev, EEPROM_FREQ, &word); | 5397 | rt2x00_eeprom_read(rt2x00dev, EEPROM_FREQ, &word); |
5398 | if ((word & 0x00ff) == 0x00ff) { | 5398 | if ((word & 0x00ff) == 0x00ff) { |
5399 | rt2x00_set_field16(&word, EEPROM_FREQ_OFFSET, 0); | 5399 | rt2x00_set_field16(&word, EEPROM_FREQ_OFFSET, 0); |
5400 | rt2x00_eeprom_write(rt2x00dev, EEPROM_FREQ, word); | 5400 | rt2x00_eeprom_write(rt2x00dev, EEPROM_FREQ, word); |
5401 | EEPROM(rt2x00dev, "Freq: 0x%04x\n", word); | 5401 | rt2x00_eeprom_dbg(rt2x00dev, "Freq: 0x%04x\n", word); |
5402 | } | 5402 | } |
5403 | if ((word & 0xff00) == 0xff00) { | 5403 | if ((word & 0xff00) == 0xff00) { |
5404 | rt2x00_set_field16(&word, EEPROM_FREQ_LED_MODE, | 5404 | rt2x00_set_field16(&word, EEPROM_FREQ_LED_MODE, |
@@ -5408,7 +5408,7 @@ static int rt2800_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
5408 | rt2x00_eeprom_write(rt2x00dev, EEPROM_LED_AG_CONF, 0x5555); | 5408 | rt2x00_eeprom_write(rt2x00dev, EEPROM_LED_AG_CONF, 0x5555); |
5409 | rt2x00_eeprom_write(rt2x00dev, EEPROM_LED_ACT_CONF, 0x2221); | 5409 | rt2x00_eeprom_write(rt2x00dev, EEPROM_LED_ACT_CONF, 0x2221); |
5410 | rt2x00_eeprom_write(rt2x00dev, EEPROM_LED_POLARITY, 0xa9f8); | 5410 | rt2x00_eeprom_write(rt2x00dev, EEPROM_LED_POLARITY, 0xa9f8); |
5411 | EEPROM(rt2x00dev, "Led Mode: 0x%04x\n", word); | 5411 | rt2x00_eeprom_dbg(rt2x00dev, "Led Mode: 0x%04x\n", word); |
5412 | } | 5412 | } |
5413 | 5413 | ||
5414 | /* | 5414 | /* |
@@ -5514,7 +5514,8 @@ static int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
5514 | case RF5592: | 5514 | case RF5592: |
5515 | break; | 5515 | break; |
5516 | default: | 5516 | default: |
5517 | ERROR(rt2x00dev, "Invalid RF chipset 0x%04x detected.\n", rf); | 5517 | rt2x00_err(rt2x00dev, "Invalid RF chipset 0x%04x detected\n", |
5518 | rf); | ||
5518 | return -ENODEV; | 5519 | return -ENODEV; |
5519 | } | 5520 | } |
5520 | 5521 | ||
@@ -6103,9 +6104,8 @@ static int rt2800_probe_rt(struct rt2x00_dev *rt2x00dev) | |||
6103 | case RT5592: | 6104 | case RT5592: |
6104 | break; | 6105 | break; |
6105 | default: | 6106 | default: |
6106 | ERROR(rt2x00dev, | 6107 | rt2x00_err(rt2x00dev, "Invalid RT chipset 0x%04x, rev %04x detected\n", |
6107 | "Invalid RT chipset 0x%04x, rev %04x detected.\n", | 6108 | rt, rev); |
6108 | rt, rev); | ||
6109 | return -ENODEV; | 6109 | return -ENODEV; |
6110 | } | 6110 | } |
6111 | 6111 | ||
@@ -6364,7 +6364,8 @@ int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
6364 | case IEEE80211_AMPDU_TX_OPERATIONAL: | 6364 | case IEEE80211_AMPDU_TX_OPERATIONAL: |
6365 | break; | 6365 | break; |
6366 | default: | 6366 | default: |
6367 | WARNING((struct rt2x00_dev *)hw->priv, "Unknown AMPDU action\n"); | 6367 | rt2x00_warn((struct rt2x00_dev *)hw->priv, |
6368 | "Unknown AMPDU action\n"); | ||
6368 | } | 6369 | } |
6369 | 6370 | ||
6370 | return ret; | 6371 | return ret; |
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index d540ce944cc1..6f4a861af336 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -84,7 +84,7 @@ static void rt2800pci_mcu_status(struct rt2x00_dev *rt2x00dev, const u8 token) | |||
84 | } | 84 | } |
85 | 85 | ||
86 | if (i == 200) | 86 | if (i == 200) |
87 | ERROR(rt2x00dev, "MCU request failed, no response from hardware\n"); | 87 | rt2x00_err(rt2x00dev, "MCU request failed, no response from hardware\n"); |
88 | 88 | ||
89 | rt2x00mmio_register_write(rt2x00dev, H2M_MAILBOX_STATUS, ~0); | 89 | rt2x00mmio_register_write(rt2x00dev, H2M_MAILBOX_STATUS, ~0); |
90 | rt2x00mmio_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0); | 90 | rt2x00mmio_register_write(rt2x00dev, H2M_MAILBOX_CID, ~0); |
@@ -616,8 +616,8 @@ static int rt2800pci_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
616 | } | 616 | } |
617 | 617 | ||
618 | if (unlikely(retval)) | 618 | if (unlikely(retval)) |
619 | ERROR(rt2x00dev, "Device failed to enter state %d (%d).\n", | 619 | rt2x00_err(rt2x00dev, "Device failed to enter state %d (%d)\n", |
620 | state, retval); | 620 | state, retval); |
621 | 621 | ||
622 | return retval; | 622 | return retval; |
623 | } | 623 | } |
@@ -843,8 +843,8 @@ static bool rt2800pci_txdone(struct rt2x00_dev *rt2x00dev) | |||
843 | * Unknown queue, this shouldn't happen. Just drop | 843 | * Unknown queue, this shouldn't happen. Just drop |
844 | * this tx status. | 844 | * this tx status. |
845 | */ | 845 | */ |
846 | WARNING(rt2x00dev, "Got TX status report with " | 846 | rt2x00_warn(rt2x00dev, "Got TX status report with unexpected pid %u, dropping\n", |
847 | "unexpected pid %u, dropping\n", qid); | 847 | qid); |
848 | break; | 848 | break; |
849 | } | 849 | } |
850 | 850 | ||
@@ -854,8 +854,8 @@ static bool rt2800pci_txdone(struct rt2x00_dev *rt2x00dev) | |||
854 | * The queue is NULL, this shouldn't happen. Stop | 854 | * The queue is NULL, this shouldn't happen. Stop |
855 | * processing here and drop the tx status | 855 | * processing here and drop the tx status |
856 | */ | 856 | */ |
857 | WARNING(rt2x00dev, "Got TX status for an unavailable " | 857 | rt2x00_warn(rt2x00dev, "Got TX status for an unavailable queue %u, dropping\n", |
858 | "queue %u, dropping\n", qid); | 858 | qid); |
859 | break; | 859 | break; |
860 | } | 860 | } |
861 | 861 | ||
@@ -864,8 +864,8 @@ static bool rt2800pci_txdone(struct rt2x00_dev *rt2x00dev) | |||
864 | * The queue is empty. Stop processing here | 864 | * The queue is empty. Stop processing here |
865 | * and drop the tx status. | 865 | * and drop the tx status. |
866 | */ | 866 | */ |
867 | WARNING(rt2x00dev, "Got TX status for an empty " | 867 | rt2x00_warn(rt2x00dev, "Got TX status for an empty queue %u, dropping\n", |
868 | "queue %u, dropping\n", qid); | 868 | qid); |
869 | break; | 869 | break; |
870 | } | 870 | } |
871 | 871 | ||
@@ -883,9 +883,8 @@ static bool rt2800pci_txdone(struct rt2x00_dev *rt2x00dev) | |||
883 | if (!rt2x00queue_for_each_entry(queue, Q_INDEX_DONE, | 883 | if (!rt2x00queue_for_each_entry(queue, Q_INDEX_DONE, |
884 | Q_INDEX, &status, | 884 | Q_INDEX, &status, |
885 | rt2800pci_txdone_match_first)) { | 885 | rt2800pci_txdone_match_first)) { |
886 | WARNING(rt2x00dev, "No frame found for TX " | 886 | rt2x00_warn(rt2x00dev, "No frame found for TX status on queue %u, dropping\n", |
887 | "status on queue %u, dropping\n", | 887 | qid); |
888 | qid); | ||
889 | break; | 888 | break; |
890 | } | 889 | } |
891 | } | 890 | } |
@@ -1022,8 +1021,7 @@ static void rt2800pci_txstatus_interrupt(struct rt2x00_dev *rt2x00dev) | |||
1022 | break; | 1021 | break; |
1023 | 1022 | ||
1024 | if (!kfifo_put(&rt2x00dev->txstatus_fifo, &status)) { | 1023 | if (!kfifo_put(&rt2x00dev->txstatus_fifo, &status)) { |
1025 | WARNING(rt2x00dev, "TX status FIFO overrun," | 1024 | rt2x00_warn(rt2x00dev, "TX status FIFO overrun, drop tx status report\n"); |
1026 | "drop tx status report.\n"); | ||
1027 | break; | 1025 | break; |
1028 | } | 1026 | } |
1029 | } | 1027 | } |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 0cb6bbee7f32..ac854d75bd6c 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -128,9 +128,9 @@ static inline bool rt2800usb_entry_txstatus_timeout(struct queue_entry *entry) | |||
128 | 128 | ||
129 | tout = time_after(jiffies, entry->last_action + msecs_to_jiffies(100)); | 129 | tout = time_after(jiffies, entry->last_action + msecs_to_jiffies(100)); |
130 | if (unlikely(tout)) | 130 | if (unlikely(tout)) |
131 | WARNING(entry->queue->rt2x00dev, | 131 | rt2x00_warn(entry->queue->rt2x00dev, |
132 | "TX status timeout for entry %d in queue %d\n", | 132 | "TX status timeout for entry %d in queue %d\n", |
133 | entry->entry_idx, entry->queue->qid); | 133 | entry->entry_idx, entry->queue->qid); |
134 | return tout; | 134 | return tout; |
135 | 135 | ||
136 | } | 136 | } |
@@ -154,7 +154,8 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev, | |||
154 | bool valid; | 154 | bool valid; |
155 | 155 | ||
156 | if (urb_status) { | 156 | if (urb_status) { |
157 | WARNING(rt2x00dev, "TX status read failed %d\n", urb_status); | 157 | rt2x00_warn(rt2x00dev, "TX status read failed %d\n", |
158 | urb_status); | ||
158 | 159 | ||
159 | goto stop_reading; | 160 | goto stop_reading; |
160 | } | 161 | } |
@@ -162,7 +163,7 @@ static bool rt2800usb_tx_sta_fifo_read_completed(struct rt2x00_dev *rt2x00dev, | |||
162 | valid = rt2x00_get_field32(tx_status, TX_STA_FIFO_VALID); | 163 | valid = rt2x00_get_field32(tx_status, TX_STA_FIFO_VALID); |
163 | if (valid) { | 164 | if (valid) { |
164 | if (!kfifo_put(&rt2x00dev->txstatus_fifo, &tx_status)) | 165 | if (!kfifo_put(&rt2x00dev->txstatus_fifo, &tx_status)) |
165 | WARNING(rt2x00dev, "TX status FIFO overrun\n"); | 166 | rt2x00_warn(rt2x00dev, "TX status FIFO overrun\n"); |
166 | 167 | ||
167 | queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work); | 168 | queue_work(rt2x00dev->workqueue, &rt2x00dev->txdone_work); |
168 | 169 | ||
@@ -269,7 +270,7 @@ static int rt2800usb_write_firmware(struct rt2x00_dev *rt2x00dev, | |||
269 | 0, USB_MODE_FIRMWARE, | 270 | 0, USB_MODE_FIRMWARE, |
270 | REGISTER_TIMEOUT_FIRMWARE); | 271 | REGISTER_TIMEOUT_FIRMWARE); |
271 | if (status < 0) { | 272 | if (status < 0) { |
272 | ERROR(rt2x00dev, "Failed to write Firmware to device.\n"); | 273 | rt2x00_err(rt2x00dev, "Failed to write Firmware to device\n"); |
273 | return status; | 274 | return status; |
274 | } | 275 | } |
275 | 276 | ||
@@ -392,8 +393,8 @@ static int rt2800usb_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
392 | } | 393 | } |
393 | 394 | ||
394 | if (unlikely(retval)) | 395 | if (unlikely(retval)) |
395 | ERROR(rt2x00dev, "Device failed to enter state %d (%d).\n", | 396 | rt2x00_err(rt2x00dev, "Device failed to enter state %d (%d)\n", |
396 | state, retval); | 397 | state, retval); |
397 | 398 | ||
398 | return retval; | 399 | return retval; |
399 | } | 400 | } |
@@ -408,8 +409,7 @@ static void rt2800usb_watchdog(struct rt2x00_dev *rt2x00dev) | |||
408 | 409 | ||
409 | rt2x00usb_register_read(rt2x00dev, TXRXQ_PCNT, ®); | 410 | rt2x00usb_register_read(rt2x00dev, TXRXQ_PCNT, ®); |
410 | if (rt2x00_get_field32(reg, TXRXQ_PCNT_TX0Q)) { | 411 | if (rt2x00_get_field32(reg, TXRXQ_PCNT_TX0Q)) { |
411 | WARNING(rt2x00dev, "TX HW queue 0 timed out," | 412 | rt2x00_warn(rt2x00dev, "TX HW queue 0 timed out, invoke forced kick\n"); |
412 | " invoke forced kick\n"); | ||
413 | 413 | ||
414 | rt2x00usb_register_write(rt2x00dev, PBF_CFG, 0xf40012); | 414 | rt2x00usb_register_write(rt2x00dev, PBF_CFG, 0xf40012); |
415 | 415 | ||
@@ -424,8 +424,7 @@ static void rt2800usb_watchdog(struct rt2x00_dev *rt2x00dev) | |||
424 | 424 | ||
425 | rt2x00usb_register_read(rt2x00dev, TXRXQ_PCNT, ®); | 425 | rt2x00usb_register_read(rt2x00dev, TXRXQ_PCNT, ®); |
426 | if (rt2x00_get_field32(reg, TXRXQ_PCNT_TX1Q)) { | 426 | if (rt2x00_get_field32(reg, TXRXQ_PCNT_TX1Q)) { |
427 | WARNING(rt2x00dev, "TX HW queue 1 timed out," | 427 | rt2x00_warn(rt2x00dev, "TX HW queue 1 timed out, invoke forced kick\n"); |
428 | " invoke forced kick\n"); | ||
429 | 428 | ||
430 | rt2x00usb_register_write(rt2x00dev, PBF_CFG, 0xf4000a); | 429 | rt2x00usb_register_write(rt2x00dev, PBF_CFG, 0xf4000a); |
431 | 430 | ||
@@ -540,9 +539,9 @@ rt2800usb_txdone_entry_check(struct queue_entry *entry, u32 reg) | |||
540 | tx_pid = rt2x00_get_field32(word, TXWI_W1_PACKETID); | 539 | tx_pid = rt2x00_get_field32(word, TXWI_W1_PACKETID); |
541 | 540 | ||
542 | if (wcid != tx_wcid || ack != tx_ack || (!is_agg && pid != tx_pid)) { | 541 | if (wcid != tx_wcid || ack != tx_ack || (!is_agg && pid != tx_pid)) { |
543 | DEBUG(entry->queue->rt2x00dev, | 542 | rt2x00_dbg(entry->queue->rt2x00dev, |
544 | "TX status report missed for queue %d entry %d\n", | 543 | "TX status report missed for queue %d entry %d\n", |
545 | entry->queue->qid, entry->entry_idx); | 544 | entry->queue->qid, entry->entry_idx); |
546 | return TXDONE_UNKNOWN; | 545 | return TXDONE_UNKNOWN; |
547 | } | 546 | } |
548 | 547 | ||
@@ -566,8 +565,8 @@ static void rt2800usb_txdone(struct rt2x00_dev *rt2x00dev) | |||
566 | queue = rt2x00queue_get_tx_queue(rt2x00dev, qid); | 565 | queue = rt2x00queue_get_tx_queue(rt2x00dev, qid); |
567 | 566 | ||
568 | if (unlikely(rt2x00queue_empty(queue))) { | 567 | if (unlikely(rt2x00queue_empty(queue))) { |
569 | WARNING(rt2x00dev, "Got TX status for an empty " | 568 | rt2x00_warn(rt2x00dev, "Got TX status for an empty queue %u, dropping\n", |
570 | "queue %u, dropping\n", qid); | 569 | qid); |
571 | break; | 570 | break; |
572 | } | 571 | } |
573 | 572 | ||
@@ -575,8 +574,8 @@ static void rt2800usb_txdone(struct rt2x00_dev *rt2x00dev) | |||
575 | 574 | ||
576 | if (unlikely(test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags) || | 575 | if (unlikely(test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags) || |
577 | !test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags))) { | 576 | !test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags))) { |
578 | WARNING(rt2x00dev, "Data pending for entry %u " | 577 | rt2x00_warn(rt2x00dev, "Data pending for entry %u in queue %u\n", |
579 | "in queue %u\n", entry->entry_idx, qid); | 578 | entry->entry_idx, qid); |
580 | break; | 579 | break; |
581 | } | 580 | } |
582 | 581 | ||
@@ -677,8 +676,8 @@ static void rt2800usb_fill_rxdone(struct queue_entry *entry, | |||
677 | */ | 676 | */ |
678 | if (unlikely(rx_pkt_len == 0 || | 677 | if (unlikely(rx_pkt_len == 0 || |
679 | rx_pkt_len > entry->queue->data_size)) { | 678 | rx_pkt_len > entry->queue->data_size)) { |
680 | ERROR(entry->queue->rt2x00dev, | 679 | rt2x00_err(entry->queue->rt2x00dev, |
681 | "Bad frame size %d, forcing to 0\n", rx_pkt_len); | 680 | "Bad frame size %d, forcing to 0\n", rx_pkt_len); |
682 | return; | 681 | return; |
683 | } | 682 | } |
684 | 683 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 0d02d16ca166..7510723a8c37 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -54,47 +54,36 @@ | |||
54 | #define DRV_VERSION "2.3.0" | 54 | #define DRV_VERSION "2.3.0" |
55 | #define DRV_PROJECT "http://rt2x00.serialmonkey.com" | 55 | #define DRV_PROJECT "http://rt2x00.serialmonkey.com" |
56 | 56 | ||
57 | /* | 57 | /* Debug definitions. |
58 | * Debug definitions. | ||
59 | * Debug output has to be enabled during compile time. | 58 | * Debug output has to be enabled during compile time. |
60 | */ | 59 | */ |
61 | #define DEBUG_PRINTK_MSG(__dev, __kernlvl, __lvl, __msg, __args...) \ | ||
62 | printk(__kernlvl "%s -> %s: %s - " __msg, \ | ||
63 | wiphy_name((__dev)->hw->wiphy), __func__, __lvl, ##__args) | ||
64 | |||
65 | #define DEBUG_PRINTK_PROBE(__kernlvl, __lvl, __msg, __args...) \ | ||
66 | printk(__kernlvl "%s -> %s: %s - " __msg, \ | ||
67 | KBUILD_MODNAME, __func__, __lvl, ##__args) | ||
68 | |||
69 | #ifdef CONFIG_RT2X00_DEBUG | 60 | #ifdef CONFIG_RT2X00_DEBUG |
70 | #define DEBUG_PRINTK(__dev, __kernlvl, __lvl, __msg, __args...) \ | 61 | #define DEBUG |
71 | DEBUG_PRINTK_MSG(__dev, __kernlvl, __lvl, __msg, ##__args) | ||
72 | #else | ||
73 | #define DEBUG_PRINTK(__dev, __kernlvl, __lvl, __msg, __args...) \ | ||
74 | do { } while (0) | ||
75 | #endif /* CONFIG_RT2X00_DEBUG */ | 62 | #endif /* CONFIG_RT2X00_DEBUG */ |
76 | 63 | ||
77 | /* | 64 | /* Utility printing macros |
78 | * Various debug levels. | 65 | * rt2x00_probe_err is for messages when rt2x00_dev is uninitialized |
79 | * The debug levels PANIC and ERROR both indicate serious problems, | ||
80 | * for this reason they should never be ignored. | ||
81 | * The special ERROR_PROBE message is for messages that are generated | ||
82 | * when the rt2x00_dev is not yet initialized. | ||
83 | */ | 66 | */ |
84 | #define PANIC(__dev, __msg, __args...) \ | 67 | #define rt2x00_probe_err(fmt, ...) \ |
85 | DEBUG_PRINTK_MSG(__dev, KERN_CRIT, "Panic", __msg, ##__args) | 68 | printk(KERN_ERR KBUILD_MODNAME ": %s: Error - " fmt, \ |
86 | #define ERROR(__dev, __msg, __args...) \ | 69 | __func__, ##__VA_ARGS__) |
87 | DEBUG_PRINTK_MSG(__dev, KERN_ERR, "Error", __msg, ##__args) | 70 | #define rt2x00_err(dev, fmt, ...) \ |
88 | #define ERROR_PROBE(__msg, __args...) \ | 71 | wiphy_err((dev)->hw->wiphy, "%s: Error - " fmt, \ |
89 | DEBUG_PRINTK_PROBE(KERN_ERR, "Error", __msg, ##__args) | 72 | __func__, ##__VA_ARGS__) |
90 | #define WARNING(__dev, __msg, __args...) \ | 73 | #define rt2x00_warn(dev, fmt, ...) \ |
91 | DEBUG_PRINTK_MSG(__dev, KERN_WARNING, "Warning", __msg, ##__args) | 74 | wiphy_warn((dev)->hw->wiphy, "%s: Warning - " fmt, \ |
92 | #define INFO(__dev, __msg, __args...) \ | 75 | __func__, ##__VA_ARGS__) |
93 | DEBUG_PRINTK_MSG(__dev, KERN_INFO, "Info", __msg, ##__args) | 76 | #define rt2x00_info(dev, fmt, ...) \ |
94 | #define DEBUG(__dev, __msg, __args...) \ | 77 | wiphy_info((dev)->hw->wiphy, "%s: Info - " fmt, \ |
95 | DEBUG_PRINTK(__dev, KERN_DEBUG, "Debug", __msg, ##__args) | 78 | __func__, ##__VA_ARGS__) |
96 | #define EEPROM(__dev, __msg, __args...) \ | 79 | |
97 | DEBUG_PRINTK(__dev, KERN_DEBUG, "EEPROM recovery", __msg, ##__args) | 80 | /* Various debug levels */ |
81 | #define rt2x00_dbg(dev, fmt, ...) \ | ||
82 | wiphy_dbg((dev)->hw->wiphy, "%s: Debug - " fmt, \ | ||
83 | __func__, ##__VA_ARGS__) | ||
84 | #define rt2x00_eeprom_dbg(dev, fmt, ...) \ | ||
85 | wiphy_dbg((dev)->hw->wiphy, "%s: EEPROM recovery - " fmt, \ | ||
86 | __func__, ##__VA_ARGS__) | ||
98 | 87 | ||
99 | /* | 88 | /* |
100 | * Duration calculations | 89 | * Duration calculations |
@@ -1101,9 +1090,9 @@ static inline void rt2x00_set_chip(struct rt2x00_dev *rt2x00dev, | |||
1101 | rt2x00dev->chip.rf = rf; | 1090 | rt2x00dev->chip.rf = rf; |
1102 | rt2x00dev->chip.rev = rev; | 1091 | rt2x00dev->chip.rev = rev; |
1103 | 1092 | ||
1104 | INFO(rt2x00dev, | 1093 | rt2x00_info(rt2x00dev, "Chipset detected - rt: %04x, rf: %04x, rev: %04x\n", |
1105 | "Chipset detected - rt: %04x, rf: %04x, rev: %04x.\n", | 1094 | rt2x00dev->chip.rt, rt2x00dev->chip.rf, |
1106 | rt2x00dev->chip.rt, rt2x00dev->chip.rf, rt2x00dev->chip.rev); | 1095 | rt2x00dev->chip.rev); |
1107 | } | 1096 | } |
1108 | 1097 | ||
1109 | static inline void rt2x00_set_rt(struct rt2x00_dev *rt2x00dev, | 1098 | static inline void rt2x00_set_rt(struct rt2x00_dev *rt2x00dev, |
@@ -1112,15 +1101,16 @@ static inline void rt2x00_set_rt(struct rt2x00_dev *rt2x00dev, | |||
1112 | rt2x00dev->chip.rt = rt; | 1101 | rt2x00dev->chip.rt = rt; |
1113 | rt2x00dev->chip.rev = rev; | 1102 | rt2x00dev->chip.rev = rev; |
1114 | 1103 | ||
1115 | INFO(rt2x00dev, "RT chipset %04x, rev %04x detected\n", | 1104 | rt2x00_info(rt2x00dev, "RT chipset %04x, rev %04x detected\n", |
1116 | rt2x00dev->chip.rt, rt2x00dev->chip.rev); | 1105 | rt2x00dev->chip.rt, rt2x00dev->chip.rev); |
1117 | } | 1106 | } |
1118 | 1107 | ||
1119 | static inline void rt2x00_set_rf(struct rt2x00_dev *rt2x00dev, const u16 rf) | 1108 | static inline void rt2x00_set_rf(struct rt2x00_dev *rt2x00dev, const u16 rf) |
1120 | { | 1109 | { |
1121 | rt2x00dev->chip.rf = rf; | 1110 | rt2x00dev->chip.rf = rf; |
1122 | 1111 | ||
1123 | INFO(rt2x00dev, "RF chipset %04x detected\n", rt2x00dev->chip.rf); | 1112 | rt2x00_info(rt2x00dev, "RF chipset %04x detected\n", |
1113 | rt2x00dev->chip.rf); | ||
1124 | } | 1114 | } |
1125 | 1115 | ||
1126 | static inline bool rt2x00_rt(struct rt2x00_dev *rt2x00dev, const u16 rt) | 1116 | static inline bool rt2x00_rt(struct rt2x00_dev *rt2x00dev, const u16 rt) |
diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c index 3bb8cafbac59..fe7a7f63a9ed 100644 --- a/drivers/net/wireless/rt2x00/rt2x00debug.c +++ b/drivers/net/wireless/rt2x00/rt2x00debug.c | |||
@@ -174,7 +174,7 @@ void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, | |||
174 | do_gettimeofday(×tamp); | 174 | do_gettimeofday(×tamp); |
175 | 175 | ||
176 | if (skb_queue_len(&intf->frame_dump_skbqueue) > 20) { | 176 | if (skb_queue_len(&intf->frame_dump_skbqueue) > 20) { |
177 | DEBUG(rt2x00dev, "txrx dump queue length exceeded.\n"); | 177 | rt2x00_dbg(rt2x00dev, "txrx dump queue length exceeded\n"); |
178 | return; | 178 | return; |
179 | } | 179 | } |
180 | 180 | ||
@@ -185,7 +185,7 @@ void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, | |||
185 | skbcopy = alloc_skb(sizeof(*dump_hdr) + skbdesc->desc_len + data_len, | 185 | skbcopy = alloc_skb(sizeof(*dump_hdr) + skbdesc->desc_len + data_len, |
186 | GFP_ATOMIC); | 186 | GFP_ATOMIC); |
187 | if (!skbcopy) { | 187 | if (!skbcopy) { |
188 | DEBUG(rt2x00dev, "Failed to copy skb for dump.\n"); | 188 | rt2x00_dbg(rt2x00dev, "Failed to copy skb for dump\n"); |
189 | return; | 189 | return; |
190 | } | 190 | } |
191 | 191 | ||
@@ -657,7 +657,7 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) | |||
657 | 657 | ||
658 | intf = kzalloc(sizeof(struct rt2x00debug_intf), GFP_KERNEL); | 658 | intf = kzalloc(sizeof(struct rt2x00debug_intf), GFP_KERNEL); |
659 | if (!intf) { | 659 | if (!intf) { |
660 | ERROR(rt2x00dev, "Failed to allocate debug handler.\n"); | 660 | rt2x00_err(rt2x00dev, "Failed to allocate debug handler\n"); |
661 | return; | 661 | return; |
662 | } | 662 | } |
663 | 663 | ||
@@ -760,7 +760,7 @@ void rt2x00debug_register(struct rt2x00_dev *rt2x00dev) | |||
760 | 760 | ||
761 | exit: | 761 | exit: |
762 | rt2x00debug_deregister(rt2x00dev); | 762 | rt2x00debug_deregister(rt2x00dev); |
763 | ERROR(rt2x00dev, "Failed to register debug handler.\n"); | 763 | rt2x00_err(rt2x00dev, "Failed to register debug handler\n"); |
764 | } | 764 | } |
765 | 765 | ||
766 | void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev) | 766 | void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev) |
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 189744db65e0..90dc14336980 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -171,7 +171,7 @@ static void rt2x00lib_autowakeup(struct work_struct *work) | |||
171 | return; | 171 | return; |
172 | 172 | ||
173 | if (rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_AWAKE)) | 173 | if (rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_AWAKE)) |
174 | ERROR(rt2x00dev, "Device failed to wakeup.\n"); | 174 | rt2x00_err(rt2x00dev, "Device failed to wakeup\n"); |
175 | clear_bit(CONFIG_POWERSAVING, &rt2x00dev->flags); | 175 | clear_bit(CONFIG_POWERSAVING, &rt2x00dev->flags); |
176 | } | 176 | } |
177 | 177 | ||
@@ -673,9 +673,8 @@ static int rt2x00lib_rxdone_read_signal(struct rt2x00_dev *rt2x00dev, | |||
673 | break; | 673 | break; |
674 | } | 674 | } |
675 | 675 | ||
676 | WARNING(rt2x00dev, "Frame received with unrecognized signal, " | 676 | rt2x00_warn(rt2x00dev, "Frame received with unrecognized signal, mode=0x%.4x, signal=0x%.4x, type=%d\n", |
677 | "mode=0x%.4x, signal=0x%.4x, type=%d.\n", | 677 | rxdesc->rate_mode, signal, type); |
678 | rxdesc->rate_mode, signal, type); | ||
679 | return 0; | 678 | return 0; |
680 | } | 679 | } |
681 | 680 | ||
@@ -720,8 +719,8 @@ void rt2x00lib_rxdone(struct queue_entry *entry, gfp_t gfp) | |||
720 | */ | 719 | */ |
721 | if (unlikely(rxdesc.size == 0 || | 720 | if (unlikely(rxdesc.size == 0 || |
722 | rxdesc.size > entry->queue->data_size)) { | 721 | rxdesc.size > entry->queue->data_size)) { |
723 | ERROR(rt2x00dev, "Wrong frame size %d max %d.\n", | 722 | rt2x00_err(rt2x00dev, "Wrong frame size %d max %d\n", |
724 | rxdesc.size, entry->queue->data_size); | 723 | rxdesc.size, entry->queue->data_size); |
725 | dev_kfree_skb(entry->skb); | 724 | dev_kfree_skb(entry->skb); |
726 | goto renew_skb; | 725 | goto renew_skb; |
727 | } | 726 | } |
@@ -1006,7 +1005,7 @@ static int rt2x00lib_probe_hw_modes(struct rt2x00_dev *rt2x00dev, | |||
1006 | 1005 | ||
1007 | exit_free_channels: | 1006 | exit_free_channels: |
1008 | kfree(channels); | 1007 | kfree(channels); |
1009 | ERROR(rt2x00dev, "Allocation ieee80211 modes failed.\n"); | 1008 | rt2x00_err(rt2x00dev, "Allocation ieee80211 modes failed\n"); |
1010 | return -ENOMEM; | 1009 | return -ENOMEM; |
1011 | } | 1010 | } |
1012 | 1011 | ||
@@ -1337,7 +1336,7 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev) | |||
1337 | */ | 1336 | */ |
1338 | retval = rt2x00dev->ops->lib->probe_hw(rt2x00dev); | 1337 | retval = rt2x00dev->ops->lib->probe_hw(rt2x00dev); |
1339 | if (retval) { | 1338 | if (retval) { |
1340 | ERROR(rt2x00dev, "Failed to allocate device.\n"); | 1339 | rt2x00_err(rt2x00dev, "Failed to allocate device\n"); |
1341 | goto exit; | 1340 | goto exit; |
1342 | } | 1341 | } |
1343 | 1342 | ||
@@ -1353,7 +1352,7 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev) | |||
1353 | */ | 1352 | */ |
1354 | retval = rt2x00lib_probe_hw(rt2x00dev); | 1353 | retval = rt2x00lib_probe_hw(rt2x00dev); |
1355 | if (retval) { | 1354 | if (retval) { |
1356 | ERROR(rt2x00dev, "Failed to initialize hw.\n"); | 1355 | rt2x00_err(rt2x00dev, "Failed to initialize hw\n"); |
1357 | goto exit; | 1356 | goto exit; |
1358 | } | 1357 | } |
1359 | 1358 | ||
@@ -1451,7 +1450,7 @@ EXPORT_SYMBOL_GPL(rt2x00lib_remove_dev); | |||
1451 | #ifdef CONFIG_PM | 1450 | #ifdef CONFIG_PM |
1452 | int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev, pm_message_t state) | 1451 | int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev, pm_message_t state) |
1453 | { | 1452 | { |
1454 | DEBUG(rt2x00dev, "Going to sleep.\n"); | 1453 | rt2x00_dbg(rt2x00dev, "Going to sleep\n"); |
1455 | 1454 | ||
1456 | /* | 1455 | /* |
1457 | * Prevent mac80211 from accessing driver while suspended. | 1456 | * Prevent mac80211 from accessing driver while suspended. |
@@ -1482,8 +1481,7 @@ int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev, pm_message_t state) | |||
1482 | * device is as good as disabled. | 1481 | * device is as good as disabled. |
1483 | */ | 1482 | */ |
1484 | if (rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_SLEEP)) | 1483 | if (rt2x00dev->ops->lib->set_device_state(rt2x00dev, STATE_SLEEP)) |
1485 | WARNING(rt2x00dev, "Device failed to enter sleep state, " | 1484 | rt2x00_warn(rt2x00dev, "Device failed to enter sleep state, continue suspending\n"); |
1486 | "continue suspending.\n"); | ||
1487 | 1485 | ||
1488 | return 0; | 1486 | return 0; |
1489 | } | 1487 | } |
@@ -1491,7 +1489,7 @@ EXPORT_SYMBOL_GPL(rt2x00lib_suspend); | |||
1491 | 1489 | ||
1492 | int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev) | 1490 | int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev) |
1493 | { | 1491 | { |
1494 | DEBUG(rt2x00dev, "Waking up.\n"); | 1492 | rt2x00_dbg(rt2x00dev, "Waking up\n"); |
1495 | 1493 | ||
1496 | /* | 1494 | /* |
1497 | * Restore/enable extra components. | 1495 | * Restore/enable extra components. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00firmware.c b/drivers/net/wireless/rt2x00/rt2x00firmware.c index f316aad30612..1b4254b4272d 100644 --- a/drivers/net/wireless/rt2x00/rt2x00firmware.c +++ b/drivers/net/wireless/rt2x00/rt2x00firmware.c | |||
@@ -42,28 +42,28 @@ static int rt2x00lib_request_firmware(struct rt2x00_dev *rt2x00dev) | |||
42 | */ | 42 | */ |
43 | fw_name = rt2x00dev->ops->lib->get_firmware_name(rt2x00dev); | 43 | fw_name = rt2x00dev->ops->lib->get_firmware_name(rt2x00dev); |
44 | if (!fw_name) { | 44 | if (!fw_name) { |
45 | ERROR(rt2x00dev, | 45 | rt2x00_err(rt2x00dev, |
46 | "Invalid firmware filename.\n" | 46 | "Invalid firmware filename\n" |
47 | "Please file bug report to %s.\n", DRV_PROJECT); | 47 | "Please file bug report to %s\n", DRV_PROJECT); |
48 | return -EINVAL; | 48 | return -EINVAL; |
49 | } | 49 | } |
50 | 50 | ||
51 | INFO(rt2x00dev, "Loading firmware file '%s'.\n", fw_name); | 51 | rt2x00_info(rt2x00dev, "Loading firmware file '%s'\n", fw_name); |
52 | 52 | ||
53 | retval = request_firmware(&fw, fw_name, device); | 53 | retval = request_firmware(&fw, fw_name, device); |
54 | if (retval) { | 54 | if (retval) { |
55 | ERROR(rt2x00dev, "Failed to request Firmware.\n"); | 55 | rt2x00_err(rt2x00dev, "Failed to request Firmware\n"); |
56 | return retval; | 56 | return retval; |
57 | } | 57 | } |
58 | 58 | ||
59 | if (!fw || !fw->size || !fw->data) { | 59 | if (!fw || !fw->size || !fw->data) { |
60 | ERROR(rt2x00dev, "Failed to read Firmware.\n"); | 60 | rt2x00_err(rt2x00dev, "Failed to read Firmware\n"); |
61 | release_firmware(fw); | 61 | release_firmware(fw); |
62 | return -ENOENT; | 62 | return -ENOENT; |
63 | } | 63 | } |
64 | 64 | ||
65 | INFO(rt2x00dev, "Firmware detected - version: %d.%d.\n", | 65 | rt2x00_info(rt2x00dev, "Firmware detected - version: %d.%d\n", |
66 | fw->data[fw->size - 4], fw->data[fw->size - 3]); | 66 | fw->data[fw->size - 4], fw->data[fw->size - 3]); |
67 | snprintf(rt2x00dev->hw->wiphy->fw_version, | 67 | snprintf(rt2x00dev->hw->wiphy->fw_version, |
68 | sizeof(rt2x00dev->hw->wiphy->fw_version), "%d.%d", | 68 | sizeof(rt2x00dev->hw->wiphy->fw_version), "%d.%d", |
69 | fw->data[fw->size - 4], fw->data[fw->size - 3]); | 69 | fw->data[fw->size - 4], fw->data[fw->size - 3]); |
@@ -73,15 +73,14 @@ static int rt2x00lib_request_firmware(struct rt2x00_dev *rt2x00dev) | |||
73 | case FW_OK: | 73 | case FW_OK: |
74 | break; | 74 | break; |
75 | case FW_BAD_CRC: | 75 | case FW_BAD_CRC: |
76 | ERROR(rt2x00dev, "Firmware checksum error.\n"); | 76 | rt2x00_err(rt2x00dev, "Firmware checksum error\n"); |
77 | goto exit; | 77 | goto exit; |
78 | case FW_BAD_LENGTH: | 78 | case FW_BAD_LENGTH: |
79 | ERROR(rt2x00dev, | 79 | rt2x00_err(rt2x00dev, "Invalid firmware file length (len=%zu)\n", |
80 | "Invalid firmware file length (len=%zu)\n", fw->size); | 80 | fw->size); |
81 | goto exit; | 81 | goto exit; |
82 | case FW_BAD_VERSION: | 82 | case FW_BAD_VERSION: |
83 | ERROR(rt2x00dev, | 83 | rt2x00_err(rt2x00dev, "Current firmware does not support detected chipset\n"); |
84 | "Current firmware does not support detected chipset.\n"); | ||
85 | goto exit; | 84 | goto exit; |
86 | } | 85 | } |
87 | 86 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00leds.c b/drivers/net/wireless/rt2x00/rt2x00leds.c index 8679d781a264..997a6c89e66e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00leds.c +++ b/drivers/net/wireless/rt2x00/rt2x00leds.c | |||
@@ -113,7 +113,7 @@ static int rt2x00leds_register_led(struct rt2x00_dev *rt2x00dev, | |||
113 | 113 | ||
114 | retval = led_classdev_register(device, &led->led_dev); | 114 | retval = led_classdev_register(device, &led->led_dev); |
115 | if (retval) { | 115 | if (retval) { |
116 | ERROR(rt2x00dev, "Failed to register led handler.\n"); | 116 | rt2x00_err(rt2x00dev, "Failed to register led handler\n"); |
117 | return retval; | 117 | return retval; |
118 | } | 118 | } |
119 | 119 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c index 9161c02d8ff9..f883802f3505 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c | |||
@@ -46,7 +46,7 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, | |||
46 | 46 | ||
47 | skb = dev_alloc_skb(data_length + rt2x00dev->hw->extra_tx_headroom); | 47 | skb = dev_alloc_skb(data_length + rt2x00dev->hw->extra_tx_headroom); |
48 | if (unlikely(!skb)) { | 48 | if (unlikely(!skb)) { |
49 | WARNING(rt2x00dev, "Failed to create RTS/CTS frame.\n"); | 49 | rt2x00_warn(rt2x00dev, "Failed to create RTS/CTS frame\n"); |
50 | return -ENOMEM; | 50 | return -ENOMEM; |
51 | } | 51 | } |
52 | 52 | ||
@@ -93,7 +93,7 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, | |||
93 | retval = rt2x00queue_write_tx_frame(queue, skb, true); | 93 | retval = rt2x00queue_write_tx_frame(queue, skb, true); |
94 | if (retval) { | 94 | if (retval) { |
95 | dev_kfree_skb_any(skb); | 95 | dev_kfree_skb_any(skb); |
96 | WARNING(rt2x00dev, "Failed to send RTS/CTS frame.\n"); | 96 | rt2x00_warn(rt2x00dev, "Failed to send RTS/CTS frame\n"); |
97 | } | 97 | } |
98 | 98 | ||
99 | return retval; | 99 | return retval; |
@@ -126,9 +126,9 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, | |||
126 | 126 | ||
127 | queue = rt2x00queue_get_tx_queue(rt2x00dev, qid); | 127 | queue = rt2x00queue_get_tx_queue(rt2x00dev, qid); |
128 | if (unlikely(!queue)) { | 128 | if (unlikely(!queue)) { |
129 | ERROR(rt2x00dev, | 129 | rt2x00_err(rt2x00dev, |
130 | "Attempt to send packet over invalid queue %d.\n" | 130 | "Attempt to send packet over invalid queue %d\n" |
131 | "Please file bug report to %s.\n", qid, DRV_PROJECT); | 131 | "Please file bug report to %s\n", qid, DRV_PROJECT); |
132 | goto exit_free_skb; | 132 | goto exit_free_skb; |
133 | } | 133 | } |
134 | 134 | ||
@@ -731,9 +731,10 @@ int rt2x00mac_conf_tx(struct ieee80211_hw *hw, | |||
731 | queue->aifs = params->aifs; | 731 | queue->aifs = params->aifs; |
732 | queue->txop = params->txop; | 732 | queue->txop = params->txop; |
733 | 733 | ||
734 | DEBUG(rt2x00dev, | 734 | rt2x00_dbg(rt2x00dev, |
735 | "Configured TX queue %d - CWmin: %d, CWmax: %d, Aifs: %d, TXop: %d.\n", | 735 | "Configured TX queue %d - CWmin: %d, CWmax: %d, Aifs: %d, TXop: %d\n", |
736 | queue_idx, queue->cw_min, queue->cw_max, queue->aifs, queue->txop); | 736 | queue_idx, queue->cw_min, queue->cw_max, queue->aifs, |
737 | queue->txop); | ||
737 | 738 | ||
738 | return 0; | 739 | return 0; |
739 | } | 740 | } |
diff --git a/drivers/net/wireless/rt2x00/rt2x00mmio.c b/drivers/net/wireless/rt2x00/rt2x00mmio.c index 06c766930b15..64b06c6abe58 100644 --- a/drivers/net/wireless/rt2x00/rt2x00mmio.c +++ b/drivers/net/wireless/rt2x00/rt2x00mmio.c | |||
@@ -175,8 +175,8 @@ int rt2x00mmio_initialize(struct rt2x00_dev *rt2x00dev) | |||
175 | rt2x00dev->ops->lib->irq_handler, | 175 | rt2x00dev->ops->lib->irq_handler, |
176 | IRQF_SHARED, rt2x00dev->name, rt2x00dev); | 176 | IRQF_SHARED, rt2x00dev->name, rt2x00dev); |
177 | if (status) { | 177 | if (status) { |
178 | ERROR(rt2x00dev, "IRQ %d allocation failed (error %d).\n", | 178 | rt2x00_err(rt2x00dev, "IRQ %d allocation failed (error %d)\n", |
179 | rt2x00dev->irq, status); | 179 | rt2x00dev->irq, status); |
180 | goto exit; | 180 | goto exit; |
181 | } | 181 | } |
182 | 182 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index e87865e33113..dc49e525ae5e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -68,7 +68,7 @@ static int rt2x00pci_alloc_reg(struct rt2x00_dev *rt2x00dev) | |||
68 | return 0; | 68 | return 0; |
69 | 69 | ||
70 | exit: | 70 | exit: |
71 | ERROR_PROBE("Failed to allocate registers.\n"); | 71 | rt2x00_probe_err("Failed to allocate registers\n"); |
72 | 72 | ||
73 | rt2x00pci_free_reg(rt2x00dev); | 73 | rt2x00pci_free_reg(rt2x00dev); |
74 | 74 | ||
@@ -84,30 +84,30 @@ int rt2x00pci_probe(struct pci_dev *pci_dev, const struct rt2x00_ops *ops) | |||
84 | 84 | ||
85 | retval = pci_enable_device(pci_dev); | 85 | retval = pci_enable_device(pci_dev); |
86 | if (retval) { | 86 | if (retval) { |
87 | ERROR_PROBE("Enable device failed.\n"); | 87 | rt2x00_probe_err("Enable device failed\n"); |
88 | return retval; | 88 | return retval; |
89 | } | 89 | } |
90 | 90 | ||
91 | retval = pci_request_regions(pci_dev, pci_name(pci_dev)); | 91 | retval = pci_request_regions(pci_dev, pci_name(pci_dev)); |
92 | if (retval) { | 92 | if (retval) { |
93 | ERROR_PROBE("PCI request regions failed.\n"); | 93 | rt2x00_probe_err("PCI request regions failed\n"); |
94 | goto exit_disable_device; | 94 | goto exit_disable_device; |
95 | } | 95 | } |
96 | 96 | ||
97 | pci_set_master(pci_dev); | 97 | pci_set_master(pci_dev); |
98 | 98 | ||
99 | if (pci_set_mwi(pci_dev)) | 99 | if (pci_set_mwi(pci_dev)) |
100 | ERROR_PROBE("MWI not available.\n"); | 100 | rt2x00_probe_err("MWI not available\n"); |
101 | 101 | ||
102 | if (dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(32))) { | 102 | if (dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(32))) { |
103 | ERROR_PROBE("PCI DMA not supported.\n"); | 103 | rt2x00_probe_err("PCI DMA not supported\n"); |
104 | retval = -EIO; | 104 | retval = -EIO; |
105 | goto exit_release_regions; | 105 | goto exit_release_regions; |
106 | } | 106 | } |
107 | 107 | ||
108 | hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw); | 108 | hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw); |
109 | if (!hw) { | 109 | if (!hw) { |
110 | ERROR_PROBE("Failed to allocate hardware.\n"); | 110 | rt2x00_probe_err("Failed to allocate hardware\n"); |
111 | retval = -ENOMEM; | 111 | retval = -ENOMEM; |
112 | goto exit_release_regions; | 112 | goto exit_release_regions; |
113 | } | 113 | } |
@@ -207,7 +207,7 @@ int rt2x00pci_resume(struct pci_dev *pci_dev) | |||
207 | 207 | ||
208 | if (pci_set_power_state(pci_dev, PCI_D0) || | 208 | if (pci_set_power_state(pci_dev, PCI_D0) || |
209 | pci_enable_device(pci_dev)) { | 209 | pci_enable_device(pci_dev)) { |
210 | ERROR(rt2x00dev, "Failed to resume device.\n"); | 210 | rt2x00_err(rt2x00dev, "Failed to resume device\n"); |
211 | return -EIO; | 211 | return -EIO; |
212 | } | 212 | } |
213 | 213 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index d2f894ef3a2d..2c12311467a9 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -532,10 +532,10 @@ static int rt2x00queue_write_tx_data(struct queue_entry *entry, | |||
532 | */ | 532 | */ |
533 | if (unlikely(rt2x00dev->ops->lib->get_entry_state && | 533 | if (unlikely(rt2x00dev->ops->lib->get_entry_state && |
534 | rt2x00dev->ops->lib->get_entry_state(entry))) { | 534 | rt2x00dev->ops->lib->get_entry_state(entry))) { |
535 | ERROR(rt2x00dev, | 535 | rt2x00_err(rt2x00dev, |
536 | "Corrupt queue %d, accessing entry which is not ours.\n" | 536 | "Corrupt queue %d, accessing entry which is not ours\n" |
537 | "Please file bug report to %s.\n", | 537 | "Please file bug report to %s\n", |
538 | entry->queue->qid, DRV_PROJECT); | 538 | entry->queue->qid, DRV_PROJECT); |
539 | return -EINVAL; | 539 | return -EINVAL; |
540 | } | 540 | } |
541 | 541 | ||
@@ -699,8 +699,8 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb, | |||
699 | spin_lock(&queue->tx_lock); | 699 | spin_lock(&queue->tx_lock); |
700 | 700 | ||
701 | if (unlikely(rt2x00queue_full(queue))) { | 701 | if (unlikely(rt2x00queue_full(queue))) { |
702 | ERROR(queue->rt2x00dev, | 702 | rt2x00_err(queue->rt2x00dev, "Dropping frame due to full tx queue %d\n", |
703 | "Dropping frame due to full tx queue %d.\n", queue->qid); | 703 | queue->qid); |
704 | ret = -ENOBUFS; | 704 | ret = -ENOBUFS; |
705 | goto out; | 705 | goto out; |
706 | } | 706 | } |
@@ -709,10 +709,10 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb, | |||
709 | 709 | ||
710 | if (unlikely(test_and_set_bit(ENTRY_OWNER_DEVICE_DATA, | 710 | if (unlikely(test_and_set_bit(ENTRY_OWNER_DEVICE_DATA, |
711 | &entry->flags))) { | 711 | &entry->flags))) { |
712 | ERROR(queue->rt2x00dev, | 712 | rt2x00_err(queue->rt2x00dev, |
713 | "Arrived at non-free entry in the non-full queue %d.\n" | 713 | "Arrived at non-free entry in the non-full queue %d\n" |
714 | "Please file bug report to %s.\n", | 714 | "Please file bug report to %s\n", |
715 | queue->qid, DRV_PROJECT); | 715 | queue->qid, DRV_PROJECT); |
716 | ret = -EINVAL; | 716 | ret = -EINVAL; |
717 | goto out; | 717 | goto out; |
718 | } | 718 | } |
@@ -843,9 +843,9 @@ bool rt2x00queue_for_each_entry(struct data_queue *queue, | |||
843 | unsigned int i; | 843 | unsigned int i; |
844 | 844 | ||
845 | if (unlikely(start >= Q_INDEX_MAX || end >= Q_INDEX_MAX)) { | 845 | if (unlikely(start >= Q_INDEX_MAX || end >= Q_INDEX_MAX)) { |
846 | ERROR(queue->rt2x00dev, | 846 | rt2x00_err(queue->rt2x00dev, |
847 | "Entry requested from invalid index range (%d - %d)\n", | 847 | "Entry requested from invalid index range (%d - %d)\n", |
848 | start, end); | 848 | start, end); |
849 | return true; | 849 | return true; |
850 | } | 850 | } |
851 | 851 | ||
@@ -892,8 +892,8 @@ struct queue_entry *rt2x00queue_get_entry(struct data_queue *queue, | |||
892 | unsigned long irqflags; | 892 | unsigned long irqflags; |
893 | 893 | ||
894 | if (unlikely(index >= Q_INDEX_MAX)) { | 894 | if (unlikely(index >= Q_INDEX_MAX)) { |
895 | ERROR(queue->rt2x00dev, | 895 | rt2x00_err(queue->rt2x00dev, "Entry requested from invalid index type (%d)\n", |
896 | "Entry requested from invalid index type (%d)\n", index); | 896 | index); |
897 | return NULL; | 897 | return NULL; |
898 | } | 898 | } |
899 | 899 | ||
@@ -913,8 +913,8 @@ void rt2x00queue_index_inc(struct queue_entry *entry, enum queue_index index) | |||
913 | unsigned long irqflags; | 913 | unsigned long irqflags; |
914 | 914 | ||
915 | if (unlikely(index >= Q_INDEX_MAX)) { | 915 | if (unlikely(index >= Q_INDEX_MAX)) { |
916 | ERROR(queue->rt2x00dev, | 916 | rt2x00_err(queue->rt2x00dev, |
917 | "Index change on invalid index type (%d)\n", index); | 917 | "Index change on invalid index type (%d)\n", index); |
918 | return; | 918 | return; |
919 | } | 919 | } |
920 | 920 | ||
@@ -1074,7 +1074,8 @@ void rt2x00queue_flush_queue(struct data_queue *queue, bool drop) | |||
1074 | * The queue flush has failed... | 1074 | * The queue flush has failed... |
1075 | */ | 1075 | */ |
1076 | if (unlikely(!rt2x00queue_empty(queue))) | 1076 | if (unlikely(!rt2x00queue_empty(queue))) |
1077 | WARNING(queue->rt2x00dev, "Queue %d failed to flush\n", queue->qid); | 1077 | rt2x00_warn(queue->rt2x00dev, "Queue %d failed to flush\n", |
1078 | queue->qid); | ||
1078 | 1079 | ||
1079 | /* | 1080 | /* |
1080 | * Restore the queue to the previous status | 1081 | * Restore the queue to the previous status |
@@ -1264,7 +1265,7 @@ int rt2x00queue_initialize(struct rt2x00_dev *rt2x00dev) | |||
1264 | return 0; | 1265 | return 0; |
1265 | 1266 | ||
1266 | exit: | 1267 | exit: |
1267 | ERROR(rt2x00dev, "Queue entries allocation failed.\n"); | 1268 | rt2x00_err(rt2x00dev, "Queue entries allocation failed\n"); |
1268 | 1269 | ||
1269 | rt2x00queue_uninitialize(rt2x00dev); | 1270 | rt2x00queue_uninitialize(rt2x00dev); |
1270 | 1271 | ||
@@ -1316,7 +1317,7 @@ int rt2x00queue_allocate(struct rt2x00_dev *rt2x00dev) | |||
1316 | 1317 | ||
1317 | queue = kcalloc(rt2x00dev->data_queues, sizeof(*queue), GFP_KERNEL); | 1318 | queue = kcalloc(rt2x00dev->data_queues, sizeof(*queue), GFP_KERNEL); |
1318 | if (!queue) { | 1319 | if (!queue) { |
1319 | ERROR(rt2x00dev, "Queue allocation failed.\n"); | 1320 | rt2x00_err(rt2x00dev, "Queue allocation failed\n"); |
1320 | return -ENOMEM; | 1321 | return -ENOMEM; |
1321 | } | 1322 | } |
1322 | 1323 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00soc.c b/drivers/net/wireless/rt2x00/rt2x00soc.c index 2aa5c38022f3..9271a5fce0a8 100644 --- a/drivers/net/wireless/rt2x00/rt2x00soc.c +++ b/drivers/net/wireless/rt2x00/rt2x00soc.c | |||
@@ -68,7 +68,7 @@ static int rt2x00soc_alloc_reg(struct rt2x00_dev *rt2x00dev) | |||
68 | return 0; | 68 | return 0; |
69 | 69 | ||
70 | exit: | 70 | exit: |
71 | ERROR_PROBE("Failed to allocate registers.\n"); | 71 | rt2x00_probe_err("Failed to allocate registers\n"); |
72 | rt2x00soc_free_reg(rt2x00dev); | 72 | rt2x00soc_free_reg(rt2x00dev); |
73 | 73 | ||
74 | return -ENOMEM; | 74 | return -ENOMEM; |
@@ -82,7 +82,7 @@ int rt2x00soc_probe(struct platform_device *pdev, const struct rt2x00_ops *ops) | |||
82 | 82 | ||
83 | hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw); | 83 | hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw); |
84 | if (!hw) { | 84 | if (!hw) { |
85 | ERROR_PROBE("Failed to allocate hardware.\n"); | 85 | rt2x00_probe_err("Failed to allocate hardware\n"); |
86 | return -ENOMEM; | 86 | return -ENOMEM; |
87 | } | 87 | } |
88 | 88 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index 5e50d4ff9d21..88289873c0cf 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -70,9 +70,9 @@ int rt2x00usb_vendor_request(struct rt2x00_dev *rt2x00dev, | |||
70 | } | 70 | } |
71 | } | 71 | } |
72 | 72 | ||
73 | ERROR(rt2x00dev, | 73 | rt2x00_err(rt2x00dev, |
74 | "Vendor Request 0x%02x failed for offset 0x%04x with error %d.\n", | 74 | "Vendor Request 0x%02x failed for offset 0x%04x with error %d\n", |
75 | request, offset, status); | 75 | request, offset, status); |
76 | 76 | ||
77 | return status; | 77 | return status; |
78 | } | 78 | } |
@@ -91,7 +91,7 @@ int rt2x00usb_vendor_req_buff_lock(struct rt2x00_dev *rt2x00dev, | |||
91 | * Check for Cache availability. | 91 | * Check for Cache availability. |
92 | */ | 92 | */ |
93 | if (unlikely(!rt2x00dev->csr.cache || buffer_length > CSR_CACHE_SIZE)) { | 93 | if (unlikely(!rt2x00dev->csr.cache || buffer_length > CSR_CACHE_SIZE)) { |
94 | ERROR(rt2x00dev, "CSR cache not available.\n"); | 94 | rt2x00_err(rt2x00dev, "CSR cache not available\n"); |
95 | return -ENOMEM; | 95 | return -ENOMEM; |
96 | } | 96 | } |
97 | 97 | ||
@@ -157,8 +157,8 @@ int rt2x00usb_regbusy_read(struct rt2x00_dev *rt2x00dev, | |||
157 | udelay(REGISTER_BUSY_DELAY); | 157 | udelay(REGISTER_BUSY_DELAY); |
158 | } | 158 | } |
159 | 159 | ||
160 | ERROR(rt2x00dev, "Indirect register access failed: " | 160 | rt2x00_err(rt2x00dev, "Indirect register access failed: offset=0x%.08x, value=0x%.08x\n", |
161 | "offset=0x%.08x, value=0x%.08x\n", offset, *reg); | 161 | offset, *reg); |
162 | *reg = ~0; | 162 | *reg = ~0; |
163 | 163 | ||
164 | return 0; | 164 | return 0; |
@@ -307,7 +307,7 @@ static bool rt2x00usb_kick_tx_entry(struct queue_entry *entry, void *data) | |||
307 | status = skb_padto(entry->skb, length); | 307 | status = skb_padto(entry->skb, length); |
308 | if (unlikely(status)) { | 308 | if (unlikely(status)) { |
309 | /* TODO: report something more appropriate than IO_FAILED. */ | 309 | /* TODO: report something more appropriate than IO_FAILED. */ |
310 | WARNING(rt2x00dev, "TX SKB padding error, out of memory\n"); | 310 | rt2x00_warn(rt2x00dev, "TX SKB padding error, out of memory\n"); |
311 | set_bit(ENTRY_DATA_IO_FAILED, &entry->flags); | 311 | set_bit(ENTRY_DATA_IO_FAILED, &entry->flags); |
312 | rt2x00lib_dmadone(entry); | 312 | rt2x00lib_dmadone(entry); |
313 | 313 | ||
@@ -520,8 +520,8 @@ EXPORT_SYMBOL_GPL(rt2x00usb_flush_queue); | |||
520 | 520 | ||
521 | static void rt2x00usb_watchdog_tx_dma(struct data_queue *queue) | 521 | static void rt2x00usb_watchdog_tx_dma(struct data_queue *queue) |
522 | { | 522 | { |
523 | WARNING(queue->rt2x00dev, "TX queue %d DMA timed out," | 523 | rt2x00_warn(queue->rt2x00dev, "TX queue %d DMA timed out, invoke forced forced reset\n", |
524 | " invoke forced forced reset\n", queue->qid); | 524 | queue->qid); |
525 | 525 | ||
526 | rt2x00queue_flush_queue(queue, true); | 526 | rt2x00queue_flush_queue(queue, true); |
527 | } | 527 | } |
@@ -622,7 +622,7 @@ static int rt2x00usb_find_endpoints(struct rt2x00_dev *rt2x00dev) | |||
622 | * At least 1 endpoint for RX and 1 endpoint for TX must be available. | 622 | * At least 1 endpoint for RX and 1 endpoint for TX must be available. |
623 | */ | 623 | */ |
624 | if (!rt2x00dev->rx->usb_endpoint || !rt2x00dev->tx->usb_endpoint) { | 624 | if (!rt2x00dev->rx->usb_endpoint || !rt2x00dev->tx->usb_endpoint) { |
625 | ERROR(rt2x00dev, "Bulk-in/Bulk-out endpoints not found\n"); | 625 | rt2x00_err(rt2x00dev, "Bulk-in/Bulk-out endpoints not found\n"); |
626 | return -EPIPE; | 626 | return -EPIPE; |
627 | } | 627 | } |
628 | 628 | ||
@@ -775,7 +775,7 @@ static int rt2x00usb_alloc_reg(struct rt2x00_dev *rt2x00dev) | |||
775 | return 0; | 775 | return 0; |
776 | 776 | ||
777 | exit: | 777 | exit: |
778 | ERROR_PROBE("Failed to allocate registers.\n"); | 778 | rt2x00_probe_err("Failed to allocate registers\n"); |
779 | 779 | ||
780 | rt2x00usb_free_reg(rt2x00dev); | 780 | rt2x00usb_free_reg(rt2x00dev); |
781 | 781 | ||
@@ -795,7 +795,7 @@ int rt2x00usb_probe(struct usb_interface *usb_intf, | |||
795 | 795 | ||
796 | hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw); | 796 | hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw); |
797 | if (!hw) { | 797 | if (!hw) { |
798 | ERROR_PROBE("Failed to allocate hardware.\n"); | 798 | rt2x00_probe_err("Failed to allocate hardware\n"); |
799 | retval = -ENOMEM; | 799 | retval = -ENOMEM; |
800 | goto exit_put_device; | 800 | goto exit_put_device; |
801 | } | 801 | } |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index fc99258ae777..0dc8180e251b 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -1309,7 +1309,7 @@ static int rt61pci_load_firmware(struct rt2x00_dev *rt2x00dev, | |||
1309 | } | 1309 | } |
1310 | 1310 | ||
1311 | if (!reg) { | 1311 | if (!reg) { |
1312 | ERROR(rt2x00dev, "Unstable hardware.\n"); | 1312 | rt2x00_err(rt2x00dev, "Unstable hardware\n"); |
1313 | return -EBUSY; | 1313 | return -EBUSY; |
1314 | } | 1314 | } |
1315 | 1315 | ||
@@ -1348,7 +1348,7 @@ static int rt61pci_load_firmware(struct rt2x00_dev *rt2x00dev, | |||
1348 | } | 1348 | } |
1349 | 1349 | ||
1350 | if (i == 100) { | 1350 | if (i == 100) { |
1351 | ERROR(rt2x00dev, "MCU Control register not ready.\n"); | 1351 | rt2x00_err(rt2x00dev, "MCU Control register not ready\n"); |
1352 | return -EBUSY; | 1352 | return -EBUSY; |
1353 | } | 1353 | } |
1354 | 1354 | ||
@@ -1658,7 +1658,7 @@ static int rt61pci_wait_bbp_ready(struct rt2x00_dev *rt2x00dev) | |||
1658 | udelay(REGISTER_BUSY_DELAY); | 1658 | udelay(REGISTER_BUSY_DELAY); |
1659 | } | 1659 | } |
1660 | 1660 | ||
1661 | ERROR(rt2x00dev, "BBP register access failed, aborting.\n"); | 1661 | rt2x00_err(rt2x00dev, "BBP register access failed, aborting\n"); |
1662 | return -EACCES; | 1662 | return -EACCES; |
1663 | } | 1663 | } |
1664 | 1664 | ||
@@ -1859,8 +1859,8 @@ static int rt61pci_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
1859 | } | 1859 | } |
1860 | 1860 | ||
1861 | if (unlikely(retval)) | 1861 | if (unlikely(retval)) |
1862 | ERROR(rt2x00dev, "Device failed to enter state %d (%d).\n", | 1862 | rt2x00_err(rt2x00dev, "Device failed to enter state %d (%d)\n", |
1863 | state, retval); | 1863 | state, retval); |
1864 | 1864 | ||
1865 | return retval; | 1865 | return retval; |
1866 | } | 1866 | } |
@@ -1999,7 +1999,7 @@ static void rt61pci_write_beacon(struct queue_entry *entry, | |||
1999 | */ | 1999 | */ |
2000 | padding_len = roundup(entry->skb->len, 4) - entry->skb->len; | 2000 | padding_len = roundup(entry->skb->len, 4) - entry->skb->len; |
2001 | if (padding_len && skb_pad(entry->skb, padding_len)) { | 2001 | if (padding_len && skb_pad(entry->skb, padding_len)) { |
2002 | ERROR(rt2x00dev, "Failure padding beacon, aborting\n"); | 2002 | rt2x00_err(rt2x00dev, "Failure padding beacon, aborting\n"); |
2003 | /* skb freed by skb_pad() on failure */ | 2003 | /* skb freed by skb_pad() on failure */ |
2004 | entry->skb = NULL; | 2004 | entry->skb = NULL; |
2005 | rt2x00mmio_register_write(rt2x00dev, TXRX_CSR9, orig_reg); | 2005 | rt2x00mmio_register_write(rt2x00dev, TXRX_CSR9, orig_reg); |
@@ -2210,9 +2210,8 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev) | |||
2210 | /* Catch up. | 2210 | /* Catch up. |
2211 | * Just report any entries we missed as failed. | 2211 | * Just report any entries we missed as failed. |
2212 | */ | 2212 | */ |
2213 | WARNING(rt2x00dev, | 2213 | rt2x00_warn(rt2x00dev, "TX status report missed for entry %d\n", |
2214 | "TX status report missed for entry %d\n", | 2214 | entry_done->entry_idx); |
2215 | entry_done->entry_idx); | ||
2216 | 2215 | ||
2217 | rt2x00lib_txdone_noinfo(entry_done, TXDONE_UNKNOWN); | 2216 | rt2x00lib_txdone_noinfo(entry_done, TXDONE_UNKNOWN); |
2218 | entry_done = rt2x00queue_get_entry(queue, Q_INDEX_DONE); | 2217 | entry_done = rt2x00queue_get_entry(queue, Q_INDEX_DONE); |
@@ -2419,7 +2418,7 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
2419 | mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); | 2418 | mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); |
2420 | if (!is_valid_ether_addr(mac)) { | 2419 | if (!is_valid_ether_addr(mac)) { |
2421 | eth_random_addr(mac); | 2420 | eth_random_addr(mac); |
2422 | EEPROM(rt2x00dev, "MAC: %pM\n", mac); | 2421 | rt2x00_eeprom_dbg(rt2x00dev, "MAC: %pM\n", mac); |
2423 | } | 2422 | } |
2424 | 2423 | ||
2425 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); | 2424 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); |
@@ -2434,7 +2433,7 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
2434 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); | 2433 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); |
2435 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF5225); | 2434 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF5225); |
2436 | rt2x00_eeprom_write(rt2x00dev, EEPROM_ANTENNA, word); | 2435 | rt2x00_eeprom_write(rt2x00dev, EEPROM_ANTENNA, word); |
2437 | EEPROM(rt2x00dev, "Antenna: 0x%04x\n", word); | 2436 | rt2x00_eeprom_dbg(rt2x00dev, "Antenna: 0x%04x\n", word); |
2438 | } | 2437 | } |
2439 | 2438 | ||
2440 | rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &word); | 2439 | rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &word); |
@@ -2447,7 +2446,7 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
2447 | rt2x00_set_field16(&word, EEPROM_NIC_CARDBUS_ACCEL, 0); | 2446 | rt2x00_set_field16(&word, EEPROM_NIC_CARDBUS_ACCEL, 0); |
2448 | rt2x00_set_field16(&word, EEPROM_NIC_EXTERNAL_LNA_A, 0); | 2447 | rt2x00_set_field16(&word, EEPROM_NIC_EXTERNAL_LNA_A, 0); |
2449 | rt2x00_eeprom_write(rt2x00dev, EEPROM_NIC, word); | 2448 | rt2x00_eeprom_write(rt2x00dev, EEPROM_NIC, word); |
2450 | EEPROM(rt2x00dev, "NIC: 0x%04x\n", word); | 2449 | rt2x00_eeprom_dbg(rt2x00dev, "NIC: 0x%04x\n", word); |
2451 | } | 2450 | } |
2452 | 2451 | ||
2453 | rt2x00_eeprom_read(rt2x00dev, EEPROM_LED, &word); | 2452 | rt2x00_eeprom_read(rt2x00dev, EEPROM_LED, &word); |
@@ -2455,7 +2454,7 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
2455 | rt2x00_set_field16(&word, EEPROM_LED_LED_MODE, | 2454 | rt2x00_set_field16(&word, EEPROM_LED_LED_MODE, |
2456 | LED_MODE_DEFAULT); | 2455 | LED_MODE_DEFAULT); |
2457 | rt2x00_eeprom_write(rt2x00dev, EEPROM_LED, word); | 2456 | rt2x00_eeprom_write(rt2x00dev, EEPROM_LED, word); |
2458 | EEPROM(rt2x00dev, "Led: 0x%04x\n", word); | 2457 | rt2x00_eeprom_dbg(rt2x00dev, "Led: 0x%04x\n", word); |
2459 | } | 2458 | } |
2460 | 2459 | ||
2461 | rt2x00_eeprom_read(rt2x00dev, EEPROM_FREQ, &word); | 2460 | rt2x00_eeprom_read(rt2x00dev, EEPROM_FREQ, &word); |
@@ -2463,7 +2462,7 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
2463 | rt2x00_set_field16(&word, EEPROM_FREQ_OFFSET, 0); | 2462 | rt2x00_set_field16(&word, EEPROM_FREQ_OFFSET, 0); |
2464 | rt2x00_set_field16(&word, EEPROM_FREQ_SEQ, 0); | 2463 | rt2x00_set_field16(&word, EEPROM_FREQ_SEQ, 0); |
2465 | rt2x00_eeprom_write(rt2x00dev, EEPROM_FREQ, word); | 2464 | rt2x00_eeprom_write(rt2x00dev, EEPROM_FREQ, word); |
2466 | EEPROM(rt2x00dev, "Freq: 0x%04x\n", word); | 2465 | rt2x00_eeprom_dbg(rt2x00dev, "Freq: 0x%04x\n", word); |
2467 | } | 2466 | } |
2468 | 2467 | ||
2469 | rt2x00_eeprom_read(rt2x00dev, EEPROM_RSSI_OFFSET_BG, &word); | 2468 | rt2x00_eeprom_read(rt2x00dev, EEPROM_RSSI_OFFSET_BG, &word); |
@@ -2471,7 +2470,7 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
2471 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_BG_1, 0); | 2470 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_BG_1, 0); |
2472 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_BG_2, 0); | 2471 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_BG_2, 0); |
2473 | rt2x00_eeprom_write(rt2x00dev, EEPROM_RSSI_OFFSET_BG, word); | 2472 | rt2x00_eeprom_write(rt2x00dev, EEPROM_RSSI_OFFSET_BG, word); |
2474 | EEPROM(rt2x00dev, "RSSI OFFSET BG: 0x%04x\n", word); | 2473 | rt2x00_eeprom_dbg(rt2x00dev, "RSSI OFFSET BG: 0x%04x\n", word); |
2475 | } else { | 2474 | } else { |
2476 | value = rt2x00_get_field16(word, EEPROM_RSSI_OFFSET_BG_1); | 2475 | value = rt2x00_get_field16(word, EEPROM_RSSI_OFFSET_BG_1); |
2477 | if (value < -10 || value > 10) | 2476 | if (value < -10 || value > 10) |
@@ -2487,7 +2486,7 @@ static int rt61pci_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
2487 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_A_1, 0); | 2486 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_A_1, 0); |
2488 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_A_2, 0); | 2487 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_A_2, 0); |
2489 | rt2x00_eeprom_write(rt2x00dev, EEPROM_RSSI_OFFSET_A, word); | 2488 | rt2x00_eeprom_write(rt2x00dev, EEPROM_RSSI_OFFSET_A, word); |
2490 | EEPROM(rt2x00dev, "RSSI OFFSET A: 0x%04x\n", word); | 2489 | rt2x00_eeprom_dbg(rt2x00dev, "RSSI OFFSET A: 0x%04x\n", word); |
2491 | } else { | 2490 | } else { |
2492 | value = rt2x00_get_field16(word, EEPROM_RSSI_OFFSET_A_1); | 2491 | value = rt2x00_get_field16(word, EEPROM_RSSI_OFFSET_A_1); |
2493 | if (value < -10 || value > 10) | 2492 | if (value < -10 || value > 10) |
@@ -2524,7 +2523,7 @@ static int rt61pci_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
2524 | !rt2x00_rf(rt2x00dev, RF5325) && | 2523 | !rt2x00_rf(rt2x00dev, RF5325) && |
2525 | !rt2x00_rf(rt2x00dev, RF2527) && | 2524 | !rt2x00_rf(rt2x00dev, RF2527) && |
2526 | !rt2x00_rf(rt2x00dev, RF2529)) { | 2525 | !rt2x00_rf(rt2x00dev, RF2529)) { |
2527 | ERROR(rt2x00dev, "Invalid RF chipset detected.\n"); | 2526 | rt2x00_err(rt2x00dev, "Invalid RF chipset detected\n"); |
2528 | return -ENODEV; | 2527 | return -ENODEV; |
2529 | } | 2528 | } |
2530 | 2529 | ||
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index a3387b146bb5..377e09bb0b81 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1122,7 +1122,7 @@ static int rt73usb_load_firmware(struct rt2x00_dev *rt2x00dev, | |||
1122 | } | 1122 | } |
1123 | 1123 | ||
1124 | if (!reg) { | 1124 | if (!reg) { |
1125 | ERROR(rt2x00dev, "Unstable hardware.\n"); | 1125 | rt2x00_err(rt2x00dev, "Unstable hardware\n"); |
1126 | return -EBUSY; | 1126 | return -EBUSY; |
1127 | } | 1127 | } |
1128 | 1128 | ||
@@ -1139,7 +1139,7 @@ static int rt73usb_load_firmware(struct rt2x00_dev *rt2x00dev, | |||
1139 | 0, USB_MODE_FIRMWARE, | 1139 | 0, USB_MODE_FIRMWARE, |
1140 | REGISTER_TIMEOUT_FIRMWARE); | 1140 | REGISTER_TIMEOUT_FIRMWARE); |
1141 | if (status < 0) { | 1141 | if (status < 0) { |
1142 | ERROR(rt2x00dev, "Failed to write Firmware to device.\n"); | 1142 | rt2x00_err(rt2x00dev, "Failed to write Firmware to device\n"); |
1143 | return status; | 1143 | return status; |
1144 | } | 1144 | } |
1145 | 1145 | ||
@@ -1305,7 +1305,7 @@ static int rt73usb_wait_bbp_ready(struct rt2x00_dev *rt2x00dev) | |||
1305 | udelay(REGISTER_BUSY_DELAY); | 1305 | udelay(REGISTER_BUSY_DELAY); |
1306 | } | 1306 | } |
1307 | 1307 | ||
1308 | ERROR(rt2x00dev, "BBP register access failed, aborting.\n"); | 1308 | rt2x00_err(rt2x00dev, "BBP register access failed, aborting\n"); |
1309 | return -EACCES; | 1309 | return -EACCES; |
1310 | } | 1310 | } |
1311 | 1311 | ||
@@ -1443,8 +1443,8 @@ static int rt73usb_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
1443 | } | 1443 | } |
1444 | 1444 | ||
1445 | if (unlikely(retval)) | 1445 | if (unlikely(retval)) |
1446 | ERROR(rt2x00dev, "Device failed to enter state %d (%d).\n", | 1446 | rt2x00_err(rt2x00dev, "Device failed to enter state %d (%d)\n", |
1447 | state, retval); | 1447 | state, retval); |
1448 | 1448 | ||
1449 | return retval; | 1449 | return retval; |
1450 | } | 1450 | } |
@@ -1567,7 +1567,7 @@ static void rt73usb_write_beacon(struct queue_entry *entry, | |||
1567 | */ | 1567 | */ |
1568 | padding_len = roundup(entry->skb->len, 4) - entry->skb->len; | 1568 | padding_len = roundup(entry->skb->len, 4) - entry->skb->len; |
1569 | if (padding_len && skb_pad(entry->skb, padding_len)) { | 1569 | if (padding_len && skb_pad(entry->skb, padding_len)) { |
1570 | ERROR(rt2x00dev, "Failure padding beacon, aborting\n"); | 1570 | rt2x00_err(rt2x00dev, "Failure padding beacon, aborting\n"); |
1571 | /* skb freed by skb_pad() on failure */ | 1571 | /* skb freed by skb_pad() on failure */ |
1572 | entry->skb = NULL; | 1572 | entry->skb = NULL; |
1573 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, orig_reg); | 1573 | rt2x00usb_register_write(rt2x00dev, TXRX_CSR9, orig_reg); |
@@ -1771,7 +1771,7 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1771 | mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); | 1771 | mac = rt2x00_eeprom_addr(rt2x00dev, EEPROM_MAC_ADDR_0); |
1772 | if (!is_valid_ether_addr(mac)) { | 1772 | if (!is_valid_ether_addr(mac)) { |
1773 | eth_random_addr(mac); | 1773 | eth_random_addr(mac); |
1774 | EEPROM(rt2x00dev, "MAC: %pM\n", mac); | 1774 | rt2x00_eeprom_dbg(rt2x00dev, "MAC: %pM\n", mac); |
1775 | } | 1775 | } |
1776 | 1776 | ||
1777 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); | 1777 | rt2x00_eeprom_read(rt2x00dev, EEPROM_ANTENNA, &word); |
@@ -1786,14 +1786,14 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1786 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); | 1786 | rt2x00_set_field16(&word, EEPROM_ANTENNA_HARDWARE_RADIO, 0); |
1787 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF5226); | 1787 | rt2x00_set_field16(&word, EEPROM_ANTENNA_RF_TYPE, RF5226); |
1788 | rt2x00_eeprom_write(rt2x00dev, EEPROM_ANTENNA, word); | 1788 | rt2x00_eeprom_write(rt2x00dev, EEPROM_ANTENNA, word); |
1789 | EEPROM(rt2x00dev, "Antenna: 0x%04x\n", word); | 1789 | rt2x00_eeprom_dbg(rt2x00dev, "Antenna: 0x%04x\n", word); |
1790 | } | 1790 | } |
1791 | 1791 | ||
1792 | rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &word); | 1792 | rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &word); |
1793 | if (word == 0xffff) { | 1793 | if (word == 0xffff) { |
1794 | rt2x00_set_field16(&word, EEPROM_NIC_EXTERNAL_LNA, 0); | 1794 | rt2x00_set_field16(&word, EEPROM_NIC_EXTERNAL_LNA, 0); |
1795 | rt2x00_eeprom_write(rt2x00dev, EEPROM_NIC, word); | 1795 | rt2x00_eeprom_write(rt2x00dev, EEPROM_NIC, word); |
1796 | EEPROM(rt2x00dev, "NIC: 0x%04x\n", word); | 1796 | rt2x00_eeprom_dbg(rt2x00dev, "NIC: 0x%04x\n", word); |
1797 | } | 1797 | } |
1798 | 1798 | ||
1799 | rt2x00_eeprom_read(rt2x00dev, EEPROM_LED, &word); | 1799 | rt2x00_eeprom_read(rt2x00dev, EEPROM_LED, &word); |
@@ -1809,7 +1809,7 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1809 | rt2x00_set_field16(&word, EEPROM_LED_LED_MODE, | 1809 | rt2x00_set_field16(&word, EEPROM_LED_LED_MODE, |
1810 | LED_MODE_DEFAULT); | 1810 | LED_MODE_DEFAULT); |
1811 | rt2x00_eeprom_write(rt2x00dev, EEPROM_LED, word); | 1811 | rt2x00_eeprom_write(rt2x00dev, EEPROM_LED, word); |
1812 | EEPROM(rt2x00dev, "Led: 0x%04x\n", word); | 1812 | rt2x00_eeprom_dbg(rt2x00dev, "Led: 0x%04x\n", word); |
1813 | } | 1813 | } |
1814 | 1814 | ||
1815 | rt2x00_eeprom_read(rt2x00dev, EEPROM_FREQ, &word); | 1815 | rt2x00_eeprom_read(rt2x00dev, EEPROM_FREQ, &word); |
@@ -1817,7 +1817,7 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1817 | rt2x00_set_field16(&word, EEPROM_FREQ_OFFSET, 0); | 1817 | rt2x00_set_field16(&word, EEPROM_FREQ_OFFSET, 0); |
1818 | rt2x00_set_field16(&word, EEPROM_FREQ_SEQ, 0); | 1818 | rt2x00_set_field16(&word, EEPROM_FREQ_SEQ, 0); |
1819 | rt2x00_eeprom_write(rt2x00dev, EEPROM_FREQ, word); | 1819 | rt2x00_eeprom_write(rt2x00dev, EEPROM_FREQ, word); |
1820 | EEPROM(rt2x00dev, "Freq: 0x%04x\n", word); | 1820 | rt2x00_eeprom_dbg(rt2x00dev, "Freq: 0x%04x\n", word); |
1821 | } | 1821 | } |
1822 | 1822 | ||
1823 | rt2x00_eeprom_read(rt2x00dev, EEPROM_RSSI_OFFSET_BG, &word); | 1823 | rt2x00_eeprom_read(rt2x00dev, EEPROM_RSSI_OFFSET_BG, &word); |
@@ -1825,7 +1825,7 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1825 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_BG_1, 0); | 1825 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_BG_1, 0); |
1826 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_BG_2, 0); | 1826 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_BG_2, 0); |
1827 | rt2x00_eeprom_write(rt2x00dev, EEPROM_RSSI_OFFSET_BG, word); | 1827 | rt2x00_eeprom_write(rt2x00dev, EEPROM_RSSI_OFFSET_BG, word); |
1828 | EEPROM(rt2x00dev, "RSSI OFFSET BG: 0x%04x\n", word); | 1828 | rt2x00_eeprom_dbg(rt2x00dev, "RSSI OFFSET BG: 0x%04x\n", word); |
1829 | } else { | 1829 | } else { |
1830 | value = rt2x00_get_field16(word, EEPROM_RSSI_OFFSET_BG_1); | 1830 | value = rt2x00_get_field16(word, EEPROM_RSSI_OFFSET_BG_1); |
1831 | if (value < -10 || value > 10) | 1831 | if (value < -10 || value > 10) |
@@ -1841,7 +1841,7 @@ static int rt73usb_validate_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1841 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_A_1, 0); | 1841 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_A_1, 0); |
1842 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_A_2, 0); | 1842 | rt2x00_set_field16(&word, EEPROM_RSSI_OFFSET_A_2, 0); |
1843 | rt2x00_eeprom_write(rt2x00dev, EEPROM_RSSI_OFFSET_A, word); | 1843 | rt2x00_eeprom_write(rt2x00dev, EEPROM_RSSI_OFFSET_A, word); |
1844 | EEPROM(rt2x00dev, "RSSI OFFSET A: 0x%04x\n", word); | 1844 | rt2x00_eeprom_dbg(rt2x00dev, "RSSI OFFSET A: 0x%04x\n", word); |
1845 | } else { | 1845 | } else { |
1846 | value = rt2x00_get_field16(word, EEPROM_RSSI_OFFSET_A_1); | 1846 | value = rt2x00_get_field16(word, EEPROM_RSSI_OFFSET_A_1); |
1847 | if (value < -10 || value > 10) | 1847 | if (value < -10 || value > 10) |
@@ -1875,7 +1875,7 @@ static int rt73usb_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1875 | value, rt2x00_get_field32(reg, MAC_CSR0_REVISION)); | 1875 | value, rt2x00_get_field32(reg, MAC_CSR0_REVISION)); |
1876 | 1876 | ||
1877 | if (!rt2x00_rt(rt2x00dev, RT2573) || (rt2x00_rev(rt2x00dev) == 0)) { | 1877 | if (!rt2x00_rt(rt2x00dev, RT2573) || (rt2x00_rev(rt2x00dev) == 0)) { |
1878 | ERROR(rt2x00dev, "Invalid RT chipset detected.\n"); | 1878 | rt2x00_err(rt2x00dev, "Invalid RT chipset detected\n"); |
1879 | return -ENODEV; | 1879 | return -ENODEV; |
1880 | } | 1880 | } |
1881 | 1881 | ||
@@ -1883,7 +1883,7 @@ static int rt73usb_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
1883 | !rt2x00_rf(rt2x00dev, RF2528) && | 1883 | !rt2x00_rf(rt2x00dev, RF2528) && |
1884 | !rt2x00_rf(rt2x00dev, RF5225) && | 1884 | !rt2x00_rf(rt2x00dev, RF5225) && |
1885 | !rt2x00_rf(rt2x00dev, RF2527)) { | 1885 | !rt2x00_rf(rt2x00dev, RF2527)) { |
1886 | ERROR(rt2x00dev, "Invalid RF chipset detected.\n"); | 1886 | rt2x00_err(rt2x00dev, "Invalid RF chipset detected\n"); |
1887 | return -ENODEV; | 1887 | return -ENODEV; |
1888 | } | 1888 | } |
1889 | 1889 | ||