]> git.baikalelectronics.ru Git - kernel.git/commit
ath5k: fix exp off-by-one when computing OFDM delta slope
authorForrest Zhang <forrest@hifulltech.com>
Wed, 13 May 2009 15:14:39 +0000 (11:14 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 20 May 2009 18:07:51 +0000 (14:07 -0400)
commitc22d5230a12c5734b25a064487c6b82a39876967
tree5488ef943dbf8816910f0df3703e842a2a541f4e
parent49b2beb47c88993ac6375a8e28a9335b5311f5c1
ath5k: fix exp off-by-one when computing OFDM delta slope

Commit 27f08e942cd ("ath5k: Update reset code") subtly changed the
code that computes floating point values for the PHY3_TIMING register
such that the exponent is off by a decimal point, which can cause
problems with OFDM channel operation.

get_bitmask_order() actually returns the highest bit set plus one,
whereas the previous code wanted the highest bit set.  Instead, use
ilog2 which is what this code is really calculating.  Also check
coef_scaled to handle the (invalid) case where we need log2(0).

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath5k/reset.c