]> git.baikalelectronics.ru Git - kernel.git/commit
p54: clamp properly instead of just truncating
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 13 Jan 2014 19:05:23 +0000 (22:05 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 13 Jan 2014 19:50:06 +0000 (14:50 -0500)
commit0a34aba4b6585e5ce0cca7f9ab00ef2f2e4fa016
tree465d9293f24425ec3c03efdbe196ec756b8f68b8
parente4c520a74bfa7a967c8ba30d614f82d81f1a1072
p54: clamp properly instead of just truncating

The call to clamp_t() first truncates the variable signed 8 bit and as a
result, the actual clamp is a no-op.

Fixes: 188c9a3e06af ('p54: improve site survey')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/p54/txrx.c