diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2011-06-21 05:23:34 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-22 16:09:52 -0400 |
commit | 5acb4b9366b77d27f79706cb99b4d34e5076b953 (patch) | |
tree | 534643b628dd1d29916fee07d134403bf35458a3 /drivers | |
parent | dbb204e39fec2dc4800f19eae321ad7e1b95f2fa (diff) |
ath9k: configure RF channel frequency for AR9330
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index 1194eeb69633..a0ca1ebe2986 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c | |||
@@ -75,7 +75,19 @@ static int ar9003_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan) | |||
75 | freq = centers.synth_center; | 75 | freq = centers.synth_center; |
76 | 76 | ||
77 | if (freq < 4800) { /* 2 GHz, fractional mode */ | 77 | if (freq < 4800) { /* 2 GHz, fractional mode */ |
78 | if (AR_SREV_9485(ah)) { | 78 | if (AR_SREV_9330(ah)) { |
79 | u32 chan_frac; | ||
80 | u32 div; | ||
81 | |||
82 | if (ah->is_clk_25mhz) | ||
83 | div = 75; | ||
84 | else | ||
85 | div = 120; | ||
86 | |||
87 | channelSel = (freq * 4) / div; | ||
88 | chan_frac = (((freq * 4) % div) * 0x20000) / div; | ||
89 | channelSel = (channelSel << 17) | chan_frac; | ||
90 | } else if (AR_SREV_9485(ah)) { | ||
79 | u32 chan_frac; | 91 | u32 chan_frac; |
80 | 92 | ||
81 | /* | 93 | /* |