]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath9k_hw: Find chansel of AR_PHY_65NM_CH0_SYNTH7 for AR9485
authorVasanthakumar Thiagarajan <vasanth@atheros.com>
Mon, 6 Dec 2010 12:27:45 +0000 (04:27 -0800)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 7 Dec 2010 21:34:55 +0000 (16:34 -0500)
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ar9003_phy.c
drivers/net/wireless/ath/ath9k/phy.h

index 63b6d560c7f010ec401381b3357ef597b32b2d7f..bce1fdb1660a4ee9ad5b10aa70988957116f372f 100644 (file)
@@ -75,7 +75,10 @@ static int ar9003_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
        freq = centers.synth_center;
 
        if (freq < 4800) {     /* 2 GHz, fractional mode */
-               channelSel = CHANSEL_2G(freq);
+               if (AR_SREV_9485(ah))
+                       channelSel = CHANSEL_2G_9485(freq);
+               else
+                       channelSel = CHANSEL_2G(freq);
                /* Set to 2G mode */
                bMode = 1;
        } else {
index 17969af842f6153a269acb36a7872bbf3356c05d..5e3d7496986e77656912ab5b7c7745d9f3f36cee 100644 (file)
@@ -19,6 +19,7 @@
 
 #define CHANSEL_DIV            15
 #define CHANSEL_2G(_freq)      (((_freq) * 0x10000) / CHANSEL_DIV)
+#define CHANSEL_2G_9485(_freq) ((((_freq) * 0x10000) - 215) / CHANSEL_DIV)
 #define CHANSEL_5G(_freq)      (((_freq) * 0x8000) / CHANSEL_DIV)
 
 #define AR_PHY_BASE     0x9800