Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256442
b: refs/heads/master
c: 804f6ac
h: refs/heads/master
v: v3
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Jul 11, 2011
1 parent 2a1fca1 commit 3a885b8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 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: cd27bc3c3efb95ee20e5b627c483eb9513cd0350
refs/heads/master: 804f6acb7cea1ea5b3e0ded1bf037f9bf02f1124
25 changes: 13 additions & 12 deletions trunk/drivers/net/wireless/ath/ath9k/ar9002_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,26 +447,27 @@ static void ar9002_olc_init(struct ath_hw *ah)
static u32 ar9002_hw_compute_pll_control(struct ath_hw *ah,
struct ath9k_channel *chan)
{
int ref_div = 5;
int pll_div = 0x2c;
u32 pll;

pll = SM(0x5, AR_RTC_9160_PLL_REFDIV);
if (chan && IS_CHAN_5GHZ(chan) && !IS_CHAN_A_FAST_CLOCK(ah, chan)) {
if (AR_SREV_9280_20(ah)) {
ref_div = 10;
pll_div = 0x50;
} else {
pll_div = 0x28;
}
}

pll = SM(ref_div, AR_RTC_9160_PLL_REFDIV);
pll |= SM(pll_div, AR_RTC_9160_PLL_DIV);

if (chan && IS_CHAN_HALF_RATE(chan))
pll |= SM(0x1, AR_RTC_9160_PLL_CLKSEL);
else if (chan && IS_CHAN_QUARTER_RATE(chan))
pll |= SM(0x2, AR_RTC_9160_PLL_CLKSEL);

if (chan && IS_CHAN_5GHZ(chan)) {
if (IS_CHAN_A_FAST_CLOCK(ah, chan))
pll = 0x142c;
else if (AR_SREV_9280_20(ah))
pll = 0x2850;
else
pll |= SM(0x28, AR_RTC_9160_PLL_DIV);
} else {
pll |= SM(0x2c, AR_RTC_9160_PLL_DIV);
}

return pll;
}

Expand Down

0 comments on commit 3a885b8

Please sign in to comment.