diff options
author | Joe Perches <joe@perches.com> | 2010-12-02 22:12:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-07 16:34:48 -0500 |
commit | 226afe68fdbd1aa3680158aca0a3631cbd019626 (patch) | |
tree | 89e31323c0798493b9d0b3ec32df33fc21d82bf6 /drivers/net/wireless/ath/ath9k/hw.c | |
parent | 3800276a40751539a920ef8e0537ef2e19126799 (diff) |
ath: Convert ath_print to ath_dbg
Remove ath/debug.h and the includes of these files.
Coalesce long formats.
Correct a few misspellings and missing "\n"s from these logging messages.
Remove unnecessary trailing space before a newline.
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 | 83 |
1 files changed, 41 insertions, 42 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 00ecbfa07df5..9d3be0392a9b 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -129,9 +129,9 @@ bool ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout) | |||
129 | udelay(AH_TIME_QUANTUM); | 129 | udelay(AH_TIME_QUANTUM); |
130 | } | 130 | } |
131 | 131 | ||
132 | ath_print(ath9k_hw_common(ah), ATH_DBG_ANY, | 132 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_ANY, |
133 | "timeout (%d us) on reg 0x%x: 0x%08x & 0x%08x != 0x%08x\n", | 133 | "timeout (%d us) on reg 0x%x: 0x%08x & 0x%08x != 0x%08x\n", |
134 | timeout, reg, REG_READ(ah, reg), mask, val); | 134 | timeout, reg, REG_READ(ah, reg), mask, val); |
135 | 135 | ||
136 | return false; | 136 | return false; |
137 | } | 137 | } |
@@ -465,10 +465,10 @@ static int ath9k_hw_post_init(struct ath_hw *ah) | |||
465 | if (ecode != 0) | 465 | if (ecode != 0) |
466 | return ecode; | 466 | return ecode; |
467 | 467 | ||
468 | ath_print(ath9k_hw_common(ah), ATH_DBG_CONFIG, | 468 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_CONFIG, |
469 | "Eeprom VER: %d, REV: %d\n", | 469 | "Eeprom VER: %d, REV: %d\n", |
470 | ah->eep_ops->get_eeprom_ver(ah), | 470 | ah->eep_ops->get_eeprom_ver(ah), |
471 | ah->eep_ops->get_eeprom_rev(ah)); | 471 | ah->eep_ops->get_eeprom_rev(ah)); |
472 | 472 | ||
473 | ecode = ath9k_hw_rf_alloc_ext_banks(ah); | 473 | ecode = ath9k_hw_rf_alloc_ext_banks(ah); |
474 | if (ecode) { | 474 | if (ecode) { |
@@ -530,7 +530,7 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
530 | } | 530 | } |
531 | } | 531 | } |
532 | 532 | ||
533 | ath_print(common, ATH_DBG_RESET, "serialize_regmode is %d\n", | 533 | ath_dbg(common, ATH_DBG_RESET, "serialize_regmode is %d\n", |
534 | ah->config.serialize_regmode); | 534 | ah->config.serialize_regmode); |
535 | 535 | ||
536 | if (AR_SREV_9285(ah) || AR_SREV_9271(ah)) | 536 | if (AR_SREV_9285(ah) || AR_SREV_9271(ah)) |
@@ -758,8 +758,8 @@ static void ath9k_hw_set_cts_timeout(struct ath_hw *ah, u32 us) | |||
758 | static bool ath9k_hw_set_global_txtimeout(struct ath_hw *ah, u32 tu) | 758 | static bool ath9k_hw_set_global_txtimeout(struct ath_hw *ah, u32 tu) |
759 | { | 759 | { |
760 | if (tu > 0xFFFF) { | 760 | if (tu > 0xFFFF) { |
761 | ath_print(ath9k_hw_common(ah), ATH_DBG_XMIT, | 761 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_XMIT, |
762 | "bad global tx timeout %u\n", tu); | 762 | "bad global tx timeout %u\n", tu); |
763 | ah->globaltxtimeout = (u32) -1; | 763 | ah->globaltxtimeout = (u32) -1; |
764 | return false; | 764 | return false; |
765 | } else { | 765 | } else { |
@@ -776,8 +776,8 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah) | |||
776 | int slottime; | 776 | int slottime; |
777 | int sifstime; | 777 | int sifstime; |
778 | 778 | ||
779 | ath_print(ath9k_hw_common(ah), ATH_DBG_RESET, "ah->misc_mode 0x%x\n", | 779 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_RESET, "ah->misc_mode 0x%x\n", |
780 | ah->misc_mode); | 780 | ah->misc_mode); |
781 | 781 | ||
782 | if (ah->misc_mode != 0) | 782 | if (ah->misc_mode != 0) |
783 | REG_WRITE(ah, AR_PCU_MISC, | 783 | REG_WRITE(ah, AR_PCU_MISC, |
@@ -1020,8 +1020,8 @@ static bool ath9k_hw_set_reset(struct ath_hw *ah, int type) | |||
1020 | 1020 | ||
1021 | REG_WRITE(ah, AR_RTC_RC, 0); | 1021 | REG_WRITE(ah, AR_RTC_RC, 0); |
1022 | if (!ath9k_hw_wait(ah, AR_RTC_RC, AR_RTC_RC_M, 0, AH_WAIT_TIMEOUT)) { | 1022 | if (!ath9k_hw_wait(ah, AR_RTC_RC, AR_RTC_RC_M, 0, AH_WAIT_TIMEOUT)) { |
1023 | ath_print(ath9k_hw_common(ah), ATH_DBG_RESET, | 1023 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_RESET, |
1024 | "RTC stuck in MAC reset\n"); | 1024 | "RTC stuck in MAC reset\n"); |
1025 | return false; | 1025 | return false; |
1026 | } | 1026 | } |
1027 | 1027 | ||
@@ -1067,8 +1067,8 @@ static bool ath9k_hw_set_reset_power_on(struct ath_hw *ah) | |||
1067 | AR_RTC_STATUS_M, | 1067 | AR_RTC_STATUS_M, |
1068 | AR_RTC_STATUS_ON, | 1068 | AR_RTC_STATUS_ON, |
1069 | AH_WAIT_TIMEOUT)) { | 1069 | AH_WAIT_TIMEOUT)) { |
1070 | ath_print(ath9k_hw_common(ah), ATH_DBG_RESET, | 1070 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_RESET, |
1071 | "RTC not waking up\n"); | 1071 | "RTC not waking up\n"); |
1072 | return false; | 1072 | return false; |
1073 | } | 1073 | } |
1074 | 1074 | ||
@@ -1128,9 +1128,8 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah, | |||
1128 | 1128 | ||
1129 | for (qnum = 0; qnum < AR_NUM_QCU; qnum++) { | 1129 | for (qnum = 0; qnum < AR_NUM_QCU; qnum++) { |
1130 | if (ath9k_hw_numtxpending(ah, qnum)) { | 1130 | if (ath9k_hw_numtxpending(ah, qnum)) { |
1131 | ath_print(common, ATH_DBG_QUEUE, | 1131 | ath_dbg(common, ATH_DBG_QUEUE, |
1132 | "Transmit frames pending on " | 1132 | "Transmit frames pending on queue %d\n", qnum); |
1133 | "queue %d\n", qnum); | ||
1134 | return false; | 1133 | return false; |
1135 | } | 1134 | } |
1136 | } | 1135 | } |
@@ -1211,7 +1210,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
1211 | if (!ah->chip_fullsleep) { | 1210 | if (!ah->chip_fullsleep) { |
1212 | ath9k_hw_abortpcurecv(ah); | 1211 | ath9k_hw_abortpcurecv(ah); |
1213 | if (!ath9k_hw_stopdmarecv(ah)) { | 1212 | if (!ath9k_hw_stopdmarecv(ah)) { |
1214 | ath_print(common, ATH_DBG_XMIT, | 1213 | ath_dbg(common, ATH_DBG_XMIT, |
1215 | "Failed to stop receive dma\n"); | 1214 | "Failed to stop receive dma\n"); |
1216 | bChannelChange = false; | 1215 | bChannelChange = false; |
1217 | } | 1216 | } |
@@ -1423,13 +1422,13 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, | |||
1423 | u32 mask; | 1422 | u32 mask; |
1424 | mask = REG_READ(ah, AR_CFG); | 1423 | mask = REG_READ(ah, AR_CFG); |
1425 | if (mask & (AR_CFG_SWRB | AR_CFG_SWTB | AR_CFG_SWRG)) { | 1424 | if (mask & (AR_CFG_SWRB | AR_CFG_SWTB | AR_CFG_SWRG)) { |
1426 | ath_print(common, ATH_DBG_RESET, | 1425 | ath_dbg(common, ATH_DBG_RESET, |
1427 | "CFG Byte Swap Set 0x%x\n", mask); | 1426 | "CFG Byte Swap Set 0x%x\n", mask); |
1428 | } else { | 1427 | } else { |
1429 | mask = | 1428 | mask = |
1430 | INIT_CONFIG_STATUS | AR_CFG_SWRB | AR_CFG_SWTB; | 1429 | INIT_CONFIG_STATUS | AR_CFG_SWRB | AR_CFG_SWTB; |
1431 | REG_WRITE(ah, AR_CFG, mask); | 1430 | REG_WRITE(ah, AR_CFG, mask); |
1432 | ath_print(common, ATH_DBG_RESET, | 1431 | ath_dbg(common, ATH_DBG_RESET, |
1433 | "Setting CFG 0x%x\n", REG_READ(ah, AR_CFG)); | 1432 | "Setting CFG 0x%x\n", REG_READ(ah, AR_CFG)); |
1434 | } | 1433 | } |
1435 | } else { | 1434 | } else { |
@@ -1583,8 +1582,8 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode) | |||
1583 | if (ah->power_mode == mode) | 1582 | if (ah->power_mode == mode) |
1584 | return status; | 1583 | return status; |
1585 | 1584 | ||
1586 | ath_print(common, ATH_DBG_RESET, "%s -> %s\n", | 1585 | ath_dbg(common, ATH_DBG_RESET, "%s -> %s\n", |
1587 | modes[ah->power_mode], modes[mode]); | 1586 | modes[ah->power_mode], modes[mode]); |
1588 | 1587 | ||
1589 | switch (mode) { | 1588 | switch (mode) { |
1590 | case ATH9K_PM_AWAKE: | 1589 | case ATH9K_PM_AWAKE: |
@@ -1657,9 +1656,9 @@ void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period) | |||
1657 | flags |= AR_TBTT_TIMER_EN; | 1656 | flags |= AR_TBTT_TIMER_EN; |
1658 | break; | 1657 | break; |
1659 | } | 1658 | } |
1660 | ath_print(ath9k_hw_common(ah), ATH_DBG_BEACON, | 1659 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_BEACON, |
1661 | "%s: unsupported opmode: %d\n", | 1660 | "%s: unsupported opmode: %d\n", |
1662 | __func__, ah->opmode); | 1661 | __func__, ah->opmode); |
1663 | return; | 1662 | return; |
1664 | break; | 1663 | break; |
1665 | } | 1664 | } |
@@ -1715,10 +1714,10 @@ void ath9k_hw_set_sta_beacon_timers(struct ath_hw *ah, | |||
1715 | else | 1714 | else |
1716 | nextTbtt = bs->bs_nexttbtt; | 1715 | nextTbtt = bs->bs_nexttbtt; |
1717 | 1716 | ||
1718 | ath_print(common, ATH_DBG_BEACON, "next DTIM %d\n", bs->bs_nextdtim); | 1717 | ath_dbg(common, ATH_DBG_BEACON, "next DTIM %d\n", bs->bs_nextdtim); |
1719 | ath_print(common, ATH_DBG_BEACON, "next beacon %d\n", nextTbtt); | 1718 | ath_dbg(common, ATH_DBG_BEACON, "next beacon %d\n", nextTbtt); |
1720 | ath_print(common, ATH_DBG_BEACON, "beacon period %d\n", beaconintval); | 1719 | ath_dbg(common, ATH_DBG_BEACON, "beacon period %d\n", beaconintval); |
1721 | ath_print(common, ATH_DBG_BEACON, "DTIM period %d\n", dtimperiod); | 1720 | ath_dbg(common, ATH_DBG_BEACON, "DTIM period %d\n", dtimperiod); |
1722 | 1721 | ||
1723 | ENABLE_REGWRITE_BUFFER(ah); | 1722 | ENABLE_REGWRITE_BUFFER(ah); |
1724 | 1723 | ||
@@ -1783,8 +1782,8 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah) | |||
1783 | regulatory->current_rd += 5; | 1782 | regulatory->current_rd += 5; |
1784 | else if (regulatory->current_rd == 0x41) | 1783 | else if (regulatory->current_rd == 0x41) |
1785 | regulatory->current_rd = 0x43; | 1784 | regulatory->current_rd = 0x43; |
1786 | ath_print(common, ATH_DBG_REGULATORY, | 1785 | ath_dbg(common, ATH_DBG_REGULATORY, |
1787 | "regdomain mapped to 0x%x\n", regulatory->current_rd); | 1786 | "regdomain mapped to 0x%x\n", regulatory->current_rd); |
1788 | } | 1787 | } |
1789 | 1788 | ||
1790 | eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE); | 1789 | eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE); |
@@ -2245,8 +2244,8 @@ void ath9k_hw_reset_tsf(struct ath_hw *ah) | |||
2245 | { | 2244 | { |
2246 | if (!ath9k_hw_wait(ah, AR_SLP32_MODE, AR_SLP32_TSF_WRITE_STATUS, 0, | 2245 | if (!ath9k_hw_wait(ah, AR_SLP32_MODE, AR_SLP32_TSF_WRITE_STATUS, 0, |
2247 | AH_TSF_WRITE_TIMEOUT)) | 2246 | AH_TSF_WRITE_TIMEOUT)) |
2248 | ath_print(ath9k_hw_common(ah), ATH_DBG_RESET, | 2247 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_RESET, |
2249 | "AR_SLP32_TSF_WRITE_STATUS limit exceeded\n"); | 2248 | "AR_SLP32_TSF_WRITE_STATUS limit exceeded\n"); |
2250 | 2249 | ||
2251 | REG_WRITE(ah, AR_RESET_TSF, AR_RESET_TSF_ONCE); | 2250 | REG_WRITE(ah, AR_RESET_TSF, AR_RESET_TSF_ONCE); |
2252 | } | 2251 | } |
@@ -2367,9 +2366,9 @@ void ath9k_hw_gen_timer_start(struct ath_hw *ah, | |||
2367 | 2366 | ||
2368 | tsf = ath9k_hw_gettsf32(ah); | 2367 | tsf = ath9k_hw_gettsf32(ah); |
2369 | 2368 | ||
2370 | ath_print(ath9k_hw_common(ah), ATH_DBG_HWTIMER, | 2369 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_HWTIMER, |
2371 | "curent tsf %x period %x" | 2370 | "current tsf %x period %x timer_next %x\n", |
2372 | "timer_next %x\n", tsf, timer_period, timer_next); | 2371 | tsf, timer_period, timer_next); |
2373 | 2372 | ||
2374 | /* | 2373 | /* |
2375 | * Pull timer_next forward if the current TSF already passed it | 2374 | * Pull timer_next forward if the current TSF already passed it |
@@ -2449,8 +2448,8 @@ void ath_gen_timer_isr(struct ath_hw *ah) | |||
2449 | index = rightmost_index(timer_table, &thresh_mask); | 2448 | index = rightmost_index(timer_table, &thresh_mask); |
2450 | timer = timer_table->timers[index]; | 2449 | timer = timer_table->timers[index]; |
2451 | BUG_ON(!timer); | 2450 | BUG_ON(!timer); |
2452 | ath_print(common, ATH_DBG_HWTIMER, | 2451 | ath_dbg(common, ATH_DBG_HWTIMER, |
2453 | "TSF overflow for Gen timer %d\n", index); | 2452 | "TSF overflow for Gen timer %d\n", index); |
2454 | timer->overflow(timer->arg); | 2453 | timer->overflow(timer->arg); |
2455 | } | 2454 | } |
2456 | 2455 | ||
@@ -2458,8 +2457,8 @@ void ath_gen_timer_isr(struct ath_hw *ah) | |||
2458 | index = rightmost_index(timer_table, &trigger_mask); | 2457 | index = rightmost_index(timer_table, &trigger_mask); |
2459 | timer = timer_table->timers[index]; | 2458 | timer = timer_table->timers[index]; |
2460 | BUG_ON(!timer); | 2459 | BUG_ON(!timer); |
2461 | ath_print(common, ATH_DBG_HWTIMER, | 2460 | ath_dbg(common, ATH_DBG_HWTIMER, |
2462 | "Gen timer[%d] trigger\n", index); | 2461 | "Gen timer[%d] trigger\n", index); |
2463 | timer->trigger(timer->arg); | 2462 | timer->trigger(timer->arg); |
2464 | } | 2463 | } |
2465 | } | 2464 | } |