From patchwork Wed Dec 11 15:47:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 11285545 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0B4BC14BD for ; Wed, 11 Dec 2019 15:49:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DDD2A208C3 for ; Wed, 11 Dec 2019 15:49:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="K+IhQdX6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388649AbfLKPtX (ORCPT ); Wed, 11 Dec 2019 10:49:23 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:40856 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732393AbfLKPsd (ORCPT ); Wed, 11 Dec 2019 10:48:33 -0500 Received: by mail-wr1-f66.google.com with SMTP id c14so24544040wrn.7; Wed, 11 Dec 2019 07:48:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IGE1EZUwmuYxZ2Mr6HgxG/3CVQcz/FGb9rzGPe/Zmdw=; b=K+IhQdX61p0DNtryFjvI+O95fa02XCaX+fJS84QR58V9gaWJRhRI9ixClf2eV6teDl bkJRGQtmGKWOhr97rTwTPQ4EJhJjeKurhIVIUacxn1w2p7X61WykKpWbS4GJ5n7lK6I8 p5TpUwBxe3yjKHtbYGmnlo0Rxu8dN8v7fnnWYVoRjwsPPuP/rQnTgP1FVZ17DLSx9mWy raZ16oh3Qu3idCPSlSqdLWo+TSuXqVlisK55iB4lqeOoEf74BjPJ3feoBT36oa35jMWM L26CFs389pitsobSshnEcVXzhUTUaMrqZmp0JnTh4X3o//5mzkc5qqCuEnr72ru7FH+v jPwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IGE1EZUwmuYxZ2Mr6HgxG/3CVQcz/FGb9rzGPe/Zmdw=; b=NzB+cBFq7svBrMJQB25xXvBBoV9R/lYJig+F6ZVAoGfosBXq6GhssO/JDer9dhrhWD 6i1qeIVYsbXlvFVXvUSXGTnhwX5m/mg3T95X+/RWciMSv8SXqZTc/poA14GwZ2eRq/ag Wxa7TydIGGd6nP7qsIL9Gh4BcCpKUbl44/xWC7fCHipd3VGhomuhrHfhOGXR7TE4HMHu WM4+rz3UWD5HNrubADQ5ksKeWsBZOpsGkpWwVDijl+7A60OV4wK6ZHjV/F4khHDIPG04 SV11SqG2XgG4Ta1z8+cGOC55oNQsQ8vY42WQL8ByjXjQj+ZBFQB21qp/fwdFvkYIyUJC 5fAA== X-Gm-Message-State: APjAAAUtW8Tmb4S0RwXrxd4SHMQx1eVDWPBYAoqiuAONoM2MDtaK7KAj bH8L33sg8dssCVIS4s1wl8Q= X-Google-Smtp-Source: APXvYqxtnLcKlpVW5V/2bsbKm53q/msqRT+C1dVoFjS8gzd0jI835avZh2s7fMaA3YMf0+DkjJ1BJA== X-Received: by 2002:a5d:49c3:: with SMTP id t3mr462740wrs.113.1576079312153; Wed, 11 Dec 2019 07:48:32 -0800 (PST) Received: from localhost.localdomain (dslb-002-204-142-082.002.204.pools.vodafone-ip.de. [2.204.142.82]) by smtp.gmail.com with ESMTPSA id n16sm2677388wro.88.2019.12.11.07.48.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 07:48:31 -0800 (PST) From: Michael Straube To: pkshih@realtek.com Cc: kvalo@codeaurora.org, davem@davemloft.net, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 1/6] rtlwifi: rtl8192ce: use generic rtl_query_rxpwrpercentage Date: Wed, 11 Dec 2019 16:47:50 +0100 Message-Id: <20191211154755.15012-2-straube.linux@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191211154755.15012-1-straube.linux@gmail.com> References: <20191211154755.15012-1-straube.linux@gmail.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Function _rtl92c_query_rxpwrpercentage is identical to the generic version rtl_query_rxpwrpercentage. Remove _rtl92c_query_rxpwrpercentage and use the generic function. Signed-off-by: Michael Straube --- .../net/wireless/realtek/rtlwifi/rtl8192ce/trx.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c index fc9a3aae047f..dec66b3ac365 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c @@ -23,16 +23,6 @@ static u8 _rtl92ce_map_hwqueue_to_fwqueue(struct sk_buff *skb, u8 hw_queue) return skb->priority; } -static u8 _rtl92c_query_rxpwrpercentage(s8 antpower) -{ - if ((antpower <= -100) || (antpower >= 20)) - return 0; - else if (antpower >= 0) - return 100; - else - return 100 + antpower; -} - static long _rtl92ce_signal_scale_mapping(struct ieee80211_hw *hw, long currsig) { @@ -194,7 +184,7 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw, rx_pwr[i] = ((p_drvinfo->gain_trsw[i] & 0x3f) * 2) - 110; /* Translate DBM to percentage. */ - rssi = _rtl92c_query_rxpwrpercentage(rx_pwr[i]); + rssi = rtl_query_rxpwrpercentage(rx_pwr[i]); total_rssi += rssi; /* Get Rx snr value in DB */ rtlpriv->stats.rx_snr_db[i] = @@ -209,7 +199,7 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw, * hardware (for rate adaptive) */ rx_pwr_all = ((p_drvinfo->pwdb_all >> 1) & 0x7f) - 110; - pwdb_all = _rtl92c_query_rxpwrpercentage(rx_pwr_all); + pwdb_all = rtl_query_rxpwrpercentage(rx_pwr_all); pstats->rx_pwdb_all = pwdb_all; pstats->rxpower = rx_pwr_all; pstats->recvsignalpower = rx_pwr_all; From patchwork Wed Dec 11 15:47:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 11285541 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 610A614BD for ; Wed, 11 Dec 2019 15:49:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F6AC2073D for ; Wed, 11 Dec 2019 15:49:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="d/dm7nwP" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388674AbfLKPtM (ORCPT ); Wed, 11 Dec 2019 10:49:12 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:53038 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732673AbfLKPsf (ORCPT ); Wed, 11 Dec 2019 10:48:35 -0500 Received: by mail-wm1-f68.google.com with SMTP id p9so7639330wmc.2; Wed, 11 Dec 2019 07:48:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=C9m088SAYQmhRl4obMqPAQXfSLnOFVuekwVkFXaFEP0=; b=d/dm7nwPZT6OwN3imVmFmjIsiVH3322UofPrAtVrN0xcvLPlGMrcwaOU59r0ZGCZ4Z 0pZsmKKMBnHLCcVtrUmlLKxx5CJm3Xoa2zeISbFVZpiYGrQi3AZd8FA3bTOSZ1+rNTxF 91LBRp4stM+vO4lKBgKVPMaXPCvfv9vBnDY8NDeN24+eW7Jy5M/7JHOOnugtoOWDxNYL nnhkzsRJSO/xEjZmBzPtIB79FPrjaqmtK9KTucsg6fQ5NGRr++k8byKkXjTIvAsjiMCK DE6/9aiwyUUJn69j4sBAPqshMNF4kzXXMsMHT5Q7lsXmEgUncUbMT6I3pKlk+aE+Mj2Z D3cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=C9m088SAYQmhRl4obMqPAQXfSLnOFVuekwVkFXaFEP0=; b=m99abQb32qw8/4rTCvLvrBSqu8pi6IQLrVzVJUE77vMknPBhvdjfMBSgOS5Nca8zAA xSGul8H5S/4C7yGcDGbYcvq9SE2GcDJzNSmCRfgxNtCqvMbRtviGnFZIMRH6+PO4JWvs R4Q5RRjJT+wpqh11uD0hnbJY7TI+14W89xMGeeFCj4QSswmDNjs/Dbef86MWarbpWa9O mMWs5CdegNabHZIFkZkqg3c6FXFjF38KzjtI1AquCYccd4Rk/EVqrJA0AxMcID5XTgp5 uFm0zHxbSmRP/xkgJhWfqc5W9FHIUjgNKVpCaBCR0VIF8EChzdzCz4Jq9HNGhuuA+Qk8 v7ZA== X-Gm-Message-State: APjAAAVI6sfTBkBnwO9X/Xsgn54AGFPE0PA7MrqSSbL1K7yf3NBzPzC7 BmCW3nP88cPzZva9dVpwEk8= X-Google-Smtp-Source: APXvYqzoAbn9+TS92EG8pFC2srLWZ/weCFBlV1HJnvivHfj4/iW+yQqjp5dWtbDaFB7jXWjR+gzHeg== X-Received: by 2002:a1c:e909:: with SMTP id q9mr573933wmc.30.1576079313173; Wed, 11 Dec 2019 07:48:33 -0800 (PST) Received: from localhost.localdomain (dslb-002-204-142-082.002.204.pools.vodafone-ip.de. [2.204.142.82]) by smtp.gmail.com with ESMTPSA id n16sm2677388wro.88.2019.12.11.07.48.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 07:48:32 -0800 (PST) From: Michael Straube To: pkshih@realtek.com Cc: kvalo@codeaurora.org, davem@davemloft.net, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 2/6] rtlwifi: rtl8192cu: use generic rtl_query_rxpwrpercentage Date: Wed, 11 Dec 2019 16:47:51 +0100 Message-Id: <20191211154755.15012-3-straube.linux@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191211154755.15012-1-straube.linux@gmail.com> References: <20191211154755.15012-1-straube.linux@gmail.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Function _rtl92c_query_rxpwrpercentage is identical to the generic version rtl_query_rxpwrpercentage. Remove _rtl92c_query_rxpwrpercentage and use the generic function. Signed-off-by: Michael Straube --- .../net/wireless/realtek/rtlwifi/rtl8192cu/mac.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c index cec19b32c7e2..c8652283a516 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c @@ -567,16 +567,6 @@ void rtl92c_set_min_space(struct ieee80211_hw *hw, bool is2T) /*==============================================================*/ -static u8 _rtl92c_query_rxpwrpercentage(s8 antpower) -{ - if ((antpower <= -100) || (antpower >= 20)) - return 0; - else if (antpower >= 0) - return 100; - else - return 100 + antpower; -} - static long _rtl92c_signal_scale_mapping(struct ieee80211_hw *hw, long currsig) { @@ -678,7 +668,7 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw, break; } } - pwdb_all = _rtl92c_query_rxpwrpercentage(rx_pwr_all); + pwdb_all = rtl_query_rxpwrpercentage(rx_pwr_all); pstats->rx_pwdb_all = pwdb_all; pstats->recvsignalpower = rx_pwr_all; if (packet_match_bssid) { @@ -707,7 +697,7 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw, rf_rx_num++; rx_pwr[i] = ((p_drvinfo->gain_trsw[i] & 0x3f) * 2) - 110; - rssi = _rtl92c_query_rxpwrpercentage(rx_pwr[i]); + rssi = rtl_query_rxpwrpercentage(rx_pwr[i]); total_rssi += rssi; rtlpriv->stats.rx_snr_db[i] = (long)(p_drvinfo->rxsnr[i] / 2); @@ -716,7 +706,7 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw, pstats->rx_mimo_signalstrength[i] = (u8) rssi; } rx_pwr_all = ((p_drvinfo->pwdb_all >> 1) & 0x7f) - 110; - pwdb_all = _rtl92c_query_rxpwrpercentage(rx_pwr_all); + pwdb_all = rtl_query_rxpwrpercentage(rx_pwr_all); pstats->rx_pwdb_all = pwdb_all; pstats->rxpower = rx_pwr_all; pstats->recvsignalpower = rx_pwr_all; From patchwork Wed Dec 11 15:47:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 11285535 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8562114BD for ; Wed, 11 Dec 2019 15:48:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6314B2073B for ; Wed, 11 Dec 2019 15:48:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GVBh/bVB" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388223AbfLKPsl (ORCPT ); Wed, 11 Dec 2019 10:48:41 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:55244 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733285AbfLKPsh (ORCPT ); Wed, 11 Dec 2019 10:48:37 -0500 Received: by mail-wm1-f67.google.com with SMTP id b11so7637503wmj.4; Wed, 11 Dec 2019 07:48:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=75Og2PgxTcMUhS7+nyHAmRRnlhdiala21Qw5AEaCLOU=; b=GVBh/bVBnOXig14DsIcX0JQX0jmfwGWLA4DfBfEzlU/ONm/GMm2CtBowHCdUmGZSzp mUw8u8jJOZBtqXgX1EnnzEdvF4oTqZ8LCw4X2t3/90+cuVzirPcZqq6bF3zcVZOFYM1/ wC5FT05uAJl7QtNxZZO978r2tmBgjbrQkdw1ZXfpRh3mwHwb5+HCaP/CmuYvO8d2jmgU z4z4vcjgzKfF0mrJ3xB6sGHeBEAw+qE49NgKO5mYzNyFW7TY+V1a6J3YmmZ/u0Mm7SE4 f00qw8RPWB+VH+LXnHr+HQJC5wVkbQFqGMkYP0pbMvzh51AVfNW4omp9zpvrzmvbyoow PUnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=75Og2PgxTcMUhS7+nyHAmRRnlhdiala21Qw5AEaCLOU=; b=a/jfd6tsYr3LqrJgw3B5j8mpQpBs+8oTnHN0Ws8d1bPlcLuYld1clFGykQYxZHOlL3 ysAKPHG4vel6Ne6RIu5QbuwPO2iAFeGX9QkGxJvjhnuaEcBi7OE2KLr6Jh/J14CTHsHM 23HD20lZIH35Spe4yH36pW87EUNVp46xVTq2ba8fKi8LXGD3MHKfhrlKtuxWzk5+vDBg U969sjI20p1wFETvCEfu8caxnQQ3ObknqU0lLbLFLJZVeGPnH9BnLtRA68B/kzAoj+ja 9i8BHhORL4GlQn3mBoSmIoMROOSJKPNaEwqcDiisQ2NEWONaGELL4lq5AU5xEiiOuNd/ P13Q== X-Gm-Message-State: APjAAAUymSfxLDiMQWjo064fDnHqSAX+fQ4eHfAq/OIRKz0NurUz2H1b RDrgkqOtVN2UGJCLFWLnvrQ= X-Google-Smtp-Source: APXvYqz8MitotPjFdulow2qRETyIjAHEcrSmEewJj51115gA898L1NOuqch/mbKBXpkxm/o62FWORQ== X-Received: by 2002:a1c:7419:: with SMTP id p25mr444983wmc.129.1576079314633; Wed, 11 Dec 2019 07:48:34 -0800 (PST) Received: from localhost.localdomain (dslb-002-204-142-082.002.204.pools.vodafone-ip.de. [2.204.142.82]) by smtp.gmail.com with ESMTPSA id n16sm2677388wro.88.2019.12.11.07.48.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 07:48:34 -0800 (PST) From: Michael Straube To: pkshih@realtek.com Cc: kvalo@codeaurora.org, davem@davemloft.net, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 3/6] rtlwifi: rtl8192de: use generic rtl_query_rxpwrpercentage Date: Wed, 11 Dec 2019 16:47:52 +0100 Message-Id: <20191211154755.15012-4-straube.linux@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191211154755.15012-1-straube.linux@gmail.com> References: <20191211154755.15012-1-straube.linux@gmail.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Function _rtl92d_query_rxpwrpercentage is identical to the generic version rtl_query_rxpwrpercentage. Remove _rtl92d_query_rxpwrpercentage and use the generic function. Signed-off-by: Michael Straube --- .../net/wireless/realtek/rtlwifi/rtl8192de/trx.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c index 92c9fb45f800..abb35d33cf69 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c @@ -23,16 +23,6 @@ static u8 _rtl92de_map_hwqueue_to_fwqueue(struct sk_buff *skb, u8 hw_queue) return skb->priority; } -static u8 _rtl92d_query_rxpwrpercentage(s8 antpower) -{ - if ((antpower <= -100) || (antpower >= 20)) - return 0; - else if (antpower >= 0) - return 100; - else - return 100 + antpower; -} - static long _rtl92de_translate_todbm(struct ieee80211_hw *hw, u8 signal_strength_index) { @@ -141,7 +131,7 @@ static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw, break; } } - pwdb_all = _rtl92d_query_rxpwrpercentage(rx_pwr_all); + pwdb_all = rtl_query_rxpwrpercentage(rx_pwr_all); /* CCK gain is smaller than OFDM/MCS gain, */ /* so we add gain diff by experiences, the val is 6 */ pwdb_all += 6; @@ -183,7 +173,7 @@ static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw, rf_rx_num++; rx_pwr[i] = ((p_drvinfo->gain_trsw[i] & 0x3f) * 2) - 110; - rssi = _rtl92d_query_rxpwrpercentage(rx_pwr[i]); + rssi = rtl_query_rxpwrpercentage(rx_pwr[i]); total_rssi += rssi; rtlpriv->stats.rx_snr_db[i] = (long)(p_drvinfo->rxsnr[i] / 2); @@ -191,7 +181,7 @@ static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw, pstats->rx_mimo_signalstrength[i] = (u8) rssi; } rx_pwr_all = ((p_drvinfo->pwdb_all >> 1) & 0x7f) - 106; - pwdb_all = _rtl92d_query_rxpwrpercentage(rx_pwr_all); + pwdb_all = rtl_query_rxpwrpercentage(rx_pwr_all); pstats->rx_pwdb_all = pwdb_all; pstats->rxpower = rx_pwr_all; pstats->recvsignalpower = rx_pwr_all; From patchwork Wed Dec 11 15:47:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 11285529 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B4F02109A for ; Wed, 11 Dec 2019 15:48:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 92CD22073B for ; Wed, 11 Dec 2019 15:48:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bCfc0N8T" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388156AbfLKPsj (ORCPT ); Wed, 11 Dec 2019 10:48:39 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:38079 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387642AbfLKPsh (ORCPT ); Wed, 11 Dec 2019 10:48:37 -0500 Received: by mail-wm1-f65.google.com with SMTP id p17so7482798wmi.3; Wed, 11 Dec 2019 07:48:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tJ9GgmN6U03hXpj95yNvwg3ura76vS0QtmHZxEuQ1r8=; b=bCfc0N8TD8ThkdO45KdNSqrYXfycHCcZDi7Lq64aG9VSkqQbCEgbJkMiNfqhyyusKK 8wWDExidv6xKTJsiCBf+W26UHLE5MHz/J7OJkS3On9ARjNHGxnhY/ja+jhYPKPwJlpPh /D8C26QjRXCAym+/X5L3wgY27XdoMUXQpVeypEreDqVSoceoZz9r3anrXlbafGYXyKkH Y0O18Tymasb56Xa+x6WzuRsIEUxeIraCMUpgIaA+Fw+AcVypuWuPWAWFI65DEOXtzV5d 0C8iBPIT/rhASGLUfsfLufDzNEKHllqWwKL//RbYcoy0hYeKohoe/mWCQ0Ri482YSnxn aD/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tJ9GgmN6U03hXpj95yNvwg3ura76vS0QtmHZxEuQ1r8=; b=GHFjANXL+y05aF6DBQTDq946cEJWZd/jMDlVI4lS9wdkN3xQY3RFPAFY1vLwePqSp6 DP7oDI1SlbLc4bUveefTYI33xJ1TzZXPZHuTZVATQI3JORoZqkLWL6siqftLLuFUQwcC kbB0oNIz515yP0/XV9ra86gz9FLfdvR+i5BSUfa9Ak8K68ps/a2O+OzAF2yBhk3VgbG3 THU/59prEqwu/VqktW657UefF5hsBwoyyLM0vg/hTUDTtlwscLK2ZN7gymhryxqHvJlF AyPAQdAFkt1AlAxxxv3bsRslQnBunUmxUArPUO7sSJcmkhnnCoZStiw9mN1EuLLt6W1W 4NdQ== X-Gm-Message-State: APjAAAXh4stYGTxj1BZsXdrc2kjLe3n+cwu80WKwY7b/6dWhkUape9Dh qr+hG6JosgOeRmbUWVoLqF4= X-Google-Smtp-Source: APXvYqwmp7N+PjJmu1C3SaKII8d3PVKdPJXNac+V3JaWw91A4TjC9Y+sti0/v02A0Ry18NHnqOPFmg== X-Received: by 2002:a7b:c552:: with SMTP id j18mr476461wmk.123.1576079315614; Wed, 11 Dec 2019 07:48:35 -0800 (PST) Received: from localhost.localdomain (dslb-002-204-142-082.002.204.pools.vodafone-ip.de. [2.204.142.82]) by smtp.gmail.com with ESMTPSA id n16sm2677388wro.88.2019.12.11.07.48.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 07:48:35 -0800 (PST) From: Michael Straube To: pkshih@realtek.com Cc: kvalo@codeaurora.org, davem@davemloft.net, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 4/6] rtlwifi: rtl8192ce: use generic rtl_signal_scale_mapping Date: Wed, 11 Dec 2019 16:47:53 +0100 Message-Id: <20191211154755.15012-5-straube.linux@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191211154755.15012-1-straube.linux@gmail.com> References: <20191211154755.15012-1-straube.linux@gmail.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Function _rtl92ce_signal_scale_mapping is identical to the generic version rtl_signal_scale_mapping. Remove _rtl92ce_signal_scale_mapping and use the generic function. Signed-off-by: Michael Straube --- .../wireless/realtek/rtlwifi/rtl8192ce/trx.c | 34 ++----------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c index dec66b3ac365..8fc3cb824066 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c @@ -23,35 +23,6 @@ static u8 _rtl92ce_map_hwqueue_to_fwqueue(struct sk_buff *skb, u8 hw_queue) return skb->priority; } -static long _rtl92ce_signal_scale_mapping(struct ieee80211_hw *hw, - long currsig) -{ - long retsig; - - if (currsig >= 61 && currsig <= 100) - retsig = 90 + ((currsig - 60) / 4); - else if (currsig >= 41 && currsig <= 60) - retsig = 78 + ((currsig - 40) / 2); - else if (currsig >= 31 && currsig <= 40) - retsig = 66 + (currsig - 30); - else if (currsig >= 21 && currsig <= 30) - retsig = 54 + (currsig - 20); - else if (currsig >= 5 && currsig <= 20) - retsig = 42 + (((currsig - 5) * 2) / 3); - else if (currsig == 4) - retsig = 36; - else if (currsig == 3) - retsig = 27; - else if (currsig == 2) - retsig = 18; - else if (currsig == 1) - retsig = 9; - else - retsig = currsig; - - return retsig; -} - static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw, struct rtl_stats *pstats, struct rx_desc_92c *pdesc, @@ -231,11 +202,10 @@ static void _rtl92ce_query_rxphystatus(struct ieee80211_hw *hw, */ if (is_cck_rate) pstats->signalstrength = - (u8)(_rtl92ce_signal_scale_mapping(hw, pwdb_all)); + (u8)(rtl_signal_scale_mapping(hw, pwdb_all)); else if (rf_rx_num != 0) pstats->signalstrength = - (u8)(_rtl92ce_signal_scale_mapping - (hw, total_rssi /= rf_rx_num)); + (u8)(rtl_signal_scale_mapping(hw, total_rssi /= rf_rx_num)); } static void _rtl92ce_translate_rx_signal_stuff(struct ieee80211_hw *hw, From patchwork Wed Dec 11 15:47:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 11285533 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0671B14BD for ; Wed, 11 Dec 2019 15:48:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D98352073B for ; Wed, 11 Dec 2019 15:48:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="GLl7OYdy" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733183AbfLKPsm (ORCPT ); Wed, 11 Dec 2019 10:48:42 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:39732 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387787AbfLKPsj (ORCPT ); Wed, 11 Dec 2019 10:48:39 -0500 Received: by mail-wm1-f67.google.com with SMTP id d5so5948992wmb.4; Wed, 11 Dec 2019 07:48:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=M7WbKpVa7YBzu+uEMBm4uH2YlentzYifl+jvtz9sZI8=; b=GLl7OYdyVOqJOXdJdJDBBBMF/qIehkMWMoR8aTWr59HCkn466SyzTBdRATzuRwi23X dbe5d2X4ZRY/gucvweNPVDvvu7zIx1sma/roGCFeaJpLhZo5N5Mu8cK1/n5Q2+R+Bwit PMR68JfRDKbqnKd8MabQzV0lEgOCUgcSPO5qF6c3fbgf+FX5WUOYx/O00+f79QxEwmaq Rts+gEukwH4fhmLhWSDINWVKBI/t0Wgr6+NNBnr1sM4PkoowtStgS3fsLhPcKjvsqBJj F/vn05BcstTTHZVAGqZra9682LHWyf+9GwBNcgHfbPIdHWi7l35Zm7tZUisTl3e1nL4P J3qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=M7WbKpVa7YBzu+uEMBm4uH2YlentzYifl+jvtz9sZI8=; b=WNWnlgwyyz3QyYYMN14G59GDtFqLb6yyDv4ha0M6xCuUfTir6DkmbIMwuajhikbIcu 6yblTAwI1qQBqhWM/cJtqRzeNJjGTpLw18nDSX47CLCyFGJU2oYA5fvh/+iJnfiuCsQQ Z5iSCIXGAzcrSYSqNeepPJgDLRIQaQXLqfvN24uB4C61Jwfy4P++UZSzCb3EQqdO8Cwy NpKYlcu2fqwsnLLpBM2D/H1tfPIQ90p3sE5WHrdtICFQGS5JsEsXv0p2DNONa39FzE0b p3M3hKzkRVxMqSos8TYSlze92eW0BpiKaHILVWL7whNHTs7Vz6uzJmX7nBPI7UnsTWCt j3hA== X-Gm-Message-State: APjAAAWMGG0+6sKIUr2NgEsYm2C3nFB1RwKK1pigcUy+++gtv1KCTOqf p5Ph5/Et8OLln8O3FuIKv3jA3SwB X-Google-Smtp-Source: APXvYqwyidIIr1JaTp9lVcN9cl+wvViecMLVjOQXQQr02X2ZWDqSMLFmsgVyaQQD8dQWmP2RLfFfWg== X-Received: by 2002:a7b:c1cc:: with SMTP id a12mr466879wmj.53.1576079316572; Wed, 11 Dec 2019 07:48:36 -0800 (PST) Received: from localhost.localdomain (dslb-002-204-142-082.002.204.pools.vodafone-ip.de. [2.204.142.82]) by smtp.gmail.com with ESMTPSA id n16sm2677388wro.88.2019.12.11.07.48.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 07:48:36 -0800 (PST) From: Michael Straube To: pkshih@realtek.com Cc: kvalo@codeaurora.org, davem@davemloft.net, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 5/6] rtlwifi: rtl8192cu: use generic rtl_signal_scale_mapping Date: Wed, 11 Dec 2019 16:47:54 +0100 Message-Id: <20191211154755.15012-6-straube.linux@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191211154755.15012-1-straube.linux@gmail.com> References: <20191211154755.15012-1-straube.linux@gmail.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Function _rtl92c_signal_scale_mapping is identical to the generic version rtl_signal_scale_mapping. Remove _rtl92c_signal_scale_mapping and use the generic function. Signed-off-by: Michael Straube --- .../wireless/realtek/rtlwifi/rtl8192cu/mac.c | 33 ++----------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c index c8652283a516..b4b67341dc83 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/mac.c @@ -567,34 +567,6 @@ void rtl92c_set_min_space(struct ieee80211_hw *hw, bool is2T) /*==============================================================*/ -static long _rtl92c_signal_scale_mapping(struct ieee80211_hw *hw, - long currsig) -{ - long retsig; - - if (currsig >= 61 && currsig <= 100) - retsig = 90 + ((currsig - 60) / 4); - else if (currsig >= 41 && currsig <= 60) - retsig = 78 + ((currsig - 40) / 2); - else if (currsig >= 31 && currsig <= 40) - retsig = 66 + (currsig - 30); - else if (currsig >= 21 && currsig <= 30) - retsig = 54 + (currsig - 20); - else if (currsig >= 5 && currsig <= 20) - retsig = 42 + (((currsig - 5) * 2) / 3); - else if (currsig == 4) - retsig = 36; - else if (currsig == 3) - retsig = 27; - else if (currsig == 2) - retsig = 18; - else if (currsig == 1) - retsig = 9; - else - retsig = currsig; - return retsig; -} - static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw, struct rtl_stats *pstats, struct rx_desc_92c *p_desc, @@ -729,11 +701,10 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw, } if (is_cck_rate) pstats->signalstrength = - (u8) (_rtl92c_signal_scale_mapping(hw, pwdb_all)); + (u8)(rtl_signal_scale_mapping(hw, pwdb_all)); else if (rf_rx_num != 0) pstats->signalstrength = - (u8) (_rtl92c_signal_scale_mapping - (hw, total_rssi /= rf_rx_num)); + (u8)(rtl_signal_scale_mapping(hw, total_rssi /= rf_rx_num)); } void rtl92c_translate_rx_signal_stuff(struct ieee80211_hw *hw, From patchwork Wed Dec 11 15:47:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Straube X-Patchwork-Id: 11285537 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 63DE7109A for ; Wed, 11 Dec 2019 15:49:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 429702073B for ; Wed, 11 Dec 2019 15:49:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="H/BArNKi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733191AbfLKPtA (ORCPT ); Wed, 11 Dec 2019 10:49:00 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:35651 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732172AbfLKPsj (ORCPT ); Wed, 11 Dec 2019 10:48:39 -0500 Received: by mail-wr1-f67.google.com with SMTP id g17so24573290wro.2; Wed, 11 Dec 2019 07:48:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hx73pcsUgJSxrgufL1jOhpoizW3oUY/70+LaPyCXp4c=; b=H/BArNKiHJcz8r2KnFMx4JPSJUrXZxUibPYOHF22Nnmwqa0ao+OstLbIqQcL97rPmB /0/V7ApWRvkgKZfsSmBR3Sw+XobUuvYy/w+4Y78IjcJWleCNK/aNePkemWgkLnlM3csH V28tRQwYAEGa5oqJfl1MoA19Bu7M0R3kHcADRgHhG9lTd5+weUC8J0dMQnwfNPMyaw65 i2LRMKtDKE8gH/1jKWkHf71a9N0Q9z/qkfkKsLxq6d/SA1hfpUOEkA8VMtQEJX+OpxHw Z+bLdswTMaLTZV2K5SK3Lr2GbrItZWXQoLleWy0bsldFq8sryJwuM1tQwZBdPXMWlMTP E9Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hx73pcsUgJSxrgufL1jOhpoizW3oUY/70+LaPyCXp4c=; b=tHLnTWKXw8d2u+YMiXAdlqPpW2yjxFz71JKwCVaFrsPMG6RjIBmtMHsV9HgFJhRTTI Cr/IgXwSSsLI50wet/ERPiqIWJLZeXCTSHHTwxYuvUZdTlMjX7OJjCxXdyQRVe6V3gC/ Rrgh4CMZZeMCTzL0cfxRwLaIwnTrybzMYaZopP8mP8Qu0cP8IK/Vg4vCOtYfgLvTzWQ+ r46huTZ/oT7QCGlC1J+gCVFi9psSUukOk+J6n/iOLHaLPMw25d8aANV+bjn9zuyPDoSB 43raW24D3bmwolHG4cCeE8aChJlGZjWduWkUOPQuJu0plxOAZ8QGfYNw7SQYJr2q9qv9 Tejw== X-Gm-Message-State: APjAAAWFKbjHhN9K/t1IWSScJWThItfyDTXLE5beTv1LOPSRDbputy3G xe0xSMpCPgDkrhs0lv/1Zk4= X-Google-Smtp-Source: APXvYqwx4uTZOXPFPOnIekcfGr/QHXUMTwrew7xjvS7Um1oKAGwq5fAhUoh3w2KAtfeFQHqJo+O+cQ== X-Received: by 2002:adf:fcc4:: with SMTP id f4mr439362wrs.247.1576079317544; Wed, 11 Dec 2019 07:48:37 -0800 (PST) Received: from localhost.localdomain (dslb-002-204-142-082.002.204.pools.vodafone-ip.de. [2.204.142.82]) by smtp.gmail.com with ESMTPSA id n16sm2677388wro.88.2019.12.11.07.48.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Dec 2019 07:48:37 -0800 (PST) From: Michael Straube To: pkshih@realtek.com Cc: kvalo@codeaurora.org, davem@davemloft.net, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Straube Subject: [PATCH 6/6] rtlwifi: rtl8192de: use generic rtl_signal_scale_mapping Date: Wed, 11 Dec 2019 16:47:55 +0100 Message-Id: <20191211154755.15012-7-straube.linux@gmail.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191211154755.15012-1-straube.linux@gmail.com> References: <20191211154755.15012-1-straube.linux@gmail.com> MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Function _rtl92de_signal_scale_mapping is identical to the generic version rtl_signal_scale_mapping. Remove _rtl92de_signal_scale_mapping and use the generic function. Signed-off-by: Michael Straube --- .../wireless/realtek/rtlwifi/rtl8192de/trx.c | 31 ++----------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c index abb35d33cf69..85194aa30c36 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c @@ -33,33 +33,6 @@ static long _rtl92de_translate_todbm(struct ieee80211_hw *hw, return signal_power; } -static long _rtl92de_signal_scale_mapping(struct ieee80211_hw *hw, long currsig) -{ - long retsig; - - if (currsig >= 61 && currsig <= 100) - retsig = 90 + ((currsig - 60) / 4); - else if (currsig >= 41 && currsig <= 60) - retsig = 78 + ((currsig - 40) / 2); - else if (currsig >= 31 && currsig <= 40) - retsig = 66 + (currsig - 30); - else if (currsig >= 21 && currsig <= 30) - retsig = 54 + (currsig - 20); - else if (currsig >= 5 && currsig <= 20) - retsig = 42 + (((currsig - 5) * 2) / 3); - else if (currsig == 4) - retsig = 36; - else if (currsig == 3) - retsig = 27; - else if (currsig == 2) - retsig = 18; - else if (currsig == 1) - retsig = 9; - else - retsig = currsig; - return retsig; -} - static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw, struct rtl_stats *pstats, struct rx_desc_92d *pdesc, @@ -202,10 +175,10 @@ static void _rtl92de_query_rxphystatus(struct ieee80211_hw *hw, } } if (is_cck_rate) - pstats->signalstrength = (u8)(_rtl92de_signal_scale_mapping(hw, + pstats->signalstrength = (u8)(rtl_signal_scale_mapping(hw, pwdb_all)); else if (rf_rx_num != 0) - pstats->signalstrength = (u8)(_rtl92de_signal_scale_mapping(hw, + pstats->signalstrength = (u8)(rtl_signal_scale_mapping(hw, total_rssi /= rf_rx_num)); }