mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
b43: N-PHY: use more bits for offset in RSSI calibration
commit2e1253d640
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 ine0c9a0219a
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>
This commit is contained in:
parent
123dad7cf6
commit
554293beaa
1 changed files with 2 additions and 2 deletions
|
@ -1320,7 +1320,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)
|
|||
u16 clip_off[2] = { 0xFFFF, 0xFFFF };
|
||||
|
||||
u8 vcm_final = 0;
|
||||
s8 offset[4];
|
||||
s32 offset[4];
|
||||
s32 results[8][4] = { };
|
||||
s32 results_min[4] = { };
|
||||
s32 poll_results[4] = { };
|
||||
|
@ -1487,7 +1487,7 @@ static void b43_nphy_rev2_rssi_cal(struct b43_wldev *dev, u8 type)
|
|||
u8 regs_save_radio[2];
|
||||
u16 regs_save_phy[2];
|
||||
|
||||
s8 offset[4];
|
||||
s32 offset[4];
|
||||
u8 core;
|
||||
u8 rail;
|
||||
|
||||
|
|
Loading…
Reference in a new issue