Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ath: Convert ath_dbg(bar, ATH_DBG_<FOO>, to ath_dbg(bar, FOO

Add ATH_DBG_ to macros to shorten the uses and
reduce the line count.

Coalesce ath_dbg formats.
Add missing spaces to coalesced formats.
Add missing newline terminations to ath_dbg formats.
Align ath_dbg arguments where appropriate.
Standardize ath_dbg formats without periods.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Joe Perches and committed by
John W. Linville
d2182b69 a85e1d55

+647 -799
+5 -2
drivers/net/wireless/ath/ath.h
··· 255 255 256 256 #define ath_dbg(common, dbg_mask, fmt, ...) \ 257 257 do { \ 258 - if ((common)->debug_mask & dbg_mask) \ 258 + if ((common)->debug_mask & ATH_DBG_##dbg_mask) \ 259 259 _ath_printk(KERN_DEBUG, common, fmt, ##__VA_ARGS__); \ 260 260 } while (0) 261 261 ··· 265 265 #else 266 266 267 267 static inline __attribute__ ((format (printf, 3, 4))) 268 - void ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask, 268 + void _ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask, 269 269 const char *fmt, ...) 270 270 { 271 271 } 272 + #define ath_dbg(common, dbg_mask, fmt, ...) \ 273 + _ath_dbg(common, ATH_DBG_##dbg_mask, fmt, ##__VA_ARGS__) 274 + 272 275 #define ATH_DBG_WARN(foo, arg...) do {} while (0) 273 276 #define ATH_DBG_WARN_ON_ONCE(foo) ({ \ 274 277 int __ret_warn_once = !!(foo); \
+13 -16
drivers/net/wireless/ath/ath9k/ani.c
··· 136 136 cck_base = AR_PHY_COUNTMAX - ah->config.cck_trig_high; 137 137 } 138 138 139 - ath_dbg(common, ATH_DBG_ANI, 140 - "Writing ofdmbase=%u cckbase=%u\n", ofdm_base, cck_base); 139 + ath_dbg(common, ANI, "Writing ofdmbase=%u cckbase=%u\n", 140 + ofdm_base, cck_base); 141 141 142 142 ENABLE_REGWRITE_BUFFER(ah); 143 143 ··· 268 268 269 269 aniState->noiseFloor = BEACON_RSSI(ah); 270 270 271 - ath_dbg(common, ATH_DBG_ANI, 272 - "**** ofdmlevel %d=>%d, rssi=%d[lo=%d hi=%d]\n", 271 + ath_dbg(common, ANI, "**** ofdmlevel %d=>%d, rssi=%d[lo=%d hi=%d]\n", 273 272 aniState->ofdmNoiseImmunityLevel, 274 273 immunityLevel, aniState->noiseFloor, 275 274 aniState->rssiThrLow, aniState->rssiThrHigh); ··· 335 336 const struct ani_cck_level_entry *entry_cck; 336 337 337 338 aniState->noiseFloor = BEACON_RSSI(ah); 338 - ath_dbg(common, ATH_DBG_ANI, 339 - "**** ccklevel %d=>%d, rssi=%d[lo=%d hi=%d]\n", 339 + ath_dbg(common, ANI, "**** ccklevel %d=>%d, rssi=%d[lo=%d hi=%d]\n", 340 340 aniState->cckNoiseImmunityLevel, immunityLevel, 341 341 aniState->noiseFloor, aniState->rssiThrLow, 342 342 aniState->rssiThrHigh); ··· 479 481 480 482 if (ah->opmode != NL80211_IFTYPE_STATION 481 483 && ah->opmode != NL80211_IFTYPE_ADHOC) { 482 - ath_dbg(common, ATH_DBG_ANI, 483 - "Reset ANI state opmode %u\n", ah->opmode); 484 + ath_dbg(common, ANI, "Reset ANI state opmode %u\n", ah->opmode); 484 485 ah->stats.ast_ani_reset++; 485 486 486 487 if (ah->opmode == NL80211_IFTYPE_AP) { ··· 579 582 ATH9K_ANI_OFDM_DEF_LEVEL || 580 583 aniState->cckNoiseImmunityLevel != 581 584 ATH9K_ANI_CCK_DEF_LEVEL) { 582 - ath_dbg(common, ATH_DBG_ANI, 585 + ath_dbg(common, ANI, 583 586 "Restore defaults: opmode %u chan %d Mhz/0x%x is_scanning=%d ofdm:%d cck:%d\n", 584 587 ah->opmode, 585 588 chan->channel, ··· 596 599 /* 597 600 * restore historical levels for this channel 598 601 */ 599 - ath_dbg(common, ATH_DBG_ANI, 602 + ath_dbg(common, ANI, 600 603 "Restore history: opmode %u chan %d Mhz/0x%x is_scanning=%d ofdm:%d cck:%d\n", 601 604 ah->opmode, 602 605 chan->channel, ··· 659 662 660 663 if (!use_new_ani(ah) && (phyCnt1 < ofdm_base || phyCnt2 < cck_base)) { 661 664 if (phyCnt1 < ofdm_base) { 662 - ath_dbg(common, ATH_DBG_ANI, 665 + ath_dbg(common, ANI, 663 666 "phyCnt1 0x%x, resetting counter value to 0x%x\n", 664 667 phyCnt1, ofdm_base); 665 668 REG_WRITE(ah, AR_PHY_ERR_1, ofdm_base); ··· 667 670 AR_PHY_ERR_OFDM_TIMING); 668 671 } 669 672 if (phyCnt2 < cck_base) { 670 - ath_dbg(common, ATH_DBG_ANI, 673 + ath_dbg(common, ANI, 671 674 "phyCnt2 0x%x, resetting counter value to 0x%x\n", 672 675 phyCnt2, cck_base); 673 676 REG_WRITE(ah, AR_PHY_ERR_2, cck_base); ··· 710 713 cckPhyErrRate = aniState->cckPhyErrCount * 1000 / 711 714 aniState->listenTime; 712 715 713 - ath_dbg(common, ATH_DBG_ANI, 716 + ath_dbg(common, ANI, 714 717 "listenTime=%d OFDM:%d errs=%d/s CCK:%d errs=%d/s ofdm_turn=%d\n", 715 718 aniState->listenTime, 716 719 aniState->ofdmNoiseImmunityLevel, ··· 745 748 { 746 749 struct ath_common *common = ath9k_hw_common(ah); 747 750 748 - ath_dbg(common, ATH_DBG_ANI, "Enable MIB counters\n"); 751 + ath_dbg(common, ANI, "Enable MIB counters\n"); 749 752 750 753 ath9k_hw_update_mibstats(ah, &ah->ah_mibStats); 751 754 ··· 767 770 { 768 771 struct ath_common *common = ath9k_hw_common(ah); 769 772 770 - ath_dbg(common, ATH_DBG_ANI, "Disable MIB counters\n"); 773 + ath_dbg(common, ANI, "Disable MIB counters\n"); 771 774 772 775 REG_WRITE(ah, AR_MIBC, AR_MIBC_FMC); 773 776 ath9k_hw_update_mibstats(ah, &ah->ah_mibStats); ··· 842 845 struct ath_common *common = ath9k_hw_common(ah); 843 846 int i; 844 847 845 - ath_dbg(common, ATH_DBG_ANI, "Initialize ANI\n"); 848 + ath_dbg(common, ANI, "Initialize ANI\n"); 846 849 847 850 if (use_new_ani(ah)) { 848 851 ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_NEW;
+19 -23
drivers/net/wireless/ath/ath9k/ar5008_phy.c
··· 158 158 /* pre-reverse this field */ 159 159 tmp_reg = ath9k_hw_reverse_bits(new_bias, 3); 160 160 161 - ath_dbg(common, ATH_DBG_CONFIG, "Force rf_pwd_icsyndiv to %1d on %4d\n", 161 + ath_dbg(common, CONFIG, "Force rf_pwd_icsyndiv to %1d on %4d\n", 162 162 new_bias, synth_freq); 163 163 164 164 /* swizzle rf_pwd_icsyndiv */ ··· 1053 1053 u32 level = param; 1054 1054 1055 1055 if (level >= ARRAY_SIZE(ah->totalSizeDesired)) { 1056 - ath_dbg(common, ATH_DBG_ANI, 1057 - "level out of range (%u > %zu)\n", 1056 + ath_dbg(common, ANI, "level out of range (%u > %zu)\n", 1058 1057 level, ARRAY_SIZE(ah->totalSizeDesired)); 1059 1058 return false; 1060 1059 } ··· 1156 1157 u32 level = param; 1157 1158 1158 1159 if (level >= ARRAY_SIZE(firstep)) { 1159 - ath_dbg(common, ATH_DBG_ANI, 1160 - "level out of range (%u > %zu)\n", 1160 + ath_dbg(common, ANI, "level out of range (%u > %zu)\n", 1161 1161 level, ARRAY_SIZE(firstep)); 1162 1162 return false; 1163 1163 } ··· 1175 1177 u32 level = param; 1176 1178 1177 1179 if (level >= ARRAY_SIZE(cycpwrThr1)) { 1178 - ath_dbg(common, ATH_DBG_ANI, 1179 - "level out of range (%u > %zu)\n", 1180 + ath_dbg(common, ANI, "level out of range (%u > %zu)\n", 1180 1181 level, ARRAY_SIZE(cycpwrThr1)); 1181 1182 return false; 1182 1183 } ··· 1192 1195 case ATH9K_ANI_PRESENT: 1193 1196 break; 1194 1197 default: 1195 - ath_dbg(common, ATH_DBG_ANI, "invalid cmd %u\n", cmd); 1198 + ath_dbg(common, ANI, "invalid cmd %u\n", cmd); 1196 1199 return false; 1197 1200 } 1198 1201 1199 - ath_dbg(common, ATH_DBG_ANI, "ANI parameters:\n"); 1200 - ath_dbg(common, ATH_DBG_ANI, 1202 + ath_dbg(common, ANI, "ANI parameters:\n"); 1203 + ath_dbg(common, ANI, 1201 1204 "noiseImmunityLevel=%d, spurImmunityLevel=%d, ofdmWeakSigDetectOff=%d\n", 1202 1205 aniState->noiseImmunityLevel, 1203 1206 aniState->spurImmunityLevel, 1204 1207 !aniState->ofdmWeakSigDetectOff); 1205 - ath_dbg(common, ATH_DBG_ANI, 1208 + ath_dbg(common, ANI, 1206 1209 "cckWeakSigThreshold=%d, firstepLevel=%d, listenTime=%d\n", 1207 1210 aniState->cckWeakSigThreshold, 1208 1211 aniState->firstepLevel, 1209 1212 aniState->listenTime); 1210 - ath_dbg(common, ATH_DBG_ANI, 1211 - "ofdmPhyErrCount=%d, cckPhyErrCount=%d\n\n", 1213 + ath_dbg(common, ANI, "ofdmPhyErrCount=%d, cckPhyErrCount=%d\n\n", 1212 1214 aniState->ofdmPhyErrCount, 1213 1215 aniState->cckPhyErrCount); 1214 1216 ··· 1291 1295 AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW); 1292 1296 1293 1297 if (!on != aniState->ofdmWeakSigDetectOff) { 1294 - ath_dbg(common, ATH_DBG_ANI, 1298 + ath_dbg(common, ANI, 1295 1299 "** ch %d: ofdm weak signal: %s=>%s\n", 1296 1300 chan->channel, 1297 1301 !aniState->ofdmWeakSigDetectOff ? ··· 1309 1313 u32 level = param; 1310 1314 1311 1315 if (level >= ARRAY_SIZE(firstep_table)) { 1312 - ath_dbg(common, ATH_DBG_ANI, 1316 + ath_dbg(common, ANI, 1313 1317 "ATH9K_ANI_FIRSTEP_LEVEL: level out of range (%u > %zu)\n", 1314 1318 level, ARRAY_SIZE(firstep_table)); 1315 1319 return false; ··· 1346 1350 AR_PHY_FIND_SIG_FIRSTEP_LOW, value2); 1347 1351 1348 1352 if (level != aniState->firstepLevel) { 1349 - ath_dbg(common, ATH_DBG_ANI, 1353 + ath_dbg(common, ANI, 1350 1354 "** ch %d: level %d=>%d[def:%d] firstep[level]=%d ini=%d\n", 1351 1355 chan->channel, 1352 1356 aniState->firstepLevel, ··· 1354 1358 ATH9K_ANI_FIRSTEP_LVL_NEW, 1355 1359 value, 1356 1360 aniState->iniDef.firstep); 1357 - ath_dbg(common, ATH_DBG_ANI, 1361 + ath_dbg(common, ANI, 1358 1362 "** ch %d: level %d=>%d[def:%d] firstep_low[level]=%d ini=%d\n", 1359 1363 chan->channel, 1360 1364 aniState->firstepLevel, ··· 1374 1378 u32 level = param; 1375 1379 1376 1380 if (level >= ARRAY_SIZE(cycpwrThr1_table)) { 1377 - ath_dbg(common, ATH_DBG_ANI, 1381 + ath_dbg(common, ANI, 1378 1382 "ATH9K_ANI_SPUR_IMMUNITY_LEVEL: level out of range (%u > %zu)\n", 1379 1383 level, ARRAY_SIZE(cycpwrThr1_table)); 1380 1384 return false; ··· 1410 1414 AR_PHY_EXT_TIMING5_CYCPWR_THR1, value2); 1411 1415 1412 1416 if (level != aniState->spurImmunityLevel) { 1413 - ath_dbg(common, ATH_DBG_ANI, 1417 + ath_dbg(common, ANI, 1414 1418 "** ch %d: level %d=>%d[def:%d] cycpwrThr1[level]=%d ini=%d\n", 1415 1419 chan->channel, 1416 1420 aniState->spurImmunityLevel, ··· 1418 1422 ATH9K_ANI_SPUR_IMMUNE_LVL_NEW, 1419 1423 value, 1420 1424 aniState->iniDef.cycpwrThr1); 1421 - ath_dbg(common, ATH_DBG_ANI, 1425 + ath_dbg(common, ANI, 1422 1426 "** ch %d: level %d=>%d[def:%d] cycpwrThr1Ext[level]=%d ini=%d\n", 1423 1427 chan->channel, 1424 1428 aniState->spurImmunityLevel, ··· 1444 1448 case ATH9K_ANI_PRESENT: 1445 1449 break; 1446 1450 default: 1447 - ath_dbg(common, ATH_DBG_ANI, "invalid cmd %u\n", cmd); 1451 + ath_dbg(common, ANI, "invalid cmd %u\n", cmd); 1448 1452 return false; 1449 1453 } 1450 1454 1451 - ath_dbg(common, ATH_DBG_ANI, 1455 + ath_dbg(common, ANI, 1452 1456 "ANI parameters: SI=%d, ofdmWS=%s FS=%d MRCcck=%s listenTime=%d ofdmErrs=%d cckErrs=%d\n", 1453 1457 aniState->spurImmunityLevel, 1454 1458 !aniState->ofdmWeakSigDetectOff ? "on" : "off", ··· 1502 1506 1503 1507 iniDef = &aniState->iniDef; 1504 1508 1505 - ath_dbg(common, ATH_DBG_ANI, "ver %d.%d opmode %u chan %d Mhz/0x%x\n", 1509 + ath_dbg(common, ANI, "ver %d.%d opmode %u chan %d Mhz/0x%x\n", 1506 1510 ah->hw_version.macVersion, 1507 1511 ah->hw_version.macRev, 1508 1512 ah->opmode,
+61 -73
drivers/net/wireless/ath/ath9k/ar9002_calib.c
··· 61 61 switch (currCal->calData->calType) { 62 62 case IQ_MISMATCH_CAL: 63 63 REG_WRITE(ah, AR_PHY_CALMODE, AR_PHY_CALMODE_IQ); 64 - ath_dbg(common, ATH_DBG_CALIBRATE, 64 + ath_dbg(common, CALIBRATE, 65 65 "starting IQ Mismatch Calibration\n"); 66 66 break; 67 67 case ADC_GAIN_CAL: 68 68 REG_WRITE(ah, AR_PHY_CALMODE, AR_PHY_CALMODE_ADC_GAIN); 69 - ath_dbg(common, ATH_DBG_CALIBRATE, 70 - "starting ADC Gain Calibration\n"); 69 + ath_dbg(common, CALIBRATE, "starting ADC Gain Calibration\n"); 71 70 break; 72 71 case ADC_DC_CAL: 73 72 REG_WRITE(ah, AR_PHY_CALMODE, AR_PHY_CALMODE_ADC_DC_PER); 74 - ath_dbg(common, ATH_DBG_CALIBRATE, 75 - "starting ADC DC Calibration\n"); 73 + ath_dbg(common, CALIBRATE, "starting ADC DC Calibration\n"); 76 74 break; 77 75 } 78 76 ··· 127 129 REG_READ(ah, AR_PHY_CAL_MEAS_1(i)); 128 130 ah->totalIqCorrMeas[i] += 129 131 (int32_t) REG_READ(ah, AR_PHY_CAL_MEAS_2(i)); 130 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_CALIBRATE, 132 + ath_dbg(ath9k_hw_common(ah), CALIBRATE, 131 133 "%d: Chn %d pmi=0x%08x;pmq=0x%08x;iqcm=0x%08x;\n", 132 134 ah->cal_samples, i, ah->totalPowerMeasI[i], 133 135 ah->totalPowerMeasQ[i], ··· 149 151 ah->totalAdcQEvenPhase[i] += 150 152 REG_READ(ah, AR_PHY_CAL_MEAS_3(i)); 151 153 152 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_CALIBRATE, 154 + ath_dbg(ath9k_hw_common(ah), CALIBRATE, 153 155 "%d: Chn %d oddi=0x%08x; eveni=0x%08x; oddq=0x%08x; evenq=0x%08x;\n", 154 156 ah->cal_samples, i, 155 157 ah->totalAdcIOddPhase[i], ··· 173 175 ah->totalAdcDcOffsetQEvenPhase[i] += 174 176 (int32_t) REG_READ(ah, AR_PHY_CAL_MEAS_3(i)); 175 177 176 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_CALIBRATE, 178 + ath_dbg(ath9k_hw_common(ah), CALIBRATE, 177 179 "%d: Chn %d oddi=0x%08x; eveni=0x%08x; oddq=0x%08x; evenq=0x%08x;\n", 178 180 ah->cal_samples, i, 179 181 ah->totalAdcDcOffsetIOddPhase[i], ··· 196 198 powerMeasQ = ah->totalPowerMeasQ[i]; 197 199 iqCorrMeas = ah->totalIqCorrMeas[i]; 198 200 199 - ath_dbg(common, ATH_DBG_CALIBRATE, 201 + ath_dbg(common, CALIBRATE, 200 202 "Starting IQ Cal and Correction for Chain %d\n", 201 203 i); 202 204 203 - ath_dbg(common, ATH_DBG_CALIBRATE, 205 + ath_dbg(common, CALIBRATE, 204 206 "Original: Chn %d iq_corr_meas = 0x%08x\n", 205 207 i, ah->totalIqCorrMeas[i]); 206 208 ··· 211 213 iqCorrNeg = 1; 212 214 } 213 215 214 - ath_dbg(common, ATH_DBG_CALIBRATE, 215 - "Chn %d pwr_meas_i = 0x%08x\n", i, powerMeasI); 216 - ath_dbg(common, ATH_DBG_CALIBRATE, 217 - "Chn %d pwr_meas_q = 0x%08x\n", i, powerMeasQ); 218 - ath_dbg(common, ATH_DBG_CALIBRATE, "iqCorrNeg is 0x%08x\n", 219 - iqCorrNeg); 216 + ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_i = 0x%08x\n", 217 + i, powerMeasI); 218 + ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_q = 0x%08x\n", 219 + i, powerMeasQ); 220 + ath_dbg(common, CALIBRATE, "iqCorrNeg is 0x%08x\n", iqCorrNeg); 220 221 221 222 iCoffDenom = (powerMeasI / 2 + powerMeasQ / 2) / 128; 222 223 qCoffDenom = powerMeasQ / 64; ··· 224 227 (qCoffDenom != 0)) { 225 228 iCoff = iqCorrMeas / iCoffDenom; 226 229 qCoff = powerMeasI / qCoffDenom - 64; 227 - ath_dbg(common, ATH_DBG_CALIBRATE, 228 - "Chn %d iCoff = 0x%08x\n", i, iCoff); 229 - ath_dbg(common, ATH_DBG_CALIBRATE, 230 - "Chn %d qCoff = 0x%08x\n", i, qCoff); 230 + ath_dbg(common, CALIBRATE, "Chn %d iCoff = 0x%08x\n", 231 + i, iCoff); 232 + ath_dbg(common, CALIBRATE, "Chn %d qCoff = 0x%08x\n", 233 + i, qCoff); 231 234 232 235 iCoff = iCoff & 0x3f; 233 - ath_dbg(common, ATH_DBG_CALIBRATE, 236 + ath_dbg(common, CALIBRATE, 234 237 "New: Chn %d iCoff = 0x%08x\n", i, iCoff); 235 238 if (iqCorrNeg == 0x0) 236 239 iCoff = 0x40 - iCoff; ··· 240 243 else if (qCoff <= -16) 241 244 qCoff = -16; 242 245 243 - ath_dbg(common, ATH_DBG_CALIBRATE, 246 + ath_dbg(common, CALIBRATE, 244 247 "Chn %d : iCoff = 0x%x qCoff = 0x%x\n", 245 248 i, iCoff, qCoff); 246 249 ··· 250 253 REG_RMW_FIELD(ah, AR_PHY_TIMING_CTRL4(i), 251 254 AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF, 252 255 qCoff); 253 - ath_dbg(common, ATH_DBG_CALIBRATE, 256 + ath_dbg(common, CALIBRATE, 254 257 "IQ Cal and Correction done for Chain %d\n", 255 258 i); 256 259 } ··· 272 275 qOddMeasOffset = ah->totalAdcQOddPhase[i]; 273 276 qEvenMeasOffset = ah->totalAdcQEvenPhase[i]; 274 277 275 - ath_dbg(common, ATH_DBG_CALIBRATE, 278 + ath_dbg(common, CALIBRATE, 276 279 "Starting ADC Gain Cal for Chain %d\n", i); 277 280 278 - ath_dbg(common, ATH_DBG_CALIBRATE, 279 - "Chn %d pwr_meas_odd_i = 0x%08x\n", i, 280 - iOddMeasOffset); 281 - ath_dbg(common, ATH_DBG_CALIBRATE, 282 - "Chn %d pwr_meas_even_i = 0x%08x\n", i, 283 - iEvenMeasOffset); 284 - ath_dbg(common, ATH_DBG_CALIBRATE, 285 - "Chn %d pwr_meas_odd_q = 0x%08x\n", i, 286 - qOddMeasOffset); 287 - ath_dbg(common, ATH_DBG_CALIBRATE, 288 - "Chn %d pwr_meas_even_q = 0x%08x\n", i, 289 - qEvenMeasOffset); 281 + ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_odd_i = 0x%08x\n", 282 + i, iOddMeasOffset); 283 + ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_even_i = 0x%08x\n", 284 + i, iEvenMeasOffset); 285 + ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_odd_q = 0x%08x\n", 286 + i, qOddMeasOffset); 287 + ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_even_q = 0x%08x\n", 288 + i, qEvenMeasOffset); 290 289 291 290 if (iOddMeasOffset != 0 && qEvenMeasOffset != 0) { 292 291 iGainMismatch = ··· 292 299 ((qOddMeasOffset * 32) / 293 300 qEvenMeasOffset) & 0x3f; 294 301 295 - ath_dbg(common, ATH_DBG_CALIBRATE, 296 - "Chn %d gain_mismatch_i = 0x%08x\n", i, 297 - iGainMismatch); 298 - ath_dbg(common, ATH_DBG_CALIBRATE, 299 - "Chn %d gain_mismatch_q = 0x%08x\n", i, 300 - qGainMismatch); 302 + ath_dbg(common, CALIBRATE, 303 + "Chn %d gain_mismatch_i = 0x%08x\n", 304 + i, iGainMismatch); 305 + ath_dbg(common, CALIBRATE, 306 + "Chn %d gain_mismatch_q = 0x%08x\n", 307 + i, qGainMismatch); 301 308 302 309 val = REG_READ(ah, AR_PHY_NEW_ADC_DC_GAIN_CORR(i)); 303 310 val &= 0xfffff000; 304 311 val |= (qGainMismatch) | (iGainMismatch << 6); 305 312 REG_WRITE(ah, AR_PHY_NEW_ADC_DC_GAIN_CORR(i), val); 306 313 307 - ath_dbg(common, ATH_DBG_CALIBRATE, 314 + ath_dbg(common, CALIBRATE, 308 315 "ADC Gain Cal done for Chain %d\n", i); 309 316 } 310 317 } ··· 330 337 qOddMeasOffset = ah->totalAdcDcOffsetQOddPhase[i]; 331 338 qEvenMeasOffset = ah->totalAdcDcOffsetQEvenPhase[i]; 332 339 333 - ath_dbg(common, ATH_DBG_CALIBRATE, 340 + ath_dbg(common, CALIBRATE, 334 341 "Starting ADC DC Offset Cal for Chain %d\n", i); 335 342 336 - ath_dbg(common, ATH_DBG_CALIBRATE, 337 - "Chn %d pwr_meas_odd_i = %d\n", i, 338 - iOddMeasOffset); 339 - ath_dbg(common, ATH_DBG_CALIBRATE, 340 - "Chn %d pwr_meas_even_i = %d\n", i, 341 - iEvenMeasOffset); 342 - ath_dbg(common, ATH_DBG_CALIBRATE, 343 - "Chn %d pwr_meas_odd_q = %d\n", i, 344 - qOddMeasOffset); 345 - ath_dbg(common, ATH_DBG_CALIBRATE, 346 - "Chn %d pwr_meas_even_q = %d\n", i, 347 - qEvenMeasOffset); 343 + ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_odd_i = %d\n", 344 + i, iOddMeasOffset); 345 + ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_even_i = %d\n", 346 + i, iEvenMeasOffset); 347 + ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_odd_q = %d\n", 348 + i, qOddMeasOffset); 349 + ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_even_q = %d\n", 350 + i, qEvenMeasOffset); 348 351 349 352 iDcMismatch = (((iEvenMeasOffset - iOddMeasOffset) * 2) / 350 353 numSamples) & 0x1ff; 351 354 qDcMismatch = (((qOddMeasOffset - qEvenMeasOffset) * 2) / 352 355 numSamples) & 0x1ff; 353 356 354 - ath_dbg(common, ATH_DBG_CALIBRATE, 355 - "Chn %d dc_offset_mismatch_i = 0x%08x\n", i, 356 - iDcMismatch); 357 - ath_dbg(common, ATH_DBG_CALIBRATE, 358 - "Chn %d dc_offset_mismatch_q = 0x%08x\n", i, 359 - qDcMismatch); 357 + ath_dbg(common, CALIBRATE, 358 + "Chn %d dc_offset_mismatch_i = 0x%08x\n", 359 + i, iDcMismatch); 360 + ath_dbg(common, CALIBRATE, 361 + "Chn %d dc_offset_mismatch_q = 0x%08x\n", 362 + i, qDcMismatch); 360 363 361 364 val = REG_READ(ah, AR_PHY_NEW_ADC_DC_GAIN_CORR(i)); 362 365 val &= 0xc0000fff; 363 366 val |= (qDcMismatch << 12) | (iDcMismatch << 21); 364 367 REG_WRITE(ah, AR_PHY_NEW_ADC_DC_GAIN_CORR(i), val); 365 368 366 - ath_dbg(common, ATH_DBG_CALIBRATE, 369 + ath_dbg(common, CALIBRATE, 367 370 "ADC DC Offset Cal done for Chain %d\n", i); 368 371 } 369 372 ··· 549 560 { 0x7838, 0 }, 550 561 }; 551 562 552 - ath_dbg(common, ATH_DBG_CALIBRATE, "Running PA Calibration\n"); 563 + ath_dbg(common, CALIBRATE, "Running PA Calibration\n"); 553 564 554 565 /* PA CAL is not needed for high power solution */ 555 566 if (ah->eep_ops->get_eeprom(ah, EEP_TXGAIN_TYPE) == ··· 730 741 REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL); 731 742 if (!ath9k_hw_wait(ah, AR_PHY_AGC_CONTROL, 732 743 AR_PHY_AGC_CONTROL_CAL, 0, AH_WAIT_TIMEOUT)) { 733 - ath_dbg(common, ATH_DBG_CALIBRATE, 744 + ath_dbg(common, CALIBRATE, 734 745 "offset calibration failed to complete in 1ms; noisy environment?\n"); 735 746 return false; 736 747 } ··· 744 755 REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL); 745 756 if (!ath9k_hw_wait(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL, 746 757 0, AH_WAIT_TIMEOUT)) { 747 - ath_dbg(common, ATH_DBG_CALIBRATE, 758 + ath_dbg(common, CALIBRATE, 748 759 "offset calibration failed to complete in 1ms; noisy environment?\n"); 749 760 return false; 750 761 } ··· 840 851 if (!ath9k_hw_wait(ah, AR_PHY_AGC_CONTROL, 841 852 AR_PHY_AGC_CONTROL_CAL, 842 853 0, AH_WAIT_TIMEOUT)) { 843 - ath_dbg(common, ATH_DBG_CALIBRATE, 854 + ath_dbg(common, CALIBRATE, 844 855 "offset calibration failed to complete in 1ms; noisy environment?\n"); 845 856 return false; 846 857 } ··· 875 886 if (ar9002_hw_is_cal_supported(ah, chan, ADC_GAIN_CAL)) { 876 887 INIT_CAL(&ah->adcgain_caldata); 877 888 INSERT_CAL(ah, &ah->adcgain_caldata); 878 - ath_dbg(common, ATH_DBG_CALIBRATE, 879 - "enabling ADC Gain Calibration.\n"); 889 + ath_dbg(common, CALIBRATE, 890 + "enabling ADC Gain Calibration\n"); 880 891 } 881 892 882 893 if (ar9002_hw_is_cal_supported(ah, chan, ADC_DC_CAL)) { 883 894 INIT_CAL(&ah->adcdc_caldata); 884 895 INSERT_CAL(ah, &ah->adcdc_caldata); 885 - ath_dbg(common, ATH_DBG_CALIBRATE, 886 - "enabling ADC DC Calibration.\n"); 896 + ath_dbg(common, CALIBRATE, 897 + "enabling ADC DC Calibration\n"); 887 898 } 888 899 889 900 if (ar9002_hw_is_cal_supported(ah, chan, IQ_MISMATCH_CAL)) { 890 901 INIT_CAL(&ah->iq_caldata); 891 902 INSERT_CAL(ah, &ah->iq_caldata); 892 - ath_dbg(common, ATH_DBG_CALIBRATE, 893 - "enabling IQ Calibration.\n"); 903 + ath_dbg(common, CALIBRATE, "enabling IQ Calibration\n"); 894 904 } 895 905 896 906 ah->cal_list_curr = ah->cal_list;
+5 -5
drivers/net/wireless/ath/ath9k/ar9002_mac.c
··· 107 107 } 108 108 109 109 if (isr & AR_ISR_RXORN) { 110 - ath_dbg(common, ATH_DBG_INTERRUPT, 110 + ath_dbg(common, INTERRUPT, 111 111 "receive FIFO overrun interrupt\n"); 112 112 } 113 113 ··· 143 143 144 144 if (fatal_int) { 145 145 if (sync_cause & AR_INTR_SYNC_HOST1_FATAL) { 146 - ath_dbg(common, ATH_DBG_ANY, 146 + ath_dbg(common, ANY, 147 147 "received PCI FATAL interrupt\n"); 148 148 } 149 149 if (sync_cause & AR_INTR_SYNC_HOST1_PERR) { 150 - ath_dbg(common, ATH_DBG_ANY, 150 + ath_dbg(common, ANY, 151 151 "received PCI PERR interrupt\n"); 152 152 } 153 153 *masked |= ATH9K_INT_FATAL; 154 154 } 155 155 if (sync_cause & AR_INTR_SYNC_RADM_CPL_TIMEOUT) { 156 - ath_dbg(common, ATH_DBG_INTERRUPT, 156 + ath_dbg(common, INTERRUPT, 157 157 "AR_INTR_SYNC_RADM_CPL_TIMEOUT\n"); 158 158 REG_WRITE(ah, AR_RC, AR_RC_HOSTIF); 159 159 REG_WRITE(ah, AR_RC, 0); 160 160 *masked |= ATH9K_INT_FATAL; 161 161 } 162 162 if (sync_cause & AR_INTR_SYNC_LOCAL_TIMEOUT) { 163 - ath_dbg(common, ATH_DBG_INTERRUPT, 163 + ath_dbg(common, INTERRUPT, 164 164 "AR_INTR_SYNC_LOCAL_TIMEOUT\n"); 165 165 } 166 166
+54 -66
drivers/net/wireless/ath/ath9k/ar9003_calib.c
··· 52 52 currCal->calData->calCountMax); 53 53 REG_WRITE(ah, AR_PHY_CALMODE, AR_PHY_CALMODE_IQ); 54 54 55 - ath_dbg(common, ATH_DBG_CALIBRATE, 55 + ath_dbg(common, CALIBRATE, 56 56 "starting IQ Mismatch Calibration\n"); 57 57 58 58 /* Kick-off cal */ ··· 64 64 REG_RMW_FIELD(ah, AR_PHY_65NM_CH0_THERM, 65 65 AR_PHY_65NM_CH0_THERM_START, 1); 66 66 67 - ath_dbg(common, ATH_DBG_CALIBRATE, 67 + ath_dbg(common, CALIBRATE, 68 68 "starting Temperature Compensation Calibration\n"); 69 69 break; 70 70 } ··· 194 194 REG_READ(ah, AR_PHY_CAL_MEAS_1(i)); 195 195 ah->totalIqCorrMeas[i] += 196 196 (int32_t) REG_READ(ah, AR_PHY_CAL_MEAS_2(i)); 197 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_CALIBRATE, 197 + ath_dbg(ath9k_hw_common(ah), CALIBRATE, 198 198 "%d: Chn %d pmi=0x%08x;pmq=0x%08x;iqcm=0x%08x;\n", 199 199 ah->cal_samples, i, ah->totalPowerMeasI[i], 200 200 ah->totalPowerMeasQ[i], ··· 221 221 powerMeasQ = ah->totalPowerMeasQ[i]; 222 222 iqCorrMeas = ah->totalIqCorrMeas[i]; 223 223 224 - ath_dbg(common, ATH_DBG_CALIBRATE, 225 - "Starting IQ Cal and Correction for Chain %d\n", 226 - i); 224 + ath_dbg(common, CALIBRATE, 225 + "Starting IQ Cal and Correction for Chain %d\n", i); 227 226 228 - ath_dbg(common, ATH_DBG_CALIBRATE, 227 + ath_dbg(common, CALIBRATE, 229 228 "Original: Chn %d iq_corr_meas = 0x%08x\n", 230 229 i, ah->totalIqCorrMeas[i]); 231 230 ··· 235 236 iqCorrNeg = 1; 236 237 } 237 238 238 - ath_dbg(common, ATH_DBG_CALIBRATE, 239 - "Chn %d pwr_meas_i = 0x%08x\n", i, powerMeasI); 240 - ath_dbg(common, ATH_DBG_CALIBRATE, 241 - "Chn %d pwr_meas_q = 0x%08x\n", i, powerMeasQ); 242 - ath_dbg(common, ATH_DBG_CALIBRATE, "iqCorrNeg is 0x%08x\n", 243 - iqCorrNeg); 239 + ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_i = 0x%08x\n", 240 + i, powerMeasI); 241 + ath_dbg(common, CALIBRATE, "Chn %d pwr_meas_q = 0x%08x\n", 242 + i, powerMeasQ); 243 + ath_dbg(common, CALIBRATE, "iqCorrNeg is 0x%08x\n", iqCorrNeg); 244 244 245 245 iCoffDenom = (powerMeasI / 2 + powerMeasQ / 2) / 256; 246 246 qCoffDenom = powerMeasQ / 64; ··· 247 249 if ((iCoffDenom != 0) && (qCoffDenom != 0)) { 248 250 iCoff = iqCorrMeas / iCoffDenom; 249 251 qCoff = powerMeasI / qCoffDenom - 64; 250 - ath_dbg(common, ATH_DBG_CALIBRATE, 251 - "Chn %d iCoff = 0x%08x\n", i, iCoff); 252 - ath_dbg(common, ATH_DBG_CALIBRATE, 253 - "Chn %d qCoff = 0x%08x\n", i, qCoff); 252 + ath_dbg(common, CALIBRATE, "Chn %d iCoff = 0x%08x\n", 253 + i, iCoff); 254 + ath_dbg(common, CALIBRATE, "Chn %d qCoff = 0x%08x\n", 255 + i, qCoff); 254 256 255 257 /* Force bounds on iCoff */ 256 258 if (iCoff >= 63) ··· 271 273 iCoff = iCoff & 0x7f; 272 274 qCoff = qCoff & 0x7f; 273 275 274 - ath_dbg(common, ATH_DBG_CALIBRATE, 276 + ath_dbg(common, CALIBRATE, 275 277 "Chn %d : iCoff = 0x%x qCoff = 0x%x\n", 276 278 i, iCoff, qCoff); 277 - ath_dbg(common, ATH_DBG_CALIBRATE, 279 + ath_dbg(common, CALIBRATE, 278 280 "Register offset (0x%04x) before update = 0x%x\n", 279 281 offset_array[i], 280 282 REG_READ(ah, offset_array[i])); ··· 285 287 REG_RMW_FIELD(ah, offset_array[i], 286 288 AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF, 287 289 qCoff); 288 - ath_dbg(common, ATH_DBG_CALIBRATE, 290 + ath_dbg(common, CALIBRATE, 289 291 "Register offset (0x%04x) QI COFF (bitfields 0x%08x) after update = 0x%x\n", 290 292 offset_array[i], 291 293 AR_PHY_RX_IQCAL_CORR_IQCORR_Q_I_COFF, 292 294 REG_READ(ah, offset_array[i])); 293 - ath_dbg(common, ATH_DBG_CALIBRATE, 295 + ath_dbg(common, CALIBRATE, 294 296 "Register offset (0x%04x) QQ COFF (bitfields 0x%08x) after update = 0x%x\n", 295 297 offset_array[i], 296 298 AR_PHY_RX_IQCAL_CORR_IQCORR_Q_Q_COFF, 297 299 REG_READ(ah, offset_array[i])); 298 300 299 - ath_dbg(common, ATH_DBG_CALIBRATE, 301 + ath_dbg(common, CALIBRATE, 300 302 "IQ Cal and Correction done for Chain %d\n", i); 301 303 } 302 304 } 303 305 304 306 REG_SET_BIT(ah, AR_PHY_RX_IQCAL_CORR_B0, 305 307 AR_PHY_RX_IQCAL_CORR_IQCORR_ENABLE); 306 - ath_dbg(common, ATH_DBG_CALIBRATE, 308 + ath_dbg(common, CALIBRATE, 307 309 "IQ Cal and Correction (offset 0x%04x) enabled (bit position 0x%08x). New Value 0x%08x\n", 308 310 (unsigned) (AR_PHY_RX_IQCAL_CORR_B0), 309 311 AR_PHY_RX_IQCAL_CORR_IQCORR_ENABLE, ··· 347 349 f2 = (f1 * f1 + f3 * f3) / result_shift; 348 350 349 351 if (!f2) { 350 - ath_dbg(common, ATH_DBG_CALIBRATE, "Divide by 0\n"); 352 + ath_dbg(common, CALIBRATE, "Divide by 0\n"); 351 353 return false; 352 354 } 353 355 ··· 468 470 469 471 if ((i2_p_q2_a0_d0 == 0) || (i2_p_q2_a0_d1 == 0) || 470 472 (i2_p_q2_a1_d0 == 0) || (i2_p_q2_a1_d1 == 0)) { 471 - ath_dbg(common, ATH_DBG_CALIBRATE, 473 + ath_dbg(common, CALIBRATE, 472 474 "Divide by 0:\n" 473 475 "a0_d0=%d\n" 474 476 "a0_d1=%d\n" ··· 508 510 mag2 = ar9003_hw_find_mag_approx(ah, cos_2phi_2, sin_2phi_2); 509 511 510 512 if ((mag1 == 0) || (mag2 == 0)) { 511 - ath_dbg(common, ATH_DBG_CALIBRATE, 512 - "Divide by 0: mag1=%d, mag2=%d\n", 513 + ath_dbg(common, CALIBRATE, "Divide by 0: mag1=%d, mag2=%d\n", 513 514 mag1, mag2); 514 515 return false; 515 516 } ··· 526 529 mag_a0_d0, phs_a0_d0, 527 530 mag_a1_d0, 528 531 phs_a1_d0, solved_eq)) { 529 - ath_dbg(common, ATH_DBG_CALIBRATE, 530 - "Call to ar9003_hw_solve_iq_cal() failed.\n"); 532 + ath_dbg(common, CALIBRATE, 533 + "Call to ar9003_hw_solve_iq_cal() failed\n"); 531 534 return false; 532 535 } 533 536 ··· 536 539 mag_rx = solved_eq[2]; 537 540 phs_rx = solved_eq[3]; 538 541 539 - ath_dbg(common, ATH_DBG_CALIBRATE, 542 + ath_dbg(common, CALIBRATE, 540 543 "chain %d: mag mismatch=%d phase mismatch=%d\n", 541 544 chain_idx, mag_tx/res_scale, phs_tx/res_scale); 542 545 543 546 if (res_scale == mag_tx) { 544 - ath_dbg(common, ATH_DBG_CALIBRATE, 547 + ath_dbg(common, CALIBRATE, 545 548 "Divide by 0: mag_tx=%d, res_scale=%d\n", 546 549 mag_tx, res_scale); 547 550 return false; ··· 554 557 q_q_coff = (mag_corr_tx * 128 / res_scale); 555 558 q_i_coff = (phs_corr_tx * 256 / res_scale); 556 559 557 - ath_dbg(common, ATH_DBG_CALIBRATE, 558 - "tx chain %d: mag corr=%d phase corr=%d\n", 560 + ath_dbg(common, CALIBRATE, "tx chain %d: mag corr=%d phase corr=%d\n", 559 561 chain_idx, q_q_coff, q_i_coff); 560 562 561 563 if (q_i_coff < -63) ··· 568 572 569 573 iqc_coeff[0] = (q_q_coff * 128) + q_i_coff; 570 574 571 - ath_dbg(common, ATH_DBG_CALIBRATE, 572 - "tx chain %d: iq corr coeff=%x\n", 575 + ath_dbg(common, CALIBRATE, "tx chain %d: iq corr coeff=%x\n", 573 576 chain_idx, iqc_coeff[0]); 574 577 575 578 if (-mag_rx == res_scale) { 576 - ath_dbg(common, ATH_DBG_CALIBRATE, 579 + ath_dbg(common, CALIBRATE, 577 580 "Divide by 0: mag_rx=%d, res_scale=%d\n", 578 581 mag_rx, res_scale); 579 582 return false; ··· 585 590 q_q_coff = (mag_corr_rx * 128 / res_scale); 586 591 q_i_coff = (phs_corr_rx * 256 / res_scale); 587 592 588 - ath_dbg(common, ATH_DBG_CALIBRATE, 589 - "rx chain %d: mag corr=%d phase corr=%d\n", 593 + ath_dbg(common, CALIBRATE, "rx chain %d: mag corr=%d phase corr=%d\n", 590 594 chain_idx, q_q_coff, q_i_coff); 591 595 592 596 if (q_i_coff < -63) ··· 599 605 600 606 iqc_coeff[1] = (q_q_coff * 128) + q_i_coff; 601 607 602 - ath_dbg(common, ATH_DBG_CALIBRATE, 603 - "rx chain %d: iq corr coeff=%x\n", 608 + ath_dbg(common, CALIBRATE, "rx chain %d: iq corr coeff=%x\n", 604 609 chain_idx, iqc_coeff[1]); 605 610 606 611 return true; ··· 746 753 if (!ath9k_hw_wait(ah, AR_PHY_TX_IQCAL_START, 747 754 AR_PHY_TX_IQCAL_START_DO_CAL, 0, 748 755 AH_WAIT_TIMEOUT)) { 749 - ath_dbg(common, ATH_DBG_CALIBRATE, 750 - "Tx IQ Cal is not completed.\n"); 756 + ath_dbg(common, CALIBRATE, "Tx IQ Cal is not completed\n"); 751 757 return false; 752 758 } 753 759 return true; ··· 784 792 nmeasurement = MAX_MEASUREMENT; 785 793 786 794 for (im = 0; im < nmeasurement; im++) { 787 - ath_dbg(common, ATH_DBG_CALIBRATE, 788 - "Doing Tx IQ Cal for chain %d.\n", i); 795 + ath_dbg(common, CALIBRATE, 796 + "Doing Tx IQ Cal for chain %d\n", i); 789 797 790 798 if (REG_READ(ah, txiqcal_status[i]) & 791 799 AR_PHY_TX_IQCAL_STATUS_FAILED) { 792 - ath_dbg(common, ATH_DBG_CALIBRATE, 793 - "Tx IQ Cal failed for chain %d.\n", i); 800 + ath_dbg(common, CALIBRATE, 801 + "Tx IQ Cal failed for chain %d\n", i); 794 802 goto tx_iqcal_fail; 795 803 } 796 804 ··· 816 824 iq_res[idx + 1] = 0xffff & REG_READ(ah, 817 825 chan_info_tab[i] + offset); 818 826 819 - ath_dbg(common, ATH_DBG_CALIBRATE, 820 - "IQ_RES[%d]=0x%x " 821 - "IQ_RES[%d]=0x%x\n", 827 + ath_dbg(common, CALIBRATE, 828 + "IQ_RES[%d]=0x%x IQ_RES[%d]=0x%x\n", 822 829 idx, iq_res[idx], idx + 1, 823 830 iq_res[idx + 1]); 824 831 } 825 832 826 833 if (!ar9003_hw_calc_iq_corr(ah, i, iq_res, 827 834 coeff.iqc_coeff)) { 828 - ath_dbg(common, ATH_DBG_CALIBRATE, 829 - "Failed in calculation of \ 830 - IQ correction.\n"); 835 + ath_dbg(common, CALIBRATE, 836 + "Failed in calculation of IQ correction\n"); 831 837 goto tx_iqcal_fail; 832 838 } 833 839 ··· 845 855 return; 846 856 847 857 tx_iqcal_fail: 848 - ath_dbg(common, ATH_DBG_CALIBRATE, "Tx IQ Cal failed\n"); 858 + ath_dbg(common, CALIBRATE, "Tx IQ Cal failed\n"); 849 859 return; 850 860 } 851 861 ··· 943 953 if (!ar9003_hw_rtt_restore(ah, chan)) 944 954 run_rtt_cal = true; 945 955 946 - ath_dbg(common, ATH_DBG_CALIBRATE, "RTT restore %s\n", 956 + ath_dbg(common, CALIBRATE, "RTT restore %s\n", 947 957 run_rtt_cal ? "failed" : "succeed"); 948 958 } 949 959 run_agc_cal = run_rtt_cal; ··· 1006 1016 u32 pld[4] = {0, 0, 0, 0}; 1007 1017 1008 1018 /* send CAL_REQ only when BT is AWAKE. */ 1009 - ath_dbg(common, ATH_DBG_MCI, "MCI send WLAN_CAL_REQ 0x%x\n", 1019 + ath_dbg(common, MCI, "MCI send WLAN_CAL_REQ 0x%x\n", 1010 1020 mci_hw->wlan_cal_seq); 1011 1021 MCI_GPM_SET_CAL_TYPE(pld, MCI_GPM_WLAN_CAL_REQ); 1012 1022 pld[MCI_GPM_WLAN_CAL_W_SEQUENCE] = mci_hw->wlan_cal_seq++; 1013 1023 ar9003_mci_send_message(ah, MCI_GPM, 0, pld, 16, true, false); 1014 1024 1015 1025 /* Wait BT_CAL_GRANT for 50ms */ 1016 - ath_dbg(common, ATH_DBG_MCI, "MCI wait for BT_CAL_GRANT"); 1026 + ath_dbg(common, MCI, "MCI wait for BT_CAL_GRANT\n"); 1017 1027 1018 1028 if (ar9003_mci_wait_for_gpm(ah, MCI_GPM_BT_CAL_GRANT, 0, 50000)) 1019 - ath_dbg(common, ATH_DBG_MCI, "MCI got BT_CAL_GRANT"); 1029 + ath_dbg(common, MCI, "MCI got BT_CAL_GRANT\n"); 1020 1030 else { 1021 1031 is_reusable = false; 1022 - ath_dbg(common, ATH_DBG_MCI, "\nMCI BT is not responding"); 1032 + ath_dbg(common, MCI, "\nMCI BT is not responding\n"); 1023 1033 } 1024 1034 } 1025 1035 ··· 1048 1058 1049 1059 u32 pld[4] = {0, 0, 0, 0}; 1050 1060 1051 - ath_dbg(common, ATH_DBG_MCI, "MCI Send WLAN_CAL_DONE 0x%x\n", 1061 + ath_dbg(common, MCI, "MCI Send WLAN_CAL_DONE 0x%x\n", 1052 1062 mci_hw->wlan_cal_done); 1053 1063 MCI_GPM_SET_CAL_TYPE(pld, MCI_GPM_WLAN_CAL_DONE); 1054 1064 pld[MCI_GPM_WLAN_CAL_W_SEQUENCE] = mci_hw->wlan_cal_done++; ··· 1064 1074 if (run_rtt_cal) 1065 1075 ar9003_hw_rtt_disable(ah); 1066 1076 1067 - ath_dbg(common, ATH_DBG_CALIBRATE, 1068 - "offset calibration failed to complete in 1ms;" 1069 - "noisy environment?\n"); 1077 + ath_dbg(common, CALIBRATE, 1078 + "offset calibration failed to complete in 1ms; noisy environment?\n"); 1070 1079 return false; 1071 1080 } 1072 1081 ··· 1124 1135 if (ah->supp_cals & IQ_MISMATCH_CAL) { 1125 1136 INIT_CAL(&ah->iq_caldata); 1126 1137 INSERT_CAL(ah, &ah->iq_caldata); 1127 - ath_dbg(common, ATH_DBG_CALIBRATE, 1128 - "enabling IQ Calibration.\n"); 1138 + ath_dbg(common, CALIBRATE, "enabling IQ Calibration\n"); 1129 1139 } 1130 1140 1131 1141 if (ah->supp_cals & TEMP_COMP_CAL) { 1132 1142 INIT_CAL(&ah->tempCompCalData); 1133 1143 INSERT_CAL(ah, &ah->tempCompCalData); 1134 - ath_dbg(common, ATH_DBG_CALIBRATE, 1135 - "enabling Temperature Compensation Calibration.\n"); 1144 + ath_dbg(common, CALIBRATE, 1145 + "enabling Temperature Compensation Calibration\n"); 1136 1146 } 1137 1147 1138 1148 /* Initialize current pointer to first element in list */
+35 -41
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
··· 3043 3043 int i; 3044 3044 3045 3045 if ((address < 0) || ((address + count) / 2 > AR9300_EEPROM_SIZE - 1)) { 3046 - ath_dbg(common, ATH_DBG_EEPROM, 3047 - "eeprom address not in range\n"); 3046 + ath_dbg(common, EEPROM, "eeprom address not in range\n"); 3048 3047 return false; 3049 3048 } 3050 3049 ··· 3074 3075 return true; 3075 3076 3076 3077 error: 3077 - ath_dbg(common, ATH_DBG_EEPROM, 3078 - "unable to read eeprom region at offset %d\n", address); 3078 + ath_dbg(common, EEPROM, "unable to read eeprom region at offset %d\n", 3079 + address); 3079 3080 return false; 3080 3081 } 3081 3082 ··· 3159 3160 length &= 0xff; 3160 3161 3161 3162 if (length > 0 && spot >= 0 && spot+length <= mdataSize) { 3162 - ath_dbg(common, ATH_DBG_EEPROM, 3163 + ath_dbg(common, EEPROM, 3163 3164 "Restore at %d: spot=%d offset=%d length=%d\n", 3164 3165 it, spot, offset, length); 3165 3166 memcpy(&mptr[spot], &block[it+2], length); 3166 3167 spot += length; 3167 3168 } else if (length > 0) { 3168 - ath_dbg(common, ATH_DBG_EEPROM, 3169 + ath_dbg(common, EEPROM, 3169 3170 "Bad restore at %d: spot=%d offset=%d length=%d\n", 3170 3171 it, spot, offset, length); 3171 3172 return false; ··· 3187 3188 switch (code) { 3188 3189 case _CompressNone: 3189 3190 if (length != mdata_size) { 3190 - ath_dbg(common, ATH_DBG_EEPROM, 3191 + ath_dbg(common, EEPROM, 3191 3192 "EEPROM structure size mismatch memory=%d eeprom=%d\n", 3192 3193 mdata_size, length); 3193 3194 return -1; 3194 3195 } 3195 3196 memcpy(mptr, (u8 *) (word + COMP_HDR_LEN), length); 3196 - ath_dbg(common, ATH_DBG_EEPROM, 3197 + ath_dbg(common, EEPROM, 3197 3198 "restored eeprom %d: uncompressed, length %d\n", 3198 3199 it, length); 3199 3200 break; ··· 3202 3203 } else { 3203 3204 eep = ar9003_eeprom_struct_find_by_id(reference); 3204 3205 if (eep == NULL) { 3205 - ath_dbg(common, ATH_DBG_EEPROM, 3206 + ath_dbg(common, EEPROM, 3206 3207 "can't find reference eeprom struct %d\n", 3207 3208 reference); 3208 3209 return -1; 3209 3210 } 3210 3211 memcpy(mptr, eep, mdata_size); 3211 3212 } 3212 - ath_dbg(common, ATH_DBG_EEPROM, 3213 + ath_dbg(common, EEPROM, 3213 3214 "restore eeprom %d: block, reference %d, length %d\n", 3214 3215 it, reference, length); 3215 3216 ar9300_uncompress_block(ah, mptr, mdata_size, 3216 3217 (u8 *) (word + COMP_HDR_LEN), length); 3217 3218 break; 3218 3219 default: 3219 - ath_dbg(common, ATH_DBG_EEPROM, 3220 - "unknown compression code %d\n", code); 3220 + ath_dbg(common, EEPROM, "unknown compression code %d\n", code); 3221 3221 return -1; 3222 3222 } 3223 3223 return 0; ··· 3292 3294 cptr = AR9300_BASE_ADDR_512; 3293 3295 else 3294 3296 cptr = AR9300_BASE_ADDR; 3295 - ath_dbg(common, ATH_DBG_EEPROM, 3296 - "Trying EEPROM access at Address 0x%04x\n", cptr); 3297 + ath_dbg(common, EEPROM, "Trying EEPROM access at Address 0x%04x\n", 3298 + cptr); 3297 3299 if (ar9300_check_eeprom_header(ah, read, cptr)) 3298 3300 goto found; 3299 3301 3300 3302 cptr = AR9300_BASE_ADDR_512; 3301 - ath_dbg(common, ATH_DBG_EEPROM, 3302 - "Trying EEPROM access at Address 0x%04x\n", cptr); 3303 + ath_dbg(common, EEPROM, "Trying EEPROM access at Address 0x%04x\n", 3304 + cptr); 3303 3305 if (ar9300_check_eeprom_header(ah, read, cptr)) 3304 3306 goto found; 3305 3307 3306 3308 read = ar9300_read_otp; 3307 3309 cptr = AR9300_BASE_ADDR; 3308 - ath_dbg(common, ATH_DBG_EEPROM, 3309 - "Trying OTP access at Address 0x%04x\n", cptr); 3310 + ath_dbg(common, EEPROM, "Trying OTP access at Address 0x%04x\n", cptr); 3310 3311 if (ar9300_check_eeprom_header(ah, read, cptr)) 3311 3312 goto found; 3312 3313 3313 3314 cptr = AR9300_BASE_ADDR_512; 3314 - ath_dbg(common, ATH_DBG_EEPROM, 3315 - "Trying OTP access at Address 0x%04x\n", cptr); 3315 + ath_dbg(common, EEPROM, "Trying OTP access at Address 0x%04x\n", cptr); 3316 3316 if (ar9300_check_eeprom_header(ah, read, cptr)) 3317 3317 goto found; 3318 3318 3319 3319 goto fail; 3320 3320 3321 3321 found: 3322 - ath_dbg(common, ATH_DBG_EEPROM, "Found valid EEPROM data\n"); 3322 + ath_dbg(common, EEPROM, "Found valid EEPROM data\n"); 3323 3323 3324 3324 for (it = 0; it < MSTATE; it++) { 3325 3325 if (!read(ah, cptr, word, COMP_HDR_LEN)) ··· 3328 3332 3329 3333 ar9300_comp_hdr_unpack(word, &code, &reference, 3330 3334 &length, &major, &minor); 3331 - ath_dbg(common, ATH_DBG_EEPROM, 3335 + ath_dbg(common, EEPROM, 3332 3336 "Found block at %x: code=%d ref=%d length=%d major=%d minor=%d\n", 3333 3337 cptr, code, reference, length, major, minor); 3334 3338 if ((!AR_SREV_9485(ah) && length >= 1024) || 3335 3339 (AR_SREV_9485(ah) && length > EEPROM_DATA_LEN_9485)) { 3336 - ath_dbg(common, ATH_DBG_EEPROM, 3337 - "Skipping bad header\n"); 3340 + ath_dbg(common, EEPROM, "Skipping bad header\n"); 3338 3341 cptr -= COMP_HDR_LEN; 3339 3342 continue; 3340 3343 } ··· 3342 3347 read(ah, cptr, word, COMP_HDR_LEN + osize + COMP_CKSUM_LEN); 3343 3348 checksum = ar9300_comp_cksum(&word[COMP_HDR_LEN], length); 3344 3349 mchecksum = get_unaligned_le16(&word[COMP_HDR_LEN + osize]); 3345 - ath_dbg(common, ATH_DBG_EEPROM, 3346 - "checksum %x %x\n", checksum, mchecksum); 3350 + ath_dbg(common, EEPROM, "checksum %x %x\n", 3351 + checksum, mchecksum); 3347 3352 if (checksum == mchecksum) { 3348 3353 ar9300_compress_decision(ah, it, code, reference, mptr, 3349 3354 word, length, mdata_size); 3350 3355 } else { 3351 - ath_dbg(common, ATH_DBG_EEPROM, 3356 + ath_dbg(common, EEPROM, 3352 3357 "skipping block with bad checksum\n"); 3353 3358 } 3354 3359 cptr -= (COMP_HDR_LEN + osize + COMP_CKSUM_LEN); ··· 4419 4424 is2GHz) + ht40PowerIncForPdadc; 4420 4425 4421 4426 for (i = 0; i < ar9300RateSize; i++) { 4422 - ath_dbg(common, ATH_DBG_EEPROM, 4423 - "TPC[%02d] 0x%08x\n", i, targetPowerValT2[i]); 4427 + ath_dbg(common, EEPROM, "TPC[%02d] 0x%08x\n", 4428 + i, targetPowerValT2[i]); 4424 4429 } 4425 4430 } 4426 4431 ··· 4439 4444 struct ath_common *common = ath9k_hw_common(ah); 4440 4445 4441 4446 if (ichain >= AR9300_MAX_CHAINS) { 4442 - ath_dbg(common, ATH_DBG_EEPROM, 4447 + ath_dbg(common, EEPROM, 4443 4448 "Invalid chain index, must be less than %d\n", 4444 4449 AR9300_MAX_CHAINS); 4445 4450 return -1; ··· 4447 4452 4448 4453 if (mode) { /* 5GHz */ 4449 4454 if (ipier >= AR9300_NUM_5G_CAL_PIERS) { 4450 - ath_dbg(common, ATH_DBG_EEPROM, 4455 + ath_dbg(common, EEPROM, 4451 4456 "Invalid 5GHz cal pier index, must be less than %d\n", 4452 4457 AR9300_NUM_5G_CAL_PIERS); 4453 4458 return -1; ··· 4457 4462 is2GHz = 0; 4458 4463 } else { 4459 4464 if (ipier >= AR9300_NUM_2G_CAL_PIERS) { 4460 - ath_dbg(common, ATH_DBG_EEPROM, 4465 + ath_dbg(common, EEPROM, 4461 4466 "Invalid 2GHz cal pier index, must be less than %d\n", 4462 4467 AR9300_NUM_2G_CAL_PIERS); 4463 4468 return -1; ··· 4619 4624 4620 4625 /* interpolate */ 4621 4626 for (ichain = 0; ichain < AR9300_MAX_CHAINS; ichain++) { 4622 - ath_dbg(common, ATH_DBG_EEPROM, 4623 - "ch=%d f=%d low=%d %d h=%d %d\n", 4627 + ath_dbg(common, EEPROM, "ch=%d f=%d low=%d %d h=%d %d\n", 4624 4628 ichain, frequency, lfrequency[ichain], 4625 4629 lcorrection[ichain], hfrequency[ichain], 4626 4630 hcorrection[ichain]); ··· 4674 4680 ar9003_hw_power_control_override(ah, frequency, correction, voltage, 4675 4681 temperature); 4676 4682 4677 - ath_dbg(common, ATH_DBG_EEPROM, 4683 + ath_dbg(common, EEPROM, 4678 4684 "for frequency=%d, calibration correction = %d %d %d\n", 4679 4685 frequency, correction[0], correction[1], correction[2]); 4680 4686 ··· 4860 4866 else 4861 4867 freq = centers.ctl_center; 4862 4868 4863 - ath_dbg(common, ATH_DBG_REGULATORY, 4869 + ath_dbg(common, REGULATORY, 4864 4870 "LOOP-Mode ctlMode %d < %d, isHt40CtlMode %d, EXT_ADDITIVE %d\n", 4865 4871 ctlMode, numCtlModes, isHt40CtlMode, 4866 4872 (pCtlMode[ctlMode] & EXT_ADDITIVE)); ··· 4876 4882 4877 4883 twiceMaxEdgePower = MAX_RATE_POWER; 4878 4884 for (i = 0; (i < ctlNum) && ctlIndex[i]; i++) { 4879 - ath_dbg(common, ATH_DBG_REGULATORY, 4885 + ath_dbg(common, REGULATORY, 4880 4886 "LOOP-Ctlidx %d: cfgCtl 0x%2.2x pCtlMode 0x%2.2x ctlIndex 0x%2.2x chan %d\n", 4881 4887 i, cfgCtl, pCtlMode[ctlMode], ctlIndex[i], 4882 4888 chan->channel); ··· 4918 4924 4919 4925 minCtlPower = (u8)min(twiceMaxEdgePower, scaledPower); 4920 4926 4921 - ath_dbg(common, ATH_DBG_REGULATORY, 4927 + ath_dbg(common, REGULATORY, 4922 4928 "SEL-Min ctlMode %d pCtlMode %d 2xMaxEdge %d sP %d minCtlPwr %d\n", 4923 4929 ctlMode, pCtlMode[ctlMode], twiceMaxEdgePower, 4924 4930 scaledPower, minCtlPower); ··· 5042 5048 target_power_val_t2_eep[i]) > 5043 5049 paprd_scale_factor)) { 5044 5050 ah->paprd_ratemask &= ~(1 << i); 5045 - ath_dbg(common, ATH_DBG_EEPROM, 5051 + ath_dbg(common, EEPROM, 5046 5052 "paprd disabled for mcs %d\n", i); 5047 5053 } 5048 5054 } ··· 5060 5066 return; 5061 5067 5062 5068 for (i = 0; i < ar9300RateSize; i++) { 5063 - ath_dbg(common, ATH_DBG_EEPROM, 5064 - "TPC[%02d] 0x%08x\n", i, targetPowerValT2[i]); 5069 + ath_dbg(common, EEPROM, "TPC[%02d] 0x%08x\n", 5070 + i, targetPowerValT2[i]); 5065 5071 } 5066 5072 5067 5073 ah->txpower_limit = regulatory->max_power_level;
+6 -8
drivers/net/wireless/ath/ath9k/ar9003_mac.c
··· 305 305 raw_intr = REG_READ(ah, AR_MCI_INTERRUPT_RAW); 306 306 307 307 if ((raw_intr == 0xdeadbeef) || (rx_msg_intr == 0xdeadbeef)) 308 - ath_dbg(common, ATH_DBG_MCI, 309 - "MCI gets 0xdeadbeef during MCI int processing" 310 - "new raw_intr=0x%08x, new rx_msg_raw=0x%08x, " 311 - "raw_intr=0x%08x, rx_msg_raw=0x%08x\n", 308 + ath_dbg(common, MCI, 309 + "MCI gets 0xdeadbeef during MCI int processing new raw_intr=0x%08x, new rx_msg_raw=0x%08x, raw_intr=0x%08x, rx_msg_raw=0x%08x\n", 312 310 raw_intr, rx_msg_intr, mci->raw_intr, 313 311 mci->rx_msg_intr); 314 312 else { ··· 320 322 321 323 REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_RAW, rx_msg_intr); 322 324 REG_WRITE(ah, AR_MCI_INTERRUPT_RAW, raw_intr); 323 - ath_dbg(common, ATH_DBG_MCI, "AR_INTR_SYNC_MCI\n"); 325 + ath_dbg(common, MCI, "AR_INTR_SYNC_MCI\n"); 324 326 325 327 } 326 328 } ··· 333 335 } 334 336 335 337 if (sync_cause & AR_INTR_SYNC_LOCAL_TIMEOUT) 336 - ath_dbg(common, ATH_DBG_INTERRUPT, 338 + ath_dbg(common, INTERRUPT, 337 339 "AR_INTR_SYNC_LOCAL_TIMEOUT\n"); 338 340 339 341 REG_WRITE(ah, AR_INTR_SYNC_CAUSE_CLR, sync_cause); ··· 364 366 365 367 if ((MS(ads->ds_info, AR_DescId) != ATHEROS_VENDOR_ID) || 366 368 (MS(ads->ds_info, AR_TxRxDesc) != 1)) { 367 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_XMIT, 369 + ath_dbg(ath9k_hw_common(ah), XMIT, 368 370 "Tx Descriptor error %x\n", ads->ds_info); 369 371 memset(ads, 0, sizeof(*ads)); 370 372 return -EIO; ··· 572 574 memset((void *) ah->ts_ring, 0, 573 575 ah->ts_size * sizeof(struct ar9003_txs)); 574 576 575 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_XMIT, 577 + ath_dbg(ath9k_hw_common(ah), XMIT, 576 578 "TS Start 0x%x End 0x%x Virt %p, Size %d\n", 577 579 ah->ts_paddr_start, ah->ts_paddr_end, 578 580 ah->ts_ring, ah->ts_size);
+98 -123
drivers/net/wireless/ath/ath9k/ar9003_mci.c
··· 68 68 } 69 69 70 70 if (time_out <= 0) { 71 - ath_dbg(common, ATH_DBG_MCI, 72 - "MCI Wait for Reg 0x%08x = 0x%08x timeout.\n", 71 + ath_dbg(common, MCI, 72 + "MCI Wait for Reg 0x%08x = 0x%08x timeout\n", 73 73 address, bit_position); 74 - ath_dbg(common, ATH_DBG_MCI, 75 - "MCI INT_RAW = 0x%08x, RX_MSG_RAW = 0x%08x", 74 + ath_dbg(common, MCI, 75 + "MCI INT_RAW = 0x%08x, RX_MSG_RAW = 0x%08x\n", 76 76 REG_READ(ah, AR_MCI_INTERRUPT_RAW), 77 77 REG_READ(ah, AR_MCI_INTERRUPT_RX_MSG_RAW)); 78 78 time_out = 0; ··· 135 135 136 136 if (!mci->bt_version_known && 137 137 (mci->bt_state != MCI_BT_SLEEP)) { 138 - ath_dbg(common, ATH_DBG_MCI, "MCI Send Coex version query\n"); 138 + ath_dbg(common, MCI, "MCI Send Coex version query\n"); 139 139 MCI_GPM_SET_TYPE_OPCODE(payload, 140 140 MCI_GPM_COEX_AGENT, MCI_GPM_COEX_VERSION_QUERY); 141 141 ar9003_mci_send_message(ah, MCI_GPM, 0, payload, 16, ··· 150 150 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; 151 151 u32 payload[4] = {0, 0, 0, 0}; 152 152 153 - ath_dbg(common, ATH_DBG_MCI, "MCI Send Coex version response\n"); 153 + ath_dbg(common, MCI, "MCI Send Coex version response\n"); 154 154 MCI_GPM_SET_TYPE_OPCODE(payload, MCI_GPM_COEX_AGENT, 155 155 MCI_GPM_COEX_VERSION_RESPONSE); 156 156 *(((u8 *)payload) + MCI_GPM_COEX_B_MAJOR_VERSION) = ··· 187 187 188 188 if (mci->bt_state != MCI_BT_SLEEP) { 189 189 190 - ath_dbg(common, ATH_DBG_MCI, 191 - "MCI Send Coex BT Status Query 0x%02X\n", query_type); 190 + ath_dbg(common, MCI, "MCI Send Coex BT Status Query 0x%02X\n", 191 + query_type); 192 192 193 193 MCI_GPM_SET_TYPE_OPCODE(payload, 194 194 MCI_GPM_COEX_AGENT, MCI_GPM_COEX_STATUS_QUERY); ··· 203 203 if (query_btinfo) { 204 204 mci->need_flush_btinfo = true; 205 205 206 - ath_dbg(common, ATH_DBG_MCI, 207 - "MCI send bt_status_query fail, " 208 - "set flush flag again\n"); 206 + ath_dbg(common, MCI, 207 + "MCI send bt_status_query fail, set flush flag again\n"); 209 208 } 210 209 } 211 210 ··· 220 221 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; 221 222 u32 payload[4] = {0, 0, 0, 0}; 222 223 223 - ath_dbg(common, ATH_DBG_MCI, "MCI Send Coex %s BT GPM.\n", 224 + ath_dbg(common, MCI, "MCI Send Coex %s BT GPM\n", 224 225 (halt) ? "halt" : "unhalt"); 225 226 226 227 MCI_GPM_SET_TYPE_OPCODE(payload, ··· 258 259 REG_READ(ah, AR_MCI_INTERRUPT_RAW)); 259 260 260 261 /* Remote Reset */ 261 - ath_dbg(common, ATH_DBG_MCI, "MCI Reset sequence start\n"); 262 - ath_dbg(common, ATH_DBG_MCI, "MCI send REMOTE_RESET\n"); 262 + ath_dbg(common, MCI, "MCI Reset sequence start\n"); 263 + ath_dbg(common, MCI, "MCI send REMOTE_RESET\n"); 263 264 ar9003_mci_remote_reset(ah, true); 264 265 265 266 /* ··· 270 271 if (AR_SREV_9462_10(ah)) 271 272 udelay(252); 272 273 273 - ath_dbg(common, ATH_DBG_MCI, "MCI Send REQ_WAKE to remoter(BT)\n"); 274 + ath_dbg(common, MCI, "MCI Send REQ_WAKE to remoter(BT)\n"); 274 275 ar9003_mci_send_req_wake(ah, true); 275 276 276 277 if (ar9003_mci_wait_for_interrupt(ah, AR_MCI_INTERRUPT_RX_MSG_RAW, 277 278 AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING, 500)) { 278 279 279 - ath_dbg(common, ATH_DBG_MCI, 280 - "MCI SYS_WAKING from remote(BT)\n"); 280 + ath_dbg(common, MCI, "MCI SYS_WAKING from remote(BT)\n"); 281 281 mci->bt_state = MCI_BT_AWAKE; 282 282 283 283 if (AR_SREV_9462_10(ah)) ··· 300 302 301 303 /* Send SYS_WAKING to BT */ 302 304 303 - ath_dbg(common, ATH_DBG_MCI, 304 - "MCI send SW SYS_WAKING to remote BT\n"); 305 + ath_dbg(common, MCI, "MCI send SW SYS_WAKING to remote BT\n"); 305 306 306 307 ar9003_mci_send_sys_waking(ah, true); 307 308 udelay(10); ··· 329 332 330 333 if (AR_SREV_9462_10(ah) || mci->is_2g) { 331 334 /* Send LNA_TRANS */ 332 - ath_dbg(common, ATH_DBG_MCI, 333 - "MCI send LNA_TRANS to BT\n"); 335 + ath_dbg(common, MCI, "MCI send LNA_TRANS to BT\n"); 334 336 ar9003_mci_send_lna_transfer(ah, true); 335 337 udelay(5); 336 338 } ··· 340 344 AR_MCI_INTERRUPT_RX_MSG_RAW, 341 345 AR_MCI_INTERRUPT_RX_MSG_LNA_INFO, 342 346 mci_timeout)) 343 - ath_dbg(common, ATH_DBG_MCI, 344 - "MCI WLAN has control over the LNA & " 345 - "BT obeys it\n"); 347 + ath_dbg(common, MCI, 348 + "MCI WLAN has control over the LNA & BT obeys it\n"); 346 349 else 347 - ath_dbg(common, ATH_DBG_MCI, 348 - "MCI BT didn't respond to" 349 - "LNA_TRANS\n"); 350 + ath_dbg(common, MCI, 351 + "MCI BT didn't respond to LNA_TRANS\n"); 350 352 } 351 353 352 354 if (AR_SREV_9462_10(ah)) { 353 355 /* Send another remote_reset to deassert BT clk_req. */ 354 - ath_dbg(common, ATH_DBG_MCI, 355 - "MCI another remote_reset to " 356 - "deassert clk_req\n"); 356 + ath_dbg(common, MCI, 357 + "MCI another remote_reset to deassert clk_req\n"); 357 358 ar9003_mci_remote_reset(ah, true); 358 359 udelay(252); 359 360 } ··· 434 441 recv_type = MCI_GPM_TYPE(payload); 435 442 436 443 if (recv_type == MCI_GPM_RSVD_PATTERN) { 437 - ath_dbg(common, ATH_DBG_MCI, "MCI Skip RSVD GPM\n"); 444 + ath_dbg(common, MCI, "MCI Skip RSVD GPM\n"); 438 445 return false; 439 446 } 440 447 ··· 507 514 *(((u8 *)pld) + MCI_GPM_COEX_W_BT_FLAGS + 2) = (bt_flags >> 16) & 0xFF; 508 515 *(((u8 *)pld) + MCI_GPM_COEX_W_BT_FLAGS + 3) = (bt_flags >> 24) & 0xFF; 509 516 510 - ath_dbg(common, ATH_DBG_MCI, 517 + ath_dbg(common, MCI, 511 518 "MCI BT_MCI_FLAGS: Send Coex BT Update Flags %s 0x%08x\n", 512 - (opcode == MCI_GPM_COEX_BT_FLAGS_READ) ? "READ" : 513 - ((opcode == MCI_GPM_COEX_BT_FLAGS_SET) ? "SET" : "CLEAR"), 514 - bt_flags); 519 + opcode == MCI_GPM_COEX_BT_FLAGS_READ ? "READ" : 520 + opcode == MCI_GPM_COEX_BT_FLAGS_SET ? "SET" : "CLEAR", 521 + bt_flags); 515 522 516 523 return ar9003_mci_send_message(ah, MCI_GPM, 0, pld, 16, 517 524 wait_done, true); ··· 524 531 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; 525 532 u32 regval, thresh; 526 533 527 - ath_dbg(common, ATH_DBG_MCI, "MCI full_sleep = %d, is_2g = %d\n", 534 + ath_dbg(common, MCI, "MCI full_sleep = %d, is_2g = %d\n", 528 535 is_full_sleep, is_2g); 529 536 530 537 /* ··· 532 539 */ 533 540 534 541 if (!mci->gpm_addr && !mci->sched_addr) { 535 - ath_dbg(common, ATH_DBG_MCI, 536 - "MCI GPM and schedule buffers are not allocated"); 542 + ath_dbg(common, MCI, 543 + "MCI GPM and schedule buffers are not allocated\n"); 537 544 return; 538 545 } 539 546 540 547 if (REG_READ(ah, AR_BTCOEX_CTRL) == 0xdeadbeef) { 541 - ath_dbg(common, ATH_DBG_MCI, 542 - "MCI it's deadbeef, quit mci_reset\n"); 548 + ath_dbg(common, MCI, "MCI it's deadbeef, quit mci_reset\n"); 543 549 return; 544 550 } 545 551 ··· 566 574 !(mci->config & ATH_MCI_CONFIG_DISABLE_OSLA)) { 567 575 568 576 regval |= SM(1, AR_BTCOEX_CTRL_ONE_STEP_LOOK_AHEAD_EN); 569 - ath_dbg(common, ATH_DBG_MCI, 570 - "MCI sched one step look ahead\n"); 577 + ath_dbg(common, MCI, "MCI sched one step look ahead\n"); 571 578 572 579 if (!(mci->config & 573 580 ATH_MCI_CONFIG_DISABLE_AGGR_THRESH)) { ··· 584 593 AR_MCI_SCHD_TABLE_2_MEM_BASED, 1); 585 594 586 595 } else 587 - ath_dbg(common, ATH_DBG_MCI, 588 - "MCI sched aggr thresh: off\n"); 596 + ath_dbg(common, MCI, "MCI sched aggr thresh: off\n"); 589 597 } else 590 - ath_dbg(common, ATH_DBG_MCI, 591 - "MCI SCHED one step look ahead off\n"); 598 + ath_dbg(common, MCI, "MCI SCHED one step look ahead off\n"); 592 599 593 600 if (AR_SREV_9462_10(ah)) 594 601 regval |= SM(1, AR_BTCOEX_CTRL_SPDT_ENABLE_10); ··· 667 678 * 2. before reset MCI RX, to quiet BT and avoid MCI RX misalignment 668 679 */ 669 680 670 - ath_dbg(common, ATH_DBG_MCI, "MCI Send LNA take\n"); 681 + ath_dbg(common, MCI, "MCI Send LNA take\n"); 671 682 ar9003_mci_send_lna_take(ah, true); 672 683 673 684 udelay(5); 674 685 675 - ath_dbg(common, ATH_DBG_MCI, "MCI Send sys sleeping\n"); 686 + ath_dbg(common, MCI, "MCI Send sys sleeping\n"); 676 687 ar9003_mci_send_sys_sleeping(ah, true); 677 688 } 678 689 ··· 685 696 cur_bt_state = ar9003_mci_state(ah, MCI_STATE_REMOTE_SLEEP, NULL); 686 697 687 698 if (mci->bt_state != cur_bt_state) { 688 - ath_dbg(common, ATH_DBG_MCI, 699 + ath_dbg(common, MCI, 689 700 "MCI BT state mismatches. old: %d, new: %d\n", 690 701 mci->bt_state, cur_bt_state); 691 702 mci->bt_state = cur_bt_state; ··· 697 708 ar9003_mci_send_coex_wlan_channels(ah, true); 698 709 699 710 if (mci->unhalt_bt_gpm == true) { 700 - ath_dbg(common, ATH_DBG_MCI, "MCI unhalt BT GPM"); 711 + ath_dbg(common, MCI, "MCI unhalt BT GPM\n"); 701 712 ar9003_mci_send_coex_halt_bt_gpm(ah, false, true); 702 713 } 703 714 } ··· 723 734 to_set = MCI_5G_FLAGS_SET_MASK; 724 735 } 725 736 726 - ath_dbg(common, ATH_DBG_MCI, 737 + ath_dbg(common, MCI, 727 738 "MCI BT_MCI_FLAGS: %s 0x%08x clr=0x%08x, set=0x%08x\n", 728 739 mci->is_2g ? "2G" : "5G", new_flags, to_clear, to_set); 729 740 ··· 750 761 if (queue) { 751 762 752 763 if (payload) 753 - ath_dbg(common, ATH_DBG_MCI, 764 + ath_dbg(common, MCI, 754 765 "MCI ERROR: Send fail: %02x: %02x %02x %02x\n", 755 766 header, 756 767 *(((u8 *)payload) + 4), 757 768 *(((u8 *)payload) + 5), 758 769 *(((u8 *)payload) + 6)); 759 770 else 760 - ath_dbg(common, ATH_DBG_MCI, 761 - "MCI ERROR: Send fail: %02x\n", header); 771 + ath_dbg(common, MCI, "MCI ERROR: Send fail: %02x\n", 772 + header); 762 773 } 763 774 764 775 /* check if the message is to be queued */ ··· 784 795 mci->update_2g5g = queue; 785 796 786 797 if (queue) 787 - ath_dbg(common, ATH_DBG_MCI, 788 - "MCI BT_MCI_FLAGS: 2G5G status <queued> %s.\n", 798 + ath_dbg(common, MCI, 799 + "MCI BT_MCI_FLAGS: 2G5G status <queued> %s\n", 789 800 mci->is_2g ? "2G" : "5G"); 790 801 else 791 - ath_dbg(common, ATH_DBG_MCI, 792 - "MCI BT_MCI_FLAGS: 2G5G status <sent> %s.\n", 802 + ath_dbg(common, MCI, 803 + "MCI BT_MCI_FLAGS: 2G5G status <sent> %s\n", 793 804 mci->is_2g ? "2G" : "5G"); 794 805 795 806 break; ··· 798 809 799 810 mci->wlan_channels_update = queue; 800 811 if (queue) 801 - ath_dbg(common, ATH_DBG_MCI, 802 - "MCI WLAN channel map <queued>\n"); 812 + ath_dbg(common, MCI, "MCI WLAN channel map <queued>\n"); 803 813 else 804 - ath_dbg(common, ATH_DBG_MCI, 805 - "MCI WLAN channel map <sent>\n"); 814 + ath_dbg(common, MCI, "MCI WLAN channel map <sent>\n"); 806 815 break; 807 816 808 817 case MCI_GPM_COEX_HALT_BT_GPM: ··· 811 824 mci->unhalt_bt_gpm = queue; 812 825 813 826 if (queue) 814 - ath_dbg(common, ATH_DBG_MCI, 827 + ath_dbg(common, MCI, 815 828 "MCI UNHALT BT GPM <queued>\n"); 816 829 else { 817 830 mci->halted_bt_gpm = false; 818 - ath_dbg(common, ATH_DBG_MCI, 831 + ath_dbg(common, MCI, 819 832 "MCI UNHALT BT GPM <sent>\n"); 820 833 } 821 834 } ··· 826 839 mci->halted_bt_gpm = !queue; 827 840 828 841 if (queue) 829 - ath_dbg(common, ATH_DBG_MCI, 842 + ath_dbg(common, MCI, 830 843 "MCI HALT BT GPM <not sent>\n"); 831 844 else 832 - ath_dbg(common, ATH_DBG_MCI, 845 + ath_dbg(common, MCI, 833 846 "MCI UNHALT BT GPM <sent>\n"); 834 847 } 835 848 ··· 848 861 if (mci->is_2g) { 849 862 850 863 ar9003_mci_send_2g5g_status(ah, true); 851 - ath_dbg(common, ATH_DBG_MCI, "MCI Send LNA trans\n"); 864 + ath_dbg(common, MCI, "MCI Send LNA trans\n"); 852 865 ar9003_mci_send_lna_transfer(ah, true); 853 866 udelay(5); 854 867 ··· 865 878 } 866 879 } 867 880 } else { 868 - ath_dbg(common, ATH_DBG_MCI, "MCI Send LNA take\n"); 881 + ath_dbg(common, MCI, "MCI Send LNA take\n"); 869 882 ar9003_mci_send_lna_take(ah, true); 870 883 udelay(5); 871 884 ··· 900 913 901 914 if ((regval == 0xdeadbeef) || !(regval & AR_BTCOEX_CTRL_MCI_MODE_EN)) { 902 915 903 - ath_dbg(common, ATH_DBG_MCI, 904 - "MCI Not sending 0x%x. MCI is not enabled. " 905 - "full_sleep = %d\n", header, 916 + ath_dbg(common, MCI, 917 + "MCI Not sending 0x%x. MCI is not enabled. full_sleep = %d\n", 918 + header, 906 919 (ah->power_mode == ATH9K_PM_FULL_SLEEP) ? 1 : 0); 907 920 908 921 ar9003_mci_queue_unsent_gpm(ah, header, payload, true); ··· 910 923 911 924 } else if (check_bt && (mci->bt_state == MCI_BT_SLEEP)) { 912 925 913 - ath_dbg(common, ATH_DBG_MCI, 914 - "MCI Don't send message 0x%x. BT is in sleep state\n", header); 926 + ath_dbg(common, MCI, 927 + "MCI Don't send message 0x%x. BT is in sleep state\n", 928 + header); 915 929 916 930 ar9003_mci_queue_unsent_gpm(ah, header, payload, true); 917 931 return false; ··· 977 989 978 990 /* Turn off MCI and Jupiter mode. */ 979 991 REG_WRITE(ah, AR_BTCOEX_CTRL, 0x00); 980 - ath_dbg(common, ATH_DBG_MCI, "MCI ar9003_mci_cleanup\n"); 992 + ath_dbg(common, MCI, "MCI ar9003_mci_cleanup\n"); 981 993 ar9003_mci_disable_interrupt(ah); 982 994 } 983 995 EXPORT_SYMBOL(ar9003_mci_cleanup); ··· 994 1006 995 1007 switch (gpm_opcode) { 996 1008 case MCI_GPM_COEX_VERSION_QUERY: 997 - ath_dbg(common, ATH_DBG_MCI, 998 - "MCI Recv GPM COEX Version Query\n"); 1009 + ath_dbg(common, MCI, "MCI Recv GPM COEX Version Query\n"); 999 1010 ar9003_mci_send_coex_version_response(ah, true); 1000 1011 break; 1001 1012 case MCI_GPM_COEX_VERSION_RESPONSE: 1002 - ath_dbg(common, ATH_DBG_MCI, 1003 - "MCI Recv GPM COEX Version Response\n"); 1013 + ath_dbg(common, MCI, "MCI Recv GPM COEX Version Response\n"); 1004 1014 mci->bt_ver_major = 1005 1015 *(p_data + MCI_GPM_COEX_B_MAJOR_VERSION); 1006 1016 mci->bt_ver_minor = 1007 1017 *(p_data + MCI_GPM_COEX_B_MINOR_VERSION); 1008 1018 mci->bt_version_known = true; 1009 - ath_dbg(common, ATH_DBG_MCI, 1010 - "MCI BT Coex version: %d.%d\n", 1011 - mci->bt_ver_major, 1012 - mci->bt_ver_minor); 1019 + ath_dbg(common, MCI, "MCI BT Coex version: %d.%d\n", 1020 + mci->bt_ver_major, mci->bt_ver_minor); 1013 1021 break; 1014 1022 case MCI_GPM_COEX_STATUS_QUERY: 1015 - ath_dbg(common, ATH_DBG_MCI, 1016 - "MCI Recv GPM COEX Status Query = 0x%02X.\n", 1023 + ath_dbg(common, MCI, 1024 + "MCI Recv GPM COEX Status Query = 0x%02X\n", 1017 1025 *(p_data + MCI_GPM_COEX_B_WLAN_BITMAP)); 1018 1026 mci->wlan_channels_update = true; 1019 1027 ar9003_mci_send_coex_wlan_channels(ah, true); 1020 1028 break; 1021 1029 case MCI_GPM_COEX_BT_PROFILE_INFO: 1022 1030 mci->query_bt = true; 1023 - ath_dbg(common, ATH_DBG_MCI, 1024 - "MCI Recv GPM COEX BT_Profile_Info\n"); 1031 + ath_dbg(common, MCI, "MCI Recv GPM COEX BT_Profile_Info\n"); 1025 1032 break; 1026 1033 case MCI_GPM_COEX_BT_STATUS_UPDATE: 1027 1034 mci->query_bt = true; 1028 - ath_dbg(common, ATH_DBG_MCI, 1029 - "MCI Recv GPM COEX BT_Status_Update " 1030 - "SEQ=%d (drop&query)\n", *(p_gpm + 3)); 1035 + ath_dbg(common, MCI, 1036 + "MCI Recv GPM COEX BT_Status_Update SEQ=%d (drop&query)\n", 1037 + *(p_gpm + 3)); 1031 1038 break; 1032 1039 default: 1033 1040 break; ··· 1073 1090 if ((gpm_type == MCI_GPM_BT_CAL_DONE) && 1074 1091 !b_is_bt_cal_done) { 1075 1092 gpm_type = MCI_GPM_BT_CAL_GRANT; 1076 - ath_dbg(common, ATH_DBG_MCI, 1077 - "MCI Recv BT_CAL_DONE" 1078 - "wait BT_CAL_GRANT\n"); 1093 + ath_dbg(common, MCI, 1094 + "MCI Recv BT_CAL_DONE wait BT_CAL_GRANT\n"); 1079 1095 continue; 1080 1096 } 1081 1097 ··· 1105 1123 u32 payload[4] = {0, 0, 0, 0}; 1106 1124 1107 1125 gpm_type = MCI_GPM_BT_CAL_DONE; 1108 - ath_dbg(common, ATH_DBG_MCI, 1126 + ath_dbg(common, MCI, 1109 1127 "MCI Rcv BT_CAL_REQ, send WLAN_CAL_GRANT\n"); 1110 1128 1111 1129 MCI_GPM_SET_CAL_TYPE(payload, ··· 1114 1132 ar9003_mci_send_message(ah, MCI_GPM, 0, payload, 16, 1115 1133 false, false); 1116 1134 1117 - ath_dbg(common, ATH_DBG_MCI, 1118 - "MCI now wait for BT_CAL_DONE\n"); 1135 + ath_dbg(common, MCI, "MCI now wait for BT_CAL_DONE\n"); 1119 1136 1120 1137 continue; 1121 1138 } else { 1122 - ath_dbg(common, ATH_DBG_MCI, "MCI GPM subtype" 1123 - "not match 0x%x\n", *(p_gpm + 1)); 1139 + ath_dbg(common, MCI, "MCI GPM subtype not match 0x%x\n", 1140 + *(p_gpm + 1)); 1124 1141 mismatch++; 1125 1142 ar9003_mci_process_gpm_extra(ah, recv_type, 1126 1143 recv_opcode, p_gpm); ··· 1132 1151 1133 1152 if (time_out <= 0) { 1134 1153 time_out = 0; 1135 - ath_dbg(common, ATH_DBG_MCI, 1154 + ath_dbg(common, MCI, 1136 1155 "MCI GPM received timeout, mismatch = %d\n", mismatch); 1137 1156 } else 1138 - ath_dbg(common, ATH_DBG_MCI, 1139 - "MCI Receive GPM type=0x%x, code=0x%x\n", 1157 + ath_dbg(common, MCI, "MCI Receive GPM type=0x%x, code=0x%x\n", 1140 1158 gpm_type, gpm_opcode); 1141 1159 1142 1160 while (more_data == MCI_GPM_MORE) { 1143 1161 1144 - ath_dbg(common, ATH_DBG_MCI, "MCI discard remaining GPM\n"); 1162 + ath_dbg(common, MCI, "MCI discard remaining GPM\n"); 1145 1163 offset = ar9003_mci_state(ah, MCI_STATE_NEXT_GPM_OFFSET, 1146 1164 &more_data); 1147 1165 ··· 1181 1201 break; 1182 1202 case MCI_STATE_INIT_GPM_OFFSET: 1183 1203 value = MS(REG_READ(ah, AR_MCI_GPM_1), AR_MCI_GPM_WRITE_PTR); 1184 - ath_dbg(common, ATH_DBG_MCI, 1185 - "MCI GPM initial WRITE_PTR=%d\n", value); 1204 + ath_dbg(common, MCI, "MCI GPM initial WRITE_PTR=%d\n", value); 1186 1205 mci->gpm_idx = value; 1187 1206 break; 1188 1207 case MCI_STATE_NEXT_GPM_OFFSET: ··· 1206 1227 else if (value >= mci->gpm_len) { 1207 1228 if (value != 0xFFFF) { 1208 1229 value = 0; 1209 - ath_dbg(common, ATH_DBG_MCI, "MCI GPM offset" 1210 - "out of range\n"); 1230 + ath_dbg(common, MCI, 1231 + "MCI GPM offset out of range\n"); 1211 1232 } 1212 1233 } else 1213 1234 value--; ··· 1215 1236 if (value == 0xFFFF) { 1216 1237 value = MCI_GPM_INVALID; 1217 1238 more_gpm = MCI_GPM_NOMORE; 1218 - ath_dbg(common, ATH_DBG_MCI, "MCI GPM ptr invalid" 1219 - "@ptr=%d, offset=%d, more=GPM_NOMORE\n", 1239 + ath_dbg(common, MCI, 1240 + "MCI GPM ptr invalid @ptr=%d, offset=%d, more=GPM_NOMORE\n", 1220 1241 gpm_ptr, value); 1221 1242 } else if (state_type == MCI_STATE_NEXT_GPM_OFFSET) { 1222 1243 ··· 1224 1245 value = MCI_GPM_INVALID; 1225 1246 more_gpm = MCI_GPM_NOMORE; 1226 1247 1227 - ath_dbg(common, ATH_DBG_MCI, "MCI GPM message" 1228 - "not available @ptr=%d, @offset=%d," 1229 - "more=GPM_NOMORE\n", gpm_ptr, value); 1248 + ath_dbg(common, MCI, 1249 + "MCI GPM message not available @ptr=%d, @offset=%d, more=GPM_NOMORE\n", 1250 + gpm_ptr, value); 1230 1251 } else { 1231 1252 for (;;) { 1232 1253 ··· 1246 1267 mci->gpm_len) 1247 1268 mci->gpm_idx = 0; 1248 1269 1249 - ath_dbg(common, ATH_DBG_MCI, 1250 - "MCI GPM message got ptr=%d," 1251 - "@offset=%d, more=%d\n", 1270 + ath_dbg(common, MCI, 1271 + "MCI GPM message got ptr=%d, @offset=%d, more=%d\n", 1252 1272 gpm_ptr, temp_index, 1253 1273 (more_gpm == MCI_GPM_MORE)); 1254 1274 ··· 1311 1333 1312 1334 if (mci->unhalt_bt_gpm) { 1313 1335 1314 - ath_dbg(common, ATH_DBG_MCI, 1315 - "MCI unhalt BT GPM\n"); 1336 + ath_dbg(common, MCI, "MCI unhalt BT GPM\n"); 1316 1337 ar9003_mci_send_coex_halt_bt_gpm(ah, false, true); 1317 1338 } 1318 1339 ··· 1337 1360 ATH_MCI_CONFIG_MCI_OBS_GPIO) != 1338 1361 ATH_MCI_CONFIG_MCI_OBS_GPIO) { 1339 1362 1340 - ath_dbg(common, ATH_DBG_MCI, 1341 - "MCI reconfigure observation"); 1363 + ath_dbg(common, MCI, 1364 + "MCI reconfigure observation\n"); 1342 1365 ar9003_mci_observation_set_up(ah); 1343 1366 } 1344 1367 } ··· 1351 1374 case MCI_STATE_SET_BT_COEX_VERSION: 1352 1375 1353 1376 if (!p_data) 1354 - ath_dbg(common, ATH_DBG_MCI, 1377 + ath_dbg(common, MCI, 1355 1378 "MCI Set BT Coex version with NULL data!!\n"); 1356 1379 else { 1357 1380 mci->bt_ver_major = (*p_data >> 8) & 0xff; 1358 1381 mci->bt_ver_minor = (*p_data) & 0xff; 1359 1382 mci->bt_version_known = true; 1360 - ath_dbg(common, ATH_DBG_MCI, 1361 - "MCI BT version set: %d.%d\n", 1362 - mci->bt_ver_major, 1363 - mci->bt_ver_minor); 1383 + ath_dbg(common, MCI, "MCI BT version set: %d.%d\n", 1384 + mci->bt_ver_major, mci->bt_ver_minor); 1364 1385 } 1365 1386 break; 1366 1387 ··· 1413 1438 1414 1439 case MCI_STATE_RECOVER_RX: 1415 1440 1416 - ath_dbg(common, ATH_DBG_MCI, "MCI hw RECOVER_RX\n"); 1441 + ath_dbg(common, MCI, "MCI hw RECOVER_RX\n"); 1417 1442 ar9003_mci_prep_interface(ah); 1418 1443 mci->query_bt = true; 1419 1444 mci->need_flush_btinfo = true;
+8 -9
drivers/net/wireless/ath/ath9k/ar9003_paprd.c
··· 119 119 break; 120 120 default: 121 121 delta = 0; 122 - ath_dbg(common, ATH_DBG_CALIBRATE, 123 - "Invalid tx-chainmask: %u\n", ah->txchainmask); 122 + ath_dbg(common, CALIBRATE, "Invalid tx-chainmask: %u\n", 123 + ah->txchainmask); 124 124 } 125 125 126 126 power += delta; ··· 148 148 else 149 149 training_power = ar9003_get_training_power_5g(ah); 150 150 151 - ath_dbg(common, ATH_DBG_CALIBRATE, 152 - "Training power: %d, Target power: %d\n", 151 + ath_dbg(common, CALIBRATE, "Training power: %d, Target power: %d\n", 153 152 training_power, ah->paprd_target_power); 154 153 155 154 if (training_power < 0) { 156 - ath_dbg(common, ATH_DBG_CALIBRATE, 157 - "PAPRD target power delta out of range"); 155 + ath_dbg(common, CALIBRATE, 156 + "PAPRD target power delta out of range\n"); 158 157 return -ERANGE; 159 158 } 160 159 ah->paprd_training_power = training_power; ··· 310 311 reg_cl_gain = AR_PHY_CL_TAB_2; 311 312 break; 312 313 default: 313 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_CALIBRATE, 314 - "Invalid chainmask: %d\n", chain); 314 + ath_dbg(ath9k_hw_common(ah), CALIBRATE, 315 + "Invalid chainmask: %d\n", chain); 315 316 break; 316 317 } 317 318 ··· 849 850 agc2_pwr = REG_READ_FIELD(ah, AR_PHY_PAPRD_TRAINER_STAT1, 850 851 AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR); 851 852 852 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_CALIBRATE, 853 + ath_dbg(ath9k_hw_common(ah), CALIBRATE, 853 854 "AGC2_PWR = 0x%x training done = 0x%x\n", 854 855 agc2_pwr, paprd_done); 855 856 /*
+19 -25
drivers/net/wireless/ath/ath9k/ar9003_phy.c
··· 882 882 AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW); 883 883 884 884 if (!on != aniState->ofdmWeakSigDetectOff) { 885 - ath_dbg(common, ATH_DBG_ANI, 885 + ath_dbg(common, ANI, 886 886 "** ch %d: ofdm weak signal: %s=>%s\n", 887 887 chan->channel, 888 888 !aniState->ofdmWeakSigDetectOff ? ··· 900 900 u32 level = param; 901 901 902 902 if (level >= ARRAY_SIZE(firstep_table)) { 903 - ath_dbg(common, ATH_DBG_ANI, 903 + ath_dbg(common, ANI, 904 904 "ATH9K_ANI_FIRSTEP_LEVEL: level out of range (%u > %zu)\n", 905 905 level, ARRAY_SIZE(firstep_table)); 906 906 return false; ··· 937 937 AR_PHY_FIND_SIG_LOW_FIRSTEP_LOW, value2); 938 938 939 939 if (level != aniState->firstepLevel) { 940 - ath_dbg(common, ATH_DBG_ANI, 940 + ath_dbg(common, ANI, 941 941 "** ch %d: level %d=>%d[def:%d] firstep[level]=%d ini=%d\n", 942 942 chan->channel, 943 943 aniState->firstepLevel, ··· 945 945 ATH9K_ANI_FIRSTEP_LVL_NEW, 946 946 value, 947 947 aniState->iniDef.firstep); 948 - ath_dbg(common, ATH_DBG_ANI, 948 + ath_dbg(common, ANI, 949 949 "** ch %d: level %d=>%d[def:%d] firstep_low[level]=%d ini=%d\n", 950 950 chan->channel, 951 951 aniState->firstepLevel, ··· 965 965 u32 level = param; 966 966 967 967 if (level >= ARRAY_SIZE(cycpwrThr1_table)) { 968 - ath_dbg(common, ATH_DBG_ANI, 968 + ath_dbg(common, ANI, 969 969 "ATH9K_ANI_SPUR_IMMUNITY_LEVEL: level out of range (%u > %zu)\n", 970 970 level, ARRAY_SIZE(cycpwrThr1_table)); 971 971 return false; ··· 1001 1001 AR_PHY_EXT_CYCPWR_THR1, value2); 1002 1002 1003 1003 if (level != aniState->spurImmunityLevel) { 1004 - ath_dbg(common, ATH_DBG_ANI, 1004 + ath_dbg(common, ANI, 1005 1005 "** ch %d: level %d=>%d[def:%d] cycpwrThr1[level]=%d ini=%d\n", 1006 1006 chan->channel, 1007 1007 aniState->spurImmunityLevel, ··· 1009 1009 ATH9K_ANI_SPUR_IMMUNE_LVL_NEW, 1010 1010 value, 1011 1011 aniState->iniDef.cycpwrThr1); 1012 - ath_dbg(common, ATH_DBG_ANI, 1012 + ath_dbg(common, ANI, 1013 1013 "** ch %d: level %d=>%d[def:%d] cycpwrThr1Ext[level]=%d ini=%d\n", 1014 1014 chan->channel, 1015 1015 aniState->spurImmunityLevel, ··· 1036 1036 REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL, 1037 1037 AR_PHY_MRC_CCK_MUX_REG, is_on); 1038 1038 if (!is_on != aniState->mrcCCKOff) { 1039 - ath_dbg(common, ATH_DBG_ANI, 1040 - "** ch %d: MRC CCK: %s=>%s\n", 1039 + ath_dbg(common, ANI, "** ch %d: MRC CCK: %s=>%s\n", 1041 1040 chan->channel, 1042 1041 !aniState->mrcCCKOff ? "on" : "off", 1043 1042 is_on ? "on" : "off"); ··· 1051 1052 case ATH9K_ANI_PRESENT: 1052 1053 break; 1053 1054 default: 1054 - ath_dbg(common, ATH_DBG_ANI, "invalid cmd %u\n", cmd); 1055 + ath_dbg(common, ANI, "invalid cmd %u\n", cmd); 1055 1056 return false; 1056 1057 } 1057 1058 1058 - ath_dbg(common, ATH_DBG_ANI, 1059 + ath_dbg(common, ANI, 1059 1060 "ANI parameters: SI=%d, ofdmWS=%s FS=%d MRCcck=%s listenTime=%d ofdmErrs=%d cckErrs=%d\n", 1060 1061 aniState->spurImmunityLevel, 1061 1062 !aniState->ofdmWeakSigDetectOff ? "on" : "off", ··· 1124 1125 aniState = &ah->curchan->ani; 1125 1126 iniDef = &aniState->iniDef; 1126 1127 1127 - ath_dbg(common, ATH_DBG_ANI, 1128 - "ver %d.%d opmode %u chan %d Mhz/0x%x\n", 1128 + ath_dbg(common, ANI, "ver %d.%d opmode %u chan %d Mhz/0x%x\n", 1129 1129 ah->hw_version.macVersion, 1130 1130 ah->hw_version.macRev, 1131 1131 ah->opmode, ··· 1386 1388 ~(AR_PHY_WATCHDOG_NON_IDLE_ENABLE | 1387 1389 AR_PHY_WATCHDOG_IDLE_ENABLE)); 1388 1390 1389 - ath_dbg(common, ATH_DBG_RESET, "Disabled BB Watchdog\n"); 1391 + ath_dbg(common, RESET, "Disabled BB Watchdog\n"); 1390 1392 return; 1391 1393 } 1392 1394 ··· 1422 1424 AR_PHY_WATCHDOG_IDLE_MASK | 1423 1425 (AR_PHY_WATCHDOG_NON_IDLE_MASK & (idle_count << 2))); 1424 1426 1425 - ath_dbg(common, ATH_DBG_RESET, 1426 - "Enabled BB Watchdog timeout (%u ms)\n", 1427 + ath_dbg(common, RESET, "Enabled BB Watchdog timeout (%u ms)\n", 1427 1428 idle_tmo_ms); 1428 1429 } 1429 1430 ··· 1451 1454 return; 1452 1455 1453 1456 status = ah->bb_watchdog_last_status; 1454 - ath_dbg(common, ATH_DBG_RESET, 1457 + ath_dbg(common, RESET, 1455 1458 "\n==== BB update: BB status=0x%08x ====\n", status); 1456 - ath_dbg(common, ATH_DBG_RESET, 1459 + ath_dbg(common, RESET, 1457 1460 "** BB state: wd=%u det=%u rdar=%u rOFDM=%d rCCK=%u tOFDM=%u tCCK=%u agc=%u src=%u **\n", 1458 1461 MS(status, AR_PHY_WATCHDOG_INFO), 1459 1462 MS(status, AR_PHY_WATCHDOG_DET_HANG), ··· 1465 1468 MS(status, AR_PHY_WATCHDOG_AGC_SM), 1466 1469 MS(status, AR_PHY_WATCHDOG_SRCH_SM)); 1467 1470 1468 - ath_dbg(common, ATH_DBG_RESET, 1469 - "** BB WD cntl: cntl1=0x%08x cntl2=0x%08x **\n", 1471 + ath_dbg(common, RESET, "** BB WD cntl: cntl1=0x%08x cntl2=0x%08x **\n", 1470 1472 REG_READ(ah, AR_PHY_WATCHDOG_CTL_1), 1471 1473 REG_READ(ah, AR_PHY_WATCHDOG_CTL_2)); 1472 - ath_dbg(common, ATH_DBG_RESET, 1473 - "** BB mode: BB_gen_controls=0x%08x **\n", 1474 + ath_dbg(common, RESET, "** BB mode: BB_gen_controls=0x%08x **\n", 1474 1475 REG_READ(ah, AR_PHY_GEN_CTRL)); 1475 1476 1476 1477 #define PCT(_field) (common->cc_survey._field * 100 / common->cc_survey.cycles) 1477 1478 if (common->cc_survey.cycles) 1478 - ath_dbg(common, ATH_DBG_RESET, 1479 + ath_dbg(common, RESET, 1479 1480 "** BB busy times: rx_clear=%d%%, rx_frame=%d%%, tx_frame=%d%% **\n", 1480 1481 PCT(rx_busy), PCT(rx_frame), PCT(tx_frame)); 1481 1482 1482 - ath_dbg(common, ATH_DBG_RESET, 1483 - "==== BB update: done ====\n\n"); 1483 + ath_dbg(common, RESET, "==== BB update: done ====\n\n"); 1484 1484 } 1485 1485 EXPORT_SYMBOL(ar9003_hw_bb_watchdog_dbg_info); 1486 1486
+17 -22
drivers/net/wireless/ath/ath9k/beacon.c
··· 117 117 memset(&txctl, 0, sizeof(struct ath_tx_control)); 118 118 txctl.txq = sc->beacon.cabq; 119 119 120 - ath_dbg(common, ATH_DBG_XMIT, 121 - "transmitting CABQ packet, skb: %p\n", skb); 120 + ath_dbg(common, XMIT, "transmitting CABQ packet, skb: %p\n", skb); 122 121 123 122 if (ath_tx_start(hw, skb, &txctl) != 0) { 124 - ath_dbg(common, ATH_DBG_XMIT, "CABQ TX failed\n"); 123 + ath_dbg(common, XMIT, "CABQ TX failed\n"); 125 124 dev_kfree_skb_any(skb); 126 125 } 127 126 } ··· 203 204 204 205 if (skb && cabq_depth) { 205 206 if (sc->nvifs > 1) { 206 - ath_dbg(common, ATH_DBG_BEACON, 207 + ath_dbg(common, BEACON, 207 208 "Flushing previous cabq traffic\n"); 208 209 ath_draintxq(sc, cabq, false); 209 210 } ··· 296 297 tsfadjust = TU_TO_USEC(intval * avp->av_bslot) / ATH_BCBUF; 297 298 avp->tsf_adjust = cpu_to_le64(tsfadjust); 298 299 299 - ath_dbg(common, ATH_DBG_BEACON, 300 + ath_dbg(common, BEACON, 300 301 "stagger beacons, bslot %d intval %u tsfadjust %llu\n", 301 302 avp->av_bslot, intval, (unsigned long long)tsfadjust); 302 303 ··· 370 371 sc->beacon.bmisscnt++; 371 372 372 373 if (sc->beacon.bmisscnt < BSTUCK_THRESH * sc->nbcnvifs) { 373 - ath_dbg(common, ATH_DBG_BSTUCK, 374 + ath_dbg(common, BSTUCK, 374 375 "missed %u consecutive beacons\n", 375 376 sc->beacon.bmisscnt); 376 377 ath9k_hw_stop_dma_queue(ah, sc->beacon.beaconq); 377 378 if (sc->beacon.bmisscnt > 3) 378 379 ath9k_hw_bstuck_nfcal(ah); 379 380 } else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) { 380 - ath_dbg(common, ATH_DBG_BSTUCK, 381 - "beacon is officially stuck\n"); 381 + ath_dbg(common, BSTUCK, "beacon is officially stuck\n"); 382 382 sc->sc_flags |= SC_OP_TSF_RESET; 383 383 ieee80211_queue_work(sc->hw, &sc->hw_reset_work); 384 384 } ··· 404 406 slot = (tsftu % (intval * ATH_BCBUF)) / intval; 405 407 vif = sc->beacon.bslot[slot]; 406 408 407 - ath_dbg(common, ATH_DBG_BEACON, 409 + ath_dbg(common, BEACON, 408 410 "slot %d [tsf %llu tsftu %u intval %u] vif %p\n", 409 411 slot, tsf, tsftu / ATH_BCBUF, intval, vif); 410 412 } else { ··· 422 424 } 423 425 424 426 if (sc->beacon.bmisscnt != 0) { 425 - ath_dbg(common, ATH_DBG_BSTUCK, 427 + ath_dbg(common, BSTUCK, 426 428 "resume beacon xmit after %u misses\n", 427 429 sc->beacon.bmisscnt); 428 430 sc->beacon.bmisscnt = 0; ··· 539 541 540 542 /* No need to configure beacon if we are not associated */ 541 543 if (!common->curaid) { 542 - ath_dbg(common, ATH_DBG_BEACON, 544 + ath_dbg(common, BEACON, 543 545 "STA is not yet associated..skipping beacon config\n"); 544 546 return; 545 547 } ··· 629 631 /* TSF out of range threshold fixed at 1 second */ 630 632 bs.bs_tsfoor_threshold = ATH9K_TSFOOR_THRESHOLD; 631 633 632 - ath_dbg(common, ATH_DBG_BEACON, "tsf: %llu tsftu: %u\n", tsf, tsftu); 633 - ath_dbg(common, ATH_DBG_BEACON, 634 + ath_dbg(common, BEACON, "tsf: %llu tsftu: %u\n", tsf, tsftu); 635 + ath_dbg(common, BEACON, 634 636 "bmiss: %u sleep: %u cfp-period: %u maxdur: %u next: %u\n", 635 637 bs.bs_bmissthreshold, bs.bs_sleepduration, 636 638 bs.bs_cfpperiod, bs.bs_cfpmaxduration, bs.bs_cfpnext); ··· 658 660 tsf = roundup(ath9k_hw_gettsf32(ah) + TU_TO_USEC(FUDGE), intval); 659 661 nexttbtt = tsf + intval; 660 662 661 - ath_dbg(common, ATH_DBG_BEACON, 662 - "IBSS nexttbtt %u intval %u (%u)\n", 663 + ath_dbg(common, BEACON, "IBSS nexttbtt %u intval %u (%u)\n", 663 664 nexttbtt, intval, conf->beacon_interval); 664 665 665 666 /* ··· 696 699 (sc->nbcnvifs > 1) && 697 700 (vif->type == NL80211_IFTYPE_AP) && 698 701 (cur_conf->beacon_interval != bss_conf->beacon_int)) { 699 - ath_dbg(common, ATH_DBG_CONFIG, 700 - "Changing beacon interval of multiple \ 701 - AP interfaces !\n"); 702 + ath_dbg(common, CONFIG, 703 + "Changing beacon interval of multiple AP interfaces !\n"); 702 704 return false; 703 705 } 704 706 /* ··· 706 710 */ 707 711 if ((sc->sc_ah->opmode == NL80211_IFTYPE_AP) && 708 712 (vif->type != NL80211_IFTYPE_AP)) { 709 - ath_dbg(common, ATH_DBG_CONFIG, 713 + ath_dbg(common, CONFIG, 710 714 "STA vif's beacon not allowed on AP mode\n"); 711 715 return false; 712 716 } ··· 718 722 (vif->type == NL80211_IFTYPE_STATION) && 719 723 (sc->sc_flags & SC_OP_BEACONS) && 720 724 !avp->primary_sta_vif) { 721 - ath_dbg(common, ATH_DBG_CONFIG, 725 + ath_dbg(common, CONFIG, 722 726 "Beacon already configured for a station interface\n"); 723 727 return false; 724 728 } ··· 798 802 ath_beacon_config_sta(sc, cur_conf); 799 803 break; 800 804 default: 801 - ath_dbg(common, ATH_DBG_CONFIG, 802 - "Unsupported beaconing mode\n"); 805 + ath_dbg(common, CONFIG, "Unsupported beaconing mode\n"); 803 806 return; 804 807 } 805 808
+1 -2
drivers/net/wireless/ath/ath9k/btcoex.c
··· 313 313 AR_STOMP_NONE_WLAN_WGHT); 314 314 break; 315 315 default: 316 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX, 317 - "Invalid Stomptype\n"); 316 + ath_dbg(ath9k_hw_common(ah), BTCOEX, "Invalid Stomptype\n"); 318 317 break; 319 318 } 320 319 }
+9 -11
drivers/net/wireless/ath/ath9k/calib.c
··· 116 116 if (h[i].privNF > limit->max) { 117 117 high_nf_mid = true; 118 118 119 - ath_dbg(common, ATH_DBG_CALIBRATE, 119 + ath_dbg(common, CALIBRATE, 120 120 "NFmid[%d] (%d) > MAX (%d), %s\n", 121 121 i, h[i].privNF, limit->max, 122 122 (cal->nfcal_interference ? ··· 199 199 return true; 200 200 201 201 if (currCal->calState != CAL_DONE) { 202 - ath_dbg(common, ATH_DBG_CALIBRATE, 203 - "Calibration state incorrect, %d\n", 202 + ath_dbg(common, CALIBRATE, "Calibration state incorrect, %d\n", 204 203 currCal->calState); 205 204 return true; 206 205 } ··· 207 208 if (!(ah->supp_cals & currCal->calData->calType)) 208 209 return true; 209 210 210 - ath_dbg(common, ATH_DBG_CALIBRATE, 211 - "Resetting Cal %d state for channel %u\n", 211 + ath_dbg(common, CALIBRATE, "Resetting Cal %d state for channel %u\n", 212 212 currCal->calData->calType, conf->channel->center_freq); 213 213 214 214 ah->caldata->CalValid &= ~currCal->calData->calType; ··· 300 302 * noisefloor until the next calibration timer. 301 303 */ 302 304 if (j == 10000) { 303 - ath_dbg(common, ATH_DBG_ANY, 305 + ath_dbg(common, ANY, 304 306 "Timeout while waiting for nf to load: AR_PHY_AGC_CONTROL=0x%x\n", 305 307 REG_READ(ah, AR_PHY_AGC_CONTROL)); 306 308 return; ··· 342 344 if (!nf[i]) 343 345 continue; 344 346 345 - ath_dbg(common, ATH_DBG_CALIBRATE, 347 + ath_dbg(common, CALIBRATE, 346 348 "NF calibrated [%s] [chain %d] is %d\n", 347 349 (i >= 3 ? "ext" : "ctl"), i % 3, nf[i]); 348 350 349 351 if (nf[i] > ATH9K_NF_TOO_HIGH) { 350 - ath_dbg(common, ATH_DBG_CALIBRATE, 352 + ath_dbg(common, CALIBRATE, 351 353 "NF[%d] (%d) > MAX (%d), correcting to MAX\n", 352 354 i, nf[i], ATH9K_NF_TOO_HIGH); 353 355 nf[i] = limit->max; 354 356 } else if (nf[i] < limit->min) { 355 - ath_dbg(common, ATH_DBG_CALIBRATE, 357 + ath_dbg(common, CALIBRATE, 356 358 "NF[%d] (%d) < MIN (%d), correcting to NOM\n", 357 359 i, nf[i], limit->min); 358 360 nf[i] = limit->nominal; ··· 371 373 372 374 chan->channelFlags &= (~CHANNEL_CW_INT); 373 375 if (REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF) { 374 - ath_dbg(common, ATH_DBG_CALIBRATE, 376 + ath_dbg(common, CALIBRATE, 375 377 "NF did not complete in calibration window\n"); 376 378 return false; 377 379 } ··· 381 383 nf = nfarray[0]; 382 384 if (ath9k_hw_get_nf_thresh(ah, c->band, &nfThresh) 383 385 && nf > nfThresh) { 384 - ath_dbg(common, ATH_DBG_CALIBRATE, 386 + ath_dbg(common, CALIBRATE, 385 387 "noise floor failed detected; detected %d, threshold %d\n", 386 388 nf, nfThresh); 387 389 chan->channelFlags |= CHANNEL_CW_INT;
+1 -2
drivers/net/wireless/ath/ath9k/eeprom.c
··· 305 305 regulatory->max_power_level += INCREASE_MAXPOW_BY_THREE_CHAIN; 306 306 break; 307 307 default: 308 - ath_dbg(common, ATH_DBG_EEPROM, 309 - "Invalid chainmask configuration\n"); 308 + ath_dbg(common, EEPROM, "Invalid chainmask configuration\n"); 310 309 break; 311 310 } 312 311 }
+10 -13
drivers/net/wireless/ath/ath9k/eeprom_4k.c
··· 38 38 39 39 for (addr = 0; addr < SIZE_EEPROM_4K; addr++) { 40 40 if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, eep_data)) { 41 - ath_dbg(common, ATH_DBG_EEPROM, 41 + ath_dbg(common, EEPROM, 42 42 "Unable to read eeprom region\n"); 43 43 return false; 44 44 } ··· 62 62 struct ath_common *common = ath9k_hw_common(ah); 63 63 64 64 if (!ath9k_hw_use_flash(ah)) { 65 - ath_dbg(common, ATH_DBG_EEPROM, 66 - "Reading from EEPROM, not flash\n"); 65 + ath_dbg(common, EEPROM, "Reading from EEPROM, not flash\n"); 67 66 } 68 67 69 68 if (common->bus_ops->ath_bus_type == ATH_USB) ··· 203 204 return false; 204 205 } 205 206 206 - ath_dbg(common, ATH_DBG_EEPROM, 207 - "Read Magic = 0x%04X\n", magic); 207 + ath_dbg(common, EEPROM, "Read Magic = 0x%04X\n", magic); 208 208 209 209 if (magic != AR5416_EEPROM_MAGIC) { 210 210 magic2 = swab16(magic); ··· 225 227 } 226 228 } 227 229 228 - ath_dbg(common, ATH_DBG_EEPROM, "need_swap = %s.\n", 230 + ath_dbg(common, EEPROM, "need_swap = %s\n", 229 231 need_swap ? "True" : "False"); 230 232 231 233 if (need_swap) ··· 247 249 u32 integer; 248 250 u16 word; 249 251 250 - ath_dbg(common, ATH_DBG_EEPROM, 252 + ath_dbg(common, EEPROM, 251 253 "EEPROM Endianness is not native.. Changing\n"); 252 254 253 255 word = swab16(eep->baseEepHeader.length); ··· 433 435 reg32 = get_unaligned_le32(&pdadcValues[4 * j]); 434 436 REG_WRITE(ah, regOffset, reg32); 435 437 436 - ath_dbg(common, ATH_DBG_EEPROM, 438 + ath_dbg(common, EEPROM, 437 439 "PDADC (%d,%4x): %4.4x %8.8x\n", 438 440 i, regChainOffset, regOffset, 439 441 reg32); 440 - ath_dbg(common, ATH_DBG_EEPROM, 442 + ath_dbg(common, EEPROM, 441 443 "PDADC: Chain %d | " 442 444 "PDADC %3d Value %3d | " 443 445 "PDADC %3d Value %3d | " ··· 1077 1079 1078 1080 u16 spur_val = AR_NO_SPUR; 1079 1081 1080 - ath_dbg(common, ATH_DBG_ANI, 1081 - "Getting spur idx:%d is2Ghz:%d val:%x\n", 1082 + ath_dbg(common, ANI, "Getting spur idx:%d is2Ghz:%d val:%x\n", 1082 1083 i, is2GHz, ah->config.spurchans[i][is2GHz]); 1083 1084 1084 1085 switch (ah->config.spurmode) { ··· 1085 1088 break; 1086 1089 case SPUR_ENABLE_IOCTL: 1087 1090 spur_val = ah->config.spurchans[i][is2GHz]; 1088 - ath_dbg(common, ATH_DBG_ANI, 1089 - "Getting spur val from new loc. %d\n", spur_val); 1091 + ath_dbg(common, ANI, "Getting spur val from new loc. %d\n", 1092 + spur_val); 1090 1093 break; 1091 1094 case SPUR_ENABLE_EEPROM: 1092 1095 spur_val = EEP_MAP4K_SPURCHAN;
+7 -10
drivers/net/wireless/ath/ath9k/eeprom_9287.c
··· 41 41 for (addr = 0; addr < SIZE_EEPROM_AR9287; addr++) { 42 42 if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, 43 43 eep_data)) { 44 - ath_dbg(common, ATH_DBG_EEPROM, 44 + ath_dbg(common, EEPROM, 45 45 "Unable to read eeprom region\n"); 46 46 return false; 47 47 } ··· 66 66 struct ath_common *common = ath9k_hw_common(ah); 67 67 68 68 if (!ath9k_hw_use_flash(ah)) { 69 - ath_dbg(common, ATH_DBG_EEPROM, 70 - "Reading from EEPROM, not flash\n"); 69 + ath_dbg(common, EEPROM, "Reading from EEPROM, not flash\n"); 71 70 } 72 71 73 72 if (common->bus_ops->ath_bus_type == ATH_USB) ··· 196 197 return false; 197 198 } 198 199 199 - ath_dbg(common, ATH_DBG_EEPROM, 200 - "Read Magic = 0x%04X\n", magic); 200 + ath_dbg(common, EEPROM, "Read Magic = 0x%04X\n", magic); 201 201 202 202 if (magic != AR5416_EEPROM_MAGIC) { 203 203 magic2 = swab16(magic); ··· 218 220 } 219 221 } 220 222 221 - ath_dbg(common, ATH_DBG_EEPROM, "need_swap = %s.\n", 223 + ath_dbg(common, EEPROM, "need_swap = %s\n", 222 224 need_swap ? "True" : "False"); 223 225 224 226 if (need_swap) ··· 1039 1041 struct ath_common *common = ath9k_hw_common(ah); 1040 1042 u16 spur_val = AR_NO_SPUR; 1041 1043 1042 - ath_dbg(common, ATH_DBG_ANI, 1043 - "Getting spur idx:%d is2Ghz:%d val:%x\n", 1044 + ath_dbg(common, ANI, "Getting spur idx:%d is2Ghz:%d val:%x\n", 1044 1045 i, is2GHz, ah->config.spurchans[i][is2GHz]); 1045 1046 1046 1047 switch (ah->config.spurmode) { ··· 1047 1050 break; 1048 1051 case SPUR_ENABLE_IOCTL: 1049 1052 spur_val = ah->config.spurchans[i][is2GHz]; 1050 - ath_dbg(common, ATH_DBG_ANI, 1051 - "Getting spur val from new loc. %d\n", spur_val); 1053 + ath_dbg(common, ANI, "Getting spur val from new loc. %d\n", 1054 + spur_val); 1052 1055 break; 1053 1056 case SPUR_ENABLE_EEPROM: 1054 1057 spur_val = EEP_MAP9287_SPURCHAN;
+11 -17
drivers/net/wireless/ath/ath9k/eeprom_def.c
··· 121 121 struct ath_common *common = ath9k_hw_common(ah); 122 122 123 123 if (!ath9k_hw_use_flash(ah)) { 124 - ath_dbg(common, ATH_DBG_EEPROM, 125 - "Reading from EEPROM, not flash\n"); 124 + ath_dbg(common, EEPROM, "Reading from EEPROM, not flash\n"); 126 125 } 127 126 128 127 if (common->bus_ops->ath_bus_type == ATH_USB) ··· 278 279 } 279 280 280 281 if (!ath9k_hw_use_flash(ah)) { 281 - ath_dbg(common, ATH_DBG_EEPROM, 282 - "Read Magic = 0x%04X\n", magic); 282 + ath_dbg(common, EEPROM, "Read Magic = 0x%04X\n", magic); 283 283 284 284 if (magic != AR5416_EEPROM_MAGIC) { 285 285 magic2 = swab16(magic); ··· 301 303 } 302 304 } 303 305 304 - ath_dbg(common, ATH_DBG_EEPROM, "need_swap = %s.\n", 306 + ath_dbg(common, EEPROM, "need_swap = %s\n", 305 307 need_swap ? "True" : "False"); 306 308 307 309 if (need_swap) ··· 323 325 u32 integer, j; 324 326 u16 word; 325 327 326 - ath_dbg(common, ATH_DBG_EEPROM, 328 + ath_dbg(common, EEPROM, 327 329 "EEPROM Endianness is not native.. Changing.\n"); 328 330 329 331 word = swab16(eep->baseEepHeader.length); ··· 963 965 reg32 = get_unaligned_le32(&pdadcValues[4 * j]); 964 966 REG_WRITE(ah, regOffset, reg32); 965 967 966 - ath_dbg(common, ATH_DBG_EEPROM, 968 + ath_dbg(common, EEPROM, 967 969 "PDADC (%d,%4x): %4.4x %8.8x\n", 968 970 i, regChainOffset, regOffset, 969 971 reg32); 970 - ath_dbg(common, ATH_DBG_EEPROM, 971 - "PDADC: Chain %d | PDADC %3d " 972 - "Value %3d | PDADC %3d Value %3d | " 973 - "PDADC %3d Value %3d | PDADC %3d " 974 - "Value %3d |\n", 972 + ath_dbg(common, EEPROM, 973 + "PDADC: Chain %d | PDADC %3d Value %3d | PDADC %3d Value %3d | PDADC %3d Value %3d | PDADC %3d Value %3d |\n", 975 974 i, 4 * j, pdadcValues[4 * j], 976 975 4 * j + 1, pdadcValues[4 * j + 1], 977 976 4 * j + 2, pdadcValues[4 * j + 2], ··· 1273 1278 regulatory->max_power_level += INCREASE_MAXPOW_BY_THREE_CHAIN; 1274 1279 break; 1275 1280 default: 1276 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_EEPROM, 1281 + ath_dbg(ath9k_hw_common(ah), EEPROM, 1277 1282 "Invalid chainmask configuration\n"); 1278 1283 break; 1279 1284 } ··· 1391 1396 1392 1397 u16 spur_val = AR_NO_SPUR; 1393 1398 1394 - ath_dbg(common, ATH_DBG_ANI, 1395 - "Getting spur idx:%d is2Ghz:%d val:%x\n", 1399 + ath_dbg(common, ANI, "Getting spur idx:%d is2Ghz:%d val:%x\n", 1396 1400 i, is2GHz, ah->config.spurchans[i][is2GHz]); 1397 1401 1398 1402 switch (ah->config.spurmode) { ··· 1399 1405 break; 1400 1406 case SPUR_ENABLE_IOCTL: 1401 1407 spur_val = ah->config.spurchans[i][is2GHz]; 1402 - ath_dbg(common, ATH_DBG_ANI, 1403 - "Getting spur val from new loc. %d\n", spur_val); 1408 + ath_dbg(common, ANI, "Getting spur val from new loc. %d\n", 1409 + spur_val); 1404 1410 break; 1405 1411 case SPUR_ENABLE_EEPROM: 1406 1412 spur_val = EEP_DEF_SPURCHAN;
+4 -6
drivers/net/wireless/ath/ath9k/gpio.c
··· 130 130 sc->sc_flags &= ~(SC_OP_BT_PRIORITY_DETECTED | SC_OP_BT_SCAN); 131 131 /* Detect if colocated bt started scanning */ 132 132 if (btcoex->bt_priority_cnt >= ATH_BT_CNT_SCAN_THRESHOLD) { 133 - ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_BTCOEX, 133 + ath_dbg(ath9k_hw_common(sc->sc_ah), BTCOEX, 134 134 "BT scan detected\n"); 135 135 sc->sc_flags |= (SC_OP_BT_SCAN | 136 136 SC_OP_BT_PRIORITY_DETECTED); 137 137 } else if (btcoex->bt_priority_cnt >= ATH_BT_CNT_THRESHOLD) { 138 - ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_BTCOEX, 138 + ath_dbg(ath9k_hw_common(sc->sc_ah), BTCOEX, 139 139 "BT priority traffic detected\n"); 140 140 sc->sc_flags |= SC_OP_BT_PRIORITY_DETECTED; 141 141 } ··· 230 230 struct ath_common *common = ath9k_hw_common(ah); 231 231 bool is_btscan = sc->sc_flags & SC_OP_BT_SCAN; 232 232 233 - ath_dbg(common, ATH_DBG_BTCOEX, 234 - "no stomp timer running\n"); 233 + ath_dbg(common, BTCOEX, "no stomp timer running\n"); 235 234 236 235 ath9k_ps_wakeup(sc); 237 236 spin_lock_bh(&btcoex->btcoex_lock); ··· 279 280 struct ath_btcoex *btcoex = &sc->btcoex; 280 281 struct ath_hw *ah = sc->sc_ah; 281 282 282 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX, 283 - "Starting btcoex timers\n"); 283 + ath_dbg(ath9k_hw_common(ah), BTCOEX, "Starting btcoex timers\n"); 284 284 285 285 /* make sure duty cycle timer is also stopped when resuming */ 286 286 if (btcoex->hw_timer_enabled)
+22 -29
drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
··· 167 167 /* TSF out of range threshold fixed at 1 second */ 168 168 bs.bs_tsfoor_threshold = ATH9K_TSFOOR_THRESHOLD; 169 169 170 - ath_dbg(common, ATH_DBG_CONFIG, "intval: %u tsf: %llu tsftu: %u\n", 170 + ath_dbg(common, CONFIG, "intval: %u tsf: %llu tsftu: %u\n", 171 171 intval, tsf, tsftu); 172 - ath_dbg(common, ATH_DBG_CONFIG, 172 + ath_dbg(common, CONFIG, 173 173 "bmiss: %u sleep: %u cfp-period: %u maxdur: %u next: %u\n", 174 174 bs.bs_bmissthreshold, bs.bs_sleepduration, 175 175 bs.bs_cfpperiod, bs.bs_cfpmaxduration, bs.bs_cfpnext); ··· 224 224 if (priv->op_flags & OP_ENABLE_BEACON) 225 225 imask |= ATH9K_INT_SWBA; 226 226 227 - ath_dbg(common, ATH_DBG_CONFIG, 228 - "AP Beacon config, intval: %d, nexttbtt: %u, resp_time: %d " 229 - "imask: 0x%x\n", 227 + ath_dbg(common, CONFIG, 228 + "AP Beacon config, intval: %d, nexttbtt: %u, resp_time: %d imask: 0x%x\n", 230 229 bss_conf->beacon_interval, nexttbtt, 231 230 priv->ah->config.sw_beacon_response_time, imask); 232 231 ··· 272 273 if (priv->op_flags & OP_ENABLE_BEACON) 273 274 imask |= ATH9K_INT_SWBA; 274 275 275 - ath_dbg(common, ATH_DBG_CONFIG, 276 - "IBSS Beacon config, intval: %d, nexttbtt: %u, " 277 - "resp_time: %d, imask: 0x%x\n", 276 + ath_dbg(common, CONFIG, 277 + "IBSS Beacon config, intval: %d, nexttbtt: %u, resp_time: %d, imask: 0x%x\n", 278 278 bss_conf->beacon_interval, nexttbtt, 279 279 priv->ah->config.sw_beacon_response_time, imask); 280 280 ··· 321 323 322 324 tx_slot = ath9k_htc_tx_get_slot(priv); 323 325 if (tx_slot < 0) { 324 - ath_dbg(common, ATH_DBG_XMIT, "No free CAB slot\n"); 326 + ath_dbg(common, XMIT, "No free CAB slot\n"); 325 327 dev_kfree_skb_any(skb); 326 328 goto next; 327 329 } ··· 331 333 ath9k_htc_tx_clear_slot(priv, tx_slot); 332 334 dev_kfree_skb_any(skb); 333 335 334 - ath_dbg(common, ATH_DBG_XMIT, 335 - "Failed to send CAB frame\n"); 336 + ath_dbg(common, XMIT, "Failed to send CAB frame\n"); 336 337 } else { 337 338 spin_lock_bh(&priv->tx.tx_lock); 338 339 priv->tx.queued_cnt++; ··· 406 409 ret = htc_send(priv->htc, beacon); 407 410 if (ret != 0) { 408 411 if (ret == -ENOMEM) { 409 - ath_dbg(common, ATH_DBG_BSTUCK, 412 + ath_dbg(common, BSTUCK, 410 413 "Failed to send beacon, no free TX buffer\n"); 411 414 } 412 415 dev_kfree_skb_any(beacon); ··· 431 434 slot = ((tsftu % intval) * ATH9K_HTC_MAX_BCN_VIF) / intval; 432 435 slot = ATH9K_HTC_MAX_BCN_VIF - slot - 1; 433 436 434 - ath_dbg(common, ATH_DBG_BEACON, 437 + ath_dbg(common, BEACON, 435 438 "Choose slot: %d, tsf: %llu, tsftu: %u, intval: %u\n", 436 439 slot, tsf, tsftu, intval); 437 440 ··· 447 450 if (swba->beacon_pending != 0) { 448 451 priv->cur_beacon_conf.bmiss_cnt++; 449 452 if (priv->cur_beacon_conf.bmiss_cnt > BSTUCK_THRESHOLD) { 450 - ath_dbg(common, ATH_DBG_BSTUCK, 451 - "Beacon stuck, HW reset\n"); 453 + ath_dbg(common, BSTUCK, "Beacon stuck, HW reset\n"); 452 454 ieee80211_queue_work(priv->hw, 453 455 &priv->fatal_work); 454 456 } ··· 455 459 } 456 460 457 461 if (priv->cur_beacon_conf.bmiss_cnt) { 458 - ath_dbg(common, ATH_DBG_BSTUCK, 462 + ath_dbg(common, BSTUCK, 459 463 "Resuming beacon xmit after %u misses\n", 460 464 priv->cur_beacon_conf.bmiss_cnt); 461 465 priv->cur_beacon_conf.bmiss_cnt = 0; ··· 491 495 priv->cur_beacon_conf.bslot[avp->bslot] = vif; 492 496 spin_unlock_bh(&priv->beacon_lock); 493 497 494 - ath_dbg(common, ATH_DBG_CONFIG, 495 - "Added interface at beacon slot: %d\n", avp->bslot); 498 + ath_dbg(common, CONFIG, "Added interface at beacon slot: %d\n", 499 + avp->bslot); 496 500 } 497 501 498 502 void ath9k_htc_remove_bslot(struct ath9k_htc_priv *priv, ··· 505 509 priv->cur_beacon_conf.bslot[avp->bslot] = NULL; 506 510 spin_unlock_bh(&priv->beacon_lock); 507 511 508 - ath_dbg(common, ATH_DBG_CONFIG, 509 - "Removed interface at beacon slot: %d\n", avp->bslot); 512 + ath_dbg(common, CONFIG, "Removed interface at beacon slot: %d\n", 513 + avp->bslot); 510 514 } 511 515 512 516 /* ··· 532 536 tsfadjust = cur_conf->beacon_interval * avp->bslot / ATH9K_HTC_MAX_BCN_VIF; 533 537 avp->tsfadjust = cpu_to_le64(TU_TO_USEC(tsfadjust)); 534 538 535 - ath_dbg(common, ATH_DBG_CONFIG, 536 - "tsfadjust is: %llu for bslot: %d\n", 539 + ath_dbg(common, CONFIG, "tsfadjust is: %llu for bslot: %d\n", 537 540 (unsigned long long)tsfadjust, avp->bslot); 538 541 } 539 542 ··· 563 568 (priv->num_ap_vif > 1) && 564 569 (vif->type == NL80211_IFTYPE_AP) && 565 570 (cur_conf->beacon_interval != bss_conf->beacon_int)) { 566 - ath_dbg(common, ATH_DBG_CONFIG, 571 + ath_dbg(common, CONFIG, 567 572 "Changing beacon interval of multiple AP interfaces !\n"); 568 573 return false; 569 574 } ··· 574 579 */ 575 580 if (priv->num_ap_vif && 576 581 (vif->type != NL80211_IFTYPE_AP)) { 577 - ath_dbg(common, ATH_DBG_CONFIG, 582 + ath_dbg(common, CONFIG, 578 583 "HW in AP mode, cannot set STA beacon parameters\n"); 579 584 return false; 580 585 } ··· 592 597 &beacon_configured); 593 598 594 599 if (beacon_configured) { 595 - ath_dbg(common, ATH_DBG_CONFIG, 600 + ath_dbg(common, CONFIG, 596 601 "Beacon already configured for a station interface\n"); 597 602 return false; 598 603 } ··· 632 637 ath9k_htc_beacon_config_ap(priv, cur_conf); 633 638 break; 634 639 default: 635 - ath_dbg(common, ATH_DBG_CONFIG, 636 - "Unsupported beaconing mode\n"); 640 + ath_dbg(common, CONFIG, "Unsupported beaconing mode\n"); 637 641 return; 638 642 } 639 643 } ··· 653 659 ath9k_htc_beacon_config_ap(priv, cur_conf); 654 660 break; 655 661 default: 656 - ath_dbg(common, ATH_DBG_CONFIG, 657 - "Unsupported beaconing mode\n"); 662 + ath_dbg(common, CONFIG, "Unsupported beaconing mode\n"); 658 663 return; 659 664 } 660 665 }
+4 -5
drivers/net/wireless/ath/ath9k/htc_drv_gpio.c
··· 36 36 priv->op_flags &= ~(OP_BT_PRIORITY_DETECTED | OP_BT_SCAN); 37 37 /* Detect if colocated bt started scanning */ 38 38 if (btcoex->bt_priority_cnt >= ATH_BT_CNT_SCAN_THRESHOLD) { 39 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX, 39 + ath_dbg(ath9k_hw_common(ah), BTCOEX, 40 40 "BT scan detected\n"); 41 41 priv->op_flags |= (OP_BT_SCAN | 42 42 OP_BT_PRIORITY_DETECTED); 43 43 } else if (btcoex->bt_priority_cnt >= ATH_BT_CNT_THRESHOLD) { 44 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX, 44 + ath_dbg(ath9k_hw_common(ah), BTCOEX, 45 45 "BT priority traffic detected\n"); 46 46 priv->op_flags |= OP_BT_PRIORITY_DETECTED; 47 47 } ··· 102 102 struct ath_common *common = ath9k_hw_common(ah); 103 103 bool is_btscan = priv->op_flags & OP_BT_SCAN; 104 104 105 - ath_dbg(common, ATH_DBG_BTCOEX, 106 - "time slice work for bt and wlan\n"); 105 + ath_dbg(common, BTCOEX, "time slice work for bt and wlan\n"); 107 106 108 107 if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_LOW || is_btscan) 109 108 ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_NONE); ··· 133 134 struct ath_btcoex *btcoex = &priv->btcoex; 134 135 struct ath_hw *ah = priv->ah; 135 136 136 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX, "Starting btcoex work\n"); 137 + ath_dbg(ath9k_hw_common(ah), BTCOEX, "Starting btcoex work\n"); 137 138 138 139 btcoex->bt_priority_cnt = 0; 139 140 btcoex->bt_priority_time = jiffies;
+8 -12
drivers/net/wireless/ath/ath9k/htc_drv_init.c
··· 299 299 (u8 *) &val, sizeof(val), 300 300 100); 301 301 if (unlikely(r)) { 302 - ath_dbg(common, ATH_DBG_WMI, 303 - "REGISTER READ FAILED: (0x%04x, %d)\n", 302 + ath_dbg(common, WMI, "REGISTER READ FAILED: (0x%04x, %d)\n", 304 303 reg_offset, r); 305 304 return -EIO; 306 305 } ··· 326 327 (u8 *)tmpval, sizeof(u32) * count, 327 328 100); 328 329 if (unlikely(ret)) { 329 - ath_dbg(common, ATH_DBG_WMI, 330 + ath_dbg(common, WMI, 330 331 "Multiple REGISTER READ FAILED (count: %d)\n", count); 331 332 } 332 333 ··· 351 352 (u8 *) &val, sizeof(val), 352 353 100); 353 354 if (unlikely(r)) { 354 - ath_dbg(common, ATH_DBG_WMI, 355 - "REGISTER WRITE FAILED:(0x%04x, %d)\n", 355 + ath_dbg(common, WMI, "REGISTER WRITE FAILED:(0x%04x, %d)\n", 356 356 reg_offset, r); 357 357 } 358 358 } ··· 382 384 (u8 *) &rsp_status, sizeof(rsp_status), 383 385 100); 384 386 if (unlikely(r)) { 385 - ath_dbg(common, ATH_DBG_WMI, 387 + ath_dbg(common, WMI, 386 388 "REGISTER WRITE FAILED, multi len: %d\n", 387 389 priv->wmi->multi_write_idx); 388 390 } ··· 432 434 (u8 *) &rsp_status, sizeof(rsp_status), 433 435 100); 434 436 if (unlikely(r)) { 435 - ath_dbg(common, ATH_DBG_WMI, 437 + ath_dbg(common, WMI, 436 438 "REGISTER WRITE FAILED, multi len: %d\n", 437 439 priv->wmi->multi_write_idx); 438 440 } ··· 510 512 tx_streams = ath9k_cmn_count_streams(priv->ah->txchainmask, 2); 511 513 rx_streams = ath9k_cmn_count_streams(priv->ah->rxchainmask, 2); 512 514 513 - ath_dbg(common, ATH_DBG_CONFIG, 514 - "TX streams %d, RX streams: %d\n", 515 + ath_dbg(common, CONFIG, "TX streams %d, RX streams: %d\n", 515 516 tx_streams, rx_streams); 516 517 517 518 if (tx_streams != rx_streams) { ··· 873 876 goto err_world; 874 877 } 875 878 876 - ath_dbg(common, ATH_DBG_CONFIG, 877 - "WMI:%d, BCN:%d, CAB:%d, UAPSD:%d, MGMT:%d, " 878 - "BE:%d, BK:%d, VI:%d, VO:%d\n", 879 + ath_dbg(common, CONFIG, 880 + "WMI:%d, BCN:%d, CAB:%d, UAPSD:%d, MGMT:%d, BE:%d, BK:%d, VI:%d, VO:%d\n", 879 881 priv->wmi_cmd_ep, 880 882 priv->beacon_ep, 881 883 priv->cab_ep,
+39 -44
drivers/net/wireless/ath/ath9k/htc_drv_main.c
··· 266 266 267 267 ath9k_wmi_event_drain(priv); 268 268 269 - ath_dbg(common, ATH_DBG_CONFIG, 269 + ath_dbg(common, CONFIG, 270 270 "(%u MHz) -> (%u MHz), HT: %d, HT40: %d fastcc: %d\n", 271 271 priv->ah->curchan->channel, 272 272 channel->center_freq, conf_is_ht(conf), conf_is_ht40(conf), ··· 415 415 priv->vif_sta_pos[priv->mon_vif_idx] = sta_idx; 416 416 priv->ah->is_monitoring = true; 417 417 418 - ath_dbg(common, ATH_DBG_CONFIG, 418 + ath_dbg(common, CONFIG, 419 419 "Attached a monitor interface at idx: %d, sta idx: %d\n", 420 420 priv->mon_vif_idx, sta_idx); 421 421 ··· 427 427 */ 428 428 __ath9k_htc_remove_monitor_interface(priv); 429 429 err_vif: 430 - ath_dbg(common, ATH_DBG_FATAL, "Unable to attach a monitor interface\n"); 430 + ath_dbg(common, FATAL, "Unable to attach a monitor interface\n"); 431 431 432 432 return ret; 433 433 } ··· 452 452 priv->nstations--; 453 453 priv->ah->is_monitoring = false; 454 454 455 - ath_dbg(common, ATH_DBG_CONFIG, 455 + ath_dbg(common, CONFIG, 456 456 "Removed a monitor interface at idx: %d, sta idx: %d\n", 457 457 priv->mon_vif_idx, sta_idx); 458 458 ··· 512 512 } 513 513 514 514 if (sta) { 515 - ath_dbg(common, ATH_DBG_CONFIG, 515 + ath_dbg(common, CONFIG, 516 516 "Added a station entry for: %pM (idx: %d)\n", 517 517 sta->addr, tsta.sta_index); 518 518 } else { 519 - ath_dbg(common, ATH_DBG_CONFIG, 519 + ath_dbg(common, CONFIG, 520 520 "Added a station entry for VIF %d (idx: %d)\n", 521 521 avp->index, tsta.sta_index); 522 522 } ··· 556 556 } 557 557 558 558 if (sta) { 559 - ath_dbg(common, ATH_DBG_CONFIG, 559 + ath_dbg(common, CONFIG, 560 560 "Removed a station entry for: %pM (idx: %d)\n", 561 561 sta->addr, sta_idx); 562 562 } else { 563 - ath_dbg(common, ATH_DBG_CONFIG, 563 + ath_dbg(common, CONFIG, 564 564 "Removed a station entry for VIF %d (idx: %d)\n", 565 565 avp->index, sta_idx); 566 566 } ··· 665 665 ath9k_htc_setup_rate(priv, sta, &trate); 666 666 ret = ath9k_htc_send_rate_cmd(priv, &trate); 667 667 if (!ret) 668 - ath_dbg(common, ATH_DBG_CONFIG, 668 + ath_dbg(common, CONFIG, 669 669 "Updated target sta: %pM, rate caps: 0x%X\n", 670 670 sta->addr, be32_to_cpu(trate.capflags)); 671 671 } ··· 692 692 693 693 ret = ath9k_htc_send_rate_cmd(priv, &trate); 694 694 if (!ret) 695 - ath_dbg(common, ATH_DBG_CONFIG, 695 + ath_dbg(common, CONFIG, 696 696 "Updated target sta: %pM, rate caps: 0x%X\n", 697 697 bss_conf->bssid, be32_to_cpu(trate.capflags)); 698 698 } ··· 721 721 722 722 WMI_CMD_BUF(WMI_TX_AGGR_ENABLE_CMDID, &aggr); 723 723 if (ret) 724 - ath_dbg(common, ATH_DBG_CONFIG, 724 + ath_dbg(common, CONFIG, 725 725 "Unable to %s TX aggregation for (%pM, %d)\n", 726 726 (aggr.aggr_enable) ? "start" : "stop", sta->addr, tid); 727 727 else 728 - ath_dbg(common, ATH_DBG_CONFIG, 728 + ath_dbg(common, CONFIG, 729 729 "%s TX aggregation for (%pM, %d)\n", 730 730 (aggr.aggr_enable) ? "Starting" : "Stopping", 731 731 sta->addr, tid); ··· 784 784 /* Long calibration runs independently of short calibration. */ 785 785 if ((timestamp - common->ani.longcal_timer) >= ATH_LONG_CALINTERVAL) { 786 786 longcal = true; 787 - ath_dbg(common, ATH_DBG_ANI, "longcal @%lu\n", jiffies); 787 + ath_dbg(common, ANI, "longcal @%lu\n", jiffies); 788 788 common->ani.longcal_timer = timestamp; 789 789 } 790 790 ··· 793 793 if ((timestamp - common->ani.shortcal_timer) >= 794 794 short_cal_interval) { 795 795 shortcal = true; 796 - ath_dbg(common, ATH_DBG_ANI, 797 - "shortcal @%lu\n", jiffies); 796 + ath_dbg(common, ANI, "shortcal @%lu\n", jiffies); 798 797 common->ani.shortcal_timer = timestamp; 799 798 common->ani.resetcal_timer = timestamp; 800 799 } ··· 865 866 padsize = padpos & 3; 866 867 if (padsize && skb->len > padpos) { 867 868 if (skb_headroom(skb) < padsize) { 868 - ath_dbg(common, ATH_DBG_XMIT, "No room for padding\n"); 869 + ath_dbg(common, XMIT, "No room for padding\n"); 869 870 goto fail_tx; 870 871 } 871 872 skb_push(skb, padsize); ··· 874 875 875 876 slot = ath9k_htc_tx_get_slot(priv); 876 877 if (slot < 0) { 877 - ath_dbg(common, ATH_DBG_XMIT, "No free TX slot\n"); 878 + ath_dbg(common, XMIT, "No free TX slot\n"); 878 879 goto fail_tx; 879 880 } 880 881 881 882 ret = ath9k_htc_tx_start(priv, skb, slot, false); 882 883 if (ret != 0) { 883 - ath_dbg(common, ATH_DBG_XMIT, "Tx failed\n"); 884 + ath_dbg(common, XMIT, "Tx failed\n"); 884 885 goto clear_slot; 885 886 } 886 887 ··· 908 909 909 910 mutex_lock(&priv->mutex); 910 911 911 - ath_dbg(common, ATH_DBG_CONFIG, 912 + ath_dbg(common, CONFIG, 912 913 "Starting driver with initial channel: %d MHz\n", 913 914 curchan->center_freq); 914 915 ··· 942 943 943 944 ret = ath9k_htc_update_cap_target(priv, 0); 944 945 if (ret) 945 - ath_dbg(common, ATH_DBG_CONFIG, 946 + ath_dbg(common, CONFIG, 946 947 "Failed to update capability in target\n"); 947 948 948 949 priv->op_flags &= ~OP_INVALID; ··· 979 980 mutex_lock(&priv->mutex); 980 981 981 982 if (priv->op_flags & OP_INVALID) { 982 - ath_dbg(common, ATH_DBG_ANY, "Device not present\n"); 983 + ath_dbg(common, ANY, "Device not present\n"); 983 984 mutex_unlock(&priv->mutex); 984 985 return; 985 986 } ··· 1026 1027 1027 1028 priv->op_flags |= OP_INVALID; 1028 1029 1029 - ath_dbg(common, ATH_DBG_CONFIG, "Driver halt\n"); 1030 + ath_dbg(common, CONFIG, "Driver halt\n"); 1030 1031 mutex_unlock(&priv->mutex); 1031 1032 } 1032 1033 ··· 1119 1120 ath9k_htc_start_ani(priv); 1120 1121 } 1121 1122 1122 - ath_dbg(common, ATH_DBG_CONFIG, 1123 - "Attach a VIF of type: %d at idx: %d\n", vif->type, avp->index); 1123 + ath_dbg(common, CONFIG, "Attach a VIF of type: %d at idx: %d\n", 1124 + vif->type, avp->index); 1124 1125 1125 1126 out: 1126 1127 ath9k_htc_ps_restore(priv); ··· 1176 1177 ath9k_htc_stop_ani(priv); 1177 1178 } 1178 1179 1179 - ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface at idx: %d\n", avp->index); 1180 + ath_dbg(common, CONFIG, "Detach Interface at idx: %d\n", avp->index); 1180 1181 1181 1182 ath9k_htc_ps_restore(priv); 1182 1183 mutex_unlock(&priv->mutex); ··· 1201 1202 mutex_unlock(&priv->htc_pm_lock); 1202 1203 1203 1204 if (enable_radio) { 1204 - ath_dbg(common, ATH_DBG_CONFIG, 1205 - "not-idle: enabling radio\n"); 1205 + ath_dbg(common, CONFIG, "not-idle: enabling radio\n"); 1206 1206 ath9k_htc_setpower(priv, ATH9K_PM_AWAKE); 1207 1207 ath9k_htc_radio_enable(hw); 1208 1208 } ··· 1223 1225 struct ieee80211_channel *curchan = hw->conf.channel; 1224 1226 int pos = curchan->hw_value; 1225 1227 1226 - ath_dbg(common, ATH_DBG_CONFIG, "Set channel: %d MHz\n", 1228 + ath_dbg(common, CONFIG, "Set channel: %d MHz\n", 1227 1229 curchan->center_freq); 1228 1230 1229 1231 ath9k_cmn_update_ichannel(&priv->ah->channels[pos], ··· 1263 1265 } 1264 1266 mutex_unlock(&priv->htc_pm_lock); 1265 1267 1266 - ath_dbg(common, ATH_DBG_CONFIG, 1267 - "idle: disabling radio\n"); 1268 + ath_dbg(common, CONFIG, "idle: disabling radio\n"); 1268 1269 ath9k_htc_radio_disable(hw); 1269 1270 } 1270 1271 ··· 1295 1298 *total_flags &= SUPPORTED_FILTERS; 1296 1299 1297 1300 if (priv->op_flags & OP_INVALID) { 1298 - ath_dbg(ath9k_hw_common(priv->ah), ATH_DBG_ANY, 1301 + ath_dbg(ath9k_hw_common(priv->ah), ANY, 1299 1302 "Unable to configure filter on invalid state\n"); 1300 1303 mutex_unlock(&priv->mutex); 1301 1304 return; ··· 1306 1309 rfilt = ath9k_htc_calcrxfilter(priv); 1307 1310 ath9k_hw_setrxfilter(priv->ah, rfilt); 1308 1311 1309 - ath_dbg(ath9k_hw_common(priv->ah), ATH_DBG_CONFIG, 1310 - "Set HW RX filter: 0x%x\n", rfilt); 1312 + ath_dbg(ath9k_hw_common(priv->ah), CONFIG, "Set HW RX filter: 0x%x\n", 1313 + rfilt); 1311 1314 1312 1315 ath9k_htc_ps_restore(priv); 1313 1316 mutex_unlock(&priv->mutex); ··· 1374 1377 1375 1378 qnum = get_hw_qnum(queue, priv->hwq_map); 1376 1379 1377 - ath_dbg(common, ATH_DBG_CONFIG, 1380 + ath_dbg(common, CONFIG, 1378 1381 "Configure tx [queue/hwq] [%d/%d], aifs: %d, cw_min: %d, cw_max: %d, txop: %d\n", 1379 1382 queue, qnum, params->aifs, params->cw_min, 1380 1383 params->cw_max, params->txop); ··· 1409 1412 return -ENOSPC; 1410 1413 1411 1414 mutex_lock(&priv->mutex); 1412 - ath_dbg(common, ATH_DBG_CONFIG, "Set HW Key\n"); 1415 + ath_dbg(common, CONFIG, "Set HW Key\n"); 1413 1416 ath9k_htc_ps_wakeup(priv); 1414 1417 1415 1418 switch (cmd) { ··· 1445 1448 struct ath_common *common = ath9k_hw_common(priv->ah); 1446 1449 1447 1450 ath9k_hw_write_associd(priv->ah); 1448 - ath_dbg(common, ATH_DBG_CONFIG, 1449 - "BSSID: %pM aid: 0x%x\n", 1451 + ath_dbg(common, CONFIG, "BSSID: %pM aid: 0x%x\n", 1450 1452 common->curbssid, common->curaid); 1451 1453 } 1452 1454 ··· 1483 1487 ath9k_htc_ps_wakeup(priv); 1484 1488 1485 1489 if (changed & BSS_CHANGED_ASSOC) { 1486 - ath_dbg(common, ATH_DBG_CONFIG, "BSS Changed ASSOC %d\n", 1490 + ath_dbg(common, CONFIG, "BSS Changed ASSOC %d\n", 1487 1491 bss_conf->assoc); 1488 1492 1489 1493 bss_conf->assoc ? ··· 1508 1512 } 1509 1513 1510 1514 if ((changed & BSS_CHANGED_BEACON_ENABLED) && bss_conf->enable_beacon) { 1511 - ath_dbg(common, ATH_DBG_CONFIG, 1512 - "Beacon enabled for BSS: %pM\n", bss_conf->bssid); 1515 + ath_dbg(common, CONFIG, "Beacon enabled for BSS: %pM\n", 1516 + bss_conf->bssid); 1513 1517 ath9k_htc_set_tsfadjust(priv, vif); 1514 1518 priv->op_flags |= OP_ENABLE_BEACON; 1515 1519 ath9k_htc_beacon_config(priv, vif); ··· 1521 1525 * AP/IBSS interfaces. 1522 1526 */ 1523 1527 if ((priv->num_ap_vif <= 1) || priv->num_ibss_vif) { 1524 - ath_dbg(common, ATH_DBG_CONFIG, 1528 + ath_dbg(common, CONFIG, 1525 1529 "Beacon disabled for BSS: %pM\n", 1526 1530 bss_conf->bssid); 1527 1531 priv->op_flags &= ~OP_ENABLE_BEACON; ··· 1539 1543 (vif->type == NL80211_IFTYPE_AP)) { 1540 1544 priv->op_flags |= OP_TSF_RESET; 1541 1545 } 1542 - ath_dbg(common, ATH_DBG_CONFIG, 1546 + ath_dbg(common, CONFIG, 1543 1547 "Beacon interval changed for BSS: %pM\n", 1544 1548 bss_conf->bssid); 1545 1549 ath9k_htc_beacon_config(priv, vif); ··· 1729 1733 goto out; 1730 1734 } 1731 1735 1732 - ath_dbg(common, ATH_DBG_CONFIG, 1733 - "Set bitrate masks: 0x%x, 0x%x\n", 1736 + ath_dbg(common, CONFIG, "Set bitrate masks: 0x%x, 0x%x\n", 1734 1737 mask->control[IEEE80211_BAND_2GHZ].legacy, 1735 1738 mask->control[IEEE80211_BAND_5GHZ].legacy); 1736 1739 out:
+5 -8
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
··· 355 355 vif_idx = avp->index; 356 356 } else { 357 357 if (!priv->ah->is_monitoring) { 358 - ath_dbg(ath9k_hw_common(priv->ah), ATH_DBG_XMIT, 358 + ath_dbg(ath9k_hw_common(priv->ah), XMIT, 359 359 "VIF is null, but no monitor interface !\n"); 360 360 return -EINVAL; 361 361 } ··· 620 620 } 621 621 spin_unlock_irqrestore(&epid_queue->lock, flags); 622 622 623 - ath_dbg(common, ATH_DBG_XMIT, 624 - "No matching packet for cookie: %d, epid: %d\n", 623 + ath_dbg(common, XMIT, "No matching packet for cookie: %d, epid: %d\n", 625 624 txs->cookie, epid); 626 625 627 626 return NULL; ··· 704 705 if (time_after(jiffies, 705 706 tx_ctl->timestamp + 706 707 msecs_to_jiffies(ATH9K_HTC_TX_TIMEOUT_INTERVAL))) { 707 - ath_dbg(common, ATH_DBG_XMIT, 708 - "Dropping a packet due to TX timeout\n"); 708 + ath_dbg(common, XMIT, "Dropping a packet due to TX timeout\n"); 709 709 return true; 710 710 } 711 711 ··· 751 753 752 754 skb = ath9k_htc_tx_get_packet(priv, &event->txs); 753 755 if (skb) { 754 - ath_dbg(common, ATH_DBG_XMIT, 756 + ath_dbg(common, XMIT, 755 757 "Found packet for cookie: %d, epid: %d\n", 756 758 event->txs.cookie, 757 759 MS(event->txs.ts_rate, ATH9K_HTC_TXSTAT_EPID)); ··· 1165 1167 spin_unlock(&priv->rx.rxbuflock); 1166 1168 1167 1169 if (rxbuf == NULL) { 1168 - ath_dbg(common, ATH_DBG_ANY, 1169 - "No free RX buffer\n"); 1170 + ath_dbg(common, ANY, "No free RX buffer\n"); 1170 1171 goto err; 1171 1172 } 1172 1173
+40 -46
drivers/net/wireless/ath/ath9k/hw.c
··· 133 133 udelay(AH_TIME_QUANTUM); 134 134 } 135 135 136 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_ANY, 136 + ath_dbg(ath9k_hw_common(ah), ANY, 137 137 "timeout (%d us) on reg 0x%x: 0x%08x & 0x%08x != 0x%08x\n", 138 138 timeout, reg, REG_READ(ah, reg), mask, val); 139 139 ··· 491 491 if (ecode != 0) 492 492 return ecode; 493 493 494 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_CONFIG, 495 - "Eeprom VER: %d, REV: %d\n", 494 + ath_dbg(ath9k_hw_common(ah), CONFIG, "Eeprom VER: %d, REV: %d\n", 496 495 ah->eep_ops->get_eeprom_ver(ah), 497 496 ah->eep_ops->get_eeprom_rev(ah)); 498 497 ··· 566 567 } 567 568 } 568 569 569 - ath_dbg(common, ATH_DBG_RESET, "serialize_regmode is %d\n", 570 + ath_dbg(common, RESET, "serialize_regmode is %d\n", 570 571 ah->config.serialize_regmode); 571 572 572 573 if (AR_SREV_9285(ah) || AR_SREV_9271(ah)) ··· 957 958 static bool ath9k_hw_set_global_txtimeout(struct ath_hw *ah, u32 tu) 958 959 { 959 960 if (tu > 0xFFFF) { 960 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_XMIT, 961 - "bad global tx timeout %u\n", tu); 961 + ath_dbg(ath9k_hw_common(ah), XMIT, "bad global tx timeout %u\n", 962 + tu); 962 963 ah->globaltxtimeout = (u32) -1; 963 964 return false; 964 965 } else { ··· 979 980 int rx_lat = 0, tx_lat = 0, eifs = 0; 980 981 u32 reg; 981 982 982 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_RESET, "ah->misc_mode 0x%x\n", 983 + ath_dbg(ath9k_hw_common(ah), RESET, "ah->misc_mode 0x%x\n", 983 984 ah->misc_mode); 984 985 985 986 if (!chan) ··· 1274 1275 (npend || type == ATH9K_RESET_COLD)) { 1275 1276 int reset_err = 0; 1276 1277 1277 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_RESET, 1278 + ath_dbg(ath9k_hw_common(ah), RESET, 1278 1279 "reset MAC via external reset\n"); 1279 1280 1280 1281 reset_err = ah->external_reset(); ··· 1297 1298 1298 1299 REG_WRITE(ah, AR_RTC_RC, 0); 1299 1300 if (!ath9k_hw_wait(ah, AR_RTC_RC, AR_RTC_RC_M, 0, AH_WAIT_TIMEOUT)) { 1300 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_RESET, 1301 - "RTC stuck in MAC reset\n"); 1301 + ath_dbg(ath9k_hw_common(ah), RESET, "RTC stuck in MAC reset\n"); 1302 1302 return false; 1303 1303 } 1304 1304 ··· 1342 1344 AR_RTC_STATUS_M, 1343 1345 AR_RTC_STATUS_ON, 1344 1346 AH_WAIT_TIMEOUT)) { 1345 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_RESET, 1346 - "RTC not waking up\n"); 1347 + ath_dbg(ath9k_hw_common(ah), RESET, "RTC not waking up\n"); 1347 1348 return false; 1348 1349 } 1349 1350 ··· 1415 1418 1416 1419 for (qnum = 0; qnum < AR_NUM_QCU; qnum++) { 1417 1420 if (ath9k_hw_numtxpending(ah, qnum)) { 1418 - ath_dbg(common, ATH_DBG_QUEUE, 1421 + ath_dbg(common, QUEUE, 1419 1422 "Transmit frames pending on queue %d\n", qnum); 1420 1423 return false; 1421 1424 } ··· 1533 1536 if (mci_hw->bt_state == MCI_BT_CAL_START) { 1534 1537 u32 payload[4] = {0, 0, 0, 0}; 1535 1538 1536 - ath_dbg(common, ATH_DBG_MCI, "MCI stop rx for BT CAL"); 1539 + ath_dbg(common, MCI, "MCI stop rx for BT CAL\n"); 1537 1540 1538 1541 mci_hw->bt_state = MCI_BT_CAL; 1539 1542 ··· 1545 1548 1546 1549 ar9003_mci_disable_interrupt(ah); 1547 1550 1548 - ath_dbg(common, ATH_DBG_MCI, "send WLAN_CAL_GRANT"); 1551 + ath_dbg(common, MCI, "send WLAN_CAL_GRANT\n"); 1549 1552 MCI_GPM_SET_CAL_TYPE(payload, MCI_GPM_WLAN_CAL_GRANT); 1550 1553 ar9003_mci_send_message(ah, MCI_GPM, 0, payload, 1551 1554 16, true, false); 1552 1555 1553 - ath_dbg(common, ATH_DBG_MCI, "\nMCI BT is calibrating"); 1556 + ath_dbg(common, MCI, "\nMCI BT is calibrating\n"); 1554 1557 1555 1558 /* Wait BT calibration to be completed for 25ms */ 1556 1559 1557 1560 if (ar9003_mci_wait_for_gpm(ah, MCI_GPM_BT_CAL_DONE, 1558 1561 0, 25000)) 1559 - ath_dbg(common, ATH_DBG_MCI, 1562 + ath_dbg(common, MCI, 1560 1563 "MCI got BT_CAL_DONE\n"); 1561 1564 else 1562 - ath_dbg(common, ATH_DBG_MCI, 1563 - "MCI ### BT cal takes to long, force" 1564 - "bt_state to be bt_awake\n"); 1565 + ath_dbg(common, MCI, 1566 + "MCI ### BT cal takes to long, force bt_state to be bt_awake\n"); 1565 1567 mci_hw->bt_state = MCI_BT_AWAKE; 1566 1568 /* MCI FIX: enable mci interrupt here */ 1567 1569 ar9003_mci_enable_interrupt(ah); ··· 1821 1825 * message exchanges again and recal. 1822 1826 */ 1823 1827 1824 - ath_dbg(common, ATH_DBG_MCI, "MCI BT wakes up" 1825 - "during WLAN calibration\n"); 1828 + ath_dbg(common, MCI, 1829 + "MCI BT wakes up during WLAN calibration\n"); 1826 1830 1827 1831 REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_RAW, 1828 1832 AR_MCI_INTERRUPT_RX_MSG_REMOTE_RESET | 1829 1833 AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE); 1830 - ath_dbg(common, ATH_DBG_MCI, "MCI send" 1831 - "REMOTE_RESET\n"); 1834 + ath_dbg(common, MCI, "MCI send REMOTE_RESET\n"); 1832 1835 ar9003_mci_remote_reset(ah, true); 1833 1836 ar9003_mci_send_sys_waking(ah, true); 1834 1837 udelay(1); ··· 1836 1841 1837 1842 mci_hw->bt_state = MCI_BT_AWAKE; 1838 1843 1839 - ath_dbg(common, ATH_DBG_MCI, "MCI re-cal\n"); 1844 + ath_dbg(common, MCI, "MCI re-cal\n"); 1840 1845 1841 1846 if (caldata) { 1842 1847 caldata->done_txiqcal_once = false; ··· 1866 1871 u32 mask; 1867 1872 mask = REG_READ(ah, AR_CFG); 1868 1873 if (mask & (AR_CFG_SWRB | AR_CFG_SWTB | AR_CFG_SWRG)) { 1869 - ath_dbg(common, ATH_DBG_RESET, 1870 - "CFG Byte Swap Set 0x%x\n", mask); 1874 + ath_dbg(common, RESET, "CFG Byte Swap Set 0x%x\n", 1875 + mask); 1871 1876 } else { 1872 1877 mask = 1873 1878 INIT_CONFIG_STATUS | AR_CFG_SWRB | AR_CFG_SWTB; 1874 1879 REG_WRITE(ah, AR_CFG, mask); 1875 - ath_dbg(common, ATH_DBG_RESET, 1876 - "Setting CFG 0x%x\n", REG_READ(ah, AR_CFG)); 1880 + ath_dbg(common, RESET, "Setting CFG 0x%x\n", 1881 + REG_READ(ah, AR_CFG)); 1877 1882 } 1878 1883 } else { 1879 1884 if (common->bus_ops->ath_bus_type == ATH_USB) { ··· 2085 2090 if (ah->power_mode == mode) 2086 2091 return status; 2087 2092 2088 - ath_dbg(common, ATH_DBG_RESET, "%s -> %s\n", 2093 + ath_dbg(common, RESET, "%s -> %s\n", 2089 2094 modes[ah->power_mode], modes[mode]); 2090 2095 2091 2096 switch (mode) { ··· 2102 2107 if (ar9003_mci_state(ah, MCI_STATE_ENABLE, NULL) && 2103 2108 (mci->bt_state != MCI_BT_SLEEP) && 2104 2109 !mci->halted_bt_gpm) { 2105 - ath_dbg(common, ATH_DBG_MCI, "MCI halt BT GPM" 2106 - "(full_sleep)"); 2110 + ath_dbg(common, MCI, 2111 + "MCI halt BT GPM (full_sleep)\n"); 2107 2112 ar9003_mci_send_coex_halt_bt_gpm(ah, 2108 2113 true, true); 2109 2114 } ··· 2169 2174 AR_TBTT_TIMER_EN | AR_DBA_TIMER_EN | AR_SWBA_TIMER_EN; 2170 2175 break; 2171 2176 default: 2172 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_BEACON, 2173 - "%s: unsupported opmode: %d\n", 2174 - __func__, ah->opmode); 2177 + ath_dbg(ath9k_hw_common(ah), BEACON, 2178 + "%s: unsupported opmode: %d\n", __func__, ah->opmode); 2175 2179 return; 2176 2180 break; 2177 2181 } ··· 2221 2227 else 2222 2228 nextTbtt = bs->bs_nexttbtt; 2223 2229 2224 - ath_dbg(common, ATH_DBG_BEACON, "next DTIM %d\n", bs->bs_nextdtim); 2225 - ath_dbg(common, ATH_DBG_BEACON, "next beacon %d\n", nextTbtt); 2226 - ath_dbg(common, ATH_DBG_BEACON, "beacon period %d\n", beaconintval); 2227 - ath_dbg(common, ATH_DBG_BEACON, "DTIM period %d\n", dtimperiod); 2230 + ath_dbg(common, BEACON, "next DTIM %d\n", bs->bs_nextdtim); 2231 + ath_dbg(common, BEACON, "next beacon %d\n", nextTbtt); 2232 + ath_dbg(common, BEACON, "beacon period %d\n", beaconintval); 2233 + ath_dbg(common, BEACON, "DTIM period %d\n", dtimperiod); 2228 2234 2229 2235 ENABLE_REGWRITE_BUFFER(ah); 2230 2236 ··· 2316 2322 regulatory->current_rd += 5; 2317 2323 else if (regulatory->current_rd == 0x41) 2318 2324 regulatory->current_rd = 0x43; 2319 - ath_dbg(common, ATH_DBG_REGULATORY, 2320 - "regdomain mapped to 0x%x\n", regulatory->current_rd); 2325 + ath_dbg(common, REGULATORY, "regdomain mapped to 0x%x\n", 2326 + regulatory->current_rd); 2321 2327 } 2322 2328 2323 2329 eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE); ··· 2842 2848 { 2843 2849 if (!ath9k_hw_wait(ah, AR_SLP32_MODE, AR_SLP32_TSF_WRITE_STATUS, 0, 2844 2850 AH_TSF_WRITE_TIMEOUT)) 2845 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_RESET, 2851 + ath_dbg(ath9k_hw_common(ah), RESET, 2846 2852 "AR_SLP32_TSF_WRITE_STATUS limit exceeded\n"); 2847 2853 2848 2854 REG_WRITE(ah, AR_RESET_TSF, AR_RESET_TSF_ONCE); ··· 2967 2973 2968 2974 timer_next = tsf + trig_timeout; 2969 2975 2970 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_HWTIMER, 2976 + ath_dbg(ath9k_hw_common(ah), HWTIMER, 2971 2977 "current tsf %x period %x timer_next %x\n", 2972 2978 tsf, timer_period, timer_next); 2973 2979 ··· 3056 3062 index = rightmost_index(timer_table, &thresh_mask); 3057 3063 timer = timer_table->timers[index]; 3058 3064 BUG_ON(!timer); 3059 - ath_dbg(common, ATH_DBG_HWTIMER, 3060 - "TSF overflow for Gen timer %d\n", index); 3065 + ath_dbg(common, HWTIMER, "TSF overflow for Gen timer %d\n", 3066 + index); 3061 3067 timer->overflow(timer->arg); 3062 3068 } 3063 3069 ··· 3065 3071 index = rightmost_index(timer_table, &trigger_mask); 3066 3072 timer = timer_table->timers[index]; 3067 3073 BUG_ON(!timer); 3068 - ath_dbg(common, ATH_DBG_HWTIMER, 3074 + ath_dbg(common, HWTIMER, 3069 3075 "Gen timer[%d] trigger\n", index); 3070 3076 timer->trigger(timer->arg); 3071 3077 }
+3 -4
drivers/net/wireless/ath/ath9k/init.c
··· 276 276 tx_streams = ath9k_cmn_count_streams(ah->txchainmask, max_streams); 277 277 rx_streams = ath9k_cmn_count_streams(ah->rxchainmask, max_streams); 278 278 279 - ath_dbg(common, ATH_DBG_CONFIG, 280 - "TX streams %d, RX streams: %d\n", 279 + ath_dbg(common, CONFIG, "TX streams %d, RX streams: %d\n", 281 280 tx_streams, rx_streams); 282 281 283 282 if (tx_streams != rx_streams) { ··· 328 329 struct ath_buf *bf; 329 330 int i, bsize, error, desc_len; 330 331 331 - ath_dbg(common, ATH_DBG_CONFIG, "%s DMA: %u buffers %u desc/buf\n", 332 + ath_dbg(common, CONFIG, "%s DMA: %u buffers %u desc/buf\n", 332 333 name, nbuf, ndesc); 333 334 334 335 INIT_LIST_HEAD(head); ··· 374 375 goto fail; 375 376 } 376 377 ds = (u8 *) dd->dd_desc; 377 - ath_dbg(common, ATH_DBG_CONFIG, "%s DMA map: %p (%u) -> %llx (%u)\n", 378 + ath_dbg(common, CONFIG, "%s DMA map: %p (%u) -> %llx (%u)\n", 378 379 name, ds, (u32) dd->dd_desc_len, 379 380 ito64(dd->dd_desc_paddr), /*XXX*/(u32) dd->dd_desc_len); 380 381
+16 -20
drivers/net/wireless/ath/ath9k/mac.c
··· 21 21 static void ath9k_hw_set_txq_interrupts(struct ath_hw *ah, 22 22 struct ath9k_tx_queue_info *qi) 23 23 { 24 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_INTERRUPT, 24 + ath_dbg(ath9k_hw_common(ah), INTERRUPT, 25 25 "tx ok 0x%x err 0x%x desc 0x%x eol 0x%x urn 0x%x\n", 26 26 ah->txok_interrupt_mask, ah->txerr_interrupt_mask, 27 27 ah->txdesc_interrupt_mask, ah->txeol_interrupt_mask, ··· 57 57 58 58 void ath9k_hw_txstart(struct ath_hw *ah, u32 q) 59 59 { 60 - ath_dbg(ath9k_hw_common(ah), ATH_DBG_QUEUE, 61 - "Enable TXE on queue: %u\n", q); 60 + ath_dbg(ath9k_hw_common(ah), QUEUE, "Enable TXE on queue: %u\n", q); 62 61 REG_WRITE(ah, AR_Q_TXE, 1 << q); 63 62 } 64 63 EXPORT_SYMBOL(ath9k_hw_txstart); ··· 201 202 202 203 qi = &ah->txq[q]; 203 204 if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { 204 - ath_dbg(common, ATH_DBG_QUEUE, 205 + ath_dbg(common, QUEUE, 205 206 "Set TXQ properties, inactive queue: %u\n", q); 206 207 return false; 207 208 } 208 209 209 - ath_dbg(common, ATH_DBG_QUEUE, "Set queue properties for: %u\n", q); 210 + ath_dbg(common, QUEUE, "Set queue properties for: %u\n", q); 210 211 211 212 qi->tqi_ver = qinfo->tqi_ver; 212 213 qi->tqi_subtype = qinfo->tqi_subtype; ··· 265 266 266 267 qi = &ah->txq[q]; 267 268 if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { 268 - ath_dbg(common, ATH_DBG_QUEUE, 269 + ath_dbg(common, QUEUE, 269 270 "Get TXQ properties, inactive queue: %u\n", q); 270 271 return false; 271 272 } ··· 324 325 return -1; 325 326 } 326 327 327 - ath_dbg(common, ATH_DBG_QUEUE, "Setup TX queue: %u\n", q); 328 + ath_dbg(common, QUEUE, "Setup TX queue: %u\n", q); 328 329 329 330 qi = &ah->txq[q]; 330 331 if (qi->tqi_type != ATH9K_TX_QUEUE_INACTIVE) { ··· 347 348 348 349 qi = &ah->txq[q]; 349 350 if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { 350 - ath_dbg(common, ATH_DBG_QUEUE, 351 - "Release TXQ, inactive queue: %u\n", q); 351 + ath_dbg(common, QUEUE, "Release TXQ, inactive queue: %u\n", q); 352 352 return false; 353 353 } 354 354 355 - ath_dbg(common, ATH_DBG_QUEUE, "Release TX queue: %u\n", q); 355 + ath_dbg(common, QUEUE, "Release TX queue: %u\n", q); 356 356 357 357 qi->tqi_type = ATH9K_TX_QUEUE_INACTIVE; 358 358 ah->txok_interrupt_mask &= ~(1 << q); ··· 374 376 375 377 qi = &ah->txq[q]; 376 378 if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { 377 - ath_dbg(common, ATH_DBG_QUEUE, 378 - "Reset TXQ, inactive queue: %u\n", q); 379 + ath_dbg(common, QUEUE, "Reset TXQ, inactive queue: %u\n", q); 379 380 return true; 380 381 } 381 382 382 - ath_dbg(common, ATH_DBG_QUEUE, "Reset TX queue: %u\n", q); 383 + ath_dbg(common, QUEUE, "Reset TX queue: %u\n", q); 383 384 384 385 if (qi->tqi_cwmin == ATH9K_TXQ_USEDEFAULT) { 385 386 if (chan && IS_CHAN_B(chan)) ··· 781 784 else 782 785 atomic_dec(&ah->intr_ref_cnt); 783 786 784 - ath_dbg(common, ATH_DBG_INTERRUPT, "disable IER\n"); 787 + ath_dbg(common, INTERRUPT, "disable IER\n"); 785 788 REG_WRITE(ah, AR_IER, AR_IER_DISABLE); 786 789 (void) REG_READ(ah, AR_IER); 787 790 if (!AR_SREV_9100(ah)) { ··· 804 807 return; 805 808 806 809 if (!atomic_inc_and_test(&ah->intr_ref_cnt)) { 807 - ath_dbg(common, ATH_DBG_INTERRUPT, 808 - "Do not enable IER ref count %d\n", 810 + ath_dbg(common, INTERRUPT, "Do not enable IER ref count %d\n", 809 811 atomic_read(&ah->intr_ref_cnt)); 810 812 return; 811 813 } ··· 817 821 if (ah->imask & ATH9K_INT_MCI) 818 822 async_mask |= AR_INTR_ASYNC_MASK_MCI; 819 823 820 - ath_dbg(common, ATH_DBG_INTERRUPT, "enable IER\n"); 824 + ath_dbg(common, INTERRUPT, "enable IER\n"); 821 825 REG_WRITE(ah, AR_IER, AR_IER_ENABLE); 822 826 if (!AR_SREV_9100(ah)) { 823 827 REG_WRITE(ah, AR_INTR_ASYNC_ENABLE, async_mask); ··· 826 830 REG_WRITE(ah, AR_INTR_SYNC_ENABLE, sync_default); 827 831 REG_WRITE(ah, AR_INTR_SYNC_MASK, sync_default); 828 832 } 829 - ath_dbg(common, ATH_DBG_INTERRUPT, "AR_IMR 0x%x IER 0x%x\n", 833 + ath_dbg(common, INTERRUPT, "AR_IMR 0x%x IER 0x%x\n", 830 834 REG_READ(ah, AR_IMR), REG_READ(ah, AR_IER)); 831 835 } 832 836 EXPORT_SYMBOL(ath9k_hw_enable_interrupts); ··· 841 845 if (!(ints & ATH9K_INT_GLOBAL)) 842 846 ath9k_hw_disable_interrupts(ah); 843 847 844 - ath_dbg(common, ATH_DBG_INTERRUPT, "New interrupt mask 0x%x\n", ints); 848 + ath_dbg(common, INTERRUPT, "New interrupt mask 0x%x\n", ints); 845 849 846 850 mask = ints & ATH9K_INT_COMMON; 847 851 mask2 = 0; ··· 904 908 mask2 |= AR_IMR_S2_CST; 905 909 } 906 910 907 - ath_dbg(common, ATH_DBG_INTERRUPT, "new IMR 0x%x\n", mask); 911 + ath_dbg(common, INTERRUPT, "new IMR 0x%x\n", mask); 908 912 REG_WRITE(ah, AR_IMR, mask); 909 913 ah->imrs2_reg &= ~(AR_IMR_S2_TIM | AR_IMR_S2_DTIM | AR_IMR_S2_DTIMSYNC | 910 914 AR_IMR_S2_CABEND | AR_IMR_S2_CABTO |
+43 -53
drivers/net/wireless/ath/ath9k/main.c
··· 339 339 if (!ath_prepare_reset(sc, retry_tx, flush)) 340 340 fastcc = false; 341 341 342 - ath_dbg(common, ATH_DBG_CONFIG, 343 - "Reset to %u MHz, HT40: %d fastcc: %d\n", 342 + ath_dbg(common, CONFIG, "Reset to %u MHz, HT40: %d fastcc: %d\n", 344 343 hchan->channel, !!(hchan->channelFlags & (CHANNEL_HT40MINUS | 345 344 CHANNEL_HT40PLUS)), 346 345 fastcc); ··· 428 429 txctl.paprd = BIT(chain); 429 430 430 431 if (ath_tx_start(hw, skb, &txctl) != 0) { 431 - ath_dbg(common, ATH_DBG_CALIBRATE, "PAPRD TX failed\n"); 432 + ath_dbg(common, CALIBRATE, "PAPRD TX failed\n"); 432 433 dev_kfree_skb_any(skb); 433 434 return false; 434 435 } ··· 437 438 msecs_to_jiffies(ATH_PAPRD_TIMEOUT)); 438 439 439 440 if (!time_left) 440 - ath_dbg(common, ATH_DBG_CALIBRATE, 441 + ath_dbg(common, CALIBRATE, 441 442 "Timeout waiting for paprd training on TX chain %d\n", 442 443 chain); 443 444 ··· 486 487 487 488 chain_ok = 0; 488 489 489 - ath_dbg(common, ATH_DBG_CALIBRATE, 490 - "Sending PAPRD frame for thermal measurement " 491 - "on chain %d\n", chain); 490 + ath_dbg(common, CALIBRATE, 491 + "Sending PAPRD frame for thermal measurement on chain %d\n", 492 + chain); 492 493 if (!ath_paprd_send_frame(sc, skb, chain)) 493 494 goto fail_paprd; 494 495 495 496 ar9003_paprd_setup_gain_table(ah, chain); 496 497 497 - ath_dbg(common, ATH_DBG_CALIBRATE, 498 + ath_dbg(common, CALIBRATE, 498 499 "Sending PAPRD training frame on chain %d\n", chain); 499 500 if (!ath_paprd_send_frame(sc, skb, chain)) 500 501 goto fail_paprd; 501 502 502 503 if (!ar9003_paprd_is_done(ah)) { 503 - ath_dbg(common, ATH_DBG_CALIBRATE, 504 + ath_dbg(common, CALIBRATE, 504 505 "PAPRD not yet done on chain %d\n", chain); 505 506 break; 506 507 } 507 508 508 509 if (ar9003_paprd_create_curve(ah, caldata, chain)) { 509 - ath_dbg(common, ATH_DBG_CALIBRATE, 510 + ath_dbg(common, CALIBRATE, 510 511 "PAPRD create curve failed on chain %d\n", 511 512 chain); 512 513 break; ··· 603 604 ah->rxchainmask, longcal); 604 605 } 605 606 606 - ath_dbg(common, ATH_DBG_ANI, 607 - "Calibration @%lu finished: %s %s %s, caldone: %s\n", jiffies, 607 + ath_dbg(common, ANI, 608 + "Calibration @%lu finished: %s %s %s, caldone: %s\n", 609 + jiffies, 608 610 longcal ? "long" : "", shortcal ? "short" : "", 609 611 aniflag ? "ani" : "", common->ani.caldone ? "true" : "false"); 610 612 ··· 715 715 * TSF sync does not look correct; remain awake to sync with 716 716 * the next Beacon. 717 717 */ 718 - ath_dbg(common, ATH_DBG_PS, 719 - "TSFOOR - Sync with next Beacon\n"); 718 + ath_dbg(common, PS, "TSFOOR - Sync with next Beacon\n"); 720 719 sc->ps_flags |= PS_WAIT_FOR_BEACON | PS_BEACON_SYNC; 721 720 } 722 721 ··· 935 936 busy = ath_update_survey_stats(sc); 936 937 spin_unlock_irqrestore(&common->cc_lock, flags); 937 938 938 - ath_dbg(common, ATH_DBG_RESET, "Possible baseband hang, " 939 - "busy=%d (try %d)\n", busy, sc->hw_busy_count + 1); 939 + ath_dbg(common, RESET, "Possible baseband hang, busy=%d (try %d)\n", 940 + busy, sc->hw_busy_count + 1); 940 941 if (busy >= 99) { 941 942 if (++sc->hw_busy_count >= 3) { 942 943 RESET_STAT_INC(sc, RESET_TYPE_BB_HANG); ··· 959 960 count++; 960 961 if (count == 3) { 961 962 /* Rx is hung for more than 500ms. Reset it */ 962 - ath_dbg(common, ATH_DBG_RESET, 963 - "Possible RX hang, resetting"); 963 + ath_dbg(common, RESET, "Possible RX hang, resetting\n"); 964 964 RESET_STAT_INC(sc, RESET_TYPE_PLL_HANG); 965 965 ieee80211_queue_work(sc->hw, &sc->hw_reset_work); 966 966 count = 0; ··· 999 1001 struct ath9k_channel *init_channel; 1000 1002 int r; 1001 1003 1002 - ath_dbg(common, ATH_DBG_CONFIG, 1004 + ath_dbg(common, CONFIG, 1003 1005 "Starting driver with initial channel: %d MHz\n", 1004 1006 curchan->center_freq); 1005 1007 ··· 1118 1120 if (ieee80211_is_data(hdr->frame_control) && 1119 1121 !ieee80211_is_nullfunc(hdr->frame_control) && 1120 1122 !ieee80211_has_pm(hdr->frame_control)) { 1121 - ath_dbg(common, ATH_DBG_PS, 1123 + ath_dbg(common, PS, 1122 1124 "Add PM=1 for a TX frame while in PS mode\n"); 1123 1125 hdr->frame_control |= cpu_to_le16(IEEE80211_FCTL_PM); 1124 1126 } ··· 1141 1143 if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) 1142 1144 ath9k_hw_setrxabort(sc->sc_ah, 0); 1143 1145 if (ieee80211_is_pspoll(hdr->frame_control)) { 1144 - ath_dbg(common, ATH_DBG_PS, 1146 + ath_dbg(common, PS, 1145 1147 "Sending PS-Poll to pick a buffered frame\n"); 1146 1148 sc->ps_flags |= PS_WAIT_FOR_PSPOLL_DATA; 1147 1149 } else { 1148 - ath_dbg(common, ATH_DBG_PS, 1149 - "Wake up to complete TX\n"); 1150 + ath_dbg(common, PS, "Wake up to complete TX\n"); 1150 1151 sc->ps_flags |= PS_WAIT_FOR_TX_ACK; 1151 1152 } 1152 1153 /* ··· 1159 1162 memset(&txctl, 0, sizeof(struct ath_tx_control)); 1160 1163 txctl.txq = sc->tx.txq_map[skb_get_queue_mapping(skb)]; 1161 1164 1162 - ath_dbg(common, ATH_DBG_XMIT, "transmitting packet, skb: %p\n", skb); 1165 + ath_dbg(common, XMIT, "transmitting packet, skb: %p\n", skb); 1163 1166 1164 1167 if (ath_tx_start(hw, skb, &txctl) != 0) { 1165 - ath_dbg(common, ATH_DBG_XMIT, "TX failed\n"); 1168 + ath_dbg(common, XMIT, "TX failed\n"); 1166 1169 goto exit; 1167 1170 } 1168 1171 ··· 1183 1186 ath_cancel_work(sc); 1184 1187 1185 1188 if (sc->sc_flags & SC_OP_INVALID) { 1186 - ath_dbg(common, ATH_DBG_ANY, "Device not present\n"); 1189 + ath_dbg(common, ANY, "Device not present\n"); 1187 1190 mutex_unlock(&sc->mutex); 1188 1191 return; 1189 1192 } ··· 1249 1252 1250 1253 mutex_unlock(&sc->mutex); 1251 1254 1252 - ath_dbg(common, ATH_DBG_CONFIG, "Driver halt\n"); 1255 + ath_dbg(common, CONFIG, "Driver halt\n"); 1253 1256 } 1254 1257 1255 1258 bool ath9k_uses_beacons(int type) ··· 1464 1467 goto out; 1465 1468 } 1466 1469 1467 - ath_dbg(common, ATH_DBG_CONFIG, 1468 - "Attach a VIF of type: %d\n", vif->type); 1470 + ath_dbg(common, CONFIG, "Attach a VIF of type: %d\n", vif->type); 1469 1471 1470 1472 sc->nvifs++; 1471 1473 ··· 1484 1488 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 1485 1489 int ret = 0; 1486 1490 1487 - ath_dbg(common, ATH_DBG_CONFIG, "Change Interface\n"); 1491 + ath_dbg(common, CONFIG, "Change Interface\n"); 1488 1492 mutex_lock(&sc->mutex); 1489 1493 ath9k_ps_wakeup(sc); 1490 1494 ··· 1527 1531 struct ath_softc *sc = hw->priv; 1528 1532 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 1529 1533 1530 - ath_dbg(common, ATH_DBG_CONFIG, "Detach Interface\n"); 1534 + ath_dbg(common, CONFIG, "Detach Interface\n"); 1531 1535 1532 1536 ath9k_ps_wakeup(sc); 1533 1537 mutex_lock(&sc->mutex); ··· 1618 1622 1619 1623 if (changed & IEEE80211_CONF_CHANGE_MONITOR) { 1620 1624 if (conf->flags & IEEE80211_CONF_MONITOR) { 1621 - ath_dbg(common, ATH_DBG_CONFIG, 1622 - "Monitor mode is enabled\n"); 1625 + ath_dbg(common, CONFIG, "Monitor mode is enabled\n"); 1623 1626 sc->sc_ah->is_monitoring = true; 1624 1627 } else { 1625 - ath_dbg(common, ATH_DBG_CONFIG, 1626 - "Monitor mode is disabled\n"); 1628 + ath_dbg(common, CONFIG, "Monitor mode is disabled\n"); 1627 1629 sc->sc_ah->is_monitoring = false; 1628 1630 } 1629 1631 } ··· 1641 1647 else 1642 1648 sc->sc_flags &= ~SC_OP_OFFCHANNEL; 1643 1649 1644 - ath_dbg(common, ATH_DBG_CONFIG, 1645 - "Set channel: %d MHz type: %d\n", 1650 + ath_dbg(common, CONFIG, "Set channel: %d MHz type: %d\n", 1646 1651 curchan->center_freq, conf->channel_type); 1647 1652 1648 1653 /* update survey stats for the old channel before switching */ ··· 1698 1705 } 1699 1706 1700 1707 if (changed & IEEE80211_CONF_CHANGE_POWER) { 1701 - ath_dbg(common, ATH_DBG_CONFIG, 1702 - "Set power: %d\n", conf->power_level); 1708 + ath_dbg(common, CONFIG, "Set power: %d\n", conf->power_level); 1703 1709 sc->config.txpowlimit = 2 * conf->power_level; 1704 1710 ath9k_cmn_update_txpow(ah, sc->curtxpow, 1705 1711 sc->config.txpowlimit, &sc->curtxpow); ··· 1738 1746 ath9k_hw_setrxfilter(sc->sc_ah, rfilt); 1739 1747 ath9k_ps_restore(sc); 1740 1748 1741 - ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_CONFIG, 1742 - "Set HW RX filter: 0x%x\n", rfilt); 1749 + ath_dbg(ath9k_hw_common(sc->sc_ah), CONFIG, "Set HW RX filter: 0x%x\n", 1750 + rfilt); 1743 1751 } 1744 1752 1745 1753 static int ath9k_sta_add(struct ieee80211_hw *hw, ··· 1833 1841 qi.tqi_cwmax = params->cw_max; 1834 1842 qi.tqi_burstTime = params->txop; 1835 1843 1836 - ath_dbg(common, ATH_DBG_CONFIG, 1844 + ath_dbg(common, CONFIG, 1837 1845 "Configure tx [queue/halq] [%d/%d], aifs: %d, cw_min: %d, cw_max: %d, txop: %d\n", 1838 1846 queue, txq->axq_qnum, params->aifs, params->cw_min, 1839 1847 params->cw_max, params->txop); ··· 1882 1890 1883 1891 mutex_lock(&sc->mutex); 1884 1892 ath9k_ps_wakeup(sc); 1885 - ath_dbg(common, ATH_DBG_CONFIG, "Set HW Key\n"); 1893 + ath_dbg(common, CONFIG, "Set HW Key\n"); 1886 1894 1887 1895 switch (cmd) { 1888 1896 case SET_KEY: ··· 1934 1942 memcpy(common->curbssid, bss_conf->bssid, ETH_ALEN); 1935 1943 common->curaid = bss_conf->aid; 1936 1944 ath9k_hw_write_associd(sc->sc_ah); 1937 - ath_dbg(common, ATH_DBG_CONFIG, 1938 - "Bss Info ASSOC %d, bssid: %pM\n", 1939 - bss_conf->aid, common->curbssid); 1945 + ath_dbg(common, CONFIG, "Bss Info ASSOC %d, bssid: %pM\n", 1946 + bss_conf->aid, common->curbssid); 1940 1947 ath_beacon_config(sc, vif); 1941 1948 /* 1942 1949 * Request a re-configuration of Beacon related timers ··· 1966 1975 1967 1976 /* Reconfigure bss info */ 1968 1977 if (avp->primary_sta_vif && !bss_conf->assoc) { 1969 - ath_dbg(common, ATH_DBG_CONFIG, 1970 - "Bss Info DISASSOC %d, bssid %pM\n", 1978 + ath_dbg(common, CONFIG, "Bss Info DISASSOC %d, bssid %pM\n", 1971 1979 common->curaid, common->curbssid); 1972 1980 sc->sc_flags &= ~(SC_OP_PRIM_STA_VIF | SC_OP_BEACONS); 1973 1981 avp->primary_sta_vif = false; ··· 2008 2018 if (changed & BSS_CHANGED_BSSID) { 2009 2019 ath9k_config_bss(sc, vif); 2010 2020 2011 - ath_dbg(common, ATH_DBG_CONFIG, "BSSID: %pM aid: 0x%x\n", 2021 + ath_dbg(common, CONFIG, "BSSID: %pM aid: 0x%x\n", 2012 2022 common->curbssid, common->curaid); 2013 2023 } 2014 2024 ··· 2086 2096 } 2087 2097 2088 2098 if (changed & BSS_CHANGED_ERP_PREAMBLE) { 2089 - ath_dbg(common, ATH_DBG_CONFIG, "BSS Changed PREAMBLE %d\n", 2099 + ath_dbg(common, CONFIG, "BSS Changed PREAMBLE %d\n", 2090 2100 bss_conf->use_short_preamble); 2091 2101 if (bss_conf->use_short_preamble) 2092 2102 sc->sc_flags |= SC_OP_PREAMBLE_SHORT; ··· 2095 2105 } 2096 2106 2097 2107 if (changed & BSS_CHANGED_ERP_CTS_PROT) { 2098 - ath_dbg(common, ATH_DBG_CONFIG, "BSS Changed CTS PROT %d\n", 2108 + ath_dbg(common, CONFIG, "BSS Changed CTS PROT %d\n", 2099 2109 bss_conf->use_cts_prot); 2100 2110 if (bss_conf->use_cts_prot && 2101 2111 hw->conf.channel->band != IEEE80211_BAND_5GHZ) ··· 2261 2271 cancel_delayed_work_sync(&sc->tx_complete_work); 2262 2272 2263 2273 if (ah->ah_flags & AH_UNPLUGGED) { 2264 - ath_dbg(common, ATH_DBG_ANY, "Device has been unplugged!\n"); 2274 + ath_dbg(common, ANY, "Device has been unplugged!\n"); 2265 2275 mutex_unlock(&sc->mutex); 2266 2276 return; 2267 2277 } 2268 2278 2269 2279 if (sc->sc_flags & SC_OP_INVALID) { 2270 - ath_dbg(common, ATH_DBG_ANY, "Device not present\n"); 2280 + ath_dbg(common, ANY, "Device not present\n"); 2271 2281 mutex_unlock(&sc->mutex); 2272 2282 return; 2273 2283 }
+56 -70
drivers/net/wireless/ath/ath9k/mci.c
··· 43 43 44 44 if ((mci->num_sco == ATH_MCI_MAX_SCO_PROFILE) && 45 45 (info->type == MCI_GPM_COEX_PROFILE_VOICE)) { 46 - ath_dbg(common, ATH_DBG_MCI, 46 + ath_dbg(common, MCI, 47 47 "Too many SCO profile, failed to add new profile\n"); 48 48 return false; 49 49 } 50 50 51 51 if (((NUM_PROF(mci) - mci->num_sco) == ATH_MCI_MAX_ACL_PROFILE) && 52 52 (info->type != MCI_GPM_COEX_PROFILE_VOICE)) { 53 - ath_dbg(common, ATH_DBG_MCI, 53 + ath_dbg(common, MCI, 54 54 "Too many ACL profile, failed to add new profile\n"); 55 55 return false; 56 56 } ··· 80 80 entry = ath_mci_find_profile(mci, info); 81 81 82 82 if (!entry) { 83 - ath_dbg(common, ATH_DBG_MCI, 84 - "Profile to be deleted not found\n"); 83 + ath_dbg(common, MCI, "Profile to be deleted not found\n"); 85 84 return; 86 85 } 87 86 DEC_PROF(mci, entry); ··· 131 132 list); 132 133 if (mci->num_sco && info->T == 12) { 133 134 mci->aggr_limit = 8; 134 - ath_dbg(common, ATH_DBG_MCI, 135 + ath_dbg(common, MCI, 135 136 "Single SCO, aggregation limit 2 ms\n"); 136 137 } else if ((info->type == MCI_GPM_COEX_PROFILE_BNEP) && 137 138 !info->master) { 138 139 btcoex->btcoex_period = 60; 139 - ath_dbg(common, ATH_DBG_MCI, 140 + ath_dbg(common, MCI, 140 141 "Single slave PAN/FTP, bt period 60 ms\n"); 141 142 } else if ((info->type == MCI_GPM_COEX_PROFILE_HID) && 142 143 (info->T > 0 && info->T < 50) && 143 144 (info->A > 1 || info->W > 1)) { 144 145 btcoex->duty_cycle = 30; 145 146 mci->aggr_limit = 8; 146 - ath_dbg(common, ATH_DBG_MCI, 147 + ath_dbg(common, MCI, 147 148 "Multiple attempt/timeout single HID " 148 149 "aggregation limit 2 ms dutycycle 30%%\n"); 149 150 } 150 151 } else if ((num_profile == 2) && (mci->num_hid == 2)) { 151 152 btcoex->duty_cycle = 30; 152 153 mci->aggr_limit = 8; 153 - ath_dbg(common, ATH_DBG_MCI, 154 + ath_dbg(common, MCI, 154 155 "Two HIDs aggregation limit 2 ms dutycycle 30%%\n"); 155 156 } else if (num_profile > 3) { 156 157 mci->aggr_limit = 6; 157 - ath_dbg(common, ATH_DBG_MCI, 158 + ath_dbg(common, MCI, 158 159 "Three or more profiles aggregation limit 1.5 ms\n"); 159 160 } 160 161 ··· 193 194 switch (opcode) { 194 195 case MCI_GPM_BT_CAL_REQ: 195 196 196 - ath_dbg(common, ATH_DBG_MCI, "MCI received BT_CAL_REQ\n"); 197 + ath_dbg(common, MCI, "MCI received BT_CAL_REQ\n"); 197 198 198 199 if (ar9003_mci_state(ah, MCI_STATE_BT, NULL) == MCI_BT_AWAKE) { 199 200 ar9003_mci_state(ah, MCI_STATE_SET_BT_CAL_START, NULL); 200 201 ieee80211_queue_work(sc->hw, &sc->hw_reset_work); 201 202 } else 202 - ath_dbg(common, ATH_DBG_MCI, 203 - "MCI State mismatches: %d\n", 203 + ath_dbg(common, MCI, "MCI State mismatches: %d\n", 204 204 ar9003_mci_state(ah, MCI_STATE_BT, NULL)); 205 205 206 206 break; 207 207 208 208 case MCI_GPM_BT_CAL_DONE: 209 209 210 - ath_dbg(common, ATH_DBG_MCI, "MCI received BT_CAL_DONE\n"); 210 + ath_dbg(common, MCI, "MCI received BT_CAL_DONE\n"); 211 211 212 212 if (ar9003_mci_state(ah, MCI_STATE_BT, NULL) == MCI_BT_CAL) 213 - ath_dbg(common, ATH_DBG_MCI, "MCI error illegal!\n"); 213 + ath_dbg(common, MCI, "MCI error illegal!\n"); 214 214 else 215 - ath_dbg(common, ATH_DBG_MCI, "MCI BT not in CAL state\n"); 215 + ath_dbg(common, MCI, "MCI BT not in CAL state\n"); 216 216 217 217 break; 218 218 219 219 case MCI_GPM_BT_CAL_GRANT: 220 220 221 - ath_dbg(common, ATH_DBG_MCI, "MCI received BT_CAL_GRANT\n"); 221 + ath_dbg(common, MCI, "MCI received BT_CAL_GRANT\n"); 222 222 223 223 /* Send WLAN_CAL_DONE for now */ 224 - ath_dbg(common, ATH_DBG_MCI, "MCI send WLAN_CAL_DONE\n"); 224 + ath_dbg(common, MCI, "MCI send WLAN_CAL_DONE\n"); 225 225 MCI_GPM_SET_CAL_TYPE(payload, MCI_GPM_WLAN_CAL_DONE); 226 226 ar9003_mci_send_message(sc->sc_ah, MCI_GPM, 0, payload, 227 227 16, false, true); 228 228 break; 229 229 230 230 default: 231 - ath_dbg(common, ATH_DBG_MCI, "MCI Unknown GPM CAL message\n"); 231 + ath_dbg(common, MCI, "MCI Unknown GPM CAL message\n"); 232 232 break; 233 233 } 234 234 } ··· 270 272 271 273 /* Link status type are not handled */ 272 274 if (status->is_link) { 273 - ath_dbg(common, ATH_DBG_MCI, 274 - "Skip link type status update\n"); 275 + ath_dbg(common, MCI, "Skip link type status update\n"); 275 276 return; 276 277 } 277 278 ··· 278 281 279 282 info.conn_handle = status->conn_handle; 280 283 if (ath_mci_find_profile(mci, &info)) { 281 - ath_dbg(common, ATH_DBG_MCI, 284 + ath_dbg(common, MCI, 282 285 "Skip non link state update for existing profile %d\n", 283 286 status->conn_handle); 284 287 return; 285 288 } 286 289 if (status->conn_handle >= ATH_MCI_MAX_PROFILE) { 287 - ath_dbg(common, ATH_DBG_MCI, 288 - "Ignore too many non-link update\n"); 290 + ath_dbg(common, MCI, "Ignore too many non-link update\n"); 289 291 return; 290 292 } 291 293 if (status->is_critical) ··· 316 320 switch (opcode) { 317 321 318 322 case MCI_GPM_COEX_VERSION_QUERY: 319 - ath_dbg(common, ATH_DBG_MCI, 320 - "MCI Recv GPM COEX Version Query.\n"); 323 + ath_dbg(common, MCI, "MCI Recv GPM COEX Version Query\n"); 321 324 version = ar9003_mci_state(ah, 322 325 MCI_STATE_SEND_WLAN_COEX_VERSION, NULL); 323 326 break; 324 327 325 328 case MCI_GPM_COEX_VERSION_RESPONSE: 326 - ath_dbg(common, ATH_DBG_MCI, 327 - "MCI Recv GPM COEX Version Response.\n"); 329 + ath_dbg(common, MCI, "MCI Recv GPM COEX Version Response\n"); 328 330 major = *(rx_payload + MCI_GPM_COEX_B_MAJOR_VERSION); 329 331 minor = *(rx_payload + MCI_GPM_COEX_B_MINOR_VERSION); 330 - ath_dbg(common, ATH_DBG_MCI, 331 - "MCI BT Coex version: %d.%d\n", major, minor); 332 + ath_dbg(common, MCI, "MCI BT Coex version: %d.%d\n", 333 + major, minor); 332 334 version = (major << 8) + minor; 333 335 version = ar9003_mci_state(ah, 334 336 MCI_STATE_SET_BT_COEX_VERSION, &version); 335 337 break; 336 338 337 339 case MCI_GPM_COEX_STATUS_QUERY: 338 - ath_dbg(common, ATH_DBG_MCI, 339 - "MCI Recv GPM COEX Status Query = 0x%02x.\n", 340 + ath_dbg(common, MCI, 341 + "MCI Recv GPM COEX Status Query = 0x%02x\n", 340 342 *(rx_payload + MCI_GPM_COEX_B_WLAN_BITMAP)); 341 343 ar9003_mci_state(ah, 342 344 MCI_STATE_SEND_WLAN_CHANNELS, NULL); 343 345 break; 344 346 345 347 case MCI_GPM_COEX_BT_PROFILE_INFO: 346 - ath_dbg(common, ATH_DBG_MCI, 347 - "MCI Recv GPM Coex BT profile info\n"); 348 + ath_dbg(common, MCI, "MCI Recv GPM Coex BT profile info\n"); 348 349 memcpy(&profile_info, 349 350 (rx_payload + MCI_GPM_COEX_B_PROFILE_TYPE), 10); 350 351 ··· 349 356 || (profile_info.type >= 350 357 MCI_GPM_COEX_PROFILE_MAX)) { 351 358 352 - ath_dbg(common, ATH_DBG_MCI, 353 - "illegal profile type = %d," 354 - "state = %d\n", profile_info.type, 359 + ath_dbg(common, MCI, 360 + "illegal profile type = %d, state = %d\n", 361 + profile_info.type, 355 362 profile_info.start); 356 363 break; 357 364 } ··· 368 375 MCI_GPM_COEX_B_STATUS_STATE); 369 376 370 377 seq_num = *((u32 *)(rx_payload + 12)); 371 - ath_dbg(common, ATH_DBG_MCI, 372 - "MCI Recv GPM COEX BT_Status_Update: " 373 - "is_link=%d, linkId=%d, state=%d, SEQ=%d\n", 378 + ath_dbg(common, MCI, 379 + "MCI Recv GPM COEX BT_Status_Update: is_link=%d, linkId=%d, state=%d, SEQ=%d\n", 374 380 profile_status.is_link, profile_status.conn_handle, 375 381 profile_status.is_critical, seq_num); 376 382 ··· 377 385 break; 378 386 379 387 default: 380 - ath_dbg(common, ATH_DBG_MCI, 381 - "MCI Unknown GPM COEX message = 0x%02x\n", opcode); 388 + ath_dbg(common, MCI, "MCI Unknown GPM COEX message = 0x%02x\n", 389 + opcode); 382 390 break; 383 391 } 384 392 } ··· 420 428 mci->sched_buf.bf_len = ATH_MCI_SCHED_BUF_SIZE + ATH_MCI_GPM_BUF_SIZE; 421 429 422 430 if (ath_mci_buf_alloc(sc, &mci->sched_buf)) { 423 - ath_dbg(common, ATH_DBG_FATAL, "MCI buffer alloc failed\n"); 431 + ath_dbg(common, FATAL, "MCI buffer alloc failed\n"); 424 432 error = -ENOMEM; 425 433 goto fail; 426 434 } ··· 473 481 if (ar9003_mci_state(ah, MCI_STATE_ENABLE, NULL) == 0) { 474 482 475 483 ar9003_mci_state(sc->sc_ah, MCI_STATE_INIT_GPM_OFFSET, NULL); 476 - ath_dbg(common, ATH_DBG_MCI, 477 - "MCI interrupt but MCI disabled\n"); 484 + ath_dbg(common, MCI, "MCI interrupt but MCI disabled\n"); 478 485 479 - ath_dbg(common, ATH_DBG_MCI, 486 + ath_dbg(common, MCI, 480 487 "MCI interrupt: intr = 0x%x, intr_rxmsg = 0x%x\n", 481 488 mci_int, mci_int_rxmsg); 482 489 return; ··· 490 499 * only when BT wake up. Now they are always sent, as a 491 500 * recovery method to reset BT MCI's RX alignment. 492 501 */ 493 - ath_dbg(common, ATH_DBG_MCI, "MCI interrupt send REMOTE_RESET\n"); 502 + ath_dbg(common, MCI, "MCI interrupt send REMOTE_RESET\n"); 494 503 495 504 ar9003_mci_send_message(ah, MCI_REMOTE_RESET, 0, 496 505 payload, 16, true, false); 497 - ath_dbg(common, ATH_DBG_MCI, "MCI interrupt send SYS_WAKING\n"); 506 + ath_dbg(common, MCI, "MCI interrupt send SYS_WAKING\n"); 498 507 ar9003_mci_send_message(ah, MCI_SYS_WAKING, 0, 499 508 NULL, 0, true, false); 500 509 ··· 504 513 /* 505 514 * always do this for recovery and 2G/5G toggling and LNA_TRANS 506 515 */ 507 - ath_dbg(common, ATH_DBG_MCI, "MCI Set BT state to AWAKE.\n"); 516 + ath_dbg(common, MCI, "MCI Set BT state to AWAKE\n"); 508 517 ar9003_mci_state(ah, MCI_STATE_SET_BT_AWAKE, NULL); 509 518 } 510 519 ··· 516 525 517 526 if (ar9003_mci_state(ah, MCI_STATE_REMOTE_SLEEP, NULL) 518 527 == MCI_BT_SLEEP) 519 - ath_dbg(common, ATH_DBG_MCI, 528 + ath_dbg(common, MCI, 520 529 "MCI BT stays in sleep mode\n"); 521 530 else { 522 - ath_dbg(common, ATH_DBG_MCI, 523 - "MCI Set BT state to AWAKE.\n"); 531 + ath_dbg(common, MCI, 532 + "MCI Set BT state to AWAKE\n"); 524 533 ar9003_mci_state(ah, 525 534 MCI_STATE_SET_BT_AWAKE, NULL); 526 535 } 527 536 } else 528 - ath_dbg(common, ATH_DBG_MCI, 529 - "MCI BT stays in AWAKE mode.\n"); 537 + ath_dbg(common, MCI, "MCI BT stays in AWAKE mode\n"); 530 538 } 531 539 532 540 if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING) { ··· 536 546 537 547 if (ar9003_mci_state(ah, MCI_STATE_REMOTE_SLEEP, NULL) 538 548 == MCI_BT_AWAKE) 539 - ath_dbg(common, ATH_DBG_MCI, 540 - "MCI BT stays in AWAKE mode.\n"); 549 + ath_dbg(common, MCI, 550 + "MCI BT stays in AWAKE mode\n"); 541 551 else { 542 - ath_dbg(common, ATH_DBG_MCI, 552 + ath_dbg(common, MCI, 543 553 "MCI SetBT state to SLEEP\n"); 544 554 ar9003_mci_state(ah, MCI_STATE_SET_BT_SLEEP, 545 555 NULL); 546 556 } 547 557 } else 548 - ath_dbg(common, ATH_DBG_MCI, 549 - "MCI BT stays in SLEEP mode\n"); 558 + ath_dbg(common, MCI, "MCI BT stays in SLEEP mode\n"); 550 559 } 551 560 552 561 if ((mci_int & AR_MCI_INTERRUPT_RX_INVALID_HDR) || 553 562 (mci_int & AR_MCI_INTERRUPT_CONT_INFO_TIMEOUT)) { 554 563 555 - ath_dbg(common, ATH_DBG_MCI, "MCI RX broken, skip GPM msgs\n"); 564 + ath_dbg(common, MCI, "MCI RX broken, skip GPM msgs\n"); 556 565 ar9003_mci_state(ah, MCI_STATE_RECOVER_RX, NULL); 557 566 skip_gpm = true; 558 567 } ··· 613 624 614 625 if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_LNA_INFO) { 615 626 mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_LNA_INFO; 616 - ath_dbg(common, ATH_DBG_MCI, "MCI LNA_INFO\n"); 627 + ath_dbg(common, MCI, "MCI LNA_INFO\n"); 617 628 } 618 629 619 630 if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_CONT_INFO) { ··· 624 635 mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_CONT_INFO; 625 636 626 637 if (ar9003_mci_state(ah, MCI_STATE_CONT_TXRX, NULL)) 627 - ath_dbg(common, ATH_DBG_MCI, 628 - "MCI CONT_INFO: " 629 - "(tx) pri = %d, pwr = %d dBm\n", 638 + ath_dbg(common, MCI, 639 + "MCI CONT_INFO: (tx) pri = %d, pwr = %d dBm\n", 630 640 ar9003_mci_state(ah, 631 641 MCI_STATE_CONT_PRIORITY, NULL), 632 642 value_dbm); 633 643 else 634 - ath_dbg(common, ATH_DBG_MCI, 635 - "MCI CONT_INFO:" 636 - "(rx) pri = %d,pwr = %d dBm\n", 644 + ath_dbg(common, MCI, 645 + "MCI CONT_INFO: (rx) pri = %d,pwr = %d dBm\n", 637 646 ar9003_mci_state(ah, 638 647 MCI_STATE_CONT_PRIORITY, NULL), 639 648 value_dbm); ··· 639 652 640 653 if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_CONT_NACK) { 641 654 mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_CONT_NACK; 642 - ath_dbg(common, ATH_DBG_MCI, "MCI CONT_NACK\n"); 655 + ath_dbg(common, MCI, "MCI CONT_NACK\n"); 643 656 } 644 657 645 658 if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_CONT_RST) { 646 659 mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_CONT_RST; 647 - ath_dbg(common, ATH_DBG_MCI, "MCI CONT_RST\n"); 660 + ath_dbg(common, MCI, "MCI CONT_RST\n"); 648 661 } 649 662 } 650 663 ··· 654 667 AR_MCI_INTERRUPT_CONT_INFO_TIMEOUT); 655 668 656 669 if (mci_int_rxmsg & 0xfffffffe) 657 - ath_dbg(common, ATH_DBG_MCI, 658 - "MCI not processed mci_int_rxmsg = 0x%x\n", 670 + ath_dbg(common, MCI, "MCI not processed mci_int_rxmsg = 0x%x\n", 659 671 mci_int_rxmsg); 660 672 }
+3 -4
drivers/net/wireless/ath/ath9k/rc.c
··· 1199 1199 return &ar5416_11na_ratetable; 1200 1200 return &ar5416_11a_ratetable; 1201 1201 default: 1202 - ath_dbg(common, ATH_DBG_CONFIG, "Invalid band\n"); 1202 + ath_dbg(common, CONFIG, "Invalid band\n"); 1203 1203 return NULL; 1204 1204 } 1205 1205 } ··· 1276 1276 ath_rc_priv->valid_rate_index[k-1]; 1277 1277 ath_rc_priv->rate_table = rate_table; 1278 1278 1279 - ath_dbg(common, ATH_DBG_CONFIG, 1280 - "RC Initialized with capabilities: 0x%x\n", 1279 + ath_dbg(common, CONFIG, "RC Initialized with capabilities: 0x%x\n", 1281 1280 ath_rc_priv->ht_cap); 1282 1281 } 1283 1282 ··· 1473 1474 oper_cw40, oper_sgi); 1474 1475 ath_rc_init(sc, priv_sta, sband, sta, rate_table); 1475 1476 1476 - ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_CONFIG, 1477 + ath_dbg(ath9k_hw_common(sc->sc_ah), CONFIG, 1477 1478 "Operating HT Bandwidth changed to: %d\n", 1478 1479 sc->hw->conf.channel_type); 1479 1480 }
+8 -9
drivers/net/wireless/ath/ath9k/recv.c
··· 172 172 u32 nbuf = 0; 173 173 174 174 if (list_empty(&sc->rx.rxbuf)) { 175 - ath_dbg(common, ATH_DBG_QUEUE, "No free rx buf available\n"); 175 + ath_dbg(common, QUEUE, "No free rx buf available\n"); 176 176 return; 177 177 } 178 178 ··· 337 337 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) { 338 338 return ath_rx_edma_init(sc, nbufs); 339 339 } else { 340 - ath_dbg(common, ATH_DBG_CONFIG, "cachelsz %u rxbufsize %u\n", 340 + ath_dbg(common, CONFIG, "cachelsz %u rxbufsize %u\n", 341 341 common->cachelsz, common->rx_bufsize); 342 342 343 343 /* Initialize rx descriptors */ ··· 591 591 592 592 if (sc->ps_flags & PS_BEACON_SYNC) { 593 593 sc->ps_flags &= ~PS_BEACON_SYNC; 594 - ath_dbg(common, ATH_DBG_PS, 594 + ath_dbg(common, PS, 595 595 "Reconfigure Beacon timers based on timestamp from the AP\n"); 596 596 ath_set_beacon(sc); 597 597 } ··· 604 604 * a backup trigger for returning into NETWORK SLEEP state, 605 605 * so we are waiting for it as well. 606 606 */ 607 - ath_dbg(common, ATH_DBG_PS, 607 + ath_dbg(common, PS, 608 608 "Received DTIM beacon indicating buffered broadcast/multicast frame(s)\n"); 609 609 sc->ps_flags |= PS_WAIT_FOR_CAB | PS_WAIT_FOR_BEACON; 610 610 return; ··· 617 617 * been delivered. 618 618 */ 619 619 sc->ps_flags &= ~PS_WAIT_FOR_CAB; 620 - ath_dbg(common, ATH_DBG_PS, 621 - "PS wait for CAB frames timed out\n"); 620 + ath_dbg(common, PS, "PS wait for CAB frames timed out\n"); 622 621 } 623 622 } 624 623 ··· 642 643 * point. 643 644 */ 644 645 sc->ps_flags &= ~(PS_WAIT_FOR_CAB | PS_WAIT_FOR_BEACON); 645 - ath_dbg(common, ATH_DBG_PS, 646 + ath_dbg(common, PS, 646 647 "All PS CAB frames received, back to sleep\n"); 647 648 } else if ((sc->ps_flags & PS_WAIT_FOR_PSPOLL_DATA) && 648 649 !is_multicast_ether_addr(hdr->addr1) && 649 650 !ieee80211_has_morefrags(hdr->frame_control)) { 650 651 sc->ps_flags &= ~PS_WAIT_FOR_PSPOLL_DATA; 651 - ath_dbg(common, ATH_DBG_PS, 652 + ath_dbg(common, PS, 652 653 "Going back to sleep after having received PS-Poll data (0x%lx)\n", 653 654 sc->ps_flags & (PS_WAIT_FOR_BEACON | 654 655 PS_WAIT_FOR_CAB | ··· 931 932 * No valid hardware bitrate found -- we should not get here 932 933 * because hardware has already validated this frame as OK. 933 934 */ 934 - ath_dbg(common, ATH_DBG_ANY, 935 + ath_dbg(common, ANY, 935 936 "unsupported hw bitrate detected 0x%02x using 1 Mbit\n", 936 937 rx_stats->rs_rate); 937 938
+3 -5
drivers/net/wireless/ath/ath9k/wmi.c
··· 187 187 fatal_work); 188 188 struct ath_common *common = ath9k_hw_common(priv->ah); 189 189 190 - ath_dbg(common, ATH_DBG_FATAL, "FATAL Event received, resetting device\n"); 190 + ath_dbg(common, FATAL, "FATAL Event received, resetting device\n"); 191 191 ath9k_htc_reset(priv); 192 192 } 193 193 ··· 330 330 331 331 time_left = wait_for_completion_timeout(&wmi->cmd_wait, timeout); 332 332 if (!time_left) { 333 - ath_dbg(common, ATH_DBG_WMI, 334 - "Timeout waiting for WMI command: %s\n", 333 + ath_dbg(common, WMI, "Timeout waiting for WMI command: %s\n", 335 334 wmi_cmd_to_name(cmd_id)); 336 335 mutex_unlock(&wmi->op_mutex); 337 336 return -ETIMEDOUT; ··· 341 342 return 0; 342 343 343 344 out: 344 - ath_dbg(common, ATH_DBG_WMI, 345 - "WMI failure for: %s\n", wmi_cmd_to_name(cmd_id)); 345 + ath_dbg(common, WMI, "WMI failure for: %s\n", wmi_cmd_to_name(cmd_id)); 346 346 mutex_unlock(&wmi->op_mutex); 347 347 kfree_skb(skb); 348 348
+10 -12
drivers/net/wireless/ath/ath9k/xmit.c
··· 1626 1626 bf = list_first_entry(head, struct ath_buf, list); 1627 1627 bf_last = list_entry(head->prev, struct ath_buf, list); 1628 1628 1629 - ath_dbg(common, ATH_DBG_QUEUE, 1630 - "qnum: %d, txq depth: %d\n", txq->axq_qnum, txq->axq_depth); 1629 + ath_dbg(common, QUEUE, "qnum: %d, txq depth: %d\n", 1630 + txq->axq_qnum, txq->axq_depth); 1631 1631 1632 1632 if (edma && list_empty(&txq->txq_fifo[txq->txq_headidx])) { 1633 1633 list_splice_tail_init(head, &txq->txq_fifo[txq->txq_headidx]); ··· 1638 1638 1639 1639 if (txq->axq_link) { 1640 1640 ath9k_hw_set_desc_link(ah, txq->axq_link, bf->bf_daddr); 1641 - ath_dbg(common, ATH_DBG_XMIT, 1642 - "link[%u] (%p)=%llx (%p)\n", 1641 + ath_dbg(common, XMIT, "link[%u] (%p)=%llx (%p)\n", 1643 1642 txq->axq_qnum, txq->axq_link, 1644 1643 ito64(bf->bf_daddr), bf->bf_desc); 1645 1644 } else if (!edma) ··· 1650 1651 if (puttxbuf) { 1651 1652 TX_STAT_INC(txq->axq_qnum, puttxbuf); 1652 1653 ath9k_hw_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); 1653 - ath_dbg(common, ATH_DBG_XMIT, "TXDP[%u] = %llx (%p)\n", 1654 + ath_dbg(common, XMIT, "TXDP[%u] = %llx (%p)\n", 1654 1655 txq->axq_qnum, ito64(bf->bf_daddr), bf->bf_desc); 1655 1656 } 1656 1657 ··· 1792 1793 1793 1794 bf = ath_tx_get_buffer(sc); 1794 1795 if (!bf) { 1795 - ath_dbg(common, ATH_DBG_XMIT, "TX buffers are full\n"); 1796 + ath_dbg(common, XMIT, "TX buffers are full\n"); 1796 1797 goto error; 1797 1798 } 1798 1799 ··· 1951 1952 struct ieee80211_hdr * hdr = (struct ieee80211_hdr *)skb->data; 1952 1953 int q, padpos, padsize; 1953 1954 1954 - ath_dbg(common, ATH_DBG_XMIT, "TX complete: skb: %p\n", skb); 1955 + ath_dbg(common, XMIT, "TX complete: skb: %p\n", skb); 1955 1956 1956 1957 if (!(tx_flags & ATH_TX_ERROR)) 1957 1958 /* Frame was ACKed */ ··· 1970 1971 1971 1972 if ((sc->ps_flags & PS_WAIT_FOR_TX_ACK) && !txq->axq_depth) { 1972 1973 sc->ps_flags &= ~PS_WAIT_FOR_TX_ACK; 1973 - ath_dbg(common, ATH_DBG_PS, 1974 + ath_dbg(common, PS, 1974 1975 "Going back to sleep after having received TX status (0x%lx)\n", 1975 1976 sc->ps_flags & (PS_WAIT_FOR_BEACON | 1976 1977 PS_WAIT_FOR_CAB | ··· 2121 2122 struct ath_tx_status ts; 2122 2123 int status; 2123 2124 2124 - ath_dbg(common, ATH_DBG_QUEUE, "tx queue %d (%x), link %p\n", 2125 + ath_dbg(common, QUEUE, "tx queue %d (%x), link %p\n", 2125 2126 txq->axq_qnum, ath9k_hw_gettxbuf(sc->sc_ah, txq->axq_qnum), 2126 2127 txq->axq_link); 2127 2128 ··· 2215 2216 } 2216 2217 2217 2218 if (needreset) { 2218 - ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_RESET, 2219 + ath_dbg(ath9k_hw_common(sc->sc_ah), RESET, 2219 2220 "tx hung, resetting the chip\n"); 2220 2221 RESET_STAT_INC(sc, RESET_TYPE_TX_HANG); 2221 2222 ieee80211_queue_work(sc->hw, &sc->hw_reset_work); ··· 2258 2259 if (status == -EINPROGRESS) 2259 2260 break; 2260 2261 if (status == -EIO) { 2261 - ath_dbg(common, ATH_DBG_XMIT, 2262 - "Error processing tx status\n"); 2262 + ath_dbg(common, XMIT, "Error processing tx status\n"); 2263 2263 break; 2264 2264 } 2265 2265
+4 -4
drivers/net/wireless/ath/key.c
··· 143 143 break; 144 144 case ATH_CIPHER_AES_CCM: 145 145 if (!(common->crypt_caps & ATH_CRYPT_CAP_CIPHER_AESCCM)) { 146 - ath_dbg(common, ATH_DBG_ANY, 146 + ath_dbg(common, ANY, 147 147 "AES-CCM not supported by this mac rev\n"); 148 148 return false; 149 149 } ··· 152 152 case ATH_CIPHER_TKIP: 153 153 keyType = AR_KEYTABLE_TYPE_TKIP; 154 154 if (entry + 64 >= common->keymax) { 155 - ath_dbg(common, ATH_DBG_ANY, 155 + ath_dbg(common, ANY, 156 156 "entry %u inappropriate for TKIP\n", entry); 157 157 return false; 158 158 } 159 159 break; 160 160 case ATH_CIPHER_WEP: 161 161 if (k->kv_len < WLAN_KEY_LEN_WEP40) { 162 - ath_dbg(common, ATH_DBG_ANY, 163 - "WEP key length %u too small\n", k->kv_len); 162 + ath_dbg(common, ANY, "WEP key length %u too small\n", 163 + k->kv_len); 164 164 return false; 165 165 } 166 166 if (k->kv_len <= WLAN_KEY_LEN_WEP40)