aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/ar9003_phy.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-07-14 01:26:54 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-07-17 15:11:32 -0400
commit530275e52b00e04018fb20e83377e0572944ea97 (patch)
tree238c58956b56f717958e15ea55a8a8d6fc462558 /drivers/net/wireless/ath/ath9k/ar9003_phy.c
parentrtlwifi: rtl8192de: Fix phy-based version calculation (diff)
downloadlinux-dev-530275e52b00e04018fb20e83377e0572944ea97.tar.xz
linux-dev-530275e52b00e04018fb20e83377e0572944ea97.zip
ath9k_hw: fix 5 GHz frequency selection on AR934x/AR955x with 25 MHz refclock
The old code was an accidental copy&paste of the 2.4 GHz version, which doesn't work. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_phy.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_phy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index d2346dbad6cd..e476f9f92ce3 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -117,8 +117,8 @@ static int ar9003_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
ah->is_clk_25mhz) {
u32 chan_frac;
- channelSel = (freq * 2) / 75;
- chan_frac = (((freq * 2) % 75) * 0x20000) / 75;
+ channelSel = freq / 75;
+ chan_frac = ((freq % 75) * 0x20000) / 75;
channelSel = (channelSel << 17) | chan_frac;
} else {
channelSel = CHANSEL_5G(freq);