Commit 73a06a68 authored by Nick Kossifidis's avatar Nick Kossifidis Committed by John W. Linville

ath5k: Use correct clock when setting ofdm timings

 * Use correct clock value when setting OFDM timings on
 non-default bwmodes.
Signed-off-by: default avatarNick Kossifidis <mickflemm@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3bb17654
...@@ -228,8 +228,20 @@ static inline int ath5k_hw_write_ofdm_timings(struct ath5k_hw *ah, ...@@ -228,8 +228,20 @@ static inline int ath5k_hw_write_ofdm_timings(struct ath5k_hw *ah,
* ALGO: coef = (5 * clock / carrier_freq) / 2 * ALGO: coef = (5 * clock / carrier_freq) / 2
* we scale coef by shifting clock value by 24 for * we scale coef by shifting clock value by 24 for
* better precision since we use integers */ * better precision since we use integers */
/* TODO: Half/quarter rate */ switch (ah->ah_bwmode) {
clock = (channel->hw_value & CHANNEL_TURBO) ? 80 : 40; case AR5K_BWMODE_40MHZ:
clock = 40 * 2;
break;
case AR5K_BWMODE_10MHZ:
clock = 40 / 2;
break;
case AR5K_BWMODE_5MHZ:
clock = 40 / 4;
break;
default:
clock = 40;
break;
}
coef_scaled = ((5 * (clock << 24)) / 2) / channel->center_freq; coef_scaled = ((5 * (clock << 24)) / 2) / channel->center_freq;
/* Get exponent /* Get exponent
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment