b191bfd22ea87c67e756993f3935ee0d3b83203c
[openwrt.git] / package / mac80211 / patches / 583-ath9k-fix-RF-channel-frequency-configuration-for-AR9.patch
1 From 5e08c36e3ef57712fee83248d0db3d2837e13f5f Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Mon, 2 Jul 2012 17:15:58 +0200
4 Subject: [PATCH 14/20] ath9k: fix RF channel frequency configuration for AR9550
5
6 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
7 Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
8 ---
9  drivers/net/wireless/ath/ath9k/ar9003_phy.c |    5 +++--
10  1 files changed, 3 insertions(+), 2 deletions(-)
11
12 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
13 +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
14 @@ -99,7 +99,7 @@ static int ar9003_hw_set_channel(struct
15                         channelSel = (freq * 4) / 120;
16                         chan_frac = (((freq * 4) % 120) * 0x20000) / 120;
17                         channelSel = (channelSel << 17) | chan_frac;
18 -               } else if (AR_SREV_9340(ah)) {
19 +               } else if (AR_SREV_9340(ah) || AR_SREV_9550(ah)) {
20                         if (ah->is_clk_25mhz) {
21                                 u32 chan_frac;
22  
23 @@ -113,7 +113,8 @@ static int ar9003_hw_set_channel(struct
24                 /* Set to 2G mode */
25                 bMode = 1;
26         } else {
27 -               if (AR_SREV_9340(ah) && ah->is_clk_25mhz) {
28 +               if ((AR_SREV_9340(ah) || AR_SREV_9550(ah)) &&
29 +                   ah->is_clk_25mhz) {
30                         u32 chan_frac;
31  
32                         channelSel = (freq * 2) / 75;