]> git.kernelconcepts.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 17:04:17 +0000 (10:04 -0700)
commit554293beaa09b578559058834e72725f977cebd0
tree08530407ad86de616ad054c0441e9baff3106cd5
parent123dad7cf60c6c584d50cea021668d07b6a33e42
b43: N-PHY: use more bits for offset in RSSI calibration

commit 2e1253d640eb7f8707d2591c93097c1e9f9c71d5 upstream.

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 e0c9a0219a8f542e3946fe972a68aacf8c3f906c
and caused stability regression on some cards, for ex. BCM4322.

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