* [PATCH 1/2] staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi.
@ 2020-02-02 12:27 Malcolm Priestley
2020-02-03 9:42 ` Dan Carpenter
0 siblings, 1 reply; 4+ messages in thread
From: Malcolm Priestley @ 2020-02-02 12:27 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: linux-wireless, devel@driverdev.osuosl.org
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.
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
drivers/staging/vt6656/dpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index 821aae8ca402..a0b60e7d1086 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -98,7 +98,7 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb,
vnt_rf_rssi_to_dbm(priv, tail->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;
skb_pull(skb, sizeof(*head));
--
2.25.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi.
2020-02-02 12:27 [PATCH 1/2] staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi Malcolm Priestley
@ 2020-02-03 9:42 ` Dan Carpenter
2020-02-04 19:34 ` [PATCH v2 " Malcolm Priestley
2020-02-04 19:50 ` [PATCH " Malcolm Priestley
0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-02-03 9:42 UTC (permalink / raw)
To: Malcolm Priestley
Cc: Greg Kroah-Hartman, devel@driverdev.osuosl.org, linux-wireless
On Sun, Feb 02, 2020 at 12:27:25PM +0000, Malcolm Priestley wrote:
> 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.
>
> Cc: stable <stable@vger.kernel.org>
Can you add a Fixes tag for stable kernels?
Fixes: 63b9907f58f1 ("staging: vt6656: mac80211 conversion: create rx function.")
Otherwise we don't backport it far enough and then it becomes an
actively exploited Android vulnerability and Google writes an article
about it. Then everyone gets annoyed with us and shakes their head
because OpenBSD never has Android vulnerabilities etc...
> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
> ---
> drivers/staging/vt6656/dpc.c | 2 +-
It appears that the vt6655 driver has the same issue.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/2] staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi.
2020-02-03 9:42 ` Dan Carpenter
@ 2020-02-04 19:34 ` Malcolm Priestley
2020-02-04 19:50 ` [PATCH " Malcolm Priestley
1 sibling, 0 replies; 4+ messages in thread
From: Malcolm Priestley @ 2020-02-04 19:34 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Dan Carpenter, devel@driverdev.osuosl.org, linux-wireless
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>
---
Added fixes tag
drivers/staging/vt6656/dpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index 821aae8ca402..a0b60e7d1086 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -98,7 +98,7 @@ int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb,
vnt_rf_rssi_to_dbm(priv, tail->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;
skb_pull(skb, sizeof(*head));
--
2.25.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi.
2020-02-03 9:42 ` Dan Carpenter
2020-02-04 19:34 ` [PATCH v2 " Malcolm Priestley
@ 2020-02-04 19:50 ` Malcolm Priestley
1 sibling, 0 replies; 4+ messages in thread
From: Malcolm Priestley @ 2020-02-04 19:50 UTC (permalink / raw)
To: Dan Carpenter
Cc: Greg Kroah-Hartman, devel@driverdev.osuosl.org, linux-wireless
On 03/02/2020 09:42, Dan Carpenter wrote:
> On Sun, Feb 02, 2020 at 12:27:25PM +0000, Malcolm Priestley wrote:
>> 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.
>>
>> Cc: stable <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
>> ---
...
>> drivers/staging/vt6656/dpc.c | 2 +-
>
> It appears that the vt6655 driver has the same issue.
In the vt6655 it is not used.
Regards
Malcolm
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-02-04 19:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-02 12:27 [PATCH 1/2] staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi Malcolm Priestley
2020-02-03 9:42 ` Dan Carpenter
2020-02-04 19:34 ` [PATCH v2 " Malcolm Priestley
2020-02-04 19:50 ` [PATCH " Malcolm Priestley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox