We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05ecd10 commit 38c0304Copy full SHA for 38c0304
drivers/staging/rtl8192u/r8192U_core.c
@@ -3954,18 +3954,11 @@ static u8 rtl819x_query_rxpwrpercentage(s8 antpower)
3954
3955
static u8 rtl819x_evm_dbtopercentage(s8 value)
3956
{
3957
- s8 ret_val;
+ s8 ret_val = clamp(-value, 0, 33) * 3;
3958
3959
- ret_val = value;
3960
-
3961
- if (ret_val >= 0)
3962
- ret_val = 0;
3963
- if (ret_val <= -33)
3964
- ret_val = -33;
3965
- ret_val = 0 - ret_val;
3966
- ret_val *= 3;
3967
if (ret_val == 99)
3968
ret_val = 100;
+
3969
return ret_val;
3970
}
3971
0 commit comments