From: Felix Fietkau Date: Sat, 9 Jul 2011 04:12:48 +0000 (+0700) Subject: ath9k_hw: fix MAC clock for half/quarter rate X-Git-Tag: next-20110726~36^2~21 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=906c720527b23ba8c99683ea5f9ea1f9d7749e8c;p=karo-tx-linux.git 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 Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index a6bb9c4f8a87..f69c62e36ed8 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) if (conf_is_ht40(conf)) clockrate *= 2; + if (ah->curchan) { + if (IS_CHAN_HALF_RATE(ah->curchan)) + clockrate /= 2; + if (IS_CHAN_QUARTER_RATE(ah->curchan)) + clockrate /= 4; + } + common->clockrate = clockrate; }