Skip to content

Commit 0e36c79

Browse files
lwfingergregkh
authored andcommitted
b43: Fix error in cordic routine
commit 8ea3819c0bbef57a51d8abe579e211033e861677 upstream. The cordic routine for calculating sines and cosines that was added in commit 6f98e62 ("b43: update cordic code to match current specs") contains an error whereby a quantity declared u32 can in fact go negative. This problem was detected by Priit Laes who is switching b43 to use the routine in the library functions of the kernel. Fixes: 9865045 ("b43: make cordic common (LP-PHY and N-PHY need it)") Reported-by: Priit Laes <[email protected]> Cc: Rafał Miłecki <[email protected]> Cc: Stable <[email protected]> # 2.6.34 Signed-off-by: Larry Finger <[email protected]> Signed-off-by: Priit Laes <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent b854c7b commit 0e36c79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/wireless/broadcom/b43/phy_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ struct b43_c32 b43_cordic(int theta)
616616
u8 i;
617617
s32 tmp;
618618
s8 signx = 1;
619-
u32 angle = 0;
619+
s32 angle = 0;
620620
struct b43_c32 ret = { .i = 39797, .q = 0, };
621621

622622
while (theta > (180 << 16))

0 commit comments

Comments
 (0)