aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2010-04-26 15:04:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-27 16:09:17 -0400
commite55537240f97635f9a7c42fac224ff80fa637624 (patch)
tree94d779ac70f20509849b4df56c9b4efc2aaac757
parentb360a884834a83ede845733cf344a29eb10dd2e3 (diff)
ath9k_hw: Fix usec to hw clock conversion in 5Ghz for ar9003
Fast clock operation (44Mhz) is enabled for 5Ghz in ar9003, so take care of the conversion from usec to hw clock. Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c10
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h1
2 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 40b6e8415946..7bb700151ca6 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -25,6 +25,7 @@
25#define ATH9K_CLOCK_RATE_CCK 22 25#define ATH9K_CLOCK_RATE_CCK 22
26#define ATH9K_CLOCK_RATE_5GHZ_OFDM 40 26#define ATH9K_CLOCK_RATE_5GHZ_OFDM 40
27#define ATH9K_CLOCK_RATE_2GHZ_OFDM 44 27#define ATH9K_CLOCK_RATE_2GHZ_OFDM 44
28#define ATH9K_CLOCK_FAST_RATE_5GHZ_OFDM 44
28 29
29static bool ath9k_hw_set_reset_reg(struct ath_hw *ah, u32 type); 30static bool ath9k_hw_set_reset_reg(struct ath_hw *ah, u32 type);
30 31
@@ -90,7 +91,11 @@ static u32 ath9k_hw_mac_clks(struct ath_hw *ah, u32 usecs)
90 return usecs *ATH9K_CLOCK_RATE_CCK; 91 return usecs *ATH9K_CLOCK_RATE_CCK;
91 if (conf->channel->band == IEEE80211_BAND_2GHZ) 92 if (conf->channel->band == IEEE80211_BAND_2GHZ)
92 return usecs *ATH9K_CLOCK_RATE_2GHZ_OFDM; 93 return usecs *ATH9K_CLOCK_RATE_2GHZ_OFDM;
93 return usecs *ATH9K_CLOCK_RATE_5GHZ_OFDM; 94
95 if (ah->caps.hw_caps & ATH9K_HW_CAP_FASTCLOCK)
96 return usecs * ATH9K_CLOCK_FAST_RATE_5GHZ_OFDM;
97 else
98 return usecs * ATH9K_CLOCK_RATE_5GHZ_OFDM;
94} 99}
95 100
96static u32 ath9k_hw_mac_to_clks(struct ath_hw *ah, u32 usecs) 101static u32 ath9k_hw_mac_to_clks(struct ath_hw *ah, u32 usecs)
@@ -2188,7 +2193,8 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
2188 } 2193 }
2189 2194
2190 if (AR_SREV_9300_20_OR_LATER(ah)) { 2195 if (AR_SREV_9300_20_OR_LATER(ah)) {
2191 pCap->hw_caps |= ATH9K_HW_CAP_EDMA | ATH9K_HW_CAP_LDPC; 2196 pCap->hw_caps |= ATH9K_HW_CAP_EDMA | ATH9K_HW_CAP_LDPC |
2197 ATH9K_HW_CAP_FASTCLOCK;
2192 pCap->rx_hp_qdepth = ATH9K_HW_RX_HP_QDEPTH; 2198 pCap->rx_hp_qdepth = ATH9K_HW_RX_HP_QDEPTH;
2193 pCap->rx_lp_qdepth = ATH9K_HW_RX_LP_QDEPTH; 2199 pCap->rx_lp_qdepth = ATH9K_HW_RX_LP_QDEPTH;
2194 pCap->rx_status_len = sizeof(struct ar9003_rxs); 2200 pCap->rx_status_len = sizeof(struct ar9003_rxs);
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 6c84d318e31b..7a1347b2453f 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -198,6 +198,7 @@ enum ath9k_hw_caps {
198 ATH9K_HW_CAP_EDMA = BIT(17), 198 ATH9K_HW_CAP_EDMA = BIT(17),
199 ATH9K_HW_CAP_RAC_SUPPORTED = BIT(18), 199 ATH9K_HW_CAP_RAC_SUPPORTED = BIT(18),
200 ATH9K_HW_CAP_LDPC = BIT(19), 200 ATH9K_HW_CAP_LDPC = BIT(19),
201 ATH9K_HW_CAP_FASTCLOCK = BIT(20),
201}; 202};
202 203
203enum ath9k_capability_type { 204enum ath9k_capability_type {