mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-10-06 03:18:46 +02:00
rrm: fix bad sign for calculating RCPI
The first if case should be -10950, not 10950. Without the negative this first case would get hit every time since signal strength values are always negative.
This commit is contained in:
parent
8884fd8bbd
commit
18c2c98ad5
@ -243,7 +243,7 @@ static void rrm_build_measurement_report(struct rrm_request_info *info,
|
|||||||
/* 802.11 Table 9-154 */
|
/* 802.11 Table 9-154 */
|
||||||
static uint8_t mdb_to_rcpi(int32_t mdb)
|
static uint8_t mdb_to_rcpi(int32_t mdb)
|
||||||
{
|
{
|
||||||
if (mdb <= 10950)
|
if (mdb <= -10950)
|
||||||
return 0;
|
return 0;
|
||||||
else if (mdb >= -10950 && mdb < 0)
|
else if (mdb >= -10950 && mdb < 0)
|
||||||
return (2 * (mdb + 11000)) / 100;
|
return (2 * (mdb + 11000)) / 100;
|
||||||
|
Loading…
Reference in New Issue
Block a user