Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 530275e5 authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville
Browse files

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: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f1b00f4d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);