diff options
author | Joe Perches <joe@perches.com> | 2010-12-02 22:12:36 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-07 16:34:47 -0500 |
commit | 3800276a40751539a920ef8e0537ef2e19126799 (patch) | |
tree | ccf058ea286aef7faa79aea4236b30c1b8cb757e /drivers/net/wireless/ath/ath9k/hw.c | |
parent | 21a99f934949807dc0c9dc7642bbf0081b7582f9 (diff) |
ath: Convert ath_print(.., ATH_DBG_FATAL to ath_err
So these errors are always emitted at KERN_ERR level.
Remove ARRAY_SIZE casts, use printf type %zu
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 78 |
1 files changed, 33 insertions, 45 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 9b1ee7fc05c..00ecbfa07df 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -211,8 +211,8 @@ u16 ath9k_hw_computetxtime(struct ath_hw *ah, | |||
211 | } | 211 | } |
212 | break; | 212 | break; |
213 | default: | 213 | default: |
214 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 214 | ath_err(ath9k_hw_common(ah), |
215 | "Unknown phy %u (rate ix %u)\n", phy, rateix); | 215 | "Unknown phy %u (rate ix %u)\n", phy, rateix); |
216 | txTime = 0; | 216 | txTime = 0; |
217 | break; | 217 | break; |
218 | } | 218 | } |
@@ -331,11 +331,9 @@ static bool ath9k_hw_chip_test(struct ath_hw *ah) | |||
331 | REG_WRITE(ah, addr, wrData); | 331 | REG_WRITE(ah, addr, wrData); |
332 | rdData = REG_READ(ah, addr); | 332 | rdData = REG_READ(ah, addr); |
333 | if (rdData != wrData) { | 333 | if (rdData != wrData) { |
334 | ath_print(common, ATH_DBG_FATAL, | 334 | ath_err(common, |
335 | "address test failed " | 335 | "address test failed addr: 0x%08x - wr:0x%08x != rd:0x%08x\n", |
336 | "addr: 0x%08x - wr:0x%08x != " | 336 | addr, wrData, rdData); |
337 | "rd:0x%08x\n", | ||
338 | addr, wrData, rdData); | ||
339 | return false; | 337 | return false; |
340 | } | 338 | } |
341 | } | 339 | } |
@@ -344,11 +342,9 @@ static bool ath9k_hw_chip_test(struct ath_hw *ah) | |||
344 | REG_WRITE(ah, addr, wrData); | 342 | REG_WRITE(ah, addr, wrData); |
345 | rdData = REG_READ(ah, addr); | 343 | rdData = REG_READ(ah, addr); |
346 | if (wrData != rdData) { | 344 | if (wrData != rdData) { |
347 | ath_print(common, ATH_DBG_FATAL, | 345 | ath_err(common, |
348 | "address test failed " | 346 | "address test failed addr: 0x%08x - wr:0x%08x != rd:0x%08x\n", |
349 | "addr: 0x%08x - wr:0x%08x != " | 347 | addr, wrData, rdData); |
350 | "rd:0x%08x\n", | ||
351 | addr, wrData, rdData); | ||
352 | return false; | 348 | return false; |
353 | } | 349 | } |
354 | } | 350 | } |
@@ -476,9 +472,8 @@ static int ath9k_hw_post_init(struct ath_hw *ah) | |||
476 | 472 | ||
477 | ecode = ath9k_hw_rf_alloc_ext_banks(ah); | 473 | ecode = ath9k_hw_rf_alloc_ext_banks(ah); |
478 | if (ecode) { | 474 | if (ecode) { |
479 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 475 | ath_err(ath9k_hw_common(ah), |
480 | "Failed allocating banks for " | 476 | "Failed allocating banks for external radio\n"); |
481 | "external radio\n"); | ||
482 | ath9k_hw_rf_free_ext_banks(ah); | 477 | ath9k_hw_rf_free_ext_banks(ah); |
483 | return ecode; | 478 | return ecode; |
484 | } | 479 | } |
@@ -509,8 +504,7 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
509 | ah->hw_version.macVersion = AR_SREV_VERSION_9100; | 504 | ah->hw_version.macVersion = AR_SREV_VERSION_9100; |
510 | 505 | ||
511 | if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) { | 506 | if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) { |
512 | ath_print(common, ATH_DBG_FATAL, | 507 | ath_err(common, "Couldn't reset chip\n"); |
513 | "Couldn't reset chip\n"); | ||
514 | return -EIO; | 508 | return -EIO; |
515 | } | 509 | } |
516 | 510 | ||
@@ -520,7 +514,7 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
520 | ath9k_hw_attach_ops(ah); | 514 | ath9k_hw_attach_ops(ah); |
521 | 515 | ||
522 | if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) { | 516 | if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) { |
523 | ath_print(common, ATH_DBG_FATAL, "Couldn't wakeup chip\n"); | 517 | ath_err(common, "Couldn't wakeup chip\n"); |
524 | return -EIO; | 518 | return -EIO; |
525 | } | 519 | } |
526 | 520 | ||
@@ -545,10 +539,9 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
545 | ah->config.max_txtrig_level = MAX_TX_FIFO_THRESHOLD; | 539 | ah->config.max_txtrig_level = MAX_TX_FIFO_THRESHOLD; |
546 | 540 | ||
547 | if (!ath9k_hw_macversion_supported(ah)) { | 541 | if (!ath9k_hw_macversion_supported(ah)) { |
548 | ath_print(common, ATH_DBG_FATAL, | 542 | ath_err(common, |
549 | "Mac Chip Rev 0x%02x.%x is not supported by " | 543 | "Mac Chip Rev 0x%02x.%x is not supported by this driver\n", |
550 | "this driver\n", ah->hw_version.macVersion, | 544 | ah->hw_version.macVersion, ah->hw_version.macRev); |
551 | ah->hw_version.macRev); | ||
552 | return -EOPNOTSUPP; | 545 | return -EOPNOTSUPP; |
553 | } | 546 | } |
554 | 547 | ||
@@ -594,8 +587,7 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
594 | 587 | ||
595 | r = ath9k_hw_init_macaddr(ah); | 588 | r = ath9k_hw_init_macaddr(ah); |
596 | if (r) { | 589 | if (r) { |
597 | ath_print(common, ATH_DBG_FATAL, | 590 | ath_err(common, "Failed to initialize MAC address\n"); |
598 | "Failed to initialize MAC address\n"); | ||
599 | return r; | 591 | return r; |
600 | } | 592 | } |
601 | 593 | ||
@@ -633,17 +625,16 @@ int ath9k_hw_init(struct ath_hw *ah) | |||
633 | default: | 625 | default: |
634 | if (common->bus_ops->ath_bus_type == ATH_USB) | 626 | if (common->bus_ops->ath_bus_type == ATH_USB) |
635 | break; | 627 | break; |
636 | ath_print(common, ATH_DBG_FATAL, | 628 | ath_err(common, "Hardware device ID 0x%04x not supported\n", |
637 | "Hardware device ID 0x%04x not supported\n", | 629 | ah->hw_version.devid); |
638 | ah->hw_version.devid); | ||
639 | return -EOPNOTSUPP; | 630 | return -EOPNOTSUPP; |
640 | } | 631 | } |
641 | 632 | ||
642 | ret = __ath9k_hw_init(ah); | 633 | ret = __ath9k_hw_init(ah); |
643 | if (ret) { | 634 | if (ret) { |
644 | ath_print(common, ATH_DBG_FATAL, | 635 | ath_err(common, |
645 | "Unable to initialize hardware; " | 636 | "Unable to initialize hardware; initialization status: %d\n", |
646 | "initialization status: %d\n", ret); | 637 | ret); |
647 | return ret; | 638 | return ret; |
648 | } | 639 | } |
649 | 640 | ||
@@ -1145,8 +1136,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah, | |||
1145 | } | 1136 | } |
1146 | 1137 | ||
1147 | if (!ath9k_hw_rfbus_req(ah)) { | 1138 | if (!ath9k_hw_rfbus_req(ah)) { |
1148 | ath_print(common, ATH_DBG_FATAL, | 1139 | ath_err(common, "Could not kill baseband RX\n"); |
1149 | "Could not kill baseband RX\n"); | ||
1150 | return false; | 1140 | return false; |
1151 | } | 1141 | } |
1152 | 1142 | ||
@@ -1154,8 +1144,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah, | |||
1154 | 1144 | ||
1155 | r = ath9k_hw_rf_set_freq(ah, chan); | 1145 | r = ath9k_hw_rf_set_freq(ah, chan); |
1156 | if (r) { | 1146 | if (r) { |
1157 | ath_print(common, ATH_DBG_FATAL, | 1147 | ath_err(common, "Failed to set channel\n"); |
1158 | "Failed to set channel\n"); | ||
1159 | return false; | 1148 | return false; |
1160 | } | 1149 | } |
1161 | ath9k_hw_set_clockrate(ah); | 1150 | ath9k_hw_set_clockrate(ah); |
@@ -1287,7 +1276,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
1287 | } | 1276 | } |
1288 | 1277 | ||
1289 | if (!ath9k_hw_chip_reset(ah, chan)) { | 1278 | if (!ath9k_hw_chip_reset(ah, chan)) { |
1290 | ath_print(common, ATH_DBG_FATAL, "Chip reset failed\n"); | 1279 | ath_err(common, "Chip reset failed\n"); |
1291 | return -EINVAL; | 1280 | return -EINVAL; |
1292 | } | 1281 | } |
1293 | 1282 | ||
@@ -1568,9 +1557,9 @@ static bool ath9k_hw_set_power_awake(struct ath_hw *ah, int setChip) | |||
1568 | AR_RTC_FORCE_WAKE_EN); | 1557 | AR_RTC_FORCE_WAKE_EN); |
1569 | } | 1558 | } |
1570 | if (i == 0) { | 1559 | if (i == 0) { |
1571 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 1560 | ath_err(ath9k_hw_common(ah), |
1572 | "Failed to wakeup in %uus\n", | 1561 | "Failed to wakeup in %uus\n", |
1573 | POWER_UP_TIME / 20); | 1562 | POWER_UP_TIME / 20); |
1574 | return false; | 1563 | return false; |
1575 | } | 1564 | } |
1576 | } | 1565 | } |
@@ -1609,8 +1598,7 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode) | |||
1609 | ath9k_set_power_network_sleep(ah, setChip); | 1598 | ath9k_set_power_network_sleep(ah, setChip); |
1610 | break; | 1599 | break; |
1611 | default: | 1600 | default: |
1612 | ath_print(common, ATH_DBG_FATAL, | 1601 | ath_err(common, "Unknown power mode %u\n", mode); |
1613 | "Unknown power mode %u\n", mode); | ||
1614 | return false; | 1602 | return false; |
1615 | } | 1603 | } |
1616 | ah->power_mode = mode; | 1604 | ah->power_mode = mode; |
@@ -1801,8 +1789,8 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah) | |||
1801 | 1789 | ||
1802 | eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE); | 1790 | eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE); |
1803 | if ((eeval & (AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A)) == 0) { | 1791 | if ((eeval & (AR5416_OPFLAGS_11G | AR5416_OPFLAGS_11A)) == 0) { |
1804 | ath_print(common, ATH_DBG_FATAL, | 1792 | ath_err(common, |
1805 | "no band has been marked as supported in EEPROM.\n"); | 1793 | "no band has been marked as supported in EEPROM\n"); |
1806 | return -EINVAL; | 1794 | return -EINVAL; |
1807 | } | 1795 | } |
1808 | 1796 | ||
@@ -2348,9 +2336,9 @@ struct ath_gen_timer *ath_gen_timer_alloc(struct ath_hw *ah, | |||
2348 | timer = kzalloc(sizeof(struct ath_gen_timer), GFP_KERNEL); | 2336 | timer = kzalloc(sizeof(struct ath_gen_timer), GFP_KERNEL); |
2349 | 2337 | ||
2350 | if (timer == NULL) { | 2338 | if (timer == NULL) { |
2351 | ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL, | 2339 | ath_err(ath9k_hw_common(ah), |
2352 | "Failed to allocate memory" | 2340 | "Failed to allocate memory for hw timer[%d]\n", |
2353 | "for hw timer[%d]\n", timer_index); | 2341 | timer_index); |
2354 | return NULL; | 2342 | return NULL; |
2355 | } | 2343 | } |
2356 | 2344 | ||