aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2010-12-06 07:27:45 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-07 16:34:55 -0500
commit85dd0921e686ed2f0283cef358a91ecaa36ccc8f (patch)
treebd0584134f376c30033b3987a84257b869d5bef6 /drivers/net/wireless
parentd09b17f73fd8f475f33d0b8311d7b5a0bed67c67 (diff)
ath9k_hw: Find chansel of AR_PHY_65NM_CH0_SYNTH7 for AR9485
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_phy.c5
-rw-r--r--drivers/net/wireless/ath/ath9k/phy.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index 63b6d560c7f..bce1fdb1660 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -75,7 +75,10 @@ static int ar9003_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
75 freq = centers.synth_center; 75 freq = centers.synth_center;
76 76
77 if (freq < 4800) { /* 2 GHz, fractional mode */ 77 if (freq < 4800) { /* 2 GHz, fractional mode */
78 channelSel = CHANSEL_2G(freq); 78 if (AR_SREV_9485(ah))
79 channelSel = CHANSEL_2G_9485(freq);
80 else
81 channelSel = CHANSEL_2G(freq);
79 /* Set to 2G mode */ 82 /* Set to 2G mode */
80 bMode = 1; 83 bMode = 1;
81 } else { 84 } else {
diff --git a/drivers/net/wireless/ath/ath9k/phy.h b/drivers/net/wireless/ath/ath9k/phy.h
index 17969af842f..5e3d7496986 100644
--- a/drivers/net/wireless/ath/ath9k/phy.h
+++ b/drivers/net/wireless/ath/ath9k/phy.h
@@ -19,6 +19,7 @@
19 19
20#define CHANSEL_DIV 15 20#define CHANSEL_DIV 15
21#define CHANSEL_2G(_freq) (((_freq) * 0x10000) / CHANSEL_DIV) 21#define CHANSEL_2G(_freq) (((_freq) * 0x10000) / CHANSEL_DIV)
22#define CHANSEL_2G_9485(_freq) ((((_freq) * 0x10000) - 215) / CHANSEL_DIV)
22#define CHANSEL_5G(_freq) (((_freq) * 0x8000) / CHANSEL_DIV) 23#define CHANSEL_5G(_freq) (((_freq) * 0x8000) / CHANSEL_DIV)
23 24
24#define AR_PHY_BASE 0x9800 25#define AR_PHY_BASE 0x9800