]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtl8712: fix negative level value
authorLuis de Bethencourt <luisbg@osg.samsung.com>
Sun, 11 Oct 2015 13:16:57 +0000 (14:16 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 03:43:20 +0000 (20:43 -0700)
commite0866ac462fe4bb548e56648eda3ba1dab2a1a68
tree1fecbc0f256a5e327167c4d0809229bae324eba1
parent20c9f699507465348d22880444b68da0faeb5f90
staging: rtl8712: fix negative level value

range->avg_qual.level is of type uint8, so it shouldn't be assigned a
negative number. Assigning it 0x100 - 78, which is the equivalent
to (20 + -98) dBm when IW_QUAL_DBM is set.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8712/rtl871x_ioctl_linux.c