Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5315244ybl; Tue, 4 Feb 2020 11:36:39 -0800 (PST) X-Google-Smtp-Source: APXvYqwciRXwQufixYAo2CytH5iZlH56C9ekI/kow1A516MdOmMyccK21Mz68Nnv2XdagrYw2NFC X-Received: by 2002:aca:3109:: with SMTP id x9mr395800oix.107.1580844999321; Tue, 04 Feb 2020 11:36:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580844999; cv=none; d=google.com; s=arc-20160816; b=WZaX6/pykeb3FHRytPXLh1ZB6a45zCg4IZHDlv+dsBhP1MHi0NWqXRV0puhAKOnmh2 cRqtS1Nn0hFa3jV/dRVsC8xr8LMOa7ckJp4f0Qr34oPEQUjVUvjKPv6UhCTCadTkQuaF BkR0pIEkCCAYywwfTHqEuKm8RLjBUAeFfeFUW/ajbEPXwa/J9Gyie1upogCxVaDOrKFa MQwZLK6J5uN+bh4lt9SfkW0VtsYmiFlHssTqDbqWVfLRV2bStqvA6MkgNFauFHf7vhLo KqiXfvCLYyYheh2yzFxKHtpZRdaBSBLZAUVSxHOl/6QG9lVIXq7cqwmoRSLMlDsiXiXA tGNw== 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:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=Xa/VtTU0vSVS5LXqAKxKyIRX2SoYCDqOHmaanbAohys=; b=xEYbEKiKjb28Rj36g2S6e8vX02NSjNNyCH1NFuBmp8xqQqEDOFFexYWMOLHDZjq9DS 4ciebto+YxVznig06IHTdBQYhkm84Rd8xcVRxNuHC8+SG9sq84yE9MWvKHX0/rQpvzuL ZodmjZafmJAHvMG8seFBiWfA+rfgHV/w0xQVnoAb/R5HuqAr0NQSSPRCBQ4n+O3jMv2R 2mfO7ay93gYBBJcjaTyy+I9FFvQIMzG+IBVpERzr9KqZ+tzEu6WYVQ/rX1q08QEtqOOv C/nJWo1zXmaAZiYoYvisAl7iCOVoMVZOHTBbViSx20McJWcMn2sL3OONlDFFcwkg8bTn 9vlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ni1Zc7mq; 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 o16si11706322otp.289.2020.02.04.11.36.14; Tue, 04 Feb 2020 11:36:39 -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=ni1Zc7mq; 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 S1727412AbgBDTeG (ORCPT + 99 others); Tue, 4 Feb 2020 14:34:06 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:44181 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727331AbgBDTeG (ORCPT ); Tue, 4 Feb 2020 14:34:06 -0500 Received: by mail-wr1-f65.google.com with SMTP id m16so24574811wrx.11 for ; Tue, 04 Feb 2020 11:34:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=Xa/VtTU0vSVS5LXqAKxKyIRX2SoYCDqOHmaanbAohys=; b=ni1Zc7mq56v+achnR0h9YpgMhDx7Q4ZtWxkaYlWr49GiO7iIGKTyqKIfxYScGb4sXB uTell2I8s/iVksVtuM52vYjgBDKGBgflF3TYUWl3YeqVi/vtFZyBEpjboq0dkDg66n55 NJSqj4RG1jsf7w1m+RfwNGIM3uDgX2YcbFAsMyeuCYUOS3VP69M3QaZQzIc6xXVmRYn+ YhTCghnGUyytH4H/tXJdJgueDBNRH0dmrPyoMz6Z5K98C4d3/j9i5LNkpUWZiZ+UDxzE dbcHHa3x+mX/0Dq4hPD9R0hYcrStpHI14WjfngDkglYFdZeyjB6Zpt9Gi05JXnJZ9MI6 Bx8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Xa/VtTU0vSVS5LXqAKxKyIRX2SoYCDqOHmaanbAohys=; b=lO6zrTB05CFwWPacj0a1P30NL6X/7fx3/1EWy45AykFlgdWr4++BWfCli0dgRx1YIR C7Vqkq82a/yyRhm7TQo775WmA3AGYwbinj1U3LTbGkw5mRCxUjh8wg/Af0sABSBLdBpQ 2aorbpJsNAkBwu98LQK7jhfftWKqvNkCH3xYCJYmZCQjSY+iIUcgyJ/5QVW9U2dDzFpJ ZHOpbHC26qnon3KQfxycP1CLsZCfA2hqrPLflfUqzGJlIAqi6Av6/VnSulWo7EiKk5CA lWOiTWmgnOFv0MyqohUOFAzR0iJGaJRtr92lBtrCL2Gkq7bYa9COVSdrGXhL8nK0ZzCM wHRA== X-Gm-Message-State: APjAAAX0LTpvnYZ/uT4LxV728C2pyjAuH9CJUm5wfBkcWN9eGOzCG2UH sVLnW3rGboSsjxT626tqeV12HtoK X-Received: by 2002:adf:f244:: with SMTP id b4mr22485206wrp.88.1580844844592; Tue, 04 Feb 2020 11:34:04 -0800 (PST) Received: from [192.168.43.57] (94.197.120.219.threembb.co.uk. [94.197.120.219]) by smtp.gmail.com with ESMTPSA id t131sm5075977wmb.13.2020.02.04.11.34.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 04 Feb 2020 11:34:04 -0800 (PST) Subject: [PATCH v2 1/2] staging: vt6656: fix sign of rx_dbm to bb_pre_ed_rssi. To: Greg Kroah-Hartman Cc: Dan Carpenter , "devel@driverdev.osuosl.org" , linux-wireless@vger.kernel.org References: <9b3b92d6-3672-00be-d0b5-ccd222236ba9@gmail.com> <20200203094222.GM1778@kadam> From: Malcolm Priestley Message-ID: Date: Tue, 4 Feb 2020 19:34:02 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <20200203094222.GM1778@kadam> 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. Fixes: 63b9907f58f1 ("staging: vt6656: mac80211 conversion: create rx function.") Cc: stable Signed-off-by: Malcolm Priestley --- 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