Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255454
b: refs/heads/master
c: 931749b
h: refs/heads/master
v: v3
  • Loading branch information
Mohammed Shafi Shajakhan authored and John W. Linville committed Jun 7, 2011
1 parent fcb7603 commit bb8c789
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 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: 36cb7cce230a06378915d405cd33adf58dd5fe2a
refs/heads/master: 931749bf78b969c54de9bbc67cf29b13a40bb73b
17 changes: 3 additions & 14 deletions trunk/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ EXPORT_SYMBOL(ar9003_paprd_enable);

static int ar9003_get_training_power_2g(struct ath_hw *ah)
{
struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
struct ar9300_modal_eep_header *hdr = &eep->modalHeader2G;
struct ath9k_channel *chan = ah->curchan;
unsigned int power, scale, delta;

scale = MS(le32_to_cpu(hdr->papdRateMaskHt20), AR9300_PAPRD_SCALE_1);
scale = ar9003_get_paprd_scale_factor(ah, chan);
power = REG_READ_FIELD(ah, AR_PHY_POWERTX_RATE5,
AR_PHY_POWERTX_RATE5_POWERTXHT20_0);

Expand All @@ -67,20 +66,10 @@ static int ar9003_get_training_power_2g(struct ath_hw *ah)
static int ar9003_get_training_power_5g(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
struct ar9300_modal_eep_header *hdr = &eep->modalHeader5G;
struct ath9k_channel *chan = ah->curchan;
unsigned int power, scale, delta;

if (chan->channel >= 5700)
scale = MS(le32_to_cpu(hdr->papdRateMaskHt20),
AR9300_PAPRD_SCALE_1);
else if (chan->channel >= 5400)
scale = MS(le32_to_cpu(hdr->papdRateMaskHt40),
AR9300_PAPRD_SCALE_2);
else
scale = MS(le32_to_cpu(hdr->papdRateMaskHt40),
AR9300_PAPRD_SCALE_1);
scale = ar9003_get_paprd_scale_factor(ah, chan);

if (IS_CHAN_HT40(chan))
power = REG_READ_FIELD(ah, AR_PHY_POWERTX_RATE8,
Expand Down

0 comments on commit bb8c789

Please sign in to comment.