mac80211: add initial support for AR9330
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 552-ath9k-fix-channel-frequency-calculation-for-AR9340.patch
1 diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
2 index 2df72cb..1194eeb 100644
3 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
4 +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
5 @@ -104,7 +104,7 @@ static int ar9003_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
6 u32 chan_frac;
7
8 channelSel = (freq * 2) / 75;
9 - chan_frac = ((freq % 75) * 0x20000) / 75;
10 + chan_frac = (((freq * 2) % 75) * 0x20000) / 75;
11 channelSel = (channelSel << 17) | chan_frac;
12 } else {
13 channelSel = CHANSEL_5G(freq);
14