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/eeprom_4k.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/eeprom_4k.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_4k.c | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_4k.c b/drivers/net/wireless/ath/ath9k/eeprom_4k.c index f74692da24db..939fc7af86f8 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c | |||
@@ -37,14 +37,14 @@ static bool ath9k_hw_4k_fill_eeprom(struct ath_hw *ah) | |||
37 | eep_start_loc = 64; | 37 | eep_start_loc = 64; |
38 | 38 | ||
39 | if (!ath9k_hw_use_flash(ah)) { | 39 | if (!ath9k_hw_use_flash(ah)) { |
40 | ath_print(common, ATH_DBG_EEPROM, | 40 | ath_dbg(common, ATH_DBG_EEPROM, |
41 | "Reading from EEPROM, not flash\n"); | 41 | "Reading from EEPROM, not flash\n"); |
42 | } | 42 | } |
43 | 43 | ||
44 | for (addr = 0; addr < SIZE_EEPROM_4K; addr++) { | 44 | for (addr = 0; addr < SIZE_EEPROM_4K; addr++) { |
45 | if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, eep_data)) { | 45 | if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, eep_data)) { |
46 | ath_print(common, ATH_DBG_EEPROM, | 46 | ath_dbg(common, ATH_DBG_EEPROM, |
47 | "Unable to read eeprom region\n"); | 47 | "Unable to read eeprom region\n"); |
48 | return false; | 48 | return false; |
49 | } | 49 | } |
50 | eep_data++; | 50 | eep_data++; |
@@ -73,8 +73,8 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) | |||
73 | return false; | 73 | return false; |
74 | } | 74 | } |
75 | 75 | ||
76 | ath_print(common, ATH_DBG_EEPROM, | 76 | ath_dbg(common, ATH_DBG_EEPROM, |
77 | "Read Magic = 0x%04X\n", magic); | 77 | "Read Magic = 0x%04X\n", magic); |
78 | 78 | ||
79 | if (magic != AR5416_EEPROM_MAGIC) { | 79 | if (magic != AR5416_EEPROM_MAGIC) { |
80 | magic2 = swab16(magic); | 80 | magic2 = swab16(magic); |
@@ -90,14 +90,14 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) | |||
90 | } | 90 | } |
91 | } else { | 91 | } else { |
92 | ath_err(common, | 92 | ath_err(common, |
93 | "Invalid EEPROM Magic. endianness mismatch.\n"); | 93 | "Invalid EEPROM Magic. Endianness mismatch.\n"); |
94 | return -EINVAL; | 94 | return -EINVAL; |
95 | } | 95 | } |
96 | } | 96 | } |
97 | } | 97 | } |
98 | 98 | ||
99 | ath_print(common, ATH_DBG_EEPROM, "need_swap = %s.\n", | 99 | ath_dbg(common, ATH_DBG_EEPROM, "need_swap = %s.\n", |
100 | need_swap ? "True" : "False"); | 100 | need_swap ? "True" : "False"); |
101 | 101 | ||
102 | if (need_swap) | 102 | if (need_swap) |
103 | el = swab16(ah->eeprom.map4k.baseEepHeader.length); | 103 | el = swab16(ah->eeprom.map4k.baseEepHeader.length); |
@@ -118,8 +118,8 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) | |||
118 | u32 integer; | 118 | u32 integer; |
119 | u16 word; | 119 | u16 word; |
120 | 120 | ||
121 | ath_print(common, ATH_DBG_EEPROM, | 121 | ath_dbg(common, ATH_DBG_EEPROM, |
122 | "EEPROM Endianness is not native.. Changing\n"); | 122 | "EEPROM Endianness is not native.. Changing\n"); |
123 | 123 | ||
124 | word = swab16(eep->baseEepHeader.length); | 124 | word = swab16(eep->baseEepHeader.length); |
125 | eep->baseEepHeader.length = word; | 125 | eep->baseEepHeader.length = word; |
@@ -485,21 +485,20 @@ static void ath9k_hw_set_4k_power_cal_table(struct ath_hw *ah, | |||
485 | ((pdadcValues[4 * j + 3] & 0xFF) << 24); | 485 | ((pdadcValues[4 * j + 3] & 0xFF) << 24); |
486 | REG_WRITE(ah, regOffset, reg32); | 486 | REG_WRITE(ah, regOffset, reg32); |
487 | 487 | ||
488 | ath_print(common, ATH_DBG_EEPROM, | 488 | ath_dbg(common, ATH_DBG_EEPROM, |
489 | "PDADC (%d,%4x): %4.4x %8.8x\n", | 489 | "PDADC (%d,%4x): %4.4x %8.8x\n", |
490 | i, regChainOffset, regOffset, | 490 | i, regChainOffset, regOffset, |
491 | reg32); | 491 | reg32); |
492 | ath_print(common, ATH_DBG_EEPROM, | 492 | ath_dbg(common, ATH_DBG_EEPROM, |
493 | "PDADC: Chain %d | " | 493 | "PDADC: Chain %d | " |
494 | "PDADC %3d Value %3d | " | 494 | "PDADC %3d Value %3d | " |
495 | "PDADC %3d Value %3d | " | 495 | "PDADC %3d Value %3d | " |
496 | "PDADC %3d Value %3d | " | 496 | "PDADC %3d Value %3d | " |
497 | "PDADC %3d Value %3d |\n", | 497 | "PDADC %3d Value %3d |\n", |
498 | i, 4 * j, pdadcValues[4 * j], | 498 | i, 4 * j, pdadcValues[4 * j], |
499 | 4 * j + 1, pdadcValues[4 * j + 1], | 499 | 4 * j + 1, pdadcValues[4 * j + 1], |
500 | 4 * j + 2, pdadcValues[4 * j + 2], | 500 | 4 * j + 2, pdadcValues[4 * j + 2], |
501 | 4 * j + 3, | 501 | 4 * j + 3, pdadcValues[4 * j + 3]); |
502 | pdadcValues[4 * j + 3]); | ||
503 | 502 | ||
504 | regOffset += 4; | 503 | regOffset += 4; |
505 | } | 504 | } |
@@ -1178,17 +1177,17 @@ static u16 ath9k_hw_4k_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz) | |||
1178 | 1177 | ||
1179 | u16 spur_val = AR_NO_SPUR; | 1178 | u16 spur_val = AR_NO_SPUR; |
1180 | 1179 | ||
1181 | ath_print(common, ATH_DBG_ANI, | 1180 | ath_dbg(common, ATH_DBG_ANI, |
1182 | "Getting spur idx %d is2Ghz. %d val %x\n", | 1181 | "Getting spur idx:%d is2Ghz:%d val:%x\n", |
1183 | i, is2GHz, ah->config.spurchans[i][is2GHz]); | 1182 | i, is2GHz, ah->config.spurchans[i][is2GHz]); |
1184 | 1183 | ||
1185 | switch (ah->config.spurmode) { | 1184 | switch (ah->config.spurmode) { |
1186 | case SPUR_DISABLE: | 1185 | case SPUR_DISABLE: |
1187 | break; | 1186 | break; |
1188 | case SPUR_ENABLE_IOCTL: | 1187 | case SPUR_ENABLE_IOCTL: |
1189 | spur_val = ah->config.spurchans[i][is2GHz]; | 1188 | spur_val = ah->config.spurchans[i][is2GHz]; |
1190 | ath_print(common, ATH_DBG_ANI, | 1189 | ath_dbg(common, ATH_DBG_ANI, |
1191 | "Getting spur val from new loc. %d\n", spur_val); | 1190 | "Getting spur val from new loc. %d\n", spur_val); |
1192 | break; | 1191 | break; |
1193 | case SPUR_ENABLE_EEPROM: | 1192 | case SPUR_ENABLE_EEPROM: |
1194 | spur_val = EEP_MAP4K_SPURCHAN; | 1193 | spur_val = EEP_MAP4K_SPURCHAN; |