]> git.baikalelectronics.ru Git - kernel.git/commit
b43: N-PHY: use more bits for offset in RSSI calibration
authorRafał Miłecki <zajec5@gmail.com>
Wed, 27 Mar 2013 07:37:08 +0000 (08:37 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 27 Mar 2013 15:07:05 +0000 (11:07 -0400)
commite9d0130cccf63f5fe7fc62d634758aa3861447b7
tree99a9fb3b84244a9282e28c6f30ef76cc4889a6bb
parent0a32a4365d7d43b2fc9fd4a6be0eae67ccf5b4e2
b43: N-PHY: use more bits for offset in RSSI calibration

When calculating "offset" for final RSSI calibration we're using numbers
bigger than s8 can hold. We have for example:
offset[j] = 232 - poll_results[j];
formula. If poll_results[j] is small enough (it usually is) we treat
number's bit as a sign bit. For example 232 - 1 becomes:
0xE8 - 0x1 = 0xE7, which is not 231 but -25.

This code was introduced in bcb70b4f182ba599c64bb611dab7dc12261c842a
and caused stability regression on some cards, for ex. BCM4322.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/b43/phy_n.c