Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2689808ybl; Sun, 2 Feb 2020 04:31:52 -0800 (PST) X-Google-Smtp-Source: APXvYqxhfCtx2BzKJFiWm8XTV7HvIAZJHDJzeTfIKSdjjQiL5HQGEl98zGKyamIKpsEHea3AE1Ge X-Received: by 2002:a05:6830:1257:: with SMTP id s23mr14389815otp.241.1580646712291; Sun, 02 Feb 2020 04:31:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580646712; cv=none; d=google.com; s=arc-20160816; b=UIR7ODTzLYkt2aFdJ1TUHh8V6833p1inS4srql+Z/m0vFu3ikHXh6WXeVkFDJpJd9N bzxArU5+6ja1acTC0fameBZhLHoFQBRaa9tNegX9M2LDTA2a/6kZOr/lrijOZyaLSwoZ RNSzLJL/MaSahKZlgpY1uT4hqiix/4oj9xsFm95juJGY9Qyov3e7detebJ5Ku3lRtLkc wRlaECc3NBkszfGXq1bqWA9lxzVx6ysYNGpMEEIulJrMbMoUMvHHf6/LlaIn3UHGCGRt aOyiFn3J3RJAqG9QDCNgqWXdnv5s4/3v0ylj73Yk4+R1cCfhEvc4MnZmSeDIZrm7+87a 4eog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:mime-version:user-agent:date:message-id:cc:to :subject:from:dkim-signature; bh=IZlLOQyp62ykJD13LCRO0yd0g3YOI4L9Cfoqf+OJ1ac=; b=QDhZ85/YWf1bVWbkQRXlKXzqE8sx8YRWwYsuJ3ylhSQaaTHxhzcLripLj7TL7ZZmKh Y7+0WDh97zx7YfybzkYqdEZGCqteUS/f63/NiLnd6boKd3rY0GQqWKpj8wcteSbo1Uq+ S5KApr7Kq8O8gTkMWUq/7OJ1mjWiCuZ8RSnnLDl2HXrbocTjp/8dtI0ejm0QKxmTWScE d0mDgqM9X2Z34TbziwwDBwok/u67qb+xTl6Mz4be0HgT8HYYeefpH85hbthDpnvFOD/w GWIi3K0WJ0+HqEPsOZSzl3CVKl6rmMhUAgPKQ/2knx9ZhxP7dKfRi0eEoRcaL3/rjYiR no2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IoSJMGPj; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v145si6076935oia.68.2020.02.02.04.31.26; Sun, 02 Feb 2020 04:31:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IoSJMGPj; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726669AbgBBM1c (ORCPT + 99 others); Sun, 2 Feb 2020 07:27:32 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43853 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbgBBM1b (ORCPT ); Sun, 2 Feb 2020 07:27:31 -0500 Received: by mail-wr1-f65.google.com with SMTP id z9so2191435wrs.10 for ; Sun, 02 Feb 2020 04:27:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=IZlLOQyp62ykJD13LCRO0yd0g3YOI4L9Cfoqf+OJ1ac=; b=IoSJMGPjzVrIR30XKtivH8bXL/UMpssbQF9np3kKDvhfqV6JgBF8YekhOghnjcNbx9 +z2BIViWpZe9XFiiSxUqMSWkFDayj9ZzoXYXMDuJHEwJjxWW4k55Y6elvxqhGYT7fU+u HHfhgsAyzMn8ZHLn59FLx8K96cRlcYd99UPz3amH8ogVbk+0Y4TBFBd/sMxpkQJG+wji 1jXGD1UziEHpgpaqi2eAyEgAqQw+Ax74fSVh2UN5mFoafsHhv6CaMl00VQYFO4YVYSAI Sg4xJbfdFg8lFaTi6faFILno/ObL+EwQBVZVfIDR1bNEEfBrsbuYs0j0FaPT+B6OiZaL aBXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=IZlLOQyp62ykJD13LCRO0yd0g3YOI4L9Cfoqf+OJ1ac=; b=O8TNQGTC4q8vZz702mbvDnK82c9sURMLTrlLLUzXGHDjzCd6Xrp5GFDHakr9luRB01 DvQQKlI5uH0Yl4VYeOy/nx+ehWIg59b7BPH2loFvtgLjPIGzbnbBsy2fzRSHpN9RKIyH iRqPb3g/ZUwRROmaPBImapYIAR9KNWGVE1UH+euQztu//QntIjDJNBvdOi8f/qlt2hFs SdunGHQzZOtpb7sdeHzwmmyjMaUCV70vGmMNlHZ85j/s4y2vv/j+ApRGq0S3Vq0X9G2U mbRFhSIC1drIlA9NnYj7tzrn+mFCDGDqgKdSG4rfkJeSGPp/7ZZa0Eil5ozyBM7Gen30 SsjQ== X-Gm-Message-State: APjAAAU71kh3/0kieTxh6KEg3nxwAvTXC0w0jkuKA9uXQHX+lp6Cwun4 HCrKiyU8Ox817Q15wYVFv2QCuYCe X-Received: by 2002:adf:f0ca:: with SMTP id x10mr7776349wro.423.1580646448367; Sun, 02 Feb 2020 04:27:28 -0800 (PST) Received: from [192.168.43.18] (92.40.248.192.threembb.co.uk. [92.40.248.192]) by smtp.gmail.com with ESMTPSA id b16sm21796403wrj.23.2020.02.02.04.27.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 02 Feb 2020 04:27:27 -0800 (PST) From: Malcolm Priestley Subject: [PATCH 1/2] staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi. To: Greg Kroah-Hartman Cc: linux-wireless@vger.kernel.org, "devel@driverdev.osuosl.org" Message-ID: <9b3b92d6-3672-00be-d0b5-ccd222236ba9@gmail.com> Date: Sun, 2 Feb 2020 12:27:25 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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 Signed-off-by: Malcolm Priestley --- 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