Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255808
b: refs/heads/master
c: 0e44d48
h: refs/heads/master
v: v3
  • Loading branch information
Mohammed Shafi Shajakhan authored and John W. Linville committed Jun 20, 2011
1 parent 09d5dcc commit d852090
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 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: 81dc67601a49d1bfcfa85f644b14a013fc59e0ef
refs/heads/master: 0e44d48cbb010db492a27302b247049d5d43e065
21 changes: 20 additions & 1 deletion trunk/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,26 @@ EXPORT_SYMBOL(ar9003_paprd_init_table);

bool ar9003_paprd_is_done(struct ath_hw *ah)
{
return !!REG_READ_FIELD(ah, AR_PHY_PAPRD_TRAINER_STAT1,
int paprd_done, agc2_pwr;
paprd_done = REG_READ_FIELD(ah, AR_PHY_PAPRD_TRAINER_STAT1,
AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_TRAIN_DONE);

if (paprd_done == 0x1) {
agc2_pwr = REG_READ_FIELD(ah, AR_PHY_PAPRD_TRAINER_STAT1,
AR_PHY_PAPRD_TRAINER_STAT1_PAPRD_AGC2_PWR);

ath_dbg(ath9k_hw_common(ah), ATH_DBG_CALIBRATE,
"AGC2_PWR = 0x%x training done = 0x%x\n",
agc2_pwr, paprd_done);
/*
* agc2_pwr range should not be less than 'IDEAL_AGC2_PWR_CHANGE'
* when the training is completely done, otherwise retraining is
* done to make sure the value is in ideal range
*/
if (agc2_pwr <= PAPRD_IDEAL_AGC2_PWR_RANGE)
paprd_done = 0;
}

return !!paprd_done;
}
EXPORT_SYMBOL(ar9003_paprd_is_done);
5 changes: 3 additions & 2 deletions trunk/drivers/net/wireless/ath/ath9k/hw.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,9 @@
#define ATH9K_HW_RX_HP_QDEPTH 16
#define ATH9K_HW_RX_LP_QDEPTH 128

#define PAPRD_GAIN_TABLE_ENTRIES 32
#define PAPRD_TABLE_SZ 24
#define PAPRD_GAIN_TABLE_ENTRIES 32
#define PAPRD_TABLE_SZ 24
#define PAPRD_IDEAL_AGC2_PWR_RANGE 0xe0

enum ath_hw_txq_subtype {
ATH_TXQ_AC_BE = 0,
Expand Down

0 comments on commit d852090

Please sign in to comment.