diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2020-02-04 19:34:02 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-28 15:42:45 +0100 |
commit | 03e055c209d8ddee780a46b0dc2c4b22ae74f66f (patch) | |
tree | d39928468e6382360702397914b7c1fb913325fd /drivers/staging | |
parent | a7fc5dbd17127c7301b0aefc2bcf1f54169c7383 (diff) | |
download | linux-stable-03e055c209d8ddee780a46b0dc2c4b22ae74f66f.tar.gz linux-stable-03e055c209d8ddee780a46b0dc2c4b22ae74f66f.tar.bz2 linux-stable-03e055c209d8ddee780a46b0dc2c4b22ae74f66f.zip |
staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi.
commit 93134df520f23f4e9998c425b8987edca7016817 upstream.
bb_pre_ed_rssi is an u8 rx_dm always returns negative signed
values add minus operator to always yield positive.
fixes issue where rx sensitivity is always set to maximum because
the unsigned numbers were always greater then 100.
Fixes: 63b9907f58f1 ("staging: vt6656: mac80211 conversion: create rx function.")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Link: https://lore.kernel.org/r/aceac98c-6e69-3ce1-dfec-2bf27b980221@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/vt6656/dpc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c index 655f0002f880..7b73fa2f8834 100644 --- a/drivers/staging/vt6656/dpc.c +++ b/drivers/staging/vt6656/dpc.c @@ -140,7 +140,7 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb, vnt_rf_rssi_to_dbm(priv, *rssi, &rx_dbm); - priv->bb_pre_ed_rssi = (u8)rx_dbm + 1; + priv->bb_pre_ed_rssi = (u8)-rx_dbm + 1; priv->current_rssi = priv->bb_pre_ed_rssi; frame = skb_data + 8; |