diff options
author | Michael Straube <straube.linux@gmail.com> | 2020-09-17 09:13:30 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-09-17 18:50:00 +0200 |
commit | 2d5f72b0f101eb0aeadaa078a0d0a98ecec1e7ec (patch) | |
tree | f441c69b4a870bb29efbb42ff857831f63701e80 /drivers/staging/rtl8188eu/hal/odm.c | |
parent | staging: rtl8188eu: use __func__ in hal directory (diff) | |
download | linux-dev-2d5f72b0f101eb0aeadaa078a0d0a98ecec1e7ec.tar.xz linux-dev-2d5f72b0f101eb0aeadaa078a0d0a98ecec1e7ec.zip |
staging: rtl8188eu: clean up comparsion style issues
Move constants to the right side of comparsions to follow kernel
coding style and clear checkpatch warnings. In case of comparsion
to _FAIL we can use '!' since _FAIL is defined as '0'.
WARNING: Comparisons should place the constant on the right side of the test
Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200917071330.31740-2-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8188eu/hal/odm.c')
-rw-r--r-- | drivers/staging/rtl8188eu/hal/odm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c index d6c4c7d023d1..4d659a812aed 100644 --- a/drivers/staging/rtl8188eu/hal/odm.c +++ b/drivers/staging/rtl8188eu/hal/odm.c @@ -829,9 +829,9 @@ bool ODM_RAStateCheck(struct odm_dm_struct *pDM_Odm, s32 RSSI, bool bForceUpdate } /* Decide RATRState by RSSI. */ - if (RSSI > HighRSSIThreshForRA) + if (HighRSSIThreshForRA < RSSI) RATRState = DM_RATR_STA_HIGH; - else if (RSSI > LowRSSIThreshForRA) + else if (LowRSSIThreshForRA < RSSI) RATRState = DM_RATR_STA_MIDDLE; else RATRState = DM_RATR_STA_LOW; |