Commit d2182b69 authored by Joe Perches's avatar Joe Perches Committed by John W. Linville

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent a85e1d55
...@@ -255,7 +255,7 @@ enum ATH_DEBUG { ...@@ -255,7 +255,7 @@ enum ATH_DEBUG {
#define ath_dbg(common, dbg_mask, fmt, ...) \ #define ath_dbg(common, dbg_mask, fmt, ...) \
do { \ do { \
if ((common)->debug_mask & dbg_mask) \ if ((common)->debug_mask & ATH_DBG_##dbg_mask) \
_ath_printk(KERN_DEBUG, common, fmt, ##__VA_ARGS__); \ _ath_printk(KERN_DEBUG, common, fmt, ##__VA_ARGS__); \
} while (0) } while (0)
...@@ -265,10 +265,13 @@ do { \ ...@@ -265,10 +265,13 @@ do { \
#else #else
static inline __attribute__ ((format (printf, 3, 4))) static inline __attribute__ ((format (printf, 3, 4)))
void ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask, void _ath_dbg(struct ath_common *common, enum ATH_DEBUG dbg_mask,
const char *fmt, ...) const char *fmt, ...)
{ {
} }
#define ath_dbg(common, dbg_mask, fmt, ...) \
_ath_dbg(common, ATH_DBG_##dbg_mask, fmt, ##__VA_ARGS__)
#define ATH_DBG_WARN(foo, arg...) do {} while (0) #define ATH_DBG_WARN(foo, arg...) do {} while (0)
#define ATH_DBG_WARN_ON_ONCE(foo) ({ \ #define ATH_DBG_WARN_ON_ONCE(foo) ({ \
int __ret_warn_once = !!(foo); \ int __ret_warn_once = !!(foo); \
......
...@@ -136,8 +136,8 @@ static void ath9k_ani_restart(struct ath_hw *ah) ...@@ -136,8 +136,8 @@ static void ath9k_ani_restart(struct ath_hw *ah)
cck_base = AR_PHY_COUNTMAX - ah->config.cck_trig_high; cck_base = AR_PHY_COUNTMAX - ah->config.cck_trig_high;
} }
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "Writing ofdmbase=%u cckbase=%u\n",
"Writing ofdmbase=%u cckbase=%u\n", ofdm_base, cck_base); ofdm_base, cck_base);
ENABLE_REGWRITE_BUFFER(ah); ENABLE_REGWRITE_BUFFER(ah);
...@@ -268,8 +268,7 @@ static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel) ...@@ -268,8 +268,7 @@ static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel)
aniState->noiseFloor = BEACON_RSSI(ah); aniState->noiseFloor = BEACON_RSSI(ah);
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "**** ofdmlevel %d=>%d, rssi=%d[lo=%d hi=%d]\n",
"**** ofdmlevel %d=>%d, rssi=%d[lo=%d hi=%d]\n",
aniState->ofdmNoiseImmunityLevel, aniState->ofdmNoiseImmunityLevel,
immunityLevel, aniState->noiseFloor, immunityLevel, aniState->noiseFloor,
aniState->rssiThrLow, aniState->rssiThrHigh); aniState->rssiThrLow, aniState->rssiThrHigh);
...@@ -336,8 +335,7 @@ static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel) ...@@ -336,8 +335,7 @@ static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel)
const struct ani_cck_level_entry *entry_cck; const struct ani_cck_level_entry *entry_cck;
aniState->noiseFloor = BEACON_RSSI(ah); aniState->noiseFloor = BEACON_RSSI(ah);
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "**** ccklevel %d=>%d, rssi=%d[lo=%d hi=%d]\n",
"**** ccklevel %d=>%d, rssi=%d[lo=%d hi=%d]\n",
aniState->cckNoiseImmunityLevel, immunityLevel, aniState->cckNoiseImmunityLevel, immunityLevel,
aniState->noiseFloor, aniState->rssiThrLow, aniState->noiseFloor, aniState->rssiThrLow,
aniState->rssiThrHigh); aniState->rssiThrHigh);
...@@ -481,8 +479,7 @@ static void ath9k_ani_reset_old(struct ath_hw *ah, bool is_scanning) ...@@ -481,8 +479,7 @@ static void ath9k_ani_reset_old(struct ath_hw *ah, bool is_scanning)
if (ah->opmode != NL80211_IFTYPE_STATION if (ah->opmode != NL80211_IFTYPE_STATION
&& ah->opmode != NL80211_IFTYPE_ADHOC) { && ah->opmode != NL80211_IFTYPE_ADHOC) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "Reset ANI state opmode %u\n", ah->opmode);
"Reset ANI state opmode %u\n", ah->opmode);
ah->stats.ast_ani_reset++; ah->stats.ast_ani_reset++;
if (ah->opmode == NL80211_IFTYPE_AP) { if (ah->opmode == NL80211_IFTYPE_AP) {
...@@ -582,7 +579,7 @@ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning) ...@@ -582,7 +579,7 @@ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning)
ATH9K_ANI_OFDM_DEF_LEVEL || ATH9K_ANI_OFDM_DEF_LEVEL ||
aniState->cckNoiseImmunityLevel != aniState->cckNoiseImmunityLevel !=
ATH9K_ANI_CCK_DEF_LEVEL) { ATH9K_ANI_CCK_DEF_LEVEL) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"Restore defaults: opmode %u chan %d Mhz/0x%x is_scanning=%d ofdm:%d cck:%d\n", "Restore defaults: opmode %u chan %d Mhz/0x%x is_scanning=%d ofdm:%d cck:%d\n",
ah->opmode, ah->opmode,
chan->channel, chan->channel,
...@@ -599,7 +596,7 @@ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning) ...@@ -599,7 +596,7 @@ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning)
/* /*
* restore historical levels for this channel * restore historical levels for this channel
*/ */
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"Restore history: opmode %u chan %d Mhz/0x%x is_scanning=%d ofdm:%d cck:%d\n", "Restore history: opmode %u chan %d Mhz/0x%x is_scanning=%d ofdm:%d cck:%d\n",
ah->opmode, ah->opmode,
chan->channel, chan->channel,
...@@ -662,7 +659,7 @@ static bool ath9k_hw_ani_read_counters(struct ath_hw *ah) ...@@ -662,7 +659,7 @@ static bool ath9k_hw_ani_read_counters(struct ath_hw *ah)
if (!use_new_ani(ah) && (phyCnt1 < ofdm_base || phyCnt2 < cck_base)) { if (!use_new_ani(ah) && (phyCnt1 < ofdm_base || phyCnt2 < cck_base)) {
if (phyCnt1 < ofdm_base) { if (phyCnt1 < ofdm_base) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"phyCnt1 0x%x, resetting counter value to 0x%x\n", "phyCnt1 0x%x, resetting counter value to 0x%x\n",
phyCnt1, ofdm_base); phyCnt1, ofdm_base);
REG_WRITE(ah, AR_PHY_ERR_1, ofdm_base); REG_WRITE(ah, AR_PHY_ERR_1, ofdm_base);
...@@ -670,7 +667,7 @@ static bool ath9k_hw_ani_read_counters(struct ath_hw *ah) ...@@ -670,7 +667,7 @@ static bool ath9k_hw_ani_read_counters(struct ath_hw *ah)
AR_PHY_ERR_OFDM_TIMING); AR_PHY_ERR_OFDM_TIMING);
} }
if (phyCnt2 < cck_base) { if (phyCnt2 < cck_base) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"phyCnt2 0x%x, resetting counter value to 0x%x\n", "phyCnt2 0x%x, resetting counter value to 0x%x\n",
phyCnt2, cck_base); phyCnt2, cck_base);
REG_WRITE(ah, AR_PHY_ERR_2, cck_base); REG_WRITE(ah, AR_PHY_ERR_2, cck_base);
...@@ -713,7 +710,7 @@ void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan) ...@@ -713,7 +710,7 @@ void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan)
cckPhyErrRate = aniState->cckPhyErrCount * 1000 / cckPhyErrRate = aniState->cckPhyErrCount * 1000 /
aniState->listenTime; aniState->listenTime;
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"listenTime=%d OFDM:%d errs=%d/s CCK:%d errs=%d/s ofdm_turn=%d\n", "listenTime=%d OFDM:%d errs=%d/s CCK:%d errs=%d/s ofdm_turn=%d\n",
aniState->listenTime, aniState->listenTime,
aniState->ofdmNoiseImmunityLevel, aniState->ofdmNoiseImmunityLevel,
...@@ -748,7 +745,7 @@ void ath9k_enable_mib_counters(struct ath_hw *ah) ...@@ -748,7 +745,7 @@ void ath9k_enable_mib_counters(struct ath_hw *ah)
{ {
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
ath_dbg(common, ATH_DBG_ANI, "Enable MIB counters\n"); ath_dbg(common, ANI, "Enable MIB counters\n");
ath9k_hw_update_mibstats(ah, &ah->ah_mibStats); ath9k_hw_update_mibstats(ah, &ah->ah_mibStats);
...@@ -770,7 +767,7 @@ void ath9k_hw_disable_mib_counters(struct ath_hw *ah) ...@@ -770,7 +767,7 @@ void ath9k_hw_disable_mib_counters(struct ath_hw *ah)
{ {
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
ath_dbg(common, ATH_DBG_ANI, "Disable MIB counters\n"); ath_dbg(common, ANI, "Disable MIB counters\n");
REG_WRITE(ah, AR_MIBC, AR_MIBC_FMC); REG_WRITE(ah, AR_MIBC, AR_MIBC_FMC);
ath9k_hw_update_mibstats(ah, &ah->ah_mibStats); ath9k_hw_update_mibstats(ah, &ah->ah_mibStats);
...@@ -845,7 +842,7 @@ void ath9k_hw_ani_init(struct ath_hw *ah) ...@@ -845,7 +842,7 @@ void ath9k_hw_ani_init(struct ath_hw *ah)
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
int i; int i;
ath_dbg(common, ATH_DBG_ANI, "Initialize ANI\n"); ath_dbg(common, ANI, "Initialize ANI\n");
if (use_new_ani(ah)) { if (use_new_ani(ah)) {
ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_NEW; ah->config.ofdm_trig_high = ATH9K_ANI_OFDM_TRIG_HIGH_NEW;
......
...@@ -158,7 +158,7 @@ static void ar5008_hw_force_bias(struct ath_hw *ah, u16 synth_freq) ...@@ -158,7 +158,7 @@ static void ar5008_hw_force_bias(struct ath_hw *ah, u16 synth_freq)
/* pre-reverse this field */ /* pre-reverse this field */
tmp_reg = ath9k_hw_reverse_bits(new_bias, 3); tmp_reg = ath9k_hw_reverse_bits(new_bias, 3);
ath_dbg(common, ATH_DBG_CONFIG, "Force rf_pwd_icsyndiv to %1d on %4d\n", ath_dbg(common, CONFIG, "Force rf_pwd_icsyndiv to %1d on %4d\n",
new_bias, synth_freq); new_bias, synth_freq);
/* swizzle rf_pwd_icsyndiv */ /* swizzle rf_pwd_icsyndiv */
...@@ -1053,8 +1053,7 @@ static bool ar5008_hw_ani_control_old(struct ath_hw *ah, ...@@ -1053,8 +1053,7 @@ static bool ar5008_hw_ani_control_old(struct ath_hw *ah,
u32 level = param; u32 level = param;
if (level >= ARRAY_SIZE(ah->totalSizeDesired)) { if (level >= ARRAY_SIZE(ah->totalSizeDesired)) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "level out of range (%u > %zu)\n",
"level out of range (%u > %zu)\n",
level, ARRAY_SIZE(ah->totalSizeDesired)); level, ARRAY_SIZE(ah->totalSizeDesired));
return false; return false;
} }
...@@ -1157,8 +1156,7 @@ static bool ar5008_hw_ani_control_old(struct ath_hw *ah, ...@@ -1157,8 +1156,7 @@ static bool ar5008_hw_ani_control_old(struct ath_hw *ah,
u32 level = param; u32 level = param;
if (level >= ARRAY_SIZE(firstep)) { if (level >= ARRAY_SIZE(firstep)) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "level out of range (%u > %zu)\n",
"level out of range (%u > %zu)\n",
level, ARRAY_SIZE(firstep)); level, ARRAY_SIZE(firstep));
return false; return false;
} }
...@@ -1177,8 +1175,7 @@ static bool ar5008_hw_ani_control_old(struct ath_hw *ah, ...@@ -1177,8 +1175,7 @@ static bool ar5008_hw_ani_control_old(struct ath_hw *ah,
u32 level = param; u32 level = param;
if (level >= ARRAY_SIZE(cycpwrThr1)) { if (level >= ARRAY_SIZE(cycpwrThr1)) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "level out of range (%u > %zu)\n",
"level out of range (%u > %zu)\n",
level, ARRAY_SIZE(cycpwrThr1)); level, ARRAY_SIZE(cycpwrThr1));
return false; return false;
} }
...@@ -1195,23 +1192,22 @@ static bool ar5008_hw_ani_control_old(struct ath_hw *ah, ...@@ -1195,23 +1192,22 @@ static bool ar5008_hw_ani_control_old(struct ath_hw *ah,
case ATH9K_ANI_PRESENT: case ATH9K_ANI_PRESENT:
break; break;
default: default:
ath_dbg(common, ATH_DBG_ANI, "invalid cmd %u\n", cmd); ath_dbg(common, ANI, "invalid cmd %u\n", cmd);
return false; return false;
} }
ath_dbg(common, ATH_DBG_ANI, "ANI parameters:\n"); ath_dbg(common, ANI, "ANI parameters:\n");
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"noiseImmunityLevel=%d, spurImmunityLevel=%d, ofdmWeakSigDetectOff=%d\n", "noiseImmunityLevel=%d, spurImmunityLevel=%d, ofdmWeakSigDetectOff=%d\n",
aniState->noiseImmunityLevel, aniState->noiseImmunityLevel,
aniState->spurImmunityLevel, aniState->spurImmunityLevel,
!aniState->ofdmWeakSigDetectOff); !aniState->ofdmWeakSigDetectOff);
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"cckWeakSigThreshold=%d, firstepLevel=%d, listenTime=%d\n", "cckWeakSigThreshold=%d, firstepLevel=%d, listenTime=%d\n",
aniState->cckWeakSigThreshold, aniState->cckWeakSigThreshold,
aniState->firstepLevel, aniState->firstepLevel,
aniState->listenTime); aniState->listenTime);
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "ofdmPhyErrCount=%d, cckPhyErrCount=%d\n\n",
"ofdmPhyErrCount=%d, cckPhyErrCount=%d\n\n",
aniState->ofdmPhyErrCount, aniState->ofdmPhyErrCount,
aniState->cckPhyErrCount); aniState->cckPhyErrCount);
...@@ -1295,7 +1291,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah, ...@@ -1295,7 +1291,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah,
AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW); AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
if (!on != aniState->ofdmWeakSigDetectOff) { if (!on != aniState->ofdmWeakSigDetectOff) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"** ch %d: ofdm weak signal: %s=>%s\n", "** ch %d: ofdm weak signal: %s=>%s\n",
chan->channel, chan->channel,
!aniState->ofdmWeakSigDetectOff ? !aniState->ofdmWeakSigDetectOff ?
...@@ -1313,7 +1309,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah, ...@@ -1313,7 +1309,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah,
u32 level = param; u32 level = param;
if (level >= ARRAY_SIZE(firstep_table)) { if (level >= ARRAY_SIZE(firstep_table)) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"ATH9K_ANI_FIRSTEP_LEVEL: level out of range (%u > %zu)\n", "ATH9K_ANI_FIRSTEP_LEVEL: level out of range (%u > %zu)\n",
level, ARRAY_SIZE(firstep_table)); level, ARRAY_SIZE(firstep_table));
return false; return false;
...@@ -1350,7 +1346,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah, ...@@ -1350,7 +1346,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah,
AR_PHY_FIND_SIG_FIRSTEP_LOW, value2); AR_PHY_FIND_SIG_FIRSTEP_LOW, value2);
if (level != aniState->firstepLevel) { if (level != aniState->firstepLevel) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"** ch %d: level %d=>%d[def:%d] firstep[level]=%d ini=%d\n", "** ch %d: level %d=>%d[def:%d] firstep[level]=%d ini=%d\n",
chan->channel, chan->channel,
aniState->firstepLevel, aniState->firstepLevel,
...@@ -1358,7 +1354,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah, ...@@ -1358,7 +1354,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah,
ATH9K_ANI_FIRSTEP_LVL_NEW, ATH9K_ANI_FIRSTEP_LVL_NEW,
value, value,
aniState->iniDef.firstep); aniState->iniDef.firstep);
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"** ch %d: level %d=>%d[def:%d] firstep_low[level]=%d ini=%d\n", "** ch %d: level %d=>%d[def:%d] firstep_low[level]=%d ini=%d\n",
chan->channel, chan->channel,
aniState->firstepLevel, aniState->firstepLevel,
...@@ -1378,7 +1374,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah, ...@@ -1378,7 +1374,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah,
u32 level = param; u32 level = param;
if (level >= ARRAY_SIZE(cycpwrThr1_table)) { if (level >= ARRAY_SIZE(cycpwrThr1_table)) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"ATH9K_ANI_SPUR_IMMUNITY_LEVEL: level out of range (%u > %zu)\n", "ATH9K_ANI_SPUR_IMMUNITY_LEVEL: level out of range (%u > %zu)\n",
level, ARRAY_SIZE(cycpwrThr1_table)); level, ARRAY_SIZE(cycpwrThr1_table));
return false; return false;
...@@ -1414,7 +1410,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah, ...@@ -1414,7 +1410,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah,
AR_PHY_EXT_TIMING5_CYCPWR_THR1, value2); AR_PHY_EXT_TIMING5_CYCPWR_THR1, value2);
if (level != aniState->spurImmunityLevel) { if (level != aniState->spurImmunityLevel) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"** ch %d: level %d=>%d[def:%d] cycpwrThr1[level]=%d ini=%d\n", "** ch %d: level %d=>%d[def:%d] cycpwrThr1[level]=%d ini=%d\n",
chan->channel, chan->channel,
aniState->spurImmunityLevel, aniState->spurImmunityLevel,
...@@ -1422,7 +1418,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah, ...@@ -1422,7 +1418,7 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah,
ATH9K_ANI_SPUR_IMMUNE_LVL_NEW, ATH9K_ANI_SPUR_IMMUNE_LVL_NEW,
value, value,
aniState->iniDef.cycpwrThr1); aniState->iniDef.cycpwrThr1);
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"** ch %d: level %d=>%d[def:%d] cycpwrThr1Ext[level]=%d ini=%d\n", "** ch %d: level %d=>%d[def:%d] cycpwrThr1Ext[level]=%d ini=%d\n",
chan->channel, chan->channel,
aniState->spurImmunityLevel, aniState->spurImmunityLevel,
...@@ -1448,11 +1444,11 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah, ...@@ -1448,11 +1444,11 @@ static bool ar5008_hw_ani_control_new(struct ath_hw *ah,
case ATH9K_ANI_PRESENT: case ATH9K_ANI_PRESENT:
break; break;
default: default:
ath_dbg(common, ATH_DBG_ANI, "invalid cmd %u\n", cmd); ath_dbg(common, ANI, "invalid cmd %u\n", cmd);
return false; return false;
} }
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"ANI parameters: SI=%d, ofdmWS=%s FS=%d MRCcck=%s listenTime=%d ofdmErrs=%d cckErrs=%d\n", "ANI parameters: SI=%d, ofdmWS=%s FS=%d MRCcck=%s listenTime=%d ofdmErrs=%d cckErrs=%d\n",
aniState->spurImmunityLevel, aniState->spurImmunityLevel,
!aniState->ofdmWeakSigDetectOff ? "on" : "off", !aniState->ofdmWeakSigDetectOff ? "on" : "off",
...@@ -1506,7 +1502,7 @@ static void ar5008_hw_ani_cache_ini_regs(struct ath_hw *ah) ...@@ -1506,7 +1502,7 @@ static void ar5008_hw_ani_cache_ini_regs(struct ath_hw *ah)
iniDef = &aniState->iniDef; iniDef = &aniState->iniDef;
ath_dbg(common, ATH_DBG_ANI, "ver %d.%d opmode %u chan %d Mhz/0x%x\n", ath_dbg(common, ANI, "ver %d.%d opmode %u chan %d Mhz/0x%x\n",
ah->hw_version.macVersion, ah->hw_version.macVersion,
ah->hw_version.macRev, ah->hw_version.macRev,
ah->opmode, ah->opmode,
......
...@@ -107,7 +107,7 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) ...@@ -107,7 +107,7 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked)
} }
if (isr & AR_ISR_RXORN) { if (isr & AR_ISR_RXORN) {
ath_dbg(common, ATH_DBG_INTERRUPT, ath_dbg(common, INTERRUPT,
"receive FIFO overrun interrupt\n"); "receive FIFO overrun interrupt\n");
} }
...@@ -143,24 +143,24 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) ...@@ -143,24 +143,24 @@ static bool ar9002_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked)
if (fatal_int) { if (fatal_int) {
if (sync_cause & AR_INTR_SYNC_HOST1_FATAL) { if (sync_cause & AR_INTR_SYNC_HOST1_FATAL) {
ath_dbg(common, ATH_DBG_ANY, ath_dbg(common, ANY,
"received PCI FATAL interrupt\n"); "received PCI FATAL interrupt\n");
} }
if (sync_cause & AR_INTR_SYNC_HOST1_PERR) { if (sync_cause & AR_INTR_SYNC_HOST1_PERR) {
ath_dbg(common, ATH_DBG_ANY, ath_dbg(common, ANY,
"received PCI PERR interrupt\n"); "received PCI PERR interrupt\n");
} }
*masked |= ATH9K_INT_FATAL; *masked |= ATH9K_INT_FATAL;
} }
if (sync_cause & AR_INTR_SYNC_RADM_CPL_TIMEOUT) { if (sync_cause & AR_INTR_SYNC_RADM_CPL_TIMEOUT) {
ath_dbg(common, ATH_DBG_INTERRUPT, ath_dbg(common, INTERRUPT,
"AR_INTR_SYNC_RADM_CPL_TIMEOUT\n"); "AR_INTR_SYNC_RADM_CPL_TIMEOUT\n");
REG_WRITE(ah, AR_RC, AR_RC_HOSTIF); REG_WRITE(ah, AR_RC, AR_RC_HOSTIF);
REG_WRITE(ah, AR_RC, 0); REG_WRITE(ah, AR_RC, 0);
*masked |= ATH9K_INT_FATAL; *masked |= ATH9K_INT_FATAL;
} }
if (sync_cause & AR_INTR_SYNC_LOCAL_TIMEOUT) { if (sync_cause & AR_INTR_SYNC_LOCAL_TIMEOUT) {
ath_dbg(common, ATH_DBG_INTERRUPT, ath_dbg(common, INTERRUPT,
"AR_INTR_SYNC_LOCAL_TIMEOUT\n"); "AR_INTR_SYNC_LOCAL_TIMEOUT\n");
} }
......
...@@ -3043,8 +3043,7 @@ static bool ar9300_read_eeprom(struct ath_hw *ah, int address, u8 *buffer, ...@@ -3043,8 +3043,7 @@ static bool ar9300_read_eeprom(struct ath_hw *ah, int address, u8 *buffer,
int i; int i;
if ((address < 0) || ((address + count) / 2 > AR9300_EEPROM_SIZE - 1)) { if ((address < 0) || ((address + count) / 2 > AR9300_EEPROM_SIZE - 1)) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "eeprom address not in range\n");
"eeprom address not in range\n");
return false; return false;
} }
...@@ -3075,8 +3074,8 @@ static bool ar9300_read_eeprom(struct ath_hw *ah, int address, u8 *buffer, ...@@ -3075,8 +3074,8 @@ static bool ar9300_read_eeprom(struct ath_hw *ah, int address, u8 *buffer,
return true; return true;
error: error:
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "unable to read eeprom region at offset %d\n",
"unable to read eeprom region at offset %d\n", address); address);
return false; return false;
} }
...@@ -3160,13 +3159,13 @@ static bool ar9300_uncompress_block(struct ath_hw *ah, ...@@ -3160,13 +3159,13 @@ static bool ar9300_uncompress_block(struct ath_hw *ah,
length &= 0xff; length &= 0xff;
if (length > 0 && spot >= 0 && spot+length <= mdataSize) { if (length > 0 && spot >= 0 && spot+length <= mdataSize) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"Restore at %d: spot=%d offset=%d length=%d\n", "Restore at %d: spot=%d offset=%d length=%d\n",
it, spot, offset, length); it, spot, offset, length);
memcpy(&mptr[spot], &block[it+2], length); memcpy(&mptr[spot], &block[it+2], length);
spot += length; spot += length;
} else if (length > 0) { } else if (length > 0) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"Bad restore at %d: spot=%d offset=%d length=%d\n", "Bad restore at %d: spot=%d offset=%d length=%d\n",
it, spot, offset, length); it, spot, offset, length);
return false; return false;
...@@ -3188,13 +3187,13 @@ static int ar9300_compress_decision(struct ath_hw *ah, ...@@ -3188,13 +3187,13 @@ static int ar9300_compress_decision(struct ath_hw *ah,
switch (code) { switch (code) {
case _CompressNone: case _CompressNone:
if (length != mdata_size) { if (length != mdata_size) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"EEPROM structure size mismatch memory=%d eeprom=%d\n", "EEPROM structure size mismatch memory=%d eeprom=%d\n",
mdata_size, length); mdata_size, length);
return -1; return -1;
} }
memcpy(mptr, (u8 *) (word + COMP_HDR_LEN), length); memcpy(mptr, (u8 *) (word + COMP_HDR_LEN), length);
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"restored eeprom %d: uncompressed, length %d\n", "restored eeprom %d: uncompressed, length %d\n",
it, length); it, length);
break; break;
...@@ -3203,22 +3202,21 @@ static int ar9300_compress_decision(struct ath_hw *ah, ...@@ -3203,22 +3202,21 @@ static int ar9300_compress_decision(struct ath_hw *ah,
} else { } else {
eep = ar9003_eeprom_struct_find_by_id(reference); eep = ar9003_eeprom_struct_find_by_id(reference);
if (eep == NULL) { if (eep == NULL) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"can't find reference eeprom struct %d\n", "can't find reference eeprom struct %d\n",
reference); reference);
return -1; return -1;
} }
memcpy(mptr, eep, mdata_size); memcpy(mptr, eep, mdata_size);
} }
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"restore eeprom %d: block, reference %d, length %d\n", "restore eeprom %d: block, reference %d, length %d\n",
it, reference, length); it, reference, length);
ar9300_uncompress_block(ah, mptr, mdata_size, ar9300_uncompress_block(ah, mptr, mdata_size,
(u8 *) (word + COMP_HDR_LEN), length); (u8 *) (word + COMP_HDR_LEN), length);
break; break;
default: default:
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "unknown compression code %d\n", code);
"unknown compression code %d\n", code);
return -1; return -1;
} }
return 0; return 0;
...@@ -3294,34 +3292,32 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah, ...@@ -3294,34 +3292,32 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah,
cptr = AR9300_BASE_ADDR_512; cptr = AR9300_BASE_ADDR_512;
else else
cptr = AR9300_BASE_ADDR; cptr = AR9300_BASE_ADDR;
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "Trying EEPROM access at Address 0x%04x\n",
"Trying EEPROM access at Address 0x%04x\n", cptr); cptr);
if (ar9300_check_eeprom_header(ah, read, cptr)) if (ar9300_check_eeprom_header(ah, read, cptr))
goto found; goto found;
cptr = AR9300_BASE_ADDR_512; cptr = AR9300_BASE_ADDR_512;
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "Trying EEPROM access at Address 0x%04x\n",
"Trying EEPROM access at Address 0x%04x\n", cptr); cptr);
if (ar9300_check_eeprom_header(ah, read, cptr)) if (ar9300_check_eeprom_header(ah, read, cptr))
goto found; goto found;
read = ar9300_read_otp; read = ar9300_read_otp;
cptr = AR9300_BASE_ADDR; cptr = AR9300_BASE_ADDR;
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "Trying OTP access at Address 0x%04x\n", cptr);
"Trying OTP access at Address 0x%04x\n", cptr);
if (ar9300_check_eeprom_header(ah, read, cptr)) if (ar9300_check_eeprom_header(ah, read, cptr))
goto found; goto found;
cptr = AR9300_BASE_ADDR_512; cptr = AR9300_BASE_ADDR_512;
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "Trying OTP access at Address 0x%04x\n", cptr);
"Trying OTP access at Address 0x%04x\n", cptr);
if (ar9300_check_eeprom_header(ah, read, cptr)) if (ar9300_check_eeprom_header(ah, read, cptr))
goto found; goto found;
goto fail; goto fail;
found: found:
ath_dbg(common, ATH_DBG_EEPROM, "Found valid EEPROM data\n"); ath_dbg(common, EEPROM, "Found valid EEPROM data\n");
for (it = 0; it < MSTATE; it++) { for (it = 0; it < MSTATE; it++) {
if (!read(ah, cptr, word, COMP_HDR_LEN)) if (!read(ah, cptr, word, COMP_HDR_LEN))
...@@ -3332,13 +3328,12 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah, ...@@ -3332,13 +3328,12 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah,
ar9300_comp_hdr_unpack(word, &code, &reference, ar9300_comp_hdr_unpack(word, &code, &reference,
&length, &major, &minor); &length, &major, &minor);
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"Found block at %x: code=%d ref=%d length=%d major=%d minor=%d\n", "Found block at %x: code=%d ref=%d length=%d major=%d minor=%d\n",
cptr, code, reference, length, major, minor); cptr, code, reference, length, major, minor);
if ((!AR_SREV_9485(ah) && length >= 1024) || if ((!AR_SREV_9485(ah) && length >= 1024) ||
(AR_SREV_9485(ah) && length > EEPROM_DATA_LEN_9485)) { (AR_SREV_9485(ah) && length > EEPROM_DATA_LEN_9485)) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "Skipping bad header\n");
"Skipping bad header\n");
cptr -= COMP_HDR_LEN; cptr -= COMP_HDR_LEN;
continue; continue;
} }
...@@ -3347,13 +3342,13 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah, ...@@ -3347,13 +3342,13 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah,
read(ah, cptr, word, COMP_HDR_LEN + osize + COMP_CKSUM_LEN); read(ah, cptr, word, COMP_HDR_LEN + osize + COMP_CKSUM_LEN);
checksum = ar9300_comp_cksum(&word[COMP_HDR_LEN], length); checksum = ar9300_comp_cksum(&word[COMP_HDR_LEN], length);
mchecksum = get_unaligned_le16(&word[COMP_HDR_LEN + osize]); mchecksum = get_unaligned_le16(&word[COMP_HDR_LEN + osize]);
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "checksum %x %x\n",
"checksum %x %x\n", checksum, mchecksum); checksum, mchecksum);
if (checksum == mchecksum) { if (checksum == mchecksum) {
ar9300_compress_decision(ah, it, code, reference, mptr, ar9300_compress_decision(ah, it, code, reference, mptr,
word, length, mdata_size); word, length, mdata_size);
} else { } else {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"skipping block with bad checksum\n"); "skipping block with bad checksum\n");
} }
cptr -= (COMP_HDR_LEN + osize + COMP_CKSUM_LEN); cptr -= (COMP_HDR_LEN + osize + COMP_CKSUM_LEN);
...@@ -4424,8 +4419,8 @@ static void ar9003_hw_set_target_power_eeprom(struct ath_hw *ah, u16 freq, ...@@ -4424,8 +4419,8 @@ static void ar9003_hw_set_target_power_eeprom(struct ath_hw *ah, u16 freq,
is2GHz) + ht40PowerIncForPdadc; is2GHz) + ht40PowerIncForPdadc;
for (i = 0; i < ar9300RateSize; i++) { for (i = 0; i < ar9300RateSize; i++) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "TPC[%02d] 0x%08x\n",
"TPC[%02d] 0x%08x\n", i, targetPowerValT2[i]); i, targetPowerValT2[i]);
} }
} }
...@@ -4444,7 +4439,7 @@ static int ar9003_hw_cal_pier_get(struct ath_hw *ah, ...@@ -4444,7 +4439,7 @@ static int ar9003_hw_cal_pier_get(struct ath_hw *ah,
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
if (ichain >= AR9300_MAX_CHAINS) { if (ichain >= AR9300_MAX_CHAINS) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"Invalid chain index, must be less than %d\n", "Invalid chain index, must be less than %d\n",
AR9300_MAX_CHAINS); AR9300_MAX_CHAINS);
return -1; return -1;
...@@ -4452,7 +4447,7 @@ static int ar9003_hw_cal_pier_get(struct ath_hw *ah, ...@@ -4452,7 +4447,7 @@ static int ar9003_hw_cal_pier_get(struct ath_hw *ah,
if (mode) { /* 5GHz */ if (mode) { /* 5GHz */
if (ipier >= AR9300_NUM_5G_CAL_PIERS) { if (ipier >= AR9300_NUM_5G_CAL_PIERS) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"Invalid 5GHz cal pier index, must be less than %d\n", "Invalid 5GHz cal pier index, must be less than %d\n",
AR9300_NUM_5G_CAL_PIERS); AR9300_NUM_5G_CAL_PIERS);
return -1; return -1;
...@@ -4462,7 +4457,7 @@ static int ar9003_hw_cal_pier_get(struct ath_hw *ah, ...@@ -4462,7 +4457,7 @@ static int ar9003_hw_cal_pier_get(struct ath_hw *ah,
is2GHz = 0; is2GHz = 0;
} else { } else {
if (ipier >= AR9300_NUM_2G_CAL_PIERS) { if (ipier >= AR9300_NUM_2G_CAL_PIERS) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"Invalid 2GHz cal pier index, must be less than %d\n", "Invalid 2GHz cal pier index, must be less than %d\n",
AR9300_NUM_2G_CAL_PIERS); AR9300_NUM_2G_CAL_PIERS);
return -1; return -1;
...@@ -4624,8 +4619,7 @@ static int ar9003_hw_calibration_apply(struct ath_hw *ah, int frequency) ...@@ -4624,8 +4619,7 @@ static int ar9003_hw_calibration_apply(struct ath_hw *ah, int frequency)
/* interpolate */ /* interpolate */
for (ichain = 0; ichain < AR9300_MAX_CHAINS; ichain++) { for (ichain = 0; ichain < AR9300_MAX_CHAINS; ichain++) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "ch=%d f=%d low=%d %d h=%d %d\n",
"ch=%d f=%d low=%d %d h=%d %d\n",
ichain, frequency, lfrequency[ichain], ichain, frequency, lfrequency[ichain],
lcorrection[ichain], hfrequency[ichain], lcorrection[ichain], hfrequency[ichain],
hcorrection[ichain]); hcorrection[ichain]);
...@@ -4680,7 +4674,7 @@ static int ar9003_hw_calibration_apply(struct ath_hw *ah, int frequency) ...@@ -4680,7 +4674,7 @@ static int ar9003_hw_calibration_apply(struct ath_hw *ah, int frequency)
ar9003_hw_power_control_override(ah, frequency, correction, voltage, ar9003_hw_power_control_override(ah, frequency, correction, voltage,
temperature); temperature);
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"for frequency=%d, calibration correction = %d %d %d\n", "for frequency=%d, calibration correction = %d %d %d\n",
frequency, correction[0], correction[1], correction[2]); frequency, correction[0], correction[1], correction[2]);
...@@ -4866,7 +4860,7 @@ static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah, ...@@ -4866,7 +4860,7 @@ static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah,
else else
freq = centers.ctl_center; freq = centers.ctl_center;
ath_dbg(common, ATH_DBG_REGULATORY, ath_dbg(common, REGULATORY,
"LOOP-Mode ctlMode %d < %d, isHt40CtlMode %d, EXT_ADDITIVE %d\n", "LOOP-Mode ctlMode %d < %d, isHt40CtlMode %d, EXT_ADDITIVE %d\n",
ctlMode, numCtlModes, isHt40CtlMode, ctlMode, numCtlModes, isHt40CtlMode,
(pCtlMode[ctlMode] & EXT_ADDITIVE)); (pCtlMode[ctlMode] & EXT_ADDITIVE));
...@@ -4882,7 +4876,7 @@ static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah, ...@@ -4882,7 +4876,7 @@ static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah,
twiceMaxEdgePower = MAX_RATE_POWER; twiceMaxEdgePower = MAX_RATE_POWER;
for (i = 0; (i < ctlNum) && ctlIndex[i]; i++) { for (i = 0; (i < ctlNum) && ctlIndex[i]; i++) {
ath_dbg(common, ATH_DBG_REGULATORY, ath_dbg(common, REGULATORY,
"LOOP-Ctlidx %d: cfgCtl 0x%2.2x pCtlMode 0x%2.2x ctlIndex 0x%2.2x chan %d\n", "LOOP-Ctlidx %d: cfgCtl 0x%2.2x pCtlMode 0x%2.2x ctlIndex 0x%2.2x chan %d\n",
i, cfgCtl, pCtlMode[ctlMode], ctlIndex[i], i, cfgCtl, pCtlMode[ctlMode], ctlIndex[i],
chan->channel); chan->channel);
...@@ -4924,7 +4918,7 @@ static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah, ...@@ -4924,7 +4918,7 @@ static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah,
minCtlPower = (u8)min(twiceMaxEdgePower, scaledPower); minCtlPower = (u8)min(twiceMaxEdgePower, scaledPower);
ath_dbg(common, ATH_DBG_REGULATORY, ath_dbg(common, REGULATORY,
"SEL-Min ctlMode %d pCtlMode %d 2xMaxEdge %d sP %d minCtlPwr %d\n", "SEL-Min ctlMode %d pCtlMode %d 2xMaxEdge %d sP %d minCtlPwr %d\n",
ctlMode, pCtlMode[ctlMode], twiceMaxEdgePower, ctlMode, pCtlMode[ctlMode], twiceMaxEdgePower,
scaledPower, minCtlPower); scaledPower, minCtlPower);
...@@ -5048,7 +5042,7 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah, ...@@ -5048,7 +5042,7 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah,
target_power_val_t2_eep[i]) > target_power_val_t2_eep[i]) >
paprd_scale_factor)) { paprd_scale_factor)) {
ah->paprd_ratemask &= ~(1 << i); ah->paprd_ratemask &= ~(1 << i);
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"paprd disabled for mcs %d\n", i); "paprd disabled for mcs %d\n", i);
} }
} }
...@@ -5066,8 +5060,8 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah, ...@@ -5066,8 +5060,8 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah,
return; return;
for (i = 0; i < ar9300RateSize; i++) { for (i = 0; i < ar9300RateSize; i++) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "TPC[%02d] 0x%08x\n",
"TPC[%02d] 0x%08x\n", i, targetPowerValT2[i]); i, targetPowerValT2[i]);
} }
ah->txpower_limit = regulatory->max_power_level; ah->txpower_limit = regulatory->max_power_level;
......
...@@ -305,10 +305,8 @@ static bool ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) ...@@ -305,10 +305,8 @@ static bool ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked)
raw_intr = REG_READ(ah, AR_MCI_INTERRUPT_RAW); raw_intr = REG_READ(ah, AR_MCI_INTERRUPT_RAW);
if ((raw_intr == 0xdeadbeef) || (rx_msg_intr == 0xdeadbeef)) if ((raw_intr == 0xdeadbeef) || (rx_msg_intr == 0xdeadbeef))
ath_dbg(common, ATH_DBG_MCI, ath_dbg(common, MCI,
"MCI gets 0xdeadbeef during MCI int processing" "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",
"new raw_intr=0x%08x, new rx_msg_raw=0x%08x, "
"raw_intr=0x%08x, rx_msg_raw=0x%08x\n",
raw_intr, rx_msg_intr, mci->raw_intr, raw_intr, rx_msg_intr, mci->raw_intr,
mci->rx_msg_intr); mci->rx_msg_intr);
else { else {
...@@ -322,7 +320,7 @@ static bool ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) ...@@ -322,7 +320,7 @@ static bool ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked)
REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_RAW, rx_msg_intr); REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_RAW, rx_msg_intr);
REG_WRITE(ah, AR_MCI_INTERRUPT_RAW, raw_intr); REG_WRITE(ah, AR_MCI_INTERRUPT_RAW, raw_intr);
ath_dbg(common, ATH_DBG_MCI, "AR_INTR_SYNC_MCI\n"); ath_dbg(common, MCI, "AR_INTR_SYNC_MCI\n");
} }
} }
...@@ -335,7 +333,7 @@ static bool ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked) ...@@ -335,7 +333,7 @@ static bool ar9003_hw_get_isr(struct ath_hw *ah, enum ath9k_int *masked)
} }
if (sync_cause & AR_INTR_SYNC_LOCAL_TIMEOUT) if (sync_cause & AR_INTR_SYNC_LOCAL_TIMEOUT)
ath_dbg(common, ATH_DBG_INTERRUPT, ath_dbg(common, INTERRUPT,
"AR_INTR_SYNC_LOCAL_TIMEOUT\n"); "AR_INTR_SYNC_LOCAL_TIMEOUT\n");
REG_WRITE(ah, AR_INTR_SYNC_CAUSE_CLR, sync_cause); REG_WRITE(ah, AR_INTR_SYNC_CAUSE_CLR, sync_cause);
...@@ -366,7 +364,7 @@ static int ar9003_hw_proc_txdesc(struct ath_hw *ah, void *ds, ...@@ -366,7 +364,7 @@ static int ar9003_hw_proc_txdesc(struct ath_hw *ah, void *ds,
if ((MS(ads->ds_info, AR_DescId) != ATHEROS_VENDOR_ID) || if ((MS(ads->ds_info, AR_DescId) != ATHEROS_VENDOR_ID) ||
(MS(ads->ds_info, AR_TxRxDesc) != 1)) { (MS(ads->ds_info, AR_TxRxDesc) != 1)) {
ath_dbg(ath9k_hw_common(ah), ATH_DBG_XMIT, ath_dbg(ath9k_hw_common(ah), XMIT,
"Tx Descriptor error %x\n", ads->ds_info); "Tx Descriptor error %x\n", ads->ds_info);
memset(ads, 0, sizeof(*ads)); memset(ads, 0, sizeof(*ads));
return -EIO; return -EIO;
...@@ -574,7 +572,7 @@ void ath9k_hw_reset_txstatus_ring(struct ath_hw *ah) ...@@ -574,7 +572,7 @@ void ath9k_hw_reset_txstatus_ring(struct ath_hw *ah)
memset((void *) ah->ts_ring, 0, memset((void *) ah->ts_ring, 0,
ah->ts_size * sizeof(struct ar9003_txs)); ah->ts_size * sizeof(struct ar9003_txs));
ath_dbg(ath9k_hw_common(ah), ATH_DBG_XMIT, ath_dbg(ath9k_hw_common(ah), XMIT,
"TS Start 0x%x End 0x%x Virt %p, Size %d\n", "TS Start 0x%x End 0x%x Virt %p, Size %d\n",
ah->ts_paddr_start, ah->ts_paddr_end, ah->ts_paddr_start, ah->ts_paddr_end,
ah->ts_ring, ah->ts_size); ah->ts_ring, ah->ts_size);
......
This diff is collapsed.
...@@ -119,8 +119,8 @@ static int ar9003_get_training_power_5g(struct ath_hw *ah) ...@@ -119,8 +119,8 @@ static int ar9003_get_training_power_5g(struct ath_hw *ah)
break; break;
default: default:
delta = 0; delta = 0;
ath_dbg(common, ATH_DBG_CALIBRATE, ath_dbg(common, CALIBRATE, "Invalid tx-chainmask: %u\n",
"Invalid tx-chainmask: %u\n", ah->txchainmask); ah->txchainmask);
} }
power += delta; power += delta;
...@@ -148,13 +148,12 @@ static int ar9003_paprd_setup_single_table(struct ath_hw *ah) ...@@ -148,13 +148,12 @@ static int ar9003_paprd_setup_single_table(struct ath_hw *ah)
else else
training_power = ar9003_get_training_power_5g(ah); training_power = ar9003_get_training_power_5g(ah);
ath_dbg(common, ATH_DBG_CALIBRATE, ath_dbg(common, CALIBRATE, "Training power: %d, Target power: %d\n",
"Training power: %d, Target power: %d\n",
training_power, ah->paprd_target_power); training_power, ah->paprd_target_power);
if (training_power < 0) { if (training_power < 0) {
ath_dbg(common, ATH_DBG_CALIBRATE, ath_dbg(common, CALIBRATE,
"PAPRD target power delta out of range"); "PAPRD target power delta out of range\n");
return -ERANGE; return -ERANGE;
} }
ah->paprd_training_power = training_power; ah->paprd_training_power = training_power;
...@@ -311,8 +310,8 @@ static unsigned int ar9003_get_desired_gain(struct ath_hw *ah, int chain, ...@@ -311,8 +310,8 @@ static unsigned int ar9003_get_desired_gain(struct ath_hw *ah, int chain,
reg_cl_gain = AR_PHY_CL_TAB_2; reg_cl_gain = AR_PHY_CL_TAB_2;
break; break;
default: default:
ath_dbg(ath9k_hw_common(ah), ATH_DBG_CALIBRATE, ath_dbg(ath9k_hw_common(ah), CALIBRATE,
"Invalid chainmask: %d\n", chain); "Invalid chainmask: %d\n", chain);
break; break;
} }
...@@ -850,7 +849,7 @@ bool ar9003_paprd_is_done(struct ath_hw *ah) ...@@ -850,7 +849,7 @@ bool ar9003_paprd_is_done(struct ath_hw *ah)
agc2_pwr = REG_READ_FIELD(ah, AR_PHY_PAPRD_TRAINER_STAT1, agc2_pwr = REG_READ_FIELD(ah, AR_PHY_PAPRD_TRAINER_STAT1,
AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR); AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR);
ath_dbg(ath9k_hw_common(ah), ATH_DBG_CALIBRATE, ath_dbg(ath9k_hw_common(ah), CALIBRATE,
"AGC2_PWR = 0x%x training done = 0x%x\n", "AGC2_PWR = 0x%x training done = 0x%x\n",
agc2_pwr, paprd_done); agc2_pwr, paprd_done);
/* /*
......
...@@ -882,7 +882,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah, ...@@ -882,7 +882,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW); AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
if (!on != aniState->ofdmWeakSigDetectOff) { if (!on != aniState->ofdmWeakSigDetectOff) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"** ch %d: ofdm weak signal: %s=>%s\n", "** ch %d: ofdm weak signal: %s=>%s\n",
chan->channel, chan->channel,
!aniState->ofdmWeakSigDetectOff ? !aniState->ofdmWeakSigDetectOff ?
...@@ -900,7 +900,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah, ...@@ -900,7 +900,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
u32 level = param; u32 level = param;
if (level >= ARRAY_SIZE(firstep_table)) { if (level >= ARRAY_SIZE(firstep_table)) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"ATH9K_ANI_FIRSTEP_LEVEL: level out of range (%u > %zu)\n", "ATH9K_ANI_FIRSTEP_LEVEL: level out of range (%u > %zu)\n",
level, ARRAY_SIZE(firstep_table)); level, ARRAY_SIZE(firstep_table));
return false; return false;
...@@ -937,7 +937,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah, ...@@ -937,7 +937,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
AR_PHY_FIND_SIG_LOW_FIRSTEP_LOW, value2); AR_PHY_FIND_SIG_LOW_FIRSTEP_LOW, value2);
if (level != aniState->firstepLevel) { if (level != aniState->firstepLevel) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"** ch %d: level %d=>%d[def:%d] firstep[level]=%d ini=%d\n", "** ch %d: level %d=>%d[def:%d] firstep[level]=%d ini=%d\n",
chan->channel, chan->channel,
aniState->firstepLevel, aniState->firstepLevel,
...@@ -945,7 +945,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah, ...@@ -945,7 +945,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
ATH9K_ANI_FIRSTEP_LVL_NEW, ATH9K_ANI_FIRSTEP_LVL_NEW,
value, value,
aniState->iniDef.firstep); aniState->iniDef.firstep);
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"** ch %d: level %d=>%d[def:%d] firstep_low[level]=%d ini=%d\n", "** ch %d: level %d=>%d[def:%d] firstep_low[level]=%d ini=%d\n",
chan->channel, chan->channel,
aniState->firstepLevel, aniState->firstepLevel,
...@@ -965,7 +965,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah, ...@@ -965,7 +965,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
u32 level = param; u32 level = param;
if (level >= ARRAY_SIZE(cycpwrThr1_table)) { if (level >= ARRAY_SIZE(cycpwrThr1_table)) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"ATH9K_ANI_SPUR_IMMUNITY_LEVEL: level out of range (%u > %zu)\n", "ATH9K_ANI_SPUR_IMMUNITY_LEVEL: level out of range (%u > %zu)\n",
level, ARRAY_SIZE(cycpwrThr1_table)); level, ARRAY_SIZE(cycpwrThr1_table));
return false; return false;
...@@ -1001,7 +1001,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah, ...@@ -1001,7 +1001,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
AR_PHY_EXT_CYCPWR_THR1, value2); AR_PHY_EXT_CYCPWR_THR1, value2);
if (level != aniState->spurImmunityLevel) { if (level != aniState->spurImmunityLevel) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"** ch %d: level %d=>%d[def:%d] cycpwrThr1[level]=%d ini=%d\n", "** ch %d: level %d=>%d[def:%d] cycpwrThr1[level]=%d ini=%d\n",
chan->channel, chan->channel,
aniState->spurImmunityLevel, aniState->spurImmunityLevel,
...@@ -1009,7 +1009,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah, ...@@ -1009,7 +1009,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
ATH9K_ANI_SPUR_IMMUNE_LVL_NEW, ATH9K_ANI_SPUR_IMMUNE_LVL_NEW,
value, value,
aniState->iniDef.cycpwrThr1); aniState->iniDef.cycpwrThr1);
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"** ch %d: level %d=>%d[def:%d] cycpwrThr1Ext[level]=%d ini=%d\n", "** ch %d: level %d=>%d[def:%d] cycpwrThr1Ext[level]=%d ini=%d\n",
chan->channel, chan->channel,
aniState->spurImmunityLevel, aniState->spurImmunityLevel,
...@@ -1036,8 +1036,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah, ...@@ -1036,8 +1036,7 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL, REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL,
AR_PHY_MRC_CCK_MUX_REG, is_on); AR_PHY_MRC_CCK_MUX_REG, is_on);
if (!is_on != aniState->mrcCCKOff) { if (!is_on != aniState->mrcCCKOff) {
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "** ch %d: MRC CCK: %s=>%s\n",
"** ch %d: MRC CCK: %s=>%s\n",
chan->channel, chan->channel,
!aniState->mrcCCKOff ? "on" : "off", !aniState->mrcCCKOff ? "on" : "off",
is_on ? "on" : "off"); is_on ? "on" : "off");
...@@ -1052,11 +1051,11 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah, ...@@ -1052,11 +1051,11 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,
case ATH9K_ANI_PRESENT: case ATH9K_ANI_PRESENT:
break; break;
default: default:
ath_dbg(common, ATH_DBG_ANI, "invalid cmd %u\n", cmd); ath_dbg(common, ANI, "invalid cmd %u\n", cmd);
return false; return false;
} }
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI,
"ANI parameters: SI=%d, ofdmWS=%s FS=%d MRCcck=%s listenTime=%d ofdmErrs=%d cckErrs=%d\n", "ANI parameters: SI=%d, ofdmWS=%s FS=%d MRCcck=%s listenTime=%d ofdmErrs=%d cckErrs=%d\n",
aniState->spurImmunityLevel, aniState->spurImmunityLevel,
!aniState->ofdmWeakSigDetectOff ? "on" : "off", !aniState->ofdmWeakSigDetectOff ? "on" : "off",
...@@ -1125,8 +1124,7 @@ static void ar9003_hw_ani_cache_ini_regs(struct ath_hw *ah) ...@@ -1125,8 +1124,7 @@ static void ar9003_hw_ani_cache_ini_regs(struct ath_hw *ah)
aniState = &ah->curchan->ani; aniState = &ah->curchan->ani;
iniDef = &aniState->iniDef; iniDef = &aniState->iniDef;
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "ver %d.%d opmode %u chan %d Mhz/0x%x\n",
"ver %d.%d opmode %u chan %d Mhz/0x%x\n",
ah->hw_version.macVersion, ah->hw_version.macVersion,
ah->hw_version.macRev, ah->hw_version.macRev,
ah->opmode, ah->opmode,
...@@ -1388,7 +1386,7 @@ void ar9003_hw_bb_watchdog_config(struct ath_hw *ah) ...@@ -1388,7 +1386,7 @@ void ar9003_hw_bb_watchdog_config(struct ath_hw *ah)
~(AR_PHY_WATCHDOG_NON_IDLE_ENABLE | ~(AR_PHY_WATCHDOG_NON_IDLE_ENABLE |
AR_PHY_WATCHDOG_IDLE_ENABLE)); AR_PHY_WATCHDOG_IDLE_ENABLE));
ath_dbg(common, ATH_DBG_RESET, "Disabled BB Watchdog\n"); ath_dbg(common, RESET, "Disabled BB Watchdog\n");
return; return;
} }
...@@ -1424,8 +1422,7 @@ void ar9003_hw_bb_watchdog_config(struct ath_hw *ah) ...@@ -1424,8 +1422,7 @@ void ar9003_hw_bb_watchdog_config(struct ath_hw *ah)
AR_PHY_WATCHDOG_IDLE_MASK | AR_PHY_WATCHDOG_IDLE_MASK |
(AR_PHY_WATCHDOG_NON_IDLE_MASK & (idle_count << 2))); (AR_PHY_WATCHDOG_NON_IDLE_MASK & (idle_count << 2)));
ath_dbg(common, ATH_DBG_RESET, ath_dbg(common, RESET, "Enabled BB Watchdog timeout (%u ms)\n",
"Enabled BB Watchdog timeout (%u ms)\n",
idle_tmo_ms); idle_tmo_ms);
} }
...@@ -1454,9 +1451,9 @@ void ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah) ...@@ -1454,9 +1451,9 @@ void ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah)
return; return;
status = ah->bb_watchdog_last_status; status = ah->bb_watchdog_last_status;
ath_dbg(common, ATH_DBG_RESET, ath_dbg(common, RESET,
"\n==== BB update: BB status=0x%08x ====\n", status); "\n==== BB update: BB status=0x%08x ====\n", status);
ath_dbg(common, ATH_DBG_RESET, ath_dbg(common, RESET,
"** BB state: wd=%u det=%u rdar=%u rOFDM=%d rCCK=%u tOFDM=%u tCCK=%u agc=%u src=%u **\n", "** BB state: wd=%u det=%u rdar=%u rOFDM=%d rCCK=%u tOFDM=%u tCCK=%u agc=%u src=%u **\n",
MS(status, AR_PHY_WATCHDOG_INFO), MS(status, AR_PHY_WATCHDOG_INFO),
MS(status, AR_PHY_WATCHDOG_DET_HANG), MS(status, AR_PHY_WATCHDOG_DET_HANG),
...@@ -1468,22 +1465,19 @@ void ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah) ...@@ -1468,22 +1465,19 @@ void ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah)
MS(status, AR_PHY_WATCHDOG_AGC_SM), MS(status, AR_PHY_WATCHDOG_AGC_SM),
MS(status, AR_PHY_WATCHDOG_SRCH_SM)); MS(status, AR_PHY_WATCHDOG_SRCH_SM));
ath_dbg(common, ATH_DBG_RESET, ath_dbg(common, RESET, "** BB WD cntl: cntl1=0x%08x cntl2=0x%08x **\n",
"** BB WD cntl: cntl1=0x%08x cntl2=0x%08x **\n",
REG_READ(ah, AR_PHY_WATCHDOG_CTL_1), REG_READ(ah, AR_PHY_WATCHDOG_CTL_1),
REG_READ(ah, AR_PHY_WATCHDOG_CTL_2)); REG_READ(ah, AR_PHY_WATCHDOG_CTL_2));
ath_dbg(common, ATH_DBG_RESET, ath_dbg(common, RESET, "** BB mode: BB_gen_controls=0x%08x **\n",
"** BB mode: BB_gen_controls=0x%08x **\n",
REG_READ(ah, AR_PHY_GEN_CTRL)); REG_READ(ah, AR_PHY_GEN_CTRL));
#define PCT(_field) (common->cc_survey._field * 100 / common->cc_survey.cycles) #define PCT(_field) (common->cc_survey._field * 100 / common->cc_survey.cycles)
if (common->cc_survey.cycles) if (common->cc_survey.cycles)
ath_dbg(common, ATH_DBG_RESET, ath_dbg(common, RESET,
"** BB busy times: rx_clear=%d%%, rx_frame=%d%%, tx_frame=%d%% **\n", "** BB busy times: rx_clear=%d%%, rx_frame=%d%%, tx_frame=%d%% **\n",
PCT(rx_busy), PCT(rx_frame), PCT(tx_frame)); PCT(rx_busy), PCT(rx_frame), PCT(tx_frame));
ath_dbg(common, ATH_DBG_RESET, ath_dbg(common, RESET, "==== BB update: done ====\n\n");
"==== BB update: done ====\n\n");
} }
EXPORT_SYMBOL(ar9003_hw_bb_watchdog_dbg_info); EXPORT_SYMBOL(ar9003_hw_bb_watchdog_dbg_info);
......
...@@ -117,11 +117,10 @@ static void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb) ...@@ -117,11 +117,10 @@ static void ath_tx_cabq(struct ieee80211_hw *hw, struct sk_buff *skb)
memset(&txctl, 0, sizeof(struct ath_tx_control)); memset(&txctl, 0, sizeof(struct ath_tx_control));
txctl.txq = sc->beacon.cabq; txctl.txq = sc->beacon.cabq;
ath_dbg(common, ATH_DBG_XMIT, ath_dbg(common, XMIT, "transmitting CABQ packet, skb: %p\n", skb);
"transmitting CABQ packet, skb: %p\n", skb);
if (ath_tx_start(hw, skb, &txctl) != 0) { if (ath_tx_start(hw, skb, &txctl) != 0) {
ath_dbg(common, ATH_DBG_XMIT, "CABQ TX failed\n"); ath_dbg(common, XMIT, "CABQ TX failed\n");
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
} }
} }
...@@ -204,7 +203,7 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw, ...@@ -204,7 +203,7 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw,
if (skb && cabq_depth) { if (skb && cabq_depth) {
if (sc->nvifs > 1) { if (sc->nvifs > 1) {
ath_dbg(common, ATH_DBG_BEACON, ath_dbg(common, BEACON,
"Flushing previous cabq traffic\n"); "Flushing previous cabq traffic\n");
ath_draintxq(sc, cabq, false); ath_draintxq(sc, cabq, false);
} }
...@@ -297,7 +296,7 @@ int ath_beacon_alloc(struct ath_softc *sc, struct ieee80211_vif *vif) ...@@ -297,7 +296,7 @@ int ath_beacon_alloc(struct ath_softc *sc, struct ieee80211_vif *vif)
tsfadjust = TU_TO_USEC(intval * avp->av_bslot) / ATH_BCBUF; tsfadjust = TU_TO_USEC(intval * avp->av_bslot) / ATH_BCBUF;
avp->tsf_adjust = cpu_to_le64(tsfadjust); avp->tsf_adjust = cpu_to_le64(tsfadjust);
ath_dbg(common, ATH_DBG_BEACON, ath_dbg(common, BEACON,
"stagger beacons, bslot %d intval %u tsfadjust %llu\n", "stagger beacons, bslot %d intval %u tsfadjust %llu\n",
avp->av_bslot, intval, (unsigned long long)tsfadjust); avp->av_bslot, intval, (unsigned long long)tsfadjust);
...@@ -371,15 +370,14 @@ void ath_beacon_tasklet(unsigned long data) ...@@ -371,15 +370,14 @@ void ath_beacon_tasklet(unsigned long data)
sc->beacon.bmisscnt++; sc->beacon.bmisscnt++;
if (sc->beacon.bmisscnt < BSTUCK_THRESH * sc->nbcnvifs) { if (sc->beacon.bmisscnt < BSTUCK_THRESH * sc->nbcnvifs) {
ath_dbg(common, ATH_DBG_BSTUCK, ath_dbg(common, BSTUCK,
"missed %u consecutive beacons\n", "missed %u consecutive beacons\n",
sc->beacon.bmisscnt); sc->beacon.bmisscnt);
ath9k_hw_stop_dma_queue(ah, sc->beacon.beaconq); ath9k_hw_stop_dma_queue(ah, sc->beacon.beaconq);
if (sc->beacon.bmisscnt > 3) if (sc->beacon.bmisscnt > 3)
ath9k_hw_bstuck_nfcal(ah); ath9k_hw_bstuck_nfcal(ah);
} else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) { } else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) {
ath_dbg(common, ATH_DBG_BSTUCK, ath_dbg(common, BSTUCK, "beacon is officially stuck\n");
"beacon is officially stuck\n");
sc->sc_flags |= SC_OP_TSF_RESET; sc->sc_flags |= SC_OP_TSF_RESET;
ieee80211_queue_work(sc->hw, &sc->hw_reset_work); ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
} }
...@@ -406,7 +404,7 @@ void ath_beacon_tasklet(unsigned long data) ...@@ -406,7 +404,7 @@ void ath_beacon_tasklet(unsigned long data)
slot = (tsftu % (intval * ATH_BCBUF)) / intval; slot = (tsftu % (intval * ATH_BCBUF)) / intval;
vif = sc->beacon.bslot[slot]; vif = sc->beacon.bslot[slot];
ath_dbg(common, ATH_DBG_BEACON, ath_dbg(common, BEACON,
"slot %d [tsf %llu tsftu %u intval %u] vif %p\n", "slot %d [tsf %llu tsftu %u intval %u] vif %p\n",
slot, tsf, tsftu / ATH_BCBUF, intval, vif); slot, tsf, tsftu / ATH_BCBUF, intval, vif);
} else { } else {
...@@ -424,7 +422,7 @@ void ath_beacon_tasklet(unsigned long data) ...@@ -424,7 +422,7 @@ void ath_beacon_tasklet(unsigned long data)
} }
if (sc->beacon.bmisscnt != 0) { if (sc->beacon.bmisscnt != 0) {
ath_dbg(common, ATH_DBG_BSTUCK, ath_dbg(common, BSTUCK,
"resume beacon xmit after %u misses\n", "resume beacon xmit after %u misses\n",
sc->beacon.bmisscnt); sc->beacon.bmisscnt);
sc->beacon.bmisscnt = 0; sc->beacon.bmisscnt = 0;
...@@ -541,7 +539,7 @@ static void ath_beacon_config_sta(struct ath_softc *sc, ...@@ -541,7 +539,7 @@ static void ath_beacon_config_sta(struct ath_softc *sc,
/* No need to configure beacon if we are not associated */ /* No need to configure beacon if we are not associated */
if (!common->curaid) { if (!common->curaid) {
ath_dbg(common, ATH_DBG_BEACON, ath_dbg(common, BEACON,
"STA is not yet associated..skipping beacon config\n"); "STA is not yet associated..skipping beacon config\n");
return; return;
} }
...@@ -631,8 +629,8 @@ static void ath_beacon_config_sta(struct ath_softc *sc, ...@@ -631,8 +629,8 @@ static void ath_beacon_config_sta(struct ath_softc *sc,
/* TSF out of range threshold fixed at 1 second */ /* TSF out of range threshold fixed at 1 second */
bs.bs_tsfoor_threshold = ATH9K_TSFOOR_THRESHOLD; bs.bs_tsfoor_threshold = ATH9K_TSFOOR_THRESHOLD;
ath_dbg(common, ATH_DBG_BEACON, "tsf: %llu tsftu: %u\n", tsf, tsftu); ath_dbg(common, BEACON, "tsf: %llu tsftu: %u\n", tsf, tsftu);
ath_dbg(common, ATH_DBG_BEACON, ath_dbg(common, BEACON,
"bmiss: %u sleep: %u cfp-period: %u maxdur: %u next: %u\n", "bmiss: %u sleep: %u cfp-period: %u maxdur: %u next: %u\n",
bs.bs_bmissthreshold, bs.bs_sleepduration, bs.bs_bmissthreshold, bs.bs_sleepduration,
bs.bs_cfpperiod, bs.bs_cfpmaxduration, bs.bs_cfpnext); bs.bs_cfpperiod, bs.bs_cfpmaxduration, bs.bs_cfpnext);
...@@ -660,8 +658,7 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc, ...@@ -660,8 +658,7 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc,
tsf = roundup(ath9k_hw_gettsf32(ah) + TU_TO_USEC(FUDGE), intval); tsf = roundup(ath9k_hw_gettsf32(ah) + TU_TO_USEC(FUDGE), intval);
nexttbtt = tsf + intval; nexttbtt = tsf + intval;
ath_dbg(common, ATH_DBG_BEACON, ath_dbg(common, BEACON, "IBSS nexttbtt %u intval %u (%u)\n",
"IBSS nexttbtt %u intval %u (%u)\n",
nexttbtt, intval, conf->beacon_interval); nexttbtt, intval, conf->beacon_interval);
/* /*
...@@ -699,9 +696,8 @@ static bool ath9k_allow_beacon_config(struct ath_softc *sc, ...@@ -699,9 +696,8 @@ static bool ath9k_allow_beacon_config(struct ath_softc *sc,
(sc->nbcnvifs > 1) && (sc->nbcnvifs > 1) &&
(vif->type == NL80211_IFTYPE_AP) && (vif->type == NL80211_IFTYPE_AP) &&
(cur_conf->beacon_interval != bss_conf->beacon_int)) { (cur_conf->beacon_interval != bss_conf->beacon_int)) {
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG,
"Changing beacon interval of multiple \ "Changing beacon interval of multiple AP interfaces !\n");
AP interfaces !\n");
return false; return false;
} }
/* /*
...@@ -710,7 +706,7 @@ static bool ath9k_allow_beacon_config(struct ath_softc *sc, ...@@ -710,7 +706,7 @@ static bool ath9k_allow_beacon_config(struct ath_softc *sc,
*/ */
if ((sc->sc_ah->opmode == NL80211_IFTYPE_AP) && if ((sc->sc_ah->opmode == NL80211_IFTYPE_AP) &&
(vif->type != NL80211_IFTYPE_AP)) { (vif->type != NL80211_IFTYPE_AP)) {
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG,
"STA vif's beacon not allowed on AP mode\n"); "STA vif's beacon not allowed on AP mode\n");
return false; return false;
} }
...@@ -722,7 +718,7 @@ static bool ath9k_allow_beacon_config(struct ath_softc *sc, ...@@ -722,7 +718,7 @@ static bool ath9k_allow_beacon_config(struct ath_softc *sc,
(vif->type == NL80211_IFTYPE_STATION) && (vif->type == NL80211_IFTYPE_STATION) &&
(sc->sc_flags & SC_OP_BEACONS) && (sc->sc_flags & SC_OP_BEACONS) &&
!avp->primary_sta_vif) { !avp->primary_sta_vif) {
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG,
"Beacon already configured for a station interface\n"); "Beacon already configured for a station interface\n");
return false; return false;
} }
...@@ -802,8 +798,7 @@ void ath_set_beacon(struct ath_softc *sc) ...@@ -802,8 +798,7 @@ void ath_set_beacon(struct ath_softc *sc)
ath_beacon_config_sta(sc, cur_conf); ath_beacon_config_sta(sc, cur_conf);
break; break;
default: default:
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG, "Unsupported beaconing mode\n");
"Unsupported beaconing mode\n");
return; return;
} }
......
...@@ -313,8 +313,7 @@ void ath9k_hw_btcoex_bt_stomp(struct ath_hw *ah, ...@@ -313,8 +313,7 @@ void ath9k_hw_btcoex_bt_stomp(struct ath_hw *ah,
AR_STOMP_NONE_WLAN_WGHT); AR_STOMP_NONE_WLAN_WGHT);
break; break;
default: default:
ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX, ath_dbg(ath9k_hw_common(ah), BTCOEX, "Invalid Stomptype\n");
"Invalid Stomptype\n");
break; break;
} }
} }
......
...@@ -116,7 +116,7 @@ static void ath9k_hw_update_nfcal_hist_buffer(struct ath_hw *ah, ...@@ -116,7 +116,7 @@ static void ath9k_hw_update_nfcal_hist_buffer(struct ath_hw *ah,
if (h[i].privNF > limit->max) { if (h[i].privNF > limit->max) {
high_nf_mid = true; high_nf_mid = true;
ath_dbg(common, ATH_DBG_CALIBRATE, ath_dbg(common, CALIBRATE,
"NFmid[%d] (%d) > MAX (%d), %s\n", "NFmid[%d] (%d) > MAX (%d), %s\n",
i, h[i].privNF, limit->max, i, h[i].privNF, limit->max,
(cal->nfcal_interference ? (cal->nfcal_interference ?
...@@ -199,8 +199,7 @@ bool ath9k_hw_reset_calvalid(struct ath_hw *ah) ...@@ -199,8 +199,7 @@ bool ath9k_hw_reset_calvalid(struct ath_hw *ah)
return true; return true;
if (currCal->calState != CAL_DONE) { if (currCal->calState != CAL_DONE) {
ath_dbg(common, ATH_DBG_CALIBRATE, ath_dbg(common, CALIBRATE, "Calibration state incorrect, %d\n",
"Calibration state incorrect, %d\n",
currCal->calState); currCal->calState);
return true; return true;
} }
...@@ -208,8 +207,7 @@ bool ath9k_hw_reset_calvalid(struct ath_hw *ah) ...@@ -208,8 +207,7 @@ bool ath9k_hw_reset_calvalid(struct ath_hw *ah)
if (!(ah->supp_cals & currCal->calData->calType)) if (!(ah->supp_cals & currCal->calData->calType))
return true; return true;
ath_dbg(common, ATH_DBG_CALIBRATE, ath_dbg(common, CALIBRATE, "Resetting Cal %d state for channel %u\n",
"Resetting Cal %d state for channel %u\n",
currCal->calData->calType, conf->channel->center_freq); currCal->calData->calType, conf->channel->center_freq);
ah->caldata->CalValid &= ~currCal->calData->calType; ah->caldata->CalValid &= ~currCal->calData->calType;
...@@ -302,7 +300,7 @@ void ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan) ...@@ -302,7 +300,7 @@ void ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)
* noisefloor until the next calibration timer. * noisefloor until the next calibration timer.
*/ */
if (j == 10000) { if (j == 10000) {
ath_dbg(common, ATH_DBG_ANY, ath_dbg(common, ANY,
"Timeout while waiting for nf to load: AR_PHY_AGC_CONTROL=0x%x\n", "Timeout while waiting for nf to load: AR_PHY_AGC_CONTROL=0x%x\n",
REG_READ(ah, AR_PHY_AGC_CONTROL)); REG_READ(ah, AR_PHY_AGC_CONTROL));
return; return;
...@@ -344,17 +342,17 @@ static void ath9k_hw_nf_sanitize(struct ath_hw *ah, s16 *nf) ...@@ -344,17 +342,17 @@ static void ath9k_hw_nf_sanitize(struct ath_hw *ah, s16 *nf)
if (!nf[i]) if (!nf[i])
continue; continue;
ath_dbg(common, ATH_DBG_CALIBRATE, ath_dbg(common, CALIBRATE,
"NF calibrated [%s] [chain %d] is %d\n", "NF calibrated [%s] [chain %d] is %d\n",
(i >= 3 ? "ext" : "ctl"), i % 3, nf[i]); (i >= 3 ? "ext" : "ctl"), i % 3, nf[i]);
if (nf[i] > ATH9K_NF_TOO_HIGH) { if (nf[i] > ATH9K_NF_TOO_HIGH) {
ath_dbg(common, ATH_DBG_CALIBRATE, ath_dbg(common, CALIBRATE,
"NF[%d] (%d) > MAX (%d), correcting to MAX\n", "NF[%d] (%d) > MAX (%d), correcting to MAX\n",
i, nf[i], ATH9K_NF_TOO_HIGH); i, nf[i], ATH9K_NF_TOO_HIGH);
nf[i] = limit->max; nf[i] = limit->max;
} else if (nf[i] < limit->min) { } else if (nf[i] < limit->min) {
ath_dbg(common, ATH_DBG_CALIBRATE, ath_dbg(common, CALIBRATE,
"NF[%d] (%d) < MIN (%d), correcting to NOM\n", "NF[%d] (%d) < MIN (%d), correcting to NOM\n",
i, nf[i], limit->min); i, nf[i], limit->min);
nf[i] = limit->nominal; nf[i] = limit->nominal;
...@@ -373,7 +371,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan) ...@@ -373,7 +371,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan)
chan->channelFlags &= (~CHANNEL_CW_INT); chan->channelFlags &= (~CHANNEL_CW_INT);
if (REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF) { if (REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF) {
ath_dbg(common, ATH_DBG_CALIBRATE, ath_dbg(common, CALIBRATE,
"NF did not complete in calibration window\n"); "NF did not complete in calibration window\n");
return false; return false;
} }
...@@ -383,7 +381,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan) ...@@ -383,7 +381,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan)
nf = nfarray[0]; nf = nfarray[0];
if (ath9k_hw_get_nf_thresh(ah, c->band, &nfThresh) if (ath9k_hw_get_nf_thresh(ah, c->band, &nfThresh)
&& nf > nfThresh) { && nf > nfThresh) {
ath_dbg(common, ATH_DBG_CALIBRATE, ath_dbg(common, CALIBRATE,
"noise floor failed detected; detected %d, threshold %d\n", "noise floor failed detected; detected %d, threshold %d\n",
nf, nfThresh); nf, nfThresh);
chan->channelFlags |= CHANNEL_CW_INT; chan->channelFlags |= CHANNEL_CW_INT;
......
...@@ -305,8 +305,7 @@ void ath9k_hw_update_regulatory_maxpower(struct ath_hw *ah) ...@@ -305,8 +305,7 @@ void ath9k_hw_update_regulatory_maxpower(struct ath_hw *ah)
regulatory->max_power_level += INCREASE_MAXPOW_BY_THREE_CHAIN; regulatory->max_power_level += INCREASE_MAXPOW_BY_THREE_CHAIN;
break; break;
default: default:
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "Invalid chainmask configuration\n");
"Invalid chainmask configuration\n");
break; break;
} }
} }
......
...@@ -38,7 +38,7 @@ static bool __ath9k_hw_4k_fill_eeprom(struct ath_hw *ah) ...@@ -38,7 +38,7 @@ static bool __ath9k_hw_4k_fill_eeprom(struct ath_hw *ah)
for (addr = 0; addr < SIZE_EEPROM_4K; addr++) { for (addr = 0; addr < SIZE_EEPROM_4K; addr++) {
if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, eep_data)) { if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, eep_data)) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"Unable to read eeprom region\n"); "Unable to read eeprom region\n");
return false; return false;
} }
...@@ -62,8 +62,7 @@ static bool ath9k_hw_4k_fill_eeprom(struct ath_hw *ah) ...@@ -62,8 +62,7 @@ static bool ath9k_hw_4k_fill_eeprom(struct ath_hw *ah)
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
if (!ath9k_hw_use_flash(ah)) { if (!ath9k_hw_use_flash(ah)) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "Reading from EEPROM, not flash\n");
"Reading from EEPROM, not flash\n");
} }
if (common->bus_ops->ath_bus_type == ATH_USB) if (common->bus_ops->ath_bus_type == ATH_USB)
...@@ -204,8 +203,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) ...@@ -204,8 +203,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah)
return false; return false;
} }
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "Read Magic = 0x%04X\n", magic);
"Read Magic = 0x%04X\n", magic);
if (magic != AR5416_EEPROM_MAGIC) { if (magic != AR5416_EEPROM_MAGIC) {
magic2 = swab16(magic); magic2 = swab16(magic);
...@@ -227,7 +225,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) ...@@ -227,7 +225,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah)
} }
} }
ath_dbg(common, ATH_DBG_EEPROM, "need_swap = %s.\n", ath_dbg(common, EEPROM, "need_swap = %s\n",
need_swap ? "True" : "False"); need_swap ? "True" : "False");
if (need_swap) if (need_swap)
...@@ -249,7 +247,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah) ...@@ -249,7 +247,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah)
u32 integer; u32 integer;
u16 word; u16 word;
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"EEPROM Endianness is not native.. Changing\n"); "EEPROM Endianness is not native.. Changing\n");
word = swab16(eep->baseEepHeader.length); word = swab16(eep->baseEepHeader.length);
...@@ -435,11 +433,11 @@ static void ath9k_hw_set_4k_power_cal_table(struct ath_hw *ah, ...@@ -435,11 +433,11 @@ static void ath9k_hw_set_4k_power_cal_table(struct ath_hw *ah,
reg32 = get_unaligned_le32(&pdadcValues[4 * j]); reg32 = get_unaligned_le32(&pdadcValues[4 * j]);
REG_WRITE(ah, regOffset, reg32); REG_WRITE(ah, regOffset, reg32);
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"PDADC (%d,%4x): %4.4x %8.8x\n", "PDADC (%d,%4x): %4.4x %8.8x\n",
i, regChainOffset, regOffset, i, regChainOffset, regOffset,
reg32); reg32);
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"PDADC: Chain %d | " "PDADC: Chain %d | "
"PDADC %3d Value %3d | " "PDADC %3d Value %3d | "
"PDADC %3d Value %3d | " "PDADC %3d Value %3d | "
...@@ -1079,8 +1077,7 @@ static u16 ath9k_hw_4k_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz) ...@@ -1079,8 +1077,7 @@ static u16 ath9k_hw_4k_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)
u16 spur_val = AR_NO_SPUR; u16 spur_val = AR_NO_SPUR;
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "Getting spur idx:%d is2Ghz:%d val:%x\n",
"Getting spur idx:%d is2Ghz:%d val:%x\n",
i, is2GHz, ah->config.spurchans[i][is2GHz]); i, is2GHz, ah->config.spurchans[i][is2GHz]);
switch (ah->config.spurmode) { switch (ah->config.spurmode) {
...@@ -1088,8 +1085,8 @@ static u16 ath9k_hw_4k_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz) ...@@ -1088,8 +1085,8 @@ static u16 ath9k_hw_4k_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)
break; break;
case SPUR_ENABLE_IOCTL: case SPUR_ENABLE_IOCTL:
spur_val = ah->config.spurchans[i][is2GHz]; spur_val = ah->config.spurchans[i][is2GHz];
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "Getting spur val from new loc. %d\n",
"Getting spur val from new loc. %d\n", spur_val); spur_val);
break; break;
case SPUR_ENABLE_EEPROM: case SPUR_ENABLE_EEPROM:
spur_val = EEP_MAP4K_SPURCHAN; spur_val = EEP_MAP4K_SPURCHAN;
......
...@@ -41,7 +41,7 @@ static bool __ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah) ...@@ -41,7 +41,7 @@ static bool __ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)
for (addr = 0; addr < SIZE_EEPROM_AR9287; addr++) { for (addr = 0; addr < SIZE_EEPROM_AR9287; addr++) {
if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, if (!ath9k_hw_nvram_read(common, addr + eep_start_loc,
eep_data)) { eep_data)) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"Unable to read eeprom region\n"); "Unable to read eeprom region\n");
return false; return false;
} }
...@@ -66,8 +66,7 @@ static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah) ...@@ -66,8 +66,7 @@ static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
if (!ath9k_hw_use_flash(ah)) { if (!ath9k_hw_use_flash(ah)) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "Reading from EEPROM, not flash\n");
"Reading from EEPROM, not flash\n");
} }
if (common->bus_ops->ath_bus_type == ATH_USB) if (common->bus_ops->ath_bus_type == ATH_USB)
...@@ -197,8 +196,7 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah) ...@@ -197,8 +196,7 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah)
return false; return false;
} }
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "Read Magic = 0x%04X\n", magic);
"Read Magic = 0x%04X\n", magic);
if (magic != AR5416_EEPROM_MAGIC) { if (magic != AR5416_EEPROM_MAGIC) {
magic2 = swab16(magic); magic2 = swab16(magic);
...@@ -220,7 +218,7 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah) ...@@ -220,7 +218,7 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah)
} }
} }
ath_dbg(common, ATH_DBG_EEPROM, "need_swap = %s.\n", ath_dbg(common, EEPROM, "need_swap = %s\n",
need_swap ? "True" : "False"); need_swap ? "True" : "False");
if (need_swap) if (need_swap)
...@@ -1041,8 +1039,7 @@ static u16 ath9k_hw_ar9287_get_spur_channel(struct ath_hw *ah, ...@@ -1041,8 +1039,7 @@ static u16 ath9k_hw_ar9287_get_spur_channel(struct ath_hw *ah,
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
u16 spur_val = AR_NO_SPUR; u16 spur_val = AR_NO_SPUR;
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "Getting spur idx:%d is2Ghz:%d val:%x\n",
"Getting spur idx:%d is2Ghz:%d val:%x\n",
i, is2GHz, ah->config.spurchans[i][is2GHz]); i, is2GHz, ah->config.spurchans[i][is2GHz]);
switch (ah->config.spurmode) { switch (ah->config.spurmode) {
...@@ -1050,8 +1047,8 @@ static u16 ath9k_hw_ar9287_get_spur_channel(struct ath_hw *ah, ...@@ -1050,8 +1047,8 @@ static u16 ath9k_hw_ar9287_get_spur_channel(struct ath_hw *ah,
break; break;
case SPUR_ENABLE_IOCTL: case SPUR_ENABLE_IOCTL:
spur_val = ah->config.spurchans[i][is2GHz]; spur_val = ah->config.spurchans[i][is2GHz];
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "Getting spur val from new loc. %d\n",
"Getting spur val from new loc. %d\n", spur_val); spur_val);
break; break;
case SPUR_ENABLE_EEPROM: case SPUR_ENABLE_EEPROM:
spur_val = EEP_MAP9287_SPURCHAN; spur_val = EEP_MAP9287_SPURCHAN;
......
...@@ -121,8 +121,7 @@ static bool ath9k_hw_def_fill_eeprom(struct ath_hw *ah) ...@@ -121,8 +121,7 @@ static bool ath9k_hw_def_fill_eeprom(struct ath_hw *ah)
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
if (!ath9k_hw_use_flash(ah)) { if (!ath9k_hw_use_flash(ah)) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "Reading from EEPROM, not flash\n");
"Reading from EEPROM, not flash\n");
} }
if (common->bus_ops->ath_bus_type == ATH_USB) if (common->bus_ops->ath_bus_type == ATH_USB)
...@@ -279,8 +278,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah) ...@@ -279,8 +278,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)
} }
if (!ath9k_hw_use_flash(ah)) { if (!ath9k_hw_use_flash(ah)) {
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM, "Read Magic = 0x%04X\n", magic);
"Read Magic = 0x%04X\n", magic);
if (magic != AR5416_EEPROM_MAGIC) { if (magic != AR5416_EEPROM_MAGIC) {
magic2 = swab16(magic); magic2 = swab16(magic);
...@@ -303,7 +301,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah) ...@@ -303,7 +301,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)
} }
} }
ath_dbg(common, ATH_DBG_EEPROM, "need_swap = %s.\n", ath_dbg(common, EEPROM, "need_swap = %s\n",
need_swap ? "True" : "False"); need_swap ? "True" : "False");
if (need_swap) if (need_swap)
...@@ -325,7 +323,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah) ...@@ -325,7 +323,7 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)
u32 integer, j; u32 integer, j;
u16 word; u16 word;
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"EEPROM Endianness is not native.. Changing.\n"); "EEPROM Endianness is not native.. Changing.\n");
word = swab16(eep->baseEepHeader.length); word = swab16(eep->baseEepHeader.length);
...@@ -965,15 +963,12 @@ static void ath9k_hw_set_def_power_cal_table(struct ath_hw *ah, ...@@ -965,15 +963,12 @@ static void ath9k_hw_set_def_power_cal_table(struct ath_hw *ah,
reg32 = get_unaligned_le32(&pdadcValues[4 * j]); reg32 = get_unaligned_le32(&pdadcValues[4 * j]);
REG_WRITE(ah, regOffset, reg32); REG_WRITE(ah, regOffset, reg32);
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"PDADC (%d,%4x): %4.4x %8.8x\n", "PDADC (%d,%4x): %4.4x %8.8x\n",
i, regChainOffset, regOffset, i, regChainOffset, regOffset,
reg32); reg32);
ath_dbg(common, ATH_DBG_EEPROM, ath_dbg(common, EEPROM,
"PDADC: Chain %d | PDADC %3d " "PDADC: Chain %d | PDADC %3d Value %3d | PDADC %3d Value %3d | PDADC %3d Value %3d | PDADC %3d Value %3d |\n",
"Value %3d | PDADC %3d Value %3d | "
"PDADC %3d Value %3d | PDADC %3d "
"Value %3d |\n",
i, 4 * j, pdadcValues[4 * j], i, 4 * j, pdadcValues[4 * j],
4 * j + 1, pdadcValues[4 * j + 1], 4 * j + 1, pdadcValues[4 * j + 1],
4 * j + 2, pdadcValues[4 * j + 2], 4 * j + 2, pdadcValues[4 * j + 2],
...@@ -1278,7 +1273,7 @@ static void ath9k_hw_def_set_txpower(struct ath_hw *ah, ...@@ -1278,7 +1273,7 @@ static void ath9k_hw_def_set_txpower(struct ath_hw *ah,
regulatory->max_power_level += INCREASE_MAXPOW_BY_THREE_CHAIN; regulatory->max_power_level += INCREASE_MAXPOW_BY_THREE_CHAIN;
break; break;
default: default:
ath_dbg(ath9k_hw_common(ah), ATH_DBG_EEPROM, ath_dbg(ath9k_hw_common(ah), EEPROM,
"Invalid chainmask configuration\n"); "Invalid chainmask configuration\n");
break; break;
} }
...@@ -1396,8 +1391,7 @@ static u16 ath9k_hw_def_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz) ...@@ -1396,8 +1391,7 @@ static u16 ath9k_hw_def_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)
u16 spur_val = AR_NO_SPUR; u16 spur_val = AR_NO_SPUR;
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "Getting spur idx:%d is2Ghz:%d val:%x\n",
"Getting spur idx:%d is2Ghz:%d val:%x\n",
i, is2GHz, ah->config.spurchans[i][is2GHz]); i, is2GHz, ah->config.spurchans[i][is2GHz]);
switch (ah->config.spurmode) { switch (ah->config.spurmode) {
...@@ -1405,8 +1399,8 @@ static u16 ath9k_hw_def_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz) ...@@ -1405,8 +1399,8 @@ static u16 ath9k_hw_def_get_spur_channel(struct ath_hw *ah, u16 i, bool is2GHz)
break; break;
case SPUR_ENABLE_IOCTL: case SPUR_ENABLE_IOCTL:
spur_val = ah->config.spurchans[i][is2GHz]; spur_val = ah->config.spurchans[i][is2GHz];
ath_dbg(common, ATH_DBG_ANI, ath_dbg(common, ANI, "Getting spur val from new loc. %d\n",
"Getting spur val from new loc. %d\n", spur_val); spur_val);
break; break;
case SPUR_ENABLE_EEPROM: case SPUR_ENABLE_EEPROM:
spur_val = EEP_DEF_SPURCHAN; spur_val = EEP_DEF_SPURCHAN;
......
...@@ -130,12 +130,12 @@ static void ath_detect_bt_priority(struct ath_softc *sc) ...@@ -130,12 +130,12 @@ static void ath_detect_bt_priority(struct ath_softc *sc)
sc->sc_flags &= ~(SC_OP_BT_PRIORITY_DETECTED | SC_OP_BT_SCAN); sc->sc_flags &= ~(SC_OP_BT_PRIORITY_DETECTED | SC_OP_BT_SCAN);
/* Detect if colocated bt started scanning */ /* Detect if colocated bt started scanning */
if (btcoex->bt_priority_cnt >= ATH_BT_CNT_SCAN_THRESHOLD) { if (btcoex->bt_priority_cnt >= ATH_BT_CNT_SCAN_THRESHOLD) {
ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_BTCOEX, ath_dbg(ath9k_hw_common(sc->sc_ah), BTCOEX,
"BT scan detected\n"); "BT scan detected\n");
sc->sc_flags |= (SC_OP_BT_SCAN | sc->sc_flags |= (SC_OP_BT_SCAN |
SC_OP_BT_PRIORITY_DETECTED); SC_OP_BT_PRIORITY_DETECTED);
} else if (btcoex->bt_priority_cnt >= ATH_BT_CNT_THRESHOLD) { } else if (btcoex->bt_priority_cnt >= ATH_BT_CNT_THRESHOLD) {
ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_BTCOEX, ath_dbg(ath9k_hw_common(sc->sc_ah), BTCOEX,
"BT priority traffic detected\n"); "BT priority traffic detected\n");
sc->sc_flags |= SC_OP_BT_PRIORITY_DETECTED; sc->sc_flags |= SC_OP_BT_PRIORITY_DETECTED;
} }
...@@ -230,8 +230,7 @@ static void ath_btcoex_no_stomp_timer(void *arg) ...@@ -230,8 +230,7 @@ static void ath_btcoex_no_stomp_timer(void *arg)
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
bool is_btscan = sc->sc_flags & SC_OP_BT_SCAN; bool is_btscan = sc->sc_flags & SC_OP_BT_SCAN;
ath_dbg(common, ATH_DBG_BTCOEX, ath_dbg(common, BTCOEX, "no stomp timer running\n");
"no stomp timer running\n");
ath9k_ps_wakeup(sc); ath9k_ps_wakeup(sc);
spin_lock_bh(&btcoex->btcoex_lock); spin_lock_bh(&btcoex->btcoex_lock);
...@@ -280,8 +279,7 @@ void ath9k_btcoex_timer_resume(struct ath_softc *sc) ...@@ -280,8 +279,7 @@ void ath9k_btcoex_timer_resume(struct ath_softc *sc)
struct ath_btcoex *btcoex = &sc->btcoex; struct ath_btcoex *btcoex = &sc->btcoex;
struct ath_hw *ah = sc->sc_ah; struct ath_hw *ah = sc->sc_ah;
ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX, ath_dbg(ath9k_hw_common(ah), BTCOEX, "Starting btcoex timers\n");
"Starting btcoex timers\n");
/* make sure duty cycle timer is also stopped when resuming */ /* make sure duty cycle timer is also stopped when resuming */
if (btcoex->hw_timer_enabled) if (btcoex->hw_timer_enabled)
......
...@@ -167,9 +167,9 @@ static void ath9k_htc_beacon_config_sta(struct ath9k_htc_priv *priv, ...@@ -167,9 +167,9 @@ static void ath9k_htc_beacon_config_sta(struct ath9k_htc_priv *priv,
/* TSF out of range threshold fixed at 1 second */ /* TSF out of range threshold fixed at 1 second */
bs.bs_tsfoor_threshold = ATH9K_TSFOOR_THRESHOLD; bs.bs_tsfoor_threshold = ATH9K_TSFOOR_THRESHOLD;
ath_dbg(common, ATH_DBG_CONFIG, "intval: %u tsf: %llu tsftu: %u\n", ath_dbg(common, CONFIG, "intval: %u tsf: %llu tsftu: %u\n",
intval, tsf, tsftu); intval, tsf, tsftu);
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG,
"bmiss: %u sleep: %u cfp-period: %u maxdur: %u next: %u\n", "bmiss: %u sleep: %u cfp-period: %u maxdur: %u next: %u\n",
bs.bs_bmissthreshold, bs.bs_sleepduration, bs.bs_bmissthreshold, bs.bs_sleepduration,
bs.bs_cfpperiod, bs.bs_cfpmaxduration, bs.bs_cfpnext); bs.bs_cfpperiod, bs.bs_cfpmaxduration, bs.bs_cfpnext);
...@@ -224,9 +224,8 @@ static void ath9k_htc_beacon_config_ap(struct ath9k_htc_priv *priv, ...@@ -224,9 +224,8 @@ static void ath9k_htc_beacon_config_ap(struct ath9k_htc_priv *priv,
if (priv->op_flags & OP_ENABLE_BEACON) if (priv->op_flags & OP_ENABLE_BEACON)
imask |= ATH9K_INT_SWBA; imask |= ATH9K_INT_SWBA;
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG,
"AP Beacon config, intval: %d, nexttbtt: %u, resp_time: %d " "AP Beacon config, intval: %d, nexttbtt: %u, resp_time: %d imask: 0x%x\n",
"imask: 0x%x\n",
bss_conf->beacon_interval, nexttbtt, bss_conf->beacon_interval, nexttbtt,
priv->ah->config.sw_beacon_response_time, imask); priv->ah->config.sw_beacon_response_time, imask);
...@@ -273,9 +272,8 @@ static void ath9k_htc_beacon_config_adhoc(struct ath9k_htc_priv *priv, ...@@ -273,9 +272,8 @@ static void ath9k_htc_beacon_config_adhoc(struct ath9k_htc_priv *priv,
if (priv->op_flags & OP_ENABLE_BEACON) if (priv->op_flags & OP_ENABLE_BEACON)
imask |= ATH9K_INT_SWBA; imask |= ATH9K_INT_SWBA;
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG,
"IBSS Beacon config, intval: %d, nexttbtt: %u, " "IBSS Beacon config, intval: %d, nexttbtt: %u, resp_time: %d, imask: 0x%x\n",
"resp_time: %d, imask: 0x%x\n",
bss_conf->beacon_interval, nexttbtt, bss_conf->beacon_interval, nexttbtt,
priv->ah->config.sw_beacon_response_time, imask); priv->ah->config.sw_beacon_response_time, imask);
...@@ -323,7 +321,7 @@ static void ath9k_htc_send_buffered(struct ath9k_htc_priv *priv, ...@@ -323,7 +321,7 @@ static void ath9k_htc_send_buffered(struct ath9k_htc_priv *priv,
tx_slot = ath9k_htc_tx_get_slot(priv); tx_slot = ath9k_htc_tx_get_slot(priv);
if (tx_slot < 0) { if (tx_slot < 0) {
ath_dbg(common, ATH_DBG_XMIT, "No free CAB slot\n"); ath_dbg(common, XMIT, "No free CAB slot\n");
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
goto next; goto next;
} }
...@@ -333,8 +331,7 @@ static void ath9k_htc_send_buffered(struct ath9k_htc_priv *priv, ...@@ -333,8 +331,7 @@ static void ath9k_htc_send_buffered(struct ath9k_htc_priv *priv,
ath9k_htc_tx_clear_slot(priv, tx_slot); ath9k_htc_tx_clear_slot(priv, tx_slot);
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
ath_dbg(common, ATH_DBG_XMIT, ath_dbg(common, XMIT, "Failed to send CAB frame\n");
"Failed to send CAB frame\n");
} else { } else {
spin_lock_bh(&priv->tx.tx_lock); spin_lock_bh(&priv->tx.tx_lock);
priv->tx.queued_cnt++; priv->tx.queued_cnt++;
...@@ -409,7 +406,7 @@ static void ath9k_htc_send_beacon(struct ath9k_htc_priv *priv, ...@@ -409,7 +406,7 @@ static void ath9k_htc_send_beacon(struct ath9k_htc_priv *priv,
ret = htc_send(priv->htc, beacon); ret = htc_send(priv->htc, beacon);
if (ret != 0) { if (ret != 0) {
if (ret == -ENOMEM) { if (ret == -ENOMEM) {
ath_dbg(common, ATH_DBG_BSTUCK, ath_dbg(common, BSTUCK,
"Failed to send beacon, no free TX buffer\n"); "Failed to send beacon, no free TX buffer\n");
} }
dev_kfree_skb_any(beacon); dev_kfree_skb_any(beacon);
...@@ -434,7 +431,7 @@ static int ath9k_htc_choose_bslot(struct ath9k_htc_priv *priv, ...@@ -434,7 +431,7 @@ static int ath9k_htc_choose_bslot(struct ath9k_htc_priv *priv,
slot = ((tsftu % intval) * ATH9K_HTC_MAX_BCN_VIF) / intval; slot = ((tsftu % intval) * ATH9K_HTC_MAX_BCN_VIF) / intval;
slot = ATH9K_HTC_MAX_BCN_VIF - slot - 1; slot = ATH9K_HTC_MAX_BCN_VIF - slot - 1;
ath_dbg(common, ATH_DBG_BEACON, ath_dbg(common, BEACON,
"Choose slot: %d, tsf: %llu, tsftu: %u, intval: %u\n", "Choose slot: %d, tsf: %llu, tsftu: %u, intval: %u\n",
slot, tsf, tsftu, intval); slot, tsf, tsftu, intval);
...@@ -450,8 +447,7 @@ void ath9k_htc_swba(struct ath9k_htc_priv *priv, ...@@ -450,8 +447,7 @@ void ath9k_htc_swba(struct ath9k_htc_priv *priv,
if (swba->beacon_pending != 0) { if (swba->beacon_pending != 0) {
priv->cur_beacon_conf.bmiss_cnt++; priv->cur_beacon_conf.bmiss_cnt++;
if (priv->cur_beacon_conf.bmiss_cnt > BSTUCK_THRESHOLD) { if (priv->cur_beacon_conf.bmiss_cnt > BSTUCK_THRESHOLD) {
ath_dbg(common, ATH_DBG_BSTUCK, ath_dbg(common, BSTUCK, "Beacon stuck, HW reset\n");
"Beacon stuck, HW reset\n");
ieee80211_queue_work(priv->hw, ieee80211_queue_work(priv->hw,
&priv->fatal_work); &priv->fatal_work);
} }
...@@ -459,7 +455,7 @@ void ath9k_htc_swba(struct ath9k_htc_priv *priv, ...@@ -459,7 +455,7 @@ void ath9k_htc_swba(struct ath9k_htc_priv *priv,
} }
if (priv->cur_beacon_conf.bmiss_cnt) { if (priv->cur_beacon_conf.bmiss_cnt) {
ath_dbg(common, ATH_DBG_BSTUCK, ath_dbg(common, BSTUCK,
"Resuming beacon xmit after %u misses\n", "Resuming beacon xmit after %u misses\n",
priv->cur_beacon_conf.bmiss_cnt); priv->cur_beacon_conf.bmiss_cnt);
priv->cur_beacon_conf.bmiss_cnt = 0; priv->cur_beacon_conf.bmiss_cnt = 0;
...@@ -495,8 +491,8 @@ void ath9k_htc_assign_bslot(struct ath9k_htc_priv *priv, ...@@ -495,8 +491,8 @@ void ath9k_htc_assign_bslot(struct ath9k_htc_priv *priv,
priv->cur_beacon_conf.bslot[avp->bslot] = vif; priv->cur_beacon_conf.bslot[avp->bslot] = vif;
spin_unlock_bh(&priv->beacon_lock); spin_unlock_bh(&priv->beacon_lock);
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG, "Added interface at beacon slot: %d\n",
"Added interface at beacon slot: %d\n", avp->bslot); avp->bslot);
} }
void ath9k_htc_remove_bslot(struct ath9k_htc_priv *priv, void ath9k_htc_remove_bslot(struct ath9k_htc_priv *priv,
...@@ -509,8 +505,8 @@ void ath9k_htc_remove_bslot(struct ath9k_htc_priv *priv, ...@@ -509,8 +505,8 @@ void ath9k_htc_remove_bslot(struct ath9k_htc_priv *priv,
priv->cur_beacon_conf.bslot[avp->bslot] = NULL; priv->cur_beacon_conf.bslot[avp->bslot] = NULL;
spin_unlock_bh(&priv->beacon_lock); spin_unlock_bh(&priv->beacon_lock);
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG, "Removed interface at beacon slot: %d\n",
"Removed interface at beacon slot: %d\n", avp->bslot); avp->bslot);
} }
/* /*
...@@ -536,8 +532,7 @@ void ath9k_htc_set_tsfadjust(struct ath9k_htc_priv *priv, ...@@ -536,8 +532,7 @@ void ath9k_htc_set_tsfadjust(struct ath9k_htc_priv *priv,
tsfadjust = cur_conf->beacon_interval * avp->bslot / ATH9K_HTC_MAX_BCN_VIF; tsfadjust = cur_conf->beacon_interval * avp->bslot / ATH9K_HTC_MAX_BCN_VIF;
avp->tsfadjust = cpu_to_le64(TU_TO_USEC(tsfadjust)); avp->tsfadjust = cpu_to_le64(TU_TO_USEC(tsfadjust));
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG, "tsfadjust is: %llu for bslot: %d\n",
"tsfadjust is: %llu for bslot: %d\n",
(unsigned long long)tsfadjust, avp->bslot); (unsigned long long)tsfadjust, avp->bslot);
} }
...@@ -568,7 +563,7 @@ static bool ath9k_htc_check_beacon_config(struct ath9k_htc_priv *priv, ...@@ -568,7 +563,7 @@ static bool ath9k_htc_check_beacon_config(struct ath9k_htc_priv *priv,
(priv->num_ap_vif > 1) && (priv->num_ap_vif > 1) &&
(vif->type == NL80211_IFTYPE_AP) && (vif->type == NL80211_IFTYPE_AP) &&
(cur_conf->beacon_interval != bss_conf->beacon_int)) { (cur_conf->beacon_interval != bss_conf->beacon_int)) {
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG,
"Changing beacon interval of multiple AP interfaces !\n"); "Changing beacon interval of multiple AP interfaces !\n");
return false; return false;
} }
...@@ -579,7 +574,7 @@ static bool ath9k_htc_check_beacon_config(struct ath9k_htc_priv *priv, ...@@ -579,7 +574,7 @@ static bool ath9k_htc_check_beacon_config(struct ath9k_htc_priv *priv,
*/ */
if (priv->num_ap_vif && if (priv->num_ap_vif &&
(vif->type != NL80211_IFTYPE_AP)) { (vif->type != NL80211_IFTYPE_AP)) {
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG,
"HW in AP mode, cannot set STA beacon parameters\n"); "HW in AP mode, cannot set STA beacon parameters\n");
return false; return false;
} }
...@@ -597,7 +592,7 @@ static bool ath9k_htc_check_beacon_config(struct ath9k_htc_priv *priv, ...@@ -597,7 +592,7 @@ static bool ath9k_htc_check_beacon_config(struct ath9k_htc_priv *priv,
&beacon_configured); &beacon_configured);
if (beacon_configured) { if (beacon_configured) {
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG,
"Beacon already configured for a station interface\n"); "Beacon already configured for a station interface\n");
return false; return false;
} }
...@@ -637,8 +632,7 @@ void ath9k_htc_beacon_config(struct ath9k_htc_priv *priv, ...@@ -637,8 +632,7 @@ void ath9k_htc_beacon_config(struct ath9k_htc_priv *priv,
ath9k_htc_beacon_config_ap(priv, cur_conf); ath9k_htc_beacon_config_ap(priv, cur_conf);
break; break;
default: default:
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG, "Unsupported beaconing mode\n");
"Unsupported beaconing mode\n");
return; return;
} }
} }
...@@ -659,8 +653,7 @@ void ath9k_htc_beacon_reconfig(struct ath9k_htc_priv *priv) ...@@ -659,8 +653,7 @@ void ath9k_htc_beacon_reconfig(struct ath9k_htc_priv *priv)
ath9k_htc_beacon_config_ap(priv, cur_conf); ath9k_htc_beacon_config_ap(priv, cur_conf);
break; break;
default: default:
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG, "Unsupported beaconing mode\n");
"Unsupported beaconing mode\n");
return; return;
} }
} }
...@@ -36,12 +36,12 @@ static void ath_detect_bt_priority(struct ath9k_htc_priv *priv) ...@@ -36,12 +36,12 @@ static void ath_detect_bt_priority(struct ath9k_htc_priv *priv)
priv->op_flags &= ~(OP_BT_PRIORITY_DETECTED | OP_BT_SCAN); priv->op_flags &= ~(OP_BT_PRIORITY_DETECTED | OP_BT_SCAN);
/* Detect if colocated bt started scanning */ /* Detect if colocated bt started scanning */
if (btcoex->bt_priority_cnt >= ATH_BT_CNT_SCAN_THRESHOLD) { if (btcoex->bt_priority_cnt >= ATH_BT_CNT_SCAN_THRESHOLD) {
ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX, ath_dbg(ath9k_hw_common(ah), BTCOEX,
"BT scan detected\n"); "BT scan detected\n");
priv->op_flags |= (OP_BT_SCAN | priv->op_flags |= (OP_BT_SCAN |
OP_BT_PRIORITY_DETECTED); OP_BT_PRIORITY_DETECTED);
} else if (btcoex->bt_priority_cnt >= ATH_BT_CNT_THRESHOLD) { } else if (btcoex->bt_priority_cnt >= ATH_BT_CNT_THRESHOLD) {
ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX, ath_dbg(ath9k_hw_common(ah), BTCOEX,
"BT priority traffic detected\n"); "BT priority traffic detected\n");
priv->op_flags |= OP_BT_PRIORITY_DETECTED; priv->op_flags |= OP_BT_PRIORITY_DETECTED;
} }
...@@ -102,8 +102,7 @@ static void ath_btcoex_duty_cycle_work(struct work_struct *work) ...@@ -102,8 +102,7 @@ static void ath_btcoex_duty_cycle_work(struct work_struct *work)
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
bool is_btscan = priv->op_flags & OP_BT_SCAN; bool is_btscan = priv->op_flags & OP_BT_SCAN;
ath_dbg(common, ATH_DBG_BTCOEX, ath_dbg(common, BTCOEX, "time slice work for bt and wlan\n");
"time slice work for bt and wlan\n");
if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_LOW || is_btscan) if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_LOW || is_btscan)
ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_NONE); ath9k_hw_btcoex_bt_stomp(ah, ATH_BTCOEX_STOMP_NONE);
...@@ -134,7 +133,7 @@ void ath_htc_resume_btcoex_work(struct ath9k_htc_priv *priv) ...@@ -134,7 +133,7 @@ void ath_htc_resume_btcoex_work(struct ath9k_htc_priv *priv)
struct ath_btcoex *btcoex = &priv->btcoex; struct ath_btcoex *btcoex = &priv->btcoex;
struct ath_hw *ah = priv->ah; struct ath_hw *ah = priv->ah;
ath_dbg(ath9k_hw_common(ah), ATH_DBG_BTCOEX, "Starting btcoex work\n"); ath_dbg(ath9k_hw_common(ah), BTCOEX, "Starting btcoex work\n");
btcoex->bt_priority_cnt = 0; btcoex->bt_priority_cnt = 0;
btcoex->bt_priority_time = jiffies; btcoex->bt_priority_time = jiffies;
......
...@@ -299,8 +299,7 @@ static unsigned int ath9k_regread(void *hw_priv, u32 reg_offset) ...@@ -299,8 +299,7 @@ static unsigned int ath9k_regread(void *hw_priv, u32 reg_offset)
(u8 *) &val, sizeof(val), (u8 *) &val, sizeof(val),
100); 100);
if (unlikely(r)) { if (unlikely(r)) {
ath_dbg(common, ATH_DBG_WMI, ath_dbg(common, WMI, "REGISTER READ FAILED: (0x%04x, %d)\n",
"REGISTER READ FAILED: (0x%04x, %d)\n",
reg_offset, r); reg_offset, r);
return -EIO; return -EIO;
} }
...@@ -327,7 +326,7 @@ static void ath9k_multi_regread(void *hw_priv, u32 *addr, ...@@ -327,7 +326,7 @@ static void ath9k_multi_regread(void *hw_priv, u32 *addr,
(u8 *)tmpval, sizeof(u32) * count, (u8 *)tmpval, sizeof(u32) * count,
100); 100);
if (unlikely(ret)) { if (unlikely(ret)) {
ath_dbg(common, ATH_DBG_WMI, ath_dbg(common, WMI,
"Multiple REGISTER READ FAILED (count: %d)\n", count); "Multiple REGISTER READ FAILED (count: %d)\n", count);
} }
...@@ -352,8 +351,7 @@ static void ath9k_regwrite_single(void *hw_priv, u32 val, u32 reg_offset) ...@@ -352,8 +351,7 @@ static void ath9k_regwrite_single(void *hw_priv, u32 val, u32 reg_offset)
(u8 *) &val, sizeof(val), (u8 *) &val, sizeof(val),
100); 100);
if (unlikely(r)) { if (unlikely(r)) {
ath_dbg(common, ATH_DBG_WMI, ath_dbg(common, WMI, "REGISTER WRITE FAILED:(0x%04x, %d)\n",
"REGISTER WRITE FAILED:(0x%04x, %d)\n",
reg_offset, r); reg_offset, r);
} }
} }
...@@ -384,7 +382,7 @@ static void ath9k_regwrite_buffer(void *hw_priv, u32 val, u32 reg_offset) ...@@ -384,7 +382,7 @@ static void ath9k_regwrite_buffer(void *hw_priv, u32 val, u32 reg_offset)
(u8 *) &rsp_status, sizeof(rsp_status), (u8 *) &rsp_status, sizeof(rsp_status),
100); 100);
if (unlikely(r)) { if (unlikely(r)) {
ath_dbg(common, ATH_DBG_WMI, ath_dbg(common, WMI,
"REGISTER WRITE FAILED, multi len: %d\n", "REGISTER WRITE FAILED, multi len: %d\n",
priv->wmi->multi_write_idx); priv->wmi->multi_write_idx);
} }
...@@ -434,7 +432,7 @@ static void ath9k_regwrite_flush(void *hw_priv) ...@@ -434,7 +432,7 @@ static void ath9k_regwrite_flush(void *hw_priv)
(u8 *) &rsp_status, sizeof(rsp_status), (u8 *) &rsp_status, sizeof(rsp_status),
100); 100);
if (unlikely(r)) { if (unlikely(r)) {
ath_dbg(common, ATH_DBG_WMI, ath_dbg(common, WMI,
"REGISTER WRITE FAILED, multi len: %d\n", "REGISTER WRITE FAILED, multi len: %d\n",
priv->wmi->multi_write_idx); priv->wmi->multi_write_idx);
} }
...@@ -512,8 +510,7 @@ static void setup_ht_cap(struct ath9k_htc_priv *priv, ...@@ -512,8 +510,7 @@ static void setup_ht_cap(struct ath9k_htc_priv *priv,
tx_streams = ath9k_cmn_count_streams(priv->ah->txchainmask, 2); tx_streams = ath9k_cmn_count_streams(priv->ah->txchainmask, 2);
rx_streams = ath9k_cmn_count_streams(priv->ah->rxchainmask, 2); rx_streams = ath9k_cmn_count_streams(priv->ah->rxchainmask, 2);
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG, "TX streams %d, RX streams: %d\n",
"TX streams %d, RX streams: %d\n",
tx_streams, rx_streams); tx_streams, rx_streams);
if (tx_streams != rx_streams) { if (tx_streams != rx_streams) {
...@@ -876,9 +873,8 @@ static int ath9k_init_device(struct ath9k_htc_priv *priv, ...@@ -876,9 +873,8 @@ static int ath9k_init_device(struct ath9k_htc_priv *priv,
goto err_world; goto err_world;
} }
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG,
"WMI:%d, BCN:%d, CAB:%d, UAPSD:%d, MGMT:%d, " "WMI:%d, BCN:%d, CAB:%d, UAPSD:%d, MGMT:%d, BE:%d, BK:%d, VI:%d, VO:%d\n",
"BE:%d, BK:%d, VI:%d, VO:%d\n",
priv->wmi_cmd_ep, priv->wmi_cmd_ep,
priv->beacon_ep, priv->beacon_ep,
priv->cab_ep, priv->cab_ep,
......
...@@ -355,7 +355,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv, ...@@ -355,7 +355,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,
vif_idx = avp->index; vif_idx = avp->index;
} else { } else {
if (!priv->ah->is_monitoring) { if (!priv->ah->is_monitoring) {
ath_dbg(ath9k_hw_common(priv->ah), ATH_DBG_XMIT, ath_dbg(ath9k_hw_common(priv->ah), XMIT,
"VIF is null, but no monitor interface !\n"); "VIF is null, but no monitor interface !\n");
return -EINVAL; return -EINVAL;
} }
...@@ -620,8 +620,7 @@ static struct sk_buff* ath9k_htc_tx_get_packet(struct ath9k_htc_priv *priv, ...@@ -620,8 +620,7 @@ static struct sk_buff* ath9k_htc_tx_get_packet(struct ath9k_htc_priv *priv,
} }
spin_unlock_irqrestore(&epid_queue->lock, flags); spin_unlock_irqrestore(&epid_queue->lock, flags);
ath_dbg(common, ATH_DBG_XMIT, ath_dbg(common, XMIT, "No matching packet for cookie: %d, epid: %d\n",
"No matching packet for cookie: %d, epid: %d\n",
txs->cookie, epid); txs->cookie, epid);
return NULL; return NULL;
...@@ -705,8 +704,7 @@ static inline bool check_packet(struct ath9k_htc_priv *priv, struct sk_buff *skb ...@@ -705,8 +704,7 @@ static inline bool check_packet(struct ath9k_htc_priv *priv, struct sk_buff *skb
if (time_after(jiffies, if (time_after(jiffies,
tx_ctl->timestamp + tx_ctl->timestamp +
msecs_to_jiffies(ATH9K_HTC_TX_TIMEOUT_INTERVAL))) { msecs_to_jiffies(ATH9K_HTC_TX_TIMEOUT_INTERVAL))) {
ath_dbg(common, ATH_DBG_XMIT, ath_dbg(common, XMIT, "Dropping a packet due to TX timeout\n");
"Dropping a packet due to TX timeout\n");
return true; return true;
} }
...@@ -753,7 +751,7 @@ void ath9k_htc_tx_cleanup_timer(unsigned long data) ...@@ -753,7 +751,7 @@ void ath9k_htc_tx_cleanup_timer(unsigned long data)
skb = ath9k_htc_tx_get_packet(priv, &event->txs); skb = ath9k_htc_tx_get_packet(priv, &event->txs);
if (skb) { if (skb) {
ath_dbg(common, ATH_DBG_XMIT, ath_dbg(common, XMIT,
"Found packet for cookie: %d, epid: %d\n", "Found packet for cookie: %d, epid: %d\n",
event->txs.cookie, event->txs.cookie,
MS(event->txs.ts_rate, ATH9K_HTC_TXSTAT_EPID)); MS(event->txs.ts_rate, ATH9K_HTC_TXSTAT_EPID));
...@@ -1167,8 +1165,7 @@ void ath9k_htc_rxep(void *drv_priv, struct sk_buff *skb, ...@@ -1167,8 +1165,7 @@ void ath9k_htc_rxep(void *drv_priv, struct sk_buff *skb,
spin_unlock(&priv->rx.rxbuflock); spin_unlock(&priv->rx.rxbuflock);
if (rxbuf == NULL) { if (rxbuf == NULL) {
ath_dbg(common, ATH_DBG_ANY, ath_dbg(common, ANY, "No free RX buffer\n");
"No free RX buffer\n");
goto err; goto err;
} }
......
...@@ -133,7 +133,7 @@ bool ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout) ...@@ -133,7 +133,7 @@ bool ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout)
udelay(AH_TIME_QUANTUM); udelay(AH_TIME_QUANTUM);
} }
ath_dbg(ath9k_hw_common(ah), ATH_DBG_ANY, ath_dbg(ath9k_hw_common(ah), ANY,
"timeout (%d us) on reg 0x%x: 0x%08x & 0x%08x != 0x%08x\n", "timeout (%d us) on reg 0x%x: 0x%08x & 0x%08x != 0x%08x\n",
timeout, reg, REG_READ(ah, reg), mask, val); timeout, reg, REG_READ(ah, reg), mask, val);
...@@ -491,8 +491,7 @@ static int ath9k_hw_post_init(struct ath_hw *ah) ...@@ -491,8 +491,7 @@ static int ath9k_hw_post_init(struct ath_hw *ah)
if (ecode != 0) if (ecode != 0)
return ecode; return ecode;
ath_dbg(ath9k_hw_common(ah), ATH_DBG_CONFIG, ath_dbg(ath9k_hw_common(ah), CONFIG, "Eeprom VER: %d, REV: %d\n",
"Eeprom VER: %d, REV: %d\n",
ah->eep_ops->get_eeprom_ver(ah), ah->eep_ops->get_eeprom_ver(ah),
ah->eep_ops->get_eeprom_rev(ah)); ah->eep_ops->get_eeprom_rev(ah));
...@@ -567,7 +566,7 @@ static int __ath9k_hw_init(struct ath_hw *ah) ...@@ -567,7 +566,7 @@ static int __ath9k_hw_init(struct ath_hw *ah)
} }
} }
ath_dbg(common, ATH_DBG_RESET, "serialize_regmode is %d\n", ath_dbg(common, RESET, "serialize_regmode is %d\n",
ah->config.serialize_regmode); ah->config.serialize_regmode);
if (AR_SREV_9285(ah) || AR_SREV_9271(ah)) if (AR_SREV_9285(ah) || AR_SREV_9271(ah))
...@@ -958,8 +957,8 @@ static void ath9k_hw_set_cts_timeout(struct ath_hw *ah, u32 us) ...@@ -958,8 +957,8 @@ static void ath9k_hw_set_cts_timeout(struct ath_hw *ah, u32 us)
static bool ath9k_hw_set_global_txtimeout(struct ath_hw *ah, u32 tu) static bool ath9k_hw_set_global_txtimeout(struct ath_hw *ah, u32 tu)
{ {
if (tu > 0xFFFF) { if (tu > 0xFFFF) {
ath_dbg(ath9k_hw_common(ah), ATH_DBG_XMIT, ath_dbg(ath9k_hw_common(ah), XMIT, "bad global tx timeout %u\n",
"bad global tx timeout %u\n", tu); tu);
ah->globaltxtimeout = (u32) -1; ah->globaltxtimeout = (u32) -1;
return false; return false;
} else { } else {
...@@ -980,7 +979,7 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah) ...@@ -980,7 +979,7 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah)
int rx_lat = 0, tx_lat = 0, eifs = 0; int rx_lat = 0, tx_lat = 0, eifs = 0;
u32 reg; u32 reg;
ath_dbg(ath9k_hw_common(ah), ATH_DBG_RESET, "ah->misc_mode 0x%x\n", ath_dbg(ath9k_hw_common(ah), RESET, "ah->misc_mode 0x%x\n",
ah->misc_mode); ah->misc_mode);
if (!chan) if (!chan)
...@@ -1275,7 +1274,7 @@ static bool ath9k_hw_set_reset(struct ath_hw *ah, int type) ...@@ -1275,7 +1274,7 @@ static bool ath9k_hw_set_reset(struct ath_hw *ah, int type)
(npend || type == ATH9K_RESET_COLD)) { (npend || type == ATH9K_RESET_COLD)) {
int reset_err = 0; int reset_err = 0;
ath_dbg(ath9k_hw_common(ah), ATH_DBG_RESET, ath_dbg(ath9k_hw_common(ah), RESET,
"reset MAC via external reset\n"); "reset MAC via external reset\n");
reset_err = ah->external_reset(); reset_err = ah->external_reset();
...@@ -1298,8 +1297,7 @@ static bool ath9k_hw_set_reset(struct ath_hw *ah, int type) ...@@ -1298,8 +1297,7 @@ static bool ath9k_hw_set_reset(struct ath_hw *ah, int type)
REG_WRITE(ah, AR_RTC_RC, 0); REG_WRITE(ah, AR_RTC_RC, 0);
if (!ath9k_hw_wait(ah, AR_RTC_RC, AR_RTC_RC_M, 0, AH_WAIT_TIMEOUT)) { if (!ath9k_hw_wait(ah, AR_RTC_RC, AR_RTC_RC_M, 0, AH_WAIT_TIMEOUT)) {
ath_dbg(ath9k_hw_common(ah), ATH_DBG_RESET, ath_dbg(ath9k_hw_common(ah), RESET, "RTC stuck in MAC reset\n");
"RTC stuck in MAC reset\n");
return false; return false;
} }
...@@ -1344,8 +1342,7 @@ static bool ath9k_hw_set_reset_power_on(struct ath_hw *ah) ...@@ -1344,8 +1342,7 @@ static bool ath9k_hw_set_reset_power_on(struct ath_hw *ah)
AR_RTC_STATUS_M, AR_RTC_STATUS_M,
AR_RTC_STATUS_ON, AR_RTC_STATUS_ON,
AH_WAIT_TIMEOUT)) { AH_WAIT_TIMEOUT)) {
ath_dbg(ath9k_hw_common(ah), ATH_DBG_RESET, ath_dbg(ath9k_hw_common(ah), RESET, "RTC not waking up\n");
"RTC not waking up\n");
return false; return false;
} }
...@@ -1418,7 +1415,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah, ...@@ -1418,7 +1415,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
for (qnum = 0; qnum < AR_NUM_QCU; qnum++) { for (qnum = 0; qnum < AR_NUM_QCU; qnum++) {
if (ath9k_hw_numtxpending(ah, qnum)) { if (ath9k_hw_numtxpending(ah, qnum)) {
ath_dbg(common, ATH_DBG_QUEUE, ath_dbg(common, QUEUE,
"Transmit frames pending on queue %d\n", qnum); "Transmit frames pending on queue %d\n", qnum);
return false; return false;
} }
...@@ -1536,7 +1533,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, ...@@ -1536,7 +1533,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
if (mci_hw->bt_state == MCI_BT_CAL_START) { if (mci_hw->bt_state == MCI_BT_CAL_START) {
u32 payload[4] = {0, 0, 0, 0}; u32 payload[4] = {0, 0, 0, 0};
ath_dbg(common, ATH_DBG_MCI, "MCI stop rx for BT CAL"); ath_dbg(common, MCI, "MCI stop rx for BT CAL\n");
mci_hw->bt_state = MCI_BT_CAL; mci_hw->bt_state = MCI_BT_CAL;
...@@ -1548,23 +1545,22 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, ...@@ -1548,23 +1545,22 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
ar9003_mci_disable_interrupt(ah); ar9003_mci_disable_interrupt(ah);
ath_dbg(common, ATH_DBG_MCI, "send WLAN_CAL_GRANT"); ath_dbg(common, MCI, "send WLAN_CAL_GRANT\n");
MCI_GPM_SET_CAL_TYPE(payload, MCI_GPM_WLAN_CAL_GRANT); MCI_GPM_SET_CAL_TYPE(payload, MCI_GPM_WLAN_CAL_GRANT);
ar9003_mci_send_message(ah, MCI_GPM, 0, payload, ar9003_mci_send_message(ah, MCI_GPM, 0, payload,
16, true, false); 16, true, false);
ath_dbg(common, ATH_DBG_MCI, "\nMCI BT is calibrating"); ath_dbg(common, MCI, "\nMCI BT is calibrating\n");
/* Wait BT calibration to be completed for 25ms */ /* Wait BT calibration to be completed for 25ms */
if (ar9003_mci_wait_for_gpm(ah, MCI_GPM_BT_CAL_DONE, if (ar9003_mci_wait_for_gpm(ah, MCI_GPM_BT_CAL_DONE,
0, 25000)) 0, 25000))
ath_dbg(common, ATH_DBG_MCI, ath_dbg(common, MCI,
"MCI got BT_CAL_DONE\n"); "MCI got BT_CAL_DONE\n");
else else
ath_dbg(common, ATH_DBG_MCI, ath_dbg(common, MCI,
"MCI ### BT cal takes to long, force" "MCI ### BT cal takes to long, force bt_state to be bt_awake\n");
"bt_state to be bt_awake\n");
mci_hw->bt_state = MCI_BT_AWAKE; mci_hw->bt_state = MCI_BT_AWAKE;
/* MCI FIX: enable mci interrupt here */ /* MCI FIX: enable mci interrupt here */
ar9003_mci_enable_interrupt(ah); ar9003_mci_enable_interrupt(ah);
...@@ -1825,14 +1821,13 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, ...@@ -1825,14 +1821,13 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
* message exchanges again and recal. * message exchanges again and recal.
*/ */
ath_dbg(common, ATH_DBG_MCI, "MCI BT wakes up" ath_dbg(common, MCI,
"during WLAN calibration\n"); "MCI BT wakes up during WLAN calibration\n");
REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_RAW, REG_WRITE(ah, AR_MCI_INTERRUPT_RX_MSG_RAW,
AR_MCI_INTERRUPT_RX_MSG_REMOTE_RESET | AR_MCI_INTERRUPT_RX_MSG_REMOTE_RESET |
AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE); AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE);
ath_dbg(common, ATH_DBG_MCI, "MCI send" ath_dbg(common, MCI, "MCI send REMOTE_RESET\n");
"REMOTE_RESET\n");
ar9003_mci_remote_reset(ah, true); ar9003_mci_remote_reset(ah, true);
ar9003_mci_send_sys_waking(ah, true); ar9003_mci_send_sys_waking(ah, true);
udelay(1); udelay(1);
...@@ -1841,7 +1836,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, ...@@ -1841,7 +1836,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
mci_hw->bt_state = MCI_BT_AWAKE; mci_hw->bt_state = MCI_BT_AWAKE;
ath_dbg(common, ATH_DBG_MCI, "MCI re-cal\n"); ath_dbg(common, MCI, "MCI re-cal\n");
if (caldata) { if (caldata) {
caldata->done_txiqcal_once = false; caldata->done_txiqcal_once = false;
...@@ -1871,14 +1866,14 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, ...@@ -1871,14 +1866,14 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
u32 mask; u32 mask;
mask = REG_READ(ah, AR_CFG); mask = REG_READ(ah, AR_CFG);
if (mask & (AR_CFG_SWRB | AR_CFG_SWTB | AR_CFG_SWRG)) { if (mask & (AR_CFG_SWRB | AR_CFG_SWTB | AR_CFG_SWRG)) {
ath_dbg(common, ATH_DBG_RESET, ath_dbg(common, RESET, "CFG Byte Swap Set 0x%x\n",
"CFG Byte Swap Set 0x%x\n", mask); mask);
} else { } else {
mask = mask =
INIT_CONFIG_STATUS | AR_CFG_SWRB | AR_CFG_SWTB; INIT_CONFIG_STATUS | AR_CFG_SWRB | AR_CFG_SWTB;
REG_WRITE(ah, AR_CFG, mask); REG_WRITE(ah, AR_CFG, mask);
ath_dbg(common, ATH_DBG_RESET, ath_dbg(common, RESET, "Setting CFG 0x%x\n",
"Setting CFG 0x%x\n", REG_READ(ah, AR_CFG)); REG_READ(ah, AR_CFG));
} }
} else { } else {
if (common->bus_ops->ath_bus_type == ATH_USB) { if (common->bus_ops->ath_bus_type == ATH_USB) {
...@@ -2090,7 +2085,7 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode) ...@@ -2090,7 +2085,7 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
if (ah->power_mode == mode) if (ah->power_mode == mode)
return status; return status;
ath_dbg(common, ATH_DBG_RESET, "%s -> %s\n", ath_dbg(common, RESET, "%s -> %s\n",
modes[ah->power_mode], modes[mode]); modes[ah->power_mode], modes[mode]);
switch (mode) { switch (mode) {
...@@ -2107,8 +2102,8 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode) ...@@ -2107,8 +2102,8 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
if (ar9003_mci_state(ah, MCI_STATE_ENABLE, NULL) && if (ar9003_mci_state(ah, MCI_STATE_ENABLE, NULL) &&
(mci->bt_state != MCI_BT_SLEEP) && (mci->bt_state != MCI_BT_SLEEP) &&
!mci->halted_bt_gpm) { !mci->halted_bt_gpm) {
ath_dbg(common, ATH_DBG_MCI, "MCI halt BT GPM" ath_dbg(common, MCI,
"(full_sleep)"); "MCI halt BT GPM (full_sleep)\n");
ar9003_mci_send_coex_halt_bt_gpm(ah, ar9003_mci_send_coex_halt_bt_gpm(ah,
true, true); true, true);
} }
...@@ -2174,9 +2169,8 @@ void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period) ...@@ -2174,9 +2169,8 @@ void ath9k_hw_beaconinit(struct ath_hw *ah, u32 next_beacon, u32 beacon_period)
AR_TBTT_TIMER_EN | AR_DBA_TIMER_EN | AR_SWBA_TIMER_EN; AR_TBTT_TIMER_EN | AR_DBA_TIMER_EN | AR_SWBA_TIMER_EN;
break; break;
default: default:
ath_dbg(ath9k_hw_common(ah), ATH_DBG_BEACON, ath_dbg(ath9k_hw_common(ah), BEACON,
"%s: unsupported opmode: %d\n", "%s: unsupported opmode: %d\n", __func__, ah->opmode);
__func__, ah->opmode);
return; return;
break; break;
} }
...@@ -2227,10 +2221,10 @@ void ath9k_hw_set_sta_beacon_timers(struct ath_hw *ah, ...@@ -2227,10 +2221,10 @@ void ath9k_hw_set_sta_beacon_timers(struct ath_hw *ah,
else else
nextTbtt = bs->bs_nexttbtt; nextTbtt = bs->bs_nexttbtt;
ath_dbg(common, ATH_DBG_BEACON, "next DTIM %d\n", bs->bs_nextdtim); ath_dbg(common, BEACON, "next DTIM %d\n", bs->bs_nextdtim);
ath_dbg(common, ATH_DBG_BEACON, "next beacon %d\n", nextTbtt); ath_dbg(common, BEACON, "next beacon %d\n", nextTbtt);
ath_dbg(common, ATH_DBG_BEACON, "beacon period %d\n", beaconintval); ath_dbg(common, BEACON, "beacon period %d\n", beaconintval);
ath_dbg(common, ATH_DBG_BEACON, "DTIM period %d\n", dtimperiod); ath_dbg(common, BEACON, "DTIM period %d\n", dtimperiod);
ENABLE_REGWRITE_BUFFER(ah); ENABLE_REGWRITE_BUFFER(ah);
...@@ -2322,8 +2316,8 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah) ...@@ -2322,8 +2316,8 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
regulatory->current_rd += 5; regulatory->current_rd += 5;
else if (regulatory->current_rd == 0x41) else if (regulatory->current_rd == 0x41)
regulatory->current_rd = 0x43; regulatory->current_rd = 0x43;
ath_dbg(common, ATH_DBG_REGULATORY, ath_dbg(common, REGULATORY, "regdomain mapped to 0x%x\n",
"regdomain mapped to 0x%x\n", regulatory->current_rd); regulatory->current_rd);
} }
eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE); eeval = ah->eep_ops->get_eeprom(ah, EEP_OP_MODE);
...@@ -2848,7 +2842,7 @@ void ath9k_hw_reset_tsf(struct ath_hw *ah) ...@@ -2848,7 +2842,7 @@ void ath9k_hw_reset_tsf(struct ath_hw *ah)
{ {
if (!ath9k_hw_wait(ah, AR_SLP32_MODE, AR_SLP32_TSF_WRITE_STATUS, 0, if (!ath9k_hw_wait(ah, AR_SLP32_MODE, AR_SLP32_TSF_WRITE_STATUS, 0,
AH_TSF_WRITE_TIMEOUT)) AH_TSF_WRITE_TIMEOUT))
ath_dbg(ath9k_hw_common(ah), ATH_DBG_RESET, ath_dbg(ath9k_hw_common(ah), RESET,
"AR_SLP32_TSF_WRITE_STATUS limit exceeded\n"); "AR_SLP32_TSF_WRITE_STATUS limit exceeded\n");
REG_WRITE(ah, AR_RESET_TSF, AR_RESET_TSF_ONCE); REG_WRITE(ah, AR_RESET_TSF, AR_RESET_TSF_ONCE);
...@@ -2973,7 +2967,7 @@ void ath9k_hw_gen_timer_start(struct ath_hw *ah, ...@@ -2973,7 +2967,7 @@ void ath9k_hw_gen_timer_start(struct ath_hw *ah,
timer_next = tsf + trig_timeout; timer_next = tsf + trig_timeout;
ath_dbg(ath9k_hw_common(ah), ATH_DBG_HWTIMER, ath_dbg(ath9k_hw_common(ah), HWTIMER,
"current tsf %x period %x timer_next %x\n", "current tsf %x period %x timer_next %x\n",
tsf, timer_period, timer_next); tsf, timer_period, timer_next);
...@@ -3062,8 +3056,8 @@ void ath_gen_timer_isr(struct ath_hw *ah) ...@@ -3062,8 +3056,8 @@ void ath_gen_timer_isr(struct ath_hw *ah)
index = rightmost_index(timer_table, &thresh_mask); index = rightmost_index(timer_table, &thresh_mask);
timer = timer_table->timers[index]; timer = timer_table->timers[index];
BUG_ON(!timer); BUG_ON(!timer);
ath_dbg(common, ATH_DBG_HWTIMER, ath_dbg(common, HWTIMER, "TSF overflow for Gen timer %d\n",
"TSF overflow for Gen timer %d\n", index); index);
timer->overflow(timer->arg); timer->overflow(timer->arg);
} }
...@@ -3071,7 +3065,7 @@ void ath_gen_timer_isr(struct ath_hw *ah) ...@@ -3071,7 +3065,7 @@ void ath_gen_timer_isr(struct ath_hw *ah)
index = rightmost_index(timer_table, &trigger_mask); index = rightmost_index(timer_table, &trigger_mask);
timer = timer_table->timers[index]; timer = timer_table->timers[index];
BUG_ON(!timer); BUG_ON(!timer);
ath_dbg(common, ATH_DBG_HWTIMER, ath_dbg(common, HWTIMER,
"Gen timer[%d] trigger\n", index); "Gen timer[%d] trigger\n", index);
timer->trigger(timer->arg); timer->trigger(timer->arg);
} }
......
...@@ -276,8 +276,7 @@ static void setup_ht_cap(struct ath_softc *sc, ...@@ -276,8 +276,7 @@ static void setup_ht_cap(struct ath_softc *sc,
tx_streams = ath9k_cmn_count_streams(ah->txchainmask, max_streams); tx_streams = ath9k_cmn_count_streams(ah->txchainmask, max_streams);
rx_streams = ath9k_cmn_count_streams(ah->rxchainmask, max_streams); rx_streams = ath9k_cmn_count_streams(ah->rxchainmask, max_streams);
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG, "TX streams %d, RX streams: %d\n",
"TX streams %d, RX streams: %d\n",
tx_streams, rx_streams); tx_streams, rx_streams);
if (tx_streams != rx_streams) { if (tx_streams != rx_streams) {
...@@ -329,7 +328,7 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, ...@@ -329,7 +328,7 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd,
struct ath_buf *bf; struct ath_buf *bf;
int i, bsize, error, desc_len; int i, bsize, error, desc_len;
ath_dbg(common, ATH_DBG_CONFIG, "%s DMA: %u buffers %u desc/buf\n", ath_dbg(common, CONFIG, "%s DMA: %u buffers %u desc/buf\n",
name, nbuf, ndesc); name, nbuf, ndesc);
INIT_LIST_HEAD(head); INIT_LIST_HEAD(head);
...@@ -375,7 +374,7 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd, ...@@ -375,7 +374,7 @@ int ath_descdma_setup(struct ath_softc *sc, struct ath_descdma *dd,
goto fail; goto fail;
} }
ds = (u8 *) dd->dd_desc; ds = (u8 *) dd->dd_desc;
ath_dbg(common, ATH_DBG_CONFIG, "%s DMA map: %p (%u) -> %llx (%u)\n", ath_dbg(common, CONFIG, "%s DMA map: %p (%u) -> %llx (%u)\n",
name, ds, (u32) dd->dd_desc_len, name, ds, (u32) dd->dd_desc_len,
ito64(dd->dd_desc_paddr), /*XXX*/(u32) dd->dd_desc_len); ito64(dd->dd_desc_paddr), /*XXX*/(u32) dd->dd_desc_len);
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
static void ath9k_hw_set_txq_interrupts(struct ath_hw *ah, static void ath9k_hw_set_txq_interrupts(struct ath_hw *ah,
struct ath9k_tx_queue_info *qi) struct ath9k_tx_queue_info *qi)
{ {
ath_dbg(ath9k_hw_common(ah), ATH_DBG_INTERRUPT, ath_dbg(ath9k_hw_common(ah), INTERRUPT,
"tx ok 0x%x err 0x%x desc 0x%x eol 0x%x urn 0x%x\n", "tx ok 0x%x err 0x%x desc 0x%x eol 0x%x urn 0x%x\n",
ah->txok_interrupt_mask, ah->txerr_interrupt_mask, ah->txok_interrupt_mask, ah->txerr_interrupt_mask,
ah->txdesc_interrupt_mask, ah->txeol_interrupt_mask, ah->txdesc_interrupt_mask, ah->txeol_interrupt_mask,
...@@ -57,8 +57,7 @@ EXPORT_SYMBOL(ath9k_hw_puttxbuf); ...@@ -57,8 +57,7 @@ EXPORT_SYMBOL(ath9k_hw_puttxbuf);
void ath9k_hw_txstart(struct ath_hw *ah, u32 q) void ath9k_hw_txstart(struct ath_hw *ah, u32 q)
{ {
ath_dbg(ath9k_hw_common(ah), ATH_DBG_QUEUE, ath_dbg(ath9k_hw_common(ah), QUEUE, "Enable TXE on queue: %u\n", q);
"Enable TXE on queue: %u\n", q);
REG_WRITE(ah, AR_Q_TXE, 1 << q); REG_WRITE(ah, AR_Q_TXE, 1 << q);
} }
EXPORT_SYMBOL(ath9k_hw_txstart); EXPORT_SYMBOL(ath9k_hw_txstart);
...@@ -202,12 +201,12 @@ bool ath9k_hw_set_txq_props(struct ath_hw *ah, int q, ...@@ -202,12 +201,12 @@ bool ath9k_hw_set_txq_props(struct ath_hw *ah, int q,
qi = &ah->txq[q]; qi = &ah->txq[q];
if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) {
ath_dbg(common, ATH_DBG_QUEUE, ath_dbg(common, QUEUE,
"Set TXQ properties, inactive queue: %u\n", q); "Set TXQ properties, inactive queue: %u\n", q);
return false; return false;
} }
ath_dbg(common, ATH_DBG_QUEUE, "Set queue properties for: %u\n", q); ath_dbg(common, QUEUE, "Set queue properties for: %u\n", q);
qi->tqi_ver = qinfo->tqi_ver; qi->tqi_ver = qinfo->tqi_ver;
qi->tqi_subtype = qinfo->tqi_subtype; qi->tqi_subtype = qinfo->tqi_subtype;
...@@ -266,7 +265,7 @@ bool ath9k_hw_get_txq_props(struct ath_hw *ah, int q, ...@@ -266,7 +265,7 @@ bool ath9k_hw_get_txq_props(struct ath_hw *ah, int q,
qi = &ah->txq[q]; qi = &ah->txq[q];
if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) {
ath_dbg(common, ATH_DBG_QUEUE, ath_dbg(common, QUEUE,
"Get TXQ properties, inactive queue: %u\n", q); "Get TXQ properties, inactive queue: %u\n", q);
return false; return false;
} }
...@@ -325,7 +324,7 @@ int ath9k_hw_setuptxqueue(struct ath_hw *ah, enum ath9k_tx_queue type, ...@@ -325,7 +324,7 @@ int ath9k_hw_setuptxqueue(struct ath_hw *ah, enum ath9k_tx_queue type,
return -1; return -1;
} }
ath_dbg(common, ATH_DBG_QUEUE, "Setup TX queue: %u\n", q); ath_dbg(common, QUEUE, "Setup TX queue: %u\n", q);
qi = &ah->txq[q]; qi = &ah->txq[q];
if (qi->tqi_type != ATH9K_TX_QUEUE_INACTIVE) { if (qi->tqi_type != ATH9K_TX_QUEUE_INACTIVE) {
...@@ -348,12 +347,11 @@ bool ath9k_hw_releasetxqueue(struct ath_hw *ah, u32 q) ...@@ -348,12 +347,11 @@ bool ath9k_hw_releasetxqueue(struct ath_hw *ah, u32 q)
qi = &ah->txq[q]; qi = &ah->txq[q];
if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) {
ath_dbg(common, ATH_DBG_QUEUE, ath_dbg(common, QUEUE, "Release TXQ, inactive queue: %u\n", q);
"Release TXQ, inactive queue: %u\n", q);
return false; return false;
} }
ath_dbg(common, ATH_DBG_QUEUE, "Release TX queue: %u\n", q); ath_dbg(common, QUEUE, "Release TX queue: %u\n", q);
qi->tqi_type = ATH9K_TX_QUEUE_INACTIVE; qi->tqi_type = ATH9K_TX_QUEUE_INACTIVE;
ah->txok_interrupt_mask &= ~(1 << q); ah->txok_interrupt_mask &= ~(1 << q);
...@@ -376,12 +374,11 @@ bool ath9k_hw_resettxqueue(struct ath_hw *ah, u32 q) ...@@ -376,12 +374,11 @@ bool ath9k_hw_resettxqueue(struct ath_hw *ah, u32 q)
qi = &ah->txq[q]; qi = &ah->txq[q];
if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) {
ath_dbg(common, ATH_DBG_QUEUE, ath_dbg(common, QUEUE, "Reset TXQ, inactive queue: %u\n", q);
"Reset TXQ, inactive queue: %u\n", q);
return true; return true;
} }
ath_dbg(common, ATH_DBG_QUEUE, "Reset TX queue: %u\n", q); ath_dbg(common, QUEUE, "Reset TX queue: %u\n", q);
if (qi->tqi_cwmin == ATH9K_TXQ_USEDEFAULT) { if (qi->tqi_cwmin == ATH9K_TXQ_USEDEFAULT) {
if (chan && IS_CHAN_B(chan)) if (chan && IS_CHAN_B(chan))
...@@ -784,7 +781,7 @@ void ath9k_hw_disable_interrupts(struct ath_hw *ah) ...@@ -784,7 +781,7 @@ void ath9k_hw_disable_interrupts(struct ath_hw *ah)
else else
atomic_dec(&ah->intr_ref_cnt); atomic_dec(&ah->intr_ref_cnt);
ath_dbg(common, ATH_DBG_INTERRUPT, "disable IER\n"); ath_dbg(common, INTERRUPT, "disable IER\n");
REG_WRITE(ah, AR_IER, AR_IER_DISABLE); REG_WRITE(ah, AR_IER, AR_IER_DISABLE);
(void) REG_READ(ah, AR_IER); (void) REG_READ(ah, AR_IER);
if (!AR_SREV_9100(ah)) { if (!AR_SREV_9100(ah)) {
...@@ -807,8 +804,7 @@ void ath9k_hw_enable_interrupts(struct ath_hw *ah) ...@@ -807,8 +804,7 @@ void ath9k_hw_enable_interrupts(struct ath_hw *ah)
return; return;
if (!atomic_inc_and_test(&ah->intr_ref_cnt)) { if (!atomic_inc_and_test(&ah->intr_ref_cnt)) {
ath_dbg(common, ATH_DBG_INTERRUPT, ath_dbg(common, INTERRUPT, "Do not enable IER ref count %d\n",
"Do not enable IER ref count %d\n",
atomic_read(&ah->intr_ref_cnt)); atomic_read(&ah->intr_ref_cnt));
return; return;
} }
...@@ -821,7 +817,7 @@ void ath9k_hw_enable_interrupts(struct ath_hw *ah) ...@@ -821,7 +817,7 @@ void ath9k_hw_enable_interrupts(struct ath_hw *ah)
if (ah->imask & ATH9K_INT_MCI) if (ah->imask & ATH9K_INT_MCI)
async_mask |= AR_INTR_ASYNC_MASK_MCI; async_mask |= AR_INTR_ASYNC_MASK_MCI;
ath_dbg(common, ATH_DBG_INTERRUPT, "enable IER\n"); ath_dbg(common, INTERRUPT, "enable IER\n");
REG_WRITE(ah, AR_IER, AR_IER_ENABLE); REG_WRITE(ah, AR_IER, AR_IER_ENABLE);
if (!AR_SREV_9100(ah)) { if (!AR_SREV_9100(ah)) {
REG_WRITE(ah, AR_INTR_ASYNC_ENABLE, async_mask); REG_WRITE(ah, AR_INTR_ASYNC_ENABLE, async_mask);
...@@ -830,7 +826,7 @@ void ath9k_hw_enable_interrupts(struct ath_hw *ah) ...@@ -830,7 +826,7 @@ void ath9k_hw_enable_interrupts(struct ath_hw *ah)
REG_WRITE(ah, AR_INTR_SYNC_ENABLE, sync_default); REG_WRITE(ah, AR_INTR_SYNC_ENABLE, sync_default);
REG_WRITE(ah, AR_INTR_SYNC_MASK, sync_default); REG_WRITE(ah, AR_INTR_SYNC_MASK, sync_default);
} }
ath_dbg(common, ATH_DBG_INTERRUPT, "AR_IMR 0x%x IER 0x%x\n", ath_dbg(common, INTERRUPT, "AR_IMR 0x%x IER 0x%x\n",
REG_READ(ah, AR_IMR), REG_READ(ah, AR_IER)); REG_READ(ah, AR_IMR), REG_READ(ah, AR_IER));
} }
EXPORT_SYMBOL(ath9k_hw_enable_interrupts); EXPORT_SYMBOL(ath9k_hw_enable_interrupts);
...@@ -845,7 +841,7 @@ void ath9k_hw_set_interrupts(struct ath_hw *ah) ...@@ -845,7 +841,7 @@ void ath9k_hw_set_interrupts(struct ath_hw *ah)
if (!(ints & ATH9K_INT_GLOBAL)) if (!(ints & ATH9K_INT_GLOBAL))
ath9k_hw_disable_interrupts(ah); ath9k_hw_disable_interrupts(ah);
ath_dbg(common, ATH_DBG_INTERRUPT, "New interrupt mask 0x%x\n", ints); ath_dbg(common, INTERRUPT, "New interrupt mask 0x%x\n", ints);
mask = ints & ATH9K_INT_COMMON; mask = ints & ATH9K_INT_COMMON;
mask2 = 0; mask2 = 0;
...@@ -908,7 +904,7 @@ void ath9k_hw_set_interrupts(struct ath_hw *ah) ...@@ -908,7 +904,7 @@ void ath9k_hw_set_interrupts(struct ath_hw *ah)
mask2 |= AR_IMR_S2_CST; mask2 |= AR_IMR_S2_CST;
} }
ath_dbg(common, ATH_DBG_INTERRUPT, "new IMR 0x%x\n", mask); ath_dbg(common, INTERRUPT, "new IMR 0x%x\n", mask);
REG_WRITE(ah, AR_IMR, mask); REG_WRITE(ah, AR_IMR, mask);
ah->imrs2_reg &= ~(AR_IMR_S2_TIM | AR_IMR_S2_DTIM | AR_IMR_S2_DTIMSYNC | ah->imrs2_reg &= ~(AR_IMR_S2_TIM | AR_IMR_S2_DTIM | AR_IMR_S2_DTIMSYNC |
AR_IMR_S2_CABEND | AR_IMR_S2_CABTO | AR_IMR_S2_CABEND | AR_IMR_S2_CABTO |
......
This diff is collapsed.
This diff is collapsed.
...@@ -1199,7 +1199,7 @@ struct ath_rate_table *ath_choose_rate_table(struct ath_softc *sc, ...@@ -1199,7 +1199,7 @@ struct ath_rate_table *ath_choose_rate_table(struct ath_softc *sc,
return &ar5416_11na_ratetable; return &ar5416_11na_ratetable;
return &ar5416_11a_ratetable; return &ar5416_11a_ratetable;
default: default:
ath_dbg(common, ATH_DBG_CONFIG, "Invalid band\n"); ath_dbg(common, CONFIG, "Invalid band\n");
return NULL; return NULL;
} }
} }
...@@ -1276,8 +1276,7 @@ static void ath_rc_init(struct ath_softc *sc, ...@@ -1276,8 +1276,7 @@ static void ath_rc_init(struct ath_softc *sc,
ath_rc_priv->valid_rate_index[k-1]; ath_rc_priv->valid_rate_index[k-1];
ath_rc_priv->rate_table = rate_table; ath_rc_priv->rate_table = rate_table;
ath_dbg(common, ATH_DBG_CONFIG, ath_dbg(common, CONFIG, "RC Initialized with capabilities: 0x%x\n",
"RC Initialized with capabilities: 0x%x\n",
ath_rc_priv->ht_cap); ath_rc_priv->ht_cap);
} }
...@@ -1474,7 +1473,7 @@ static void ath_rate_update(void *priv, struct ieee80211_supported_band *sband, ...@@ -1474,7 +1473,7 @@ static void ath_rate_update(void *priv, struct ieee80211_supported_band *sband,
oper_cw40, oper_sgi); oper_cw40, oper_sgi);
ath_rc_init(sc, priv_sta, sband, sta, rate_table); ath_rc_init(sc, priv_sta, sband, sta, rate_table);
ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_CONFIG, ath_dbg(ath9k_hw_common(sc->sc_ah), CONFIG,
"Operating HT Bandwidth changed to: %d\n", "Operating HT Bandwidth changed to: %d\n",
sc->hw->conf.channel_type); sc->hw->conf.channel_type);
} }
......
...@@ -172,7 +172,7 @@ static void ath_rx_addbuffer_edma(struct ath_softc *sc, ...@@ -172,7 +172,7 @@ static void ath_rx_addbuffer_edma(struct ath_softc *sc,
u32 nbuf = 0; u32 nbuf = 0;
if (list_empty(&sc->rx.rxbuf)) { if (list_empty(&sc->rx.rxbuf)) {
ath_dbg(common, ATH_DBG_QUEUE, "No free rx buf available\n"); ath_dbg(common, QUEUE, "No free rx buf available\n");
return; return;
} }
...@@ -337,7 +337,7 @@ int ath_rx_init(struct ath_softc *sc, int nbufs) ...@@ -337,7 +337,7 @@ int ath_rx_init(struct ath_softc *sc, int nbufs)
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) { if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
return ath_rx_edma_init(sc, nbufs); return ath_rx_edma_init(sc, nbufs);
} else { } else {
ath_dbg(common, ATH_DBG_CONFIG, "cachelsz %u rxbufsize %u\n", ath_dbg(common, CONFIG, "cachelsz %u rxbufsize %u\n",
common->cachelsz, common->rx_bufsize); common->cachelsz, common->rx_bufsize);
/* Initialize rx descriptors */ /* Initialize rx descriptors */
...@@ -591,7 +591,7 @@ static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb) ...@@ -591,7 +591,7 @@ static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb)
if (sc->ps_flags & PS_BEACON_SYNC) { if (sc->ps_flags & PS_BEACON_SYNC) {
sc->ps_flags &= ~PS_BEACON_SYNC; sc->ps_flags &= ~PS_BEACON_SYNC;
ath_dbg(common, ATH_DBG_PS, ath_dbg(common, PS,
"Reconfigure Beacon timers based on timestamp from the AP\n"); "Reconfigure Beacon timers based on timestamp from the AP\n");
ath_set_beacon(sc); ath_set_beacon(sc);
} }
...@@ -604,7 +604,7 @@ static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb) ...@@ -604,7 +604,7 @@ static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb)
* a backup trigger for returning into NETWORK SLEEP state, * a backup trigger for returning into NETWORK SLEEP state,
* so we are waiting for it as well. * so we are waiting for it as well.
*/ */
ath_dbg(common, ATH_DBG_PS, ath_dbg(common, PS,
"Received DTIM beacon indicating buffered broadcast/multicast frame(s)\n"); "Received DTIM beacon indicating buffered broadcast/multicast frame(s)\n");
sc->ps_flags |= PS_WAIT_FOR_CAB | PS_WAIT_FOR_BEACON; sc->ps_flags |= PS_WAIT_FOR_CAB | PS_WAIT_FOR_BEACON;
return; return;
...@@ -617,8 +617,7 @@ static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb) ...@@ -617,8 +617,7 @@ static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb)
* been delivered. * been delivered.
*/ */
sc->ps_flags &= ~PS_WAIT_FOR_CAB; sc->ps_flags &= ~PS_WAIT_FOR_CAB;
ath_dbg(common, ATH_DBG_PS, ath_dbg(common, PS, "PS wait for CAB frames timed out\n");
"PS wait for CAB frames timed out\n");
} }
} }
...@@ -643,13 +642,13 @@ static void ath_rx_ps(struct ath_softc *sc, struct sk_buff *skb, bool mybeacon) ...@@ -643,13 +642,13 @@ static void ath_rx_ps(struct ath_softc *sc, struct sk_buff *skb, bool mybeacon)
* point. * point.
*/ */
sc->ps_flags &= ~(PS_WAIT_FOR_CAB | PS_WAIT_FOR_BEACON); sc->ps_flags &= ~(PS_WAIT_FOR_CAB | PS_WAIT_FOR_BEACON);
ath_dbg(common, ATH_DBG_PS, ath_dbg(common, PS,
"All PS CAB frames received, back to sleep\n"); "All PS CAB frames received, back to sleep\n");
} else if ((sc->ps_flags & PS_WAIT_FOR_PSPOLL_DATA) && } else if ((sc->ps_flags & PS_WAIT_FOR_PSPOLL_DATA) &&
!is_multicast_ether_addr(hdr->addr1) && !is_multicast_ether_addr(hdr->addr1) &&
!ieee80211_has_morefrags(hdr->frame_control)) { !ieee80211_has_morefrags(hdr->frame_control)) {
sc->ps_flags &= ~PS_WAIT_FOR_PSPOLL_DATA; sc->ps_flags &= ~PS_WAIT_FOR_PSPOLL_DATA;
ath_dbg(common, ATH_DBG_PS, ath_dbg(common, PS,
"Going back to sleep after having received PS-Poll data (0x%lx)\n", "Going back to sleep after having received PS-Poll data (0x%lx)\n",
sc->ps_flags & (PS_WAIT_FOR_BEACON | sc->ps_flags & (PS_WAIT_FOR_BEACON |
PS_WAIT_FOR_CAB | PS_WAIT_FOR_CAB |
...@@ -932,7 +931,7 @@ static int ath9k_process_rate(struct ath_common *common, ...@@ -932,7 +931,7 @@ static int ath9k_process_rate(struct ath_common *common,
* No valid hardware bitrate found -- we should not get here * No valid hardware bitrate found -- we should not get here
* because hardware has already validated this frame as OK. * because hardware has already validated this frame as OK.
*/ */
ath_dbg(common, ATH_DBG_ANY, ath_dbg(common, ANY,
"unsupported hw bitrate detected 0x%02x using 1 Mbit\n", "unsupported hw bitrate detected 0x%02x using 1 Mbit\n",
rx_stats->rs_rate); rx_stats->rs_rate);
......
...@@ -187,7 +187,7 @@ void ath9k_fatal_work(struct work_struct *work) ...@@ -187,7 +187,7 @@ void ath9k_fatal_work(struct work_struct *work)
fatal_work); fatal_work);
struct ath_common *common = ath9k_hw_common(priv->ah); struct ath_common *common = ath9k_hw_common(priv->ah);
ath_dbg(common, ATH_DBG_FATAL, "FATAL Event received, resetting device\n"); ath_dbg(common, FATAL, "FATAL Event received, resetting device\n");
ath9k_htc_reset(priv); ath9k_htc_reset(priv);
} }
...@@ -330,8 +330,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id, ...@@ -330,8 +330,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
time_left = wait_for_completion_timeout(&wmi->cmd_wait, timeout); time_left = wait_for_completion_timeout(&wmi->cmd_wait, timeout);
if (!time_left) { if (!time_left) {
ath_dbg(common, ATH_DBG_WMI, ath_dbg(common, WMI, "Timeout waiting for WMI command: %s\n",
"Timeout waiting for WMI command: %s\n",
wmi_cmd_to_name(cmd_id)); wmi_cmd_to_name(cmd_id));
mutex_unlock(&wmi->op_mutex); mutex_unlock(&wmi->op_mutex);
return -ETIMEDOUT; return -ETIMEDOUT;
...@@ -342,8 +341,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id, ...@@ -342,8 +341,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id,
return 0; return 0;
out: out:
ath_dbg(common, ATH_DBG_WMI, ath_dbg(common, WMI, "WMI failure for: %s\n", wmi_cmd_to_name(cmd_id));
"WMI failure for: %s\n", wmi_cmd_to_name(cmd_id));
mutex_unlock(&wmi->op_mutex); mutex_unlock(&wmi->op_mutex);
kfree_skb(skb); kfree_skb(skb);
......
...@@ -1626,8 +1626,8 @@ static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq, ...@@ -1626,8 +1626,8 @@ static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq,
bf = list_first_entry(head, struct ath_buf, list); bf = list_first_entry(head, struct ath_buf, list);
bf_last = list_entry(head->prev, struct ath_buf, list); bf_last = list_entry(head->prev, struct ath_buf, list);
ath_dbg(common, ATH_DBG_QUEUE, ath_dbg(common, QUEUE, "qnum: %d, txq depth: %d\n",
"qnum: %d, txq depth: %d\n", txq->axq_qnum, txq->axq_depth); txq->axq_qnum, txq->axq_depth);
if (edma && list_empty(&txq->txq_fifo[txq->txq_headidx])) { if (edma && list_empty(&txq->txq_fifo[txq->txq_headidx])) {
list_splice_tail_init(head, &txq->txq_fifo[txq->txq_headidx]); list_splice_tail_init(head, &txq->txq_fifo[txq->txq_headidx]);
...@@ -1638,8 +1638,7 @@ static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq, ...@@ -1638,8 +1638,7 @@ static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq,
if (txq->axq_link) { if (txq->axq_link) {
ath9k_hw_set_desc_link(ah, txq->axq_link, bf->bf_daddr); ath9k_hw_set_desc_link(ah, txq->axq_link, bf->bf_daddr);
ath_dbg(common, ATH_DBG_XMIT, ath_dbg(common, XMIT, "link[%u] (%p)=%llx (%p)\n",
"link[%u] (%p)=%llx (%p)\n",
txq->axq_qnum, txq->axq_link, txq->axq_qnum, txq->axq_link,
ito64(bf->bf_daddr), bf->bf_desc); ito64(bf->bf_daddr), bf->bf_desc);
} else if (!edma) } else if (!edma)
...@@ -1651,7 +1650,7 @@ static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq, ...@@ -1651,7 +1650,7 @@ static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq,
if (puttxbuf) { if (puttxbuf) {
TX_STAT_INC(txq->axq_qnum, puttxbuf); TX_STAT_INC(txq->axq_qnum, puttxbuf);
ath9k_hw_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr); ath9k_hw_puttxbuf(ah, txq->axq_qnum, bf->bf_daddr);
ath_dbg(common, ATH_DBG_XMIT, "TXDP[%u] = %llx (%p)\n", ath_dbg(common, XMIT, "TXDP[%u] = %llx (%p)\n",
txq->axq_qnum, ito64(bf->bf_daddr), bf->bf_desc); txq->axq_qnum, ito64(bf->bf_daddr), bf->bf_desc);
} }
...@@ -1793,7 +1792,7 @@ static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc, ...@@ -1793,7 +1792,7 @@ static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc,
bf = ath_tx_get_buffer(sc); bf = ath_tx_get_buffer(sc);
if (!bf) { if (!bf) {
ath_dbg(common, ATH_DBG_XMIT, "TX buffers are full\n"); ath_dbg(common, XMIT, "TX buffers are full\n");
goto error; goto error;
} }
...@@ -1952,7 +1951,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb, ...@@ -1952,7 +1951,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
struct ieee80211_hdr * hdr = (struct ieee80211_hdr *)skb->data; struct ieee80211_hdr * hdr = (struct ieee80211_hdr *)skb->data;
int q, padpos, padsize; int q, padpos, padsize;
ath_dbg(common, ATH_DBG_XMIT, "TX complete: skb: %p\n", skb); ath_dbg(common, XMIT, "TX complete: skb: %p\n", skb);
if (!(tx_flags & ATH_TX_ERROR)) if (!(tx_flags & ATH_TX_ERROR))
/* Frame was ACKed */ /* Frame was ACKed */
...@@ -1971,7 +1970,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb, ...@@ -1971,7 +1970,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
if ((sc->ps_flags & PS_WAIT_FOR_TX_ACK) && !txq->axq_depth) { if ((sc->ps_flags & PS_WAIT_FOR_TX_ACK) && !txq->axq_depth) {
sc->ps_flags &= ~PS_WAIT_FOR_TX_ACK; sc->ps_flags &= ~PS_WAIT_FOR_TX_ACK;
ath_dbg(common, ATH_DBG_PS, ath_dbg(common, PS,
"Going back to sleep after having received TX status (0x%lx)\n", "Going back to sleep after having received TX status (0x%lx)\n",
sc->ps_flags & (PS_WAIT_FOR_BEACON | sc->ps_flags & (PS_WAIT_FOR_BEACON |
PS_WAIT_FOR_CAB | PS_WAIT_FOR_CAB |
...@@ -2122,7 +2121,7 @@ static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq) ...@@ -2122,7 +2121,7 @@ static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)
struct ath_tx_status ts; struct ath_tx_status ts;
int status; int status;
ath_dbg(common, ATH_DBG_QUEUE, "tx queue %d (%x), link %p\n", ath_dbg(common, QUEUE, "tx queue %d (%x), link %p\n",
txq->axq_qnum, ath9k_hw_gettxbuf(sc->sc_ah, txq->axq_qnum), txq->axq_qnum, ath9k_hw_gettxbuf(sc->sc_ah, txq->axq_qnum),
txq->axq_link); txq->axq_link);
...@@ -2216,7 +2215,7 @@ static void ath_tx_complete_poll_work(struct work_struct *work) ...@@ -2216,7 +2215,7 @@ static void ath_tx_complete_poll_work(struct work_struct *work)
} }
if (needreset) { if (needreset) {
ath_dbg(ath9k_hw_common(sc->sc_ah), ATH_DBG_RESET, ath_dbg(ath9k_hw_common(sc->sc_ah), RESET,
"tx hung, resetting the chip\n"); "tx hung, resetting the chip\n");
RESET_STAT_INC(sc, RESET_TYPE_TX_HANG); RESET_STAT_INC(sc, RESET_TYPE_TX_HANG);
ieee80211_queue_work(sc->hw, &sc->hw_reset_work); ieee80211_queue_work(sc->hw, &sc->hw_reset_work);
...@@ -2259,8 +2258,7 @@ void ath_tx_edma_tasklet(struct ath_softc *sc) ...@@ -2259,8 +2258,7 @@ void ath_tx_edma_tasklet(struct ath_softc *sc)
if (status == -EINPROGRESS) if (status == -EINPROGRESS)
break; break;
if (status == -EIO) { if (status == -EIO) {
ath_dbg(common, ATH_DBG_XMIT, ath_dbg(common, XMIT, "Error processing tx status\n");
"Error processing tx status\n");
break; break;
} }
......
...@@ -143,7 +143,7 @@ static bool ath_hw_set_keycache_entry(struct ath_common *common, u16 entry, ...@@ -143,7 +143,7 @@ static bool ath_hw_set_keycache_entry(struct ath_common *common, u16 entry,
break; break;
case ATH_CIPHER_AES_CCM: case ATH_CIPHER_AES_CCM:
if (!(common->crypt_caps & ATH_CRYPT_CAP_CIPHER_AESCCM)) { if (!(common->crypt_caps & ATH_CRYPT_CAP_CIPHER_AESCCM)) {
ath_dbg(common, ATH_DBG_ANY, ath_dbg(common, ANY,
"AES-CCM not supported by this mac rev\n"); "AES-CCM not supported by this mac rev\n");
return false; return false;
} }
...@@ -152,15 +152,15 @@ static bool ath_hw_set_keycache_entry(struct ath_common *common, u16 entry, ...@@ -152,15 +152,15 @@ static bool ath_hw_set_keycache_entry(struct ath_common *common, u16 entry,
case ATH_CIPHER_TKIP: case ATH_CIPHER_TKIP:
keyType = AR_KEYTABLE_TYPE_TKIP; keyType = AR_KEYTABLE_TYPE_TKIP;
if (entry + 64 >= common->keymax) { if (entry + 64 >= common->keymax) {
ath_dbg(common, ATH_DBG_ANY, ath_dbg(common, ANY,
"entry %u inappropriate for TKIP\n", entry); "entry %u inappropriate for TKIP\n", entry);
return false; return false;
} }
break; break;
case ATH_CIPHER_WEP: case ATH_CIPHER_WEP:
if (k->kv_len < WLAN_KEY_LEN_WEP40) { if (k->kv_len < WLAN_KEY_LEN_WEP40) {
ath_dbg(common, ATH_DBG_ANY, ath_dbg(common, ANY, "WEP key length %u too small\n",
"WEP key length %u too small\n", k->kv_len); k->kv_len);
return false; return false;
} }
if (k->kv_len <= WLAN_KEY_LEN_WEP40) if (k->kv_len <= WLAN_KEY_LEN_WEP40)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment