diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-07-09 00:12:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-11 15:02:12 -0400 |
commit | 906c720527b23ba8c99683ea5f9ea1f9d7749e8c (patch) | |
tree | 09be70d2f21201382d42869fc8d60828ae85866f | |
parent | a949b1725c38775fb869d24433f13d2d104de145 (diff) |
ath9k_hw: fix MAC clock for half/quarter rate
Enabling half/quarter rate makes the MAC run at half/quarter clock speed.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index a6bb9c4f8a8..f69c62e36ed 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -99,6 +99,13 @@ static void ath9k_hw_set_clockrate(struct ath_hw *ah) | |||
99 | if (conf_is_ht40(conf)) | 99 | if (conf_is_ht40(conf)) |
100 | clockrate *= 2; | 100 | clockrate *= 2; |
101 | 101 | ||
102 | if (ah->curchan) { | ||
103 | if (IS_CHAN_HALF_RATE(ah->curchan)) | ||
104 | clockrate /= 2; | ||
105 | if (IS_CHAN_QUARTER_RATE(ah->curchan)) | ||
106 | clockrate /= 4; | ||
107 | } | ||
108 | |||
102 | common->clockrate = clockrate; | 109 | common->clockrate = clockrate; |
103 | } | 110 | } |
104 | 111 | ||