Skip to contentSkip to conversation

ath9k_hw: fix 5 GHz frequency selection on AR934x/AR955x with 25 MHz refclock

PATCH New Felix Fietkau 1 participant 1 message Jul 13, 2012 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/wireless/ath/ath9k/ar9003_phy.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath9k/ar9003_phy.c +2 -2
index d2346db..e476f9f 100644
@@ -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);
Signature · 1 line
1.7.7.5 (Apple Git-26)