diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2009-02-12 10:06:45 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-27 14:51:43 -0500 |
commit | 06d0f0663e11cab4ec5f2c143a118d71a12fbbe9 (patch) | |
tree | 25f7f2dcee8b2f6acdf577a8122fd5da15e2b2b2 /drivers/net/wireless/ath9k/phy.c | |
parent | fec0de1110e58ed39647e484bff8437e4185158d (diff) | |
download | kernel-crypto-06d0f0663e11cab4ec5f2c143a118d71a12fbbe9.tar.gz kernel-crypto-06d0f0663e11cab4ec5f2c143a118d71a12fbbe9.tar.xz kernel-crypto-06d0f0663e11cab4ec5f2c143a118d71a12fbbe9.zip |
ath9k: Enable Fractional N mode
This patch enables Fractional N mode for all channel
if the EEPROM says so, and also fixes the INI only
when the device is not a 2 GHz only capable device.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/phy.c')
-rw-r--r-- | drivers/net/wireless/ath9k/phy.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath9k/phy.c b/drivers/net/wireless/ath9k/phy.c index 52aa2a7abe7..e1494bae0f9 100644 --- a/drivers/net/wireless/ath9k/phy.c +++ b/drivers/net/wireless/ath9k/phy.c @@ -132,20 +132,27 @@ ath9k_hw_ar9280_set_channel(struct ath_hw *ah, bMode = 0; fracMode = 0; - if ((freq % 20) == 0) { - aModeRefSel = 3; - } else if ((freq % 10) == 0) { - aModeRefSel = 2; - } else { + switch(ah->eep_ops->get_eeprom(ah, EEP_FRAC_N_5G)) { + case 0: + if ((freq % 20) == 0) { + aModeRefSel = 3; + } else if ((freq % 10) == 0) { + aModeRefSel = 2; + } + if (aModeRefSel) + break; + case 1: + default: aModeRefSel = 0; - fracMode = 1; refDivA = 1; channelSel = (freq * 0x8000) / 15; REG_RMW_FIELD(ah, AR_AN_SYNTH9, AR_AN_SYNTH9_REFDIVA, refDivA); + } + if (!fracMode) { ndiv = (freq * (refDivA >> aModeRefSel)) / 60; channelSel = ndiv & 0x1ff; |