Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 215351
b: refs/heads/master
c: e49f913
h: refs/heads/master
i:
  215349: 8e68bf3
  215347: 3ed7f47
  215343: e2f2188
v: v3
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Oct 15, 2010
1 parent bf69fbb commit 5d992b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 898c914a0871ea7e5557b77156d4358c0f15d98a
refs/heads/master: e49f913750bb8745085cc4c547912c330cd3eacb
13 changes: 7 additions & 6 deletions trunk/drivers/net/wireless/ath/ath9k/ani.c
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning)
REGWRITE_BUFFER_FLUSH(ah);
}

static void ath9k_hw_ani_read_counters(struct ath_hw *ah)
static bool ath9k_hw_ani_read_counters(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
struct ar5416AniState *aniState = &ah->curchan->ani;
Expand All @@ -646,10 +646,10 @@ static void ath9k_hw_ani_read_counters(struct ath_hw *ah)
ath_hw_cycle_counters_update(common);
listenTime = ath_hw_get_listen_time(common);

if (listenTime < 0) {
if (listenTime <= 0) {
ah->stats.ast_ani_lneg++;
ath9k_ani_restart(ah);
return;
return false;
}

if (!use_new_ani(ah)) {
Expand Down Expand Up @@ -683,7 +683,7 @@ static void ath9k_hw_ani_read_counters(struct ath_hw *ah)
REG_WRITE(ah, AR_PHY_ERR_MASK_2,
AR_PHY_ERR_CCK_TIMING);
}
return;
return false;
}

ofdmPhyErrCnt = phyCnt1 - ofdm_base;
Expand All @@ -695,7 +695,7 @@ static void ath9k_hw_ani_read_counters(struct ath_hw *ah)
ah->stats.ast_ani_cckerrs +=
cckPhyErrCnt - aniState->cckPhyErrCount;
aniState->cckPhyErrCount = cckPhyErrCnt;

return true;
}

void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan)
Expand All @@ -711,7 +711,8 @@ void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan)
if (WARN_ON(!aniState))
return;

ath9k_hw_ani_read_counters(ah);
if (!ath9k_hw_ani_read_counters(ah))
return;

ofdmPhyErrRate = aniState->ofdmPhyErrCount * 1000 /
aniState->listenTime;
Expand Down

0 comments on commit 5d992b0

Please sign in to comment.