Message ID | 67df12497bc6f93c6ef85b4dda7490b037f2a3da.1674596722.git.philipp.g.hortmann@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2395317wrn; Tue, 24 Jan 2023 14:08:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXsVFeh6ms2XaNiHHpjdi132AKfWfRq20LuoggegBd646Z8R04WuhGxc/jRNCzeboRV48edm X-Received: by 2002:a17:906:848e:b0:7c4:fa17:7202 with SMTP id m14-20020a170906848e00b007c4fa177202mr29268121ejx.33.1674598114106; Tue, 24 Jan 2023 14:08:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674598114; cv=none; d=google.com; s=arc-20160816; b=LuDinFFHJnF1lf0HTBXGFzPKChacw0EcLqV9na3rYYvgnlxZVxQw1TVgvvX9wEnIoW jM6/+C6hQcwM8N5q336wfdLY0UCFDPgDCxfEIdP3rT4SU3MqYVLxSM/0N7RLh3Gf7D0O 6Bb91TF+KXSX4hlCklLEC6ZjFm9QVHQn8jpZM5zxk+YR76Cz3bbqY6vSyvm+dqKwtxy9 T2uCeNOQFJw2vBSvhiGAhjp2zEA8wukufvqkak/OnYG3Bzqge3fzrL6YB/zuVH0/TgXr 5B96SeCy4lUV/hlSim4hDK8WxRE7ZZ1OnlXyadKdigJPl2BBFfHb/+XmnIgnUatWOm6d wekw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=75/IjlhstHHhYWzsbQIR4Dd2QgIIp4238rHFb4NvJPg=; b=cUTaHPOsDUZSv/91VG2/8xSc0VKNLTaqaimVMoEaCt1DsNYjiva006tk7hrqPnxdkB Fh86KdUbQe8Bv2MLXK2zM9uYwYvHunl5Jk+ybp9GRj+UyKupgDA6YDwP/25UeM5sRxLm 4I5/BRUEDknhz/r8XuYsUmhGdfsB9t6ufpwBsdChQkKX1/mq/s6NqfcB7M2gOVtPZcni X5e11TxcYkwNbyw9LNe6xbykoNtghDsw+J30mlIgqRZQGM5BgS3PxUJR0pax0osWhWVu nGor5x4U0zky3FMTSrp8qXBB//dllfBjO6fxGkwJwiMsGDBPY6RC7RSF3TrMspOmZAs5 2LKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AUJrtPJN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gh13-20020a1709073c0d00b007826cb6f57csi3385030ejc.407.2023.01.24.14.08.10; Tue, 24 Jan 2023 14:08:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=AUJrtPJN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S235113AbjAXWET (ORCPT <rfc822;rust.linux@gmail.com> + 99 others); Tue, 24 Jan 2023 17:04:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235095AbjAXWES (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 24 Jan 2023 17:04:18 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 079244FCF4 for <linux-kernel@vger.kernel.org>; Tue, 24 Jan 2023 14:04:01 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id c4-20020a1c3504000000b003d9e2f72093so41042wma.1 for <linux-kernel@vger.kernel.org>; Tue, 24 Jan 2023 14:04:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=75/IjlhstHHhYWzsbQIR4Dd2QgIIp4238rHFb4NvJPg=; b=AUJrtPJNhcoozirZE5FdY6iWPNtWlFrObe7Pouo+G3eNQt8ubArB/ugRI/EzBk9OSX 1aq6Z17HKeVHJ/q36qE9oS1RMEDv5jjAwcewxT63fnFkjsgfFANbeaC3arfNSH+yM7w2 xT7f7b4ycOCZWq8KFDadRPl3sUvStDTw/0DCHEhhkrbsPyqrywJjmLakQirMH9f56Nu1 d6ulFPt+bPPB/tuHOHKArqU+uU1/KlbWsy+JHfYYHQKIlxIL5g/E7Ok8V27Swx2PG+xI 1/hicgnaOETKo56WUCdj+ruFnlflR0QyzyQ7Dfnx1/hAKZq5jdVhJ55hXLmYCbtzS97/ osZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=75/IjlhstHHhYWzsbQIR4Dd2QgIIp4238rHFb4NvJPg=; b=ehMmjnulyciWJ4zW45+SLMv+dfBWm33RVcpTkDd2atdWNP45k38xF+yTWIRyFEXRIa 7Ou03RF0bFJgD7/R81hihhwUpt+lGOUiAd6yDLMgwiod8ypK6Lxqp5AEElYOks38vey5 j4RKWO2RrK0K+2Mkr6EKhVLlhJVj6AYHC/yu3obTQOAjPhgk2U6friJxrSHLDCXiMJv8 tar6m7W0OIg4W58KbfAefAnnuHp8jCd1ipIQMApiKEG7topsEdkOjqWw9fM96IU7nhBe fdXSNWKfvsk0lQYLcJd//lqAHFwVGtMqK82zA7QIfdkGQlGVuqY8Ud0QB2U+qcM1MMRY PoXw== X-Gm-Message-State: AFqh2kpzZOWTb4OHIUYwvvqYZNGYaZQiIs19LZ1IC41UjN7f2ZVPPFQ9 Wqi80JHZ+Qu+zLs8/solrvc= X-Received: by 2002:a05:600c:3b0a:b0:3db:22a:1349 with SMTP id m10-20020a05600c3b0a00b003db022a1349mr7678769wms.2.1674597839531; Tue, 24 Jan 2023 14:03:59 -0800 (PST) Received: from matrix-ESPRIMO-P710 (p57935ca5.dip0.t-ipconnect.de. [87.147.92.165]) by smtp.gmail.com with ESMTPSA id j20-20020a05600c489400b003db0f4e12c8sm22371wmp.34.2023.01.24.14.03.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Jan 2023 14:03:58 -0800 (PST) Date: Tue, 24 Jan 2023 23:03:56 +0100 From: Philipp Hortmann <philipp.g.hortmann@gmail.com> To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 06/11] staging: rtl8192e: Remove unused variables num_proc.., recei.. and rxov.. Message-ID: <67df12497bc6f93c6ef85b4dda7490b037f2a3da.1674596722.git.philipp.g.hortmann@gmail.com> References: <cover.1674596722.git.philipp.g.hortmann@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <cover.1674596722.git.philipp.g.hortmann@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755943392221325976?= X-GMAIL-MSGID: =?utf-8?q?1755943392221325976?= |
Series |
staging: rtl8192e: Remove unused variables from struct rt_stats
|
|
Commit Message
Philipp Hortmann
Jan. 24, 2023, 10:03 p.m. UTC
num_process_phyinfo, received_bwtype and rxoverflow are initialized and
increased but never read. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 5 -----
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 4 +---
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 3 ---
3 files changed, 1 insertion(+), 11 deletions(-)
Comments
Hi Philipp,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Hortmann/staging-rtl8192e-Remove-unused-variables-rxrdu-and-rxok/20230125-060703
patch link: https://lore.kernel.org/r/67df12497bc6f93c6ef85b4dda7490b037f2a3da.1674596722.git.philipp.g.hortmann%40gmail.com
patch subject: [PATCH 06/11] staging: rtl8192e: Remove unused variables num_proc.., recei.. and rxov..
config: ia64-allyesconfig (https://download.01.org/0day-ci/archive/20230125/202301250813.dBvVqX7V-lkp@intel.com/config)
compiler: ia64-linux-gcc (GCC) 12.1.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/3d74e0475f452fadccfa0a14940734cbfdc31f64
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Philipp-Hortmann/staging-rtl8192e-Remove-unused-variables-rxrdu-and-rxok/20230125-060703
git checkout 3d74e0475f452fadccfa0a14940734cbfdc31f64
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/staging/rtl8192e/rtl8192e/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c: In function '_rtl92e_query_rxphystatus':
>> drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:1299:58: warning: variable 'prxsc' set but not used [-Wunused-but-set-variable]
1299 | struct phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc;
| ^~~~~
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c: In function '_rtl92e_update_received_rate_histogram_stats':
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:1693:13: warning: variable 'preamble_guardinterval' set but not used [-Wunused-but-set-variable]
1693 | u32 preamble_guardinterval;
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/prxsc +1299 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1276
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1277
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1278 #define rx_hal_is_cck_rate(_pdrvinfo)\
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1279 ((_pdrvinfo->RxRate == DESC90_RATE1M ||\
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1280 _pdrvinfo->RxRate == DESC90_RATE2M ||\
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1281 _pdrvinfo->RxRate == DESC90_RATE5_5M ||\
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1282 _pdrvinfo->RxRate == DESC90_RATE11M) &&\
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1283 !_pdrvinfo->RxHT)
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1284
410bfd1d8f1c16 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-09-20 1285 static void _rtl92e_query_rxphystatus(
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1286 struct r8192_priv *priv,
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1287 struct rtllib_rx_stats *pstats,
4f534b36afb6fe drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 1288 struct rx_desc *pdesc,
6f22c62010122f drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 1289 struct rx_fwinfo *pdrvinfo,
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1290 struct rtllib_rx_stats *precord_stats,
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1291 bool bpacket_match_bssid,
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1292 bool bpacket_toself,
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1293 bool bPacketBeacon,
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1294 bool bToSelfBA
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1295 )
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1296 {
2ae7ea8cf099f0 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 1297 struct phy_sts_ofdm_819xpci *pofdm_buf;
ececd694df70a7 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 1298 struct phy_sts_cck_819xpci *pcck_buf;
910d9e5c2deec0 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 @1299 struct phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1300 u8 *prxpkt;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1301 u8 i, max_spatial_stream, tmp_rxsnr, tmp_rxevm, rxsc_sgien_exflg;
5d5fd353740ffe drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Arnd Bergmann 2016-07-20 1302 s8 rx_pwr[4], rx_pwr_all = 0;
5d5fd353740ffe drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Arnd Bergmann 2016-07-20 1303 s8 rx_snrX, rx_evmX;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1304 u8 evm, pwdb_all;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1305 u32 RSSI, total_rssi = 0;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1306 u8 is_cck_rate = 0;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1307 u8 rf_rx_num = 0;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1308 static u8 check_reg824;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1309 static u32 reg824_bit9;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1310
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1311 is_cck_rate = rx_hal_is_cck_rate(pdrvinfo);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1312 memset(precord_stats, 0, sizeof(struct rtllib_rx_stats));
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1313 pstats->bPacketMatchBSSID = precord_stats->bPacketMatchBSSID =
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1314 bpacket_match_bssid;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1315 pstats->bPacketToSelf = precord_stats->bPacketToSelf = bpacket_toself;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1316 pstats->bIsCCK = precord_stats->bIsCCK = is_cck_rate;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1317 pstats->bPacketBeacon = precord_stats->bPacketBeacon = bPacketBeacon;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1318 pstats->bToSelfBA = precord_stats->bToSelfBA = bToSelfBA;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1319 if (check_reg824 == 0) {
3c351feca929e1 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-07-19 1320 reg824_bit9 = rtl92e_get_bb_reg(priv->rtllib->dev,
3c351feca929e1 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-07-19 1321 rFPGA0_XA_HSSIParameter2,
3c351feca929e1 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-07-19 1322 0x200);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1323 check_reg824 = 1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1324 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1325
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1326
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1327 prxpkt = (u8 *)pdrvinfo;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1328
6f22c62010122f drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 1329 prxpkt += sizeof(struct rx_fwinfo);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1330
ececd694df70a7 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 1331 pcck_buf = (struct phy_sts_cck_819xpci *)prxpkt;
2ae7ea8cf099f0 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 1332 pofdm_buf = (struct phy_sts_ofdm_819xpci *)prxpkt;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1333
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1334 pstats->RxMIMOSignalQuality[0] = -1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1335 pstats->RxMIMOSignalQuality[1] = -1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1336 precord_stats->RxMIMOSignalQuality[0] = -1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1337 precord_stats->RxMIMOSignalQuality[1] = -1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1338
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1339 if (is_cck_rate) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1340 u8 report;
b1d5ee7004c855 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-13 1341
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1342 if (!reg824_bit9) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1343 report = pcck_buf->cck_agc_rpt & 0xc0;
0dbffe07b15d43 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Aya Mahfouz 2015-02-26 1344 report >>= 6;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1345 switch (report) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1346 case 0x3:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1347 rx_pwr_all = -35 - (pcck_buf->cck_agc_rpt &
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1348 0x3e);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1349 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1350 case 0x2:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1351 rx_pwr_all = -23 - (pcck_buf->cck_agc_rpt &
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1352 0x3e);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1353 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1354 case 0x1:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1355 rx_pwr_all = -11 - (pcck_buf->cck_agc_rpt &
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1356 0x3e);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1357 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1358 case 0x0:
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1359 rx_pwr_all = 8 - (pcck_buf->cck_agc_rpt & 0x3e);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1360 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1361 }
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1362 } else {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1363 report = pcck_buf->cck_agc_rpt & 0x60;
0dbffe07b15d43 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Aya Mahfouz 2015-02-26 1364 report >>= 5;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1365 switch (report) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1366 case 0x3:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1367 rx_pwr_all = -35 -
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1368 ((pcck_buf->cck_agc_rpt &
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1369 0x1f) << 1);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1370 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1371 case 0x2:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1372 rx_pwr_all = -23 -
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1373 ((pcck_buf->cck_agc_rpt &
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1374 0x1f) << 1);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1375 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1376 case 0x1:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1377 rx_pwr_all = -11 -
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1378 ((pcck_buf->cck_agc_rpt &
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1379 0x1f) << 1);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1380 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1381 case 0x0:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1382 rx_pwr_all = -8 -
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1383 ((pcck_buf->cck_agc_rpt &
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1384 0x1f) << 1);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1385 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1386 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1387 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1388
aa804031831cfc drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-07-19 1389 pwdb_all = rtl92e_rx_db_to_percent(rx_pwr_all);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1390 pstats->RxPWDBAll = precord_stats->RxPWDBAll = pwdb_all;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1391 pstats->RecvSignalPower = rx_pwr_all;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1392
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1393 if (bpacket_match_bssid) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1394 u8 sq;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1395
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1396 if (pstats->RxPWDBAll > 40) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1397 sq = 100;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1398 } else {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1399 sq = pcck_buf->sq_rpt;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1400
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1401 if (pcck_buf->sq_rpt > 64)
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1402 sq = 0;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1403 else if (pcck_buf->sq_rpt < 20)
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1404 sq = 100;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1405 else
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1406 sq = ((64-sq) * 100) / 44;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1407 }
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1408 pstats->SignalQuality = sq;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1409 precord_stats->SignalQuality = sq;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1410 pstats->RxMIMOSignalQuality[0] = sq;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1411 precord_stats->RxMIMOSignalQuality[0] = sq;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1412 pstats->RxMIMOSignalQuality[1] = -1;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1413 precord_stats->RxMIMOSignalQuality[1] = -1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1414 }
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1415 } else {
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1416 for (i = RF90_PATH_A; i < RF90_PATH_MAX; i++) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1417 if (priv->brfpath_rxenable[i])
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1418 rf_rx_num++;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1419
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1420 rx_pwr[i] = ((pofdm_buf->trsw_gain_X[i] & 0x3F) *
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1421 2) - 110;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1422
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1423 tmp_rxsnr = pofdm_buf->rxsnr_X[i];
5d5fd353740ffe drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Arnd Bergmann 2016-07-20 1424 rx_snrX = (s8)(tmp_rxsnr);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1425 rx_snrX /= 2;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1426 priv->stats.rxSNRdB[i] = (long)rx_snrX;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1427
aa804031831cfc drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-07-19 1428 RSSI = rtl92e_rx_db_to_percent(rx_pwr[i]);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1429 if (priv->brfpath_rxenable[i])
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1430 total_rssi += RSSI;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1431
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1432 if (bpacket_match_bssid) {
20400df1e48eeb drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Solomon Tan 2022-04-23 1433 pstats->RxMIMOSignalStrength[i] = RSSI;
20400df1e48eeb drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Solomon Tan 2022-04-23 1434 precord_stats->RxMIMOSignalStrength[i] = RSSI;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1435 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1436 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1437
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1438
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1439 rx_pwr_all = (((pofdm_buf->pwdb_all) >> 1) & 0x7f) - 106;
aa804031831cfc drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-07-19 1440 pwdb_all = rtl92e_rx_db_to_percent(rx_pwr_all);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1441
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1442 pstats->RxPWDBAll = precord_stats->RxPWDBAll = pwdb_all;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1443 pstats->RxPower = precord_stats->RxPower = rx_pwr_all;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1444 pstats->RecvSignalPower = rx_pwr_all;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1445 if (pdrvinfo->RxHT && pdrvinfo->RxRate >= DESC90_RATEMCS8 &&
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1446 pdrvinfo->RxRate <= DESC90_RATEMCS15)
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1447 max_spatial_stream = 2;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1448 else
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1449 max_spatial_stream = 1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1450
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1451 for (i = 0; i < max_spatial_stream; i++) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1452 tmp_rxevm = pofdm_buf->rxevm_X[i];
5d5fd353740ffe drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Arnd Bergmann 2016-07-20 1453 rx_evmX = (s8)(tmp_rxevm);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1454
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1455 rx_evmX /= 2;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1456
6b89d0e7ceb733 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-07-19 1457 evm = rtl92e_evm_db_to_percent(rx_evmX);
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1458 if (bpacket_match_bssid) {
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1459 if (i == 0) {
4db665e50ccc75 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Gargi Sharma 2017-03-09 1460 pstats->SignalQuality = evm & 0xff;
4db665e50ccc75 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Gargi Sharma 2017-03-09 1461 precord_stats->SignalQuality = evm & 0xff;
4db665e50ccc75 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Gargi Sharma 2017-03-09 1462 }
4db665e50ccc75 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Gargi Sharma 2017-03-09 1463 pstats->RxMIMOSignalQuality[i] = evm & 0xff;
4db665e50ccc75 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Gargi Sharma 2017-03-09 1464 precord_stats->RxMIMOSignalQuality[i] = evm & 0xff;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1465 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1466 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1467
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1468
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1469 rxsc_sgien_exflg = pofdm_buf->rxsc_sgien_exflg;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1470 prxsc = (struct phy_ofdm_rx_status_rxsc_sgien_exintfflag *)
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1471 &rxsc_sgien_exflg;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1472 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1473
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1474 if (is_cck_rate) {
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1475 pstats->SignalStrength = precord_stats->SignalStrength =
20400df1e48eeb drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Solomon Tan 2022-04-23 1476 _rtl92e_signal_scale_mapping(priv,
20400df1e48eeb drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Solomon Tan 2022-04-23 1477 (long)pwdb_all);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1478
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1479 } else {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1480 if (rf_rx_num != 0)
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1481 pstats->SignalStrength = precord_stats->SignalStrength =
20400df1e48eeb drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Solomon Tan 2022-04-23 1482 _rtl92e_signal_scale_mapping(priv,
20400df1e48eeb drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Solomon Tan 2022-04-23 1483 (long)(total_rssi /= rf_rx_num));
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1484 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1485 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1486
Hi Philipp,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/Philipp-Hortmann/staging-rtl8192e-Remove-unused-variables-rxrdu-and-rxok/20230125-060703
patch link: https://lore.kernel.org/r/67df12497bc6f93c6ef85b4dda7490b037f2a3da.1674596722.git.philipp.g.hortmann%40gmail.com
patch subject: [PATCH 06/11] staging: rtl8192e: Remove unused variables num_proc.., recei.. and rxov..
config: i386-randconfig-a011-20230123 (https://download.01.org/0day-ci/archive/20230125/202301251741.PZUSurrT-lkp@intel.com/config)
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/3d74e0475f452fadccfa0a14940734cbfdc31f64
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Philipp-Hortmann/staging-rtl8192e-Remove-unused-variables-rxrdu-and-rxok/20230125-060703
git checkout 3d74e0475f452fadccfa0a14940734cbfdc31f64
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/staging/rtl8192e/rtl8192e/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:1299:51: warning: variable 'prxsc' set but not used [-Wunused-but-set-variable]
struct phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc;
^
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:1693:6: warning: variable 'preamble_guardinterval' set but not used [-Wunused-but-set-variable]
u32 preamble_guardinterval;
^
2 warnings generated.
vim +/prxsc +1299 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1276
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1277
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1278 #define rx_hal_is_cck_rate(_pdrvinfo)\
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1279 ((_pdrvinfo->RxRate == DESC90_RATE1M ||\
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1280 _pdrvinfo->RxRate == DESC90_RATE2M ||\
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1281 _pdrvinfo->RxRate == DESC90_RATE5_5M ||\
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1282 _pdrvinfo->RxRate == DESC90_RATE11M) &&\
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1283 !_pdrvinfo->RxHT)
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1284
410bfd1d8f1c16 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-09-20 1285 static void _rtl92e_query_rxphystatus(
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1286 struct r8192_priv *priv,
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1287 struct rtllib_rx_stats *pstats,
4f534b36afb6fe drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 1288 struct rx_desc *pdesc,
6f22c62010122f drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 1289 struct rx_fwinfo *pdrvinfo,
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1290 struct rtllib_rx_stats *precord_stats,
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1291 bool bpacket_match_bssid,
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1292 bool bpacket_toself,
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1293 bool bPacketBeacon,
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1294 bool bToSelfBA
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1295 )
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1296 {
2ae7ea8cf099f0 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 1297 struct phy_sts_ofdm_819xpci *pofdm_buf;
ececd694df70a7 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 1298 struct phy_sts_cck_819xpci *pcck_buf;
910d9e5c2deec0 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 @1299 struct phy_ofdm_rx_status_rxsc_sgien_exintfflag *prxsc;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1300 u8 *prxpkt;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1301 u8 i, max_spatial_stream, tmp_rxsnr, tmp_rxevm, rxsc_sgien_exflg;
5d5fd353740ffe drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Arnd Bergmann 2016-07-20 1302 s8 rx_pwr[4], rx_pwr_all = 0;
5d5fd353740ffe drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Arnd Bergmann 2016-07-20 1303 s8 rx_snrX, rx_evmX;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1304 u8 evm, pwdb_all;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1305 u32 RSSI, total_rssi = 0;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1306 u8 is_cck_rate = 0;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1307 u8 rf_rx_num = 0;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1308 static u8 check_reg824;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1309 static u32 reg824_bit9;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1310
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1311 is_cck_rate = rx_hal_is_cck_rate(pdrvinfo);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1312 memset(precord_stats, 0, sizeof(struct rtllib_rx_stats));
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1313 pstats->bPacketMatchBSSID = precord_stats->bPacketMatchBSSID =
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1314 bpacket_match_bssid;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1315 pstats->bPacketToSelf = precord_stats->bPacketToSelf = bpacket_toself;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1316 pstats->bIsCCK = precord_stats->bIsCCK = is_cck_rate;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1317 pstats->bPacketBeacon = precord_stats->bPacketBeacon = bPacketBeacon;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1318 pstats->bToSelfBA = precord_stats->bToSelfBA = bToSelfBA;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1319 if (check_reg824 == 0) {
3c351feca929e1 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-07-19 1320 reg824_bit9 = rtl92e_get_bb_reg(priv->rtllib->dev,
3c351feca929e1 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-07-19 1321 rFPGA0_XA_HSSIParameter2,
3c351feca929e1 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-07-19 1322 0x200);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1323 check_reg824 = 1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1324 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1325
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1326
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1327 prxpkt = (u8 *)pdrvinfo;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1328
6f22c62010122f drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 1329 prxpkt += sizeof(struct rx_fwinfo);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1330
ececd694df70a7 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 1331 pcck_buf = (struct phy_sts_cck_819xpci *)prxpkt;
2ae7ea8cf099f0 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-18 1332 pofdm_buf = (struct phy_sts_ofdm_819xpci *)prxpkt;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1333
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1334 pstats->RxMIMOSignalQuality[0] = -1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1335 pstats->RxMIMOSignalQuality[1] = -1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1336 precord_stats->RxMIMOSignalQuality[0] = -1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1337 precord_stats->RxMIMOSignalQuality[1] = -1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1338
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1339 if (is_cck_rate) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1340 u8 report;
b1d5ee7004c855 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-07-13 1341
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1342 if (!reg824_bit9) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1343 report = pcck_buf->cck_agc_rpt & 0xc0;
0dbffe07b15d43 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Aya Mahfouz 2015-02-26 1344 report >>= 6;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1345 switch (report) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1346 case 0x3:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1347 rx_pwr_all = -35 - (pcck_buf->cck_agc_rpt &
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1348 0x3e);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1349 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1350 case 0x2:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1351 rx_pwr_all = -23 - (pcck_buf->cck_agc_rpt &
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1352 0x3e);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1353 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1354 case 0x1:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1355 rx_pwr_all = -11 - (pcck_buf->cck_agc_rpt &
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1356 0x3e);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1357 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1358 case 0x0:
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1359 rx_pwr_all = 8 - (pcck_buf->cck_agc_rpt & 0x3e);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1360 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1361 }
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1362 } else {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1363 report = pcck_buf->cck_agc_rpt & 0x60;
0dbffe07b15d43 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Aya Mahfouz 2015-02-26 1364 report >>= 5;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1365 switch (report) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1366 case 0x3:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1367 rx_pwr_all = -35 -
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1368 ((pcck_buf->cck_agc_rpt &
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1369 0x1f) << 1);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1370 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1371 case 0x2:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1372 rx_pwr_all = -23 -
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1373 ((pcck_buf->cck_agc_rpt &
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1374 0x1f) << 1);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1375 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1376 case 0x1:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1377 rx_pwr_all = -11 -
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1378 ((pcck_buf->cck_agc_rpt &
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1379 0x1f) << 1);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1380 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1381 case 0x0:
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1382 rx_pwr_all = -8 -
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1383 ((pcck_buf->cck_agc_rpt &
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1384 0x1f) << 1);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1385 break;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1386 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1387 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1388
aa804031831cfc drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-07-19 1389 pwdb_all = rtl92e_rx_db_to_percent(rx_pwr_all);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1390 pstats->RxPWDBAll = precord_stats->RxPWDBAll = pwdb_all;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1391 pstats->RecvSignalPower = rx_pwr_all;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1392
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1393 if (bpacket_match_bssid) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1394 u8 sq;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1395
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1396 if (pstats->RxPWDBAll > 40) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1397 sq = 100;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1398 } else {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1399 sq = pcck_buf->sq_rpt;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1400
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1401 if (pcck_buf->sq_rpt > 64)
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1402 sq = 0;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1403 else if (pcck_buf->sq_rpt < 20)
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1404 sq = 100;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1405 else
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1406 sq = ((64-sq) * 100) / 44;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1407 }
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1408 pstats->SignalQuality = sq;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1409 precord_stats->SignalQuality = sq;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1410 pstats->RxMIMOSignalQuality[0] = sq;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1411 precord_stats->RxMIMOSignalQuality[0] = sq;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1412 pstats->RxMIMOSignalQuality[1] = -1;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1413 precord_stats->RxMIMOSignalQuality[1] = -1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1414 }
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1415 } else {
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1416 for (i = RF90_PATH_A; i < RF90_PATH_MAX; i++) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1417 if (priv->brfpath_rxenable[i])
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1418 rf_rx_num++;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1419
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1420 rx_pwr[i] = ((pofdm_buf->trsw_gain_X[i] & 0x3F) *
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1421 2) - 110;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1422
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1423 tmp_rxsnr = pofdm_buf->rxsnr_X[i];
5d5fd353740ffe drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Arnd Bergmann 2016-07-20 1424 rx_snrX = (s8)(tmp_rxsnr);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1425 rx_snrX /= 2;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1426 priv->stats.rxSNRdB[i] = (long)rx_snrX;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1427
aa804031831cfc drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-07-19 1428 RSSI = rtl92e_rx_db_to_percent(rx_pwr[i]);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1429 if (priv->brfpath_rxenable[i])
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1430 total_rssi += RSSI;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1431
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1432 if (bpacket_match_bssid) {
20400df1e48eeb drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Solomon Tan 2022-04-23 1433 pstats->RxMIMOSignalStrength[i] = RSSI;
20400df1e48eeb drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Solomon Tan 2022-04-23 1434 precord_stats->RxMIMOSignalStrength[i] = RSSI;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1435 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1436 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1437
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1438
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1439 rx_pwr_all = (((pofdm_buf->pwdb_all) >> 1) & 0x7f) - 106;
aa804031831cfc drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-07-19 1440 pwdb_all = rtl92e_rx_db_to_percent(rx_pwr_all);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1441
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1442 pstats->RxPWDBAll = precord_stats->RxPWDBAll = pwdb_all;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1443 pstats->RxPower = precord_stats->RxPower = rx_pwr_all;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1444 pstats->RecvSignalPower = rx_pwr_all;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1445 if (pdrvinfo->RxHT && pdrvinfo->RxRate >= DESC90_RATEMCS8 &&
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1446 pdrvinfo->RxRate <= DESC90_RATEMCS15)
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1447 max_spatial_stream = 2;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1448 else
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1449 max_spatial_stream = 1;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1450
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1451 for (i = 0; i < max_spatial_stream; i++) {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1452 tmp_rxevm = pofdm_buf->rxevm_X[i];
5d5fd353740ffe drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Arnd Bergmann 2016-07-20 1453 rx_evmX = (s8)(tmp_rxevm);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1454
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1455 rx_evmX /= 2;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1456
6b89d0e7ceb733 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Mateusz Kulikowski 2015-07-19 1457 evm = rtl92e_evm_db_to_percent(rx_evmX);
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1458 if (bpacket_match_bssid) {
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1459 if (i == 0) {
4db665e50ccc75 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Gargi Sharma 2017-03-09 1460 pstats->SignalQuality = evm & 0xff;
4db665e50ccc75 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Gargi Sharma 2017-03-09 1461 precord_stats->SignalQuality = evm & 0xff;
4db665e50ccc75 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Gargi Sharma 2017-03-09 1462 }
4db665e50ccc75 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Gargi Sharma 2017-03-09 1463 pstats->RxMIMOSignalQuality[i] = evm & 0xff;
4db665e50ccc75 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Gargi Sharma 2017-03-09 1464 precord_stats->RxMIMOSignalQuality[i] = evm & 0xff;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1465 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1466 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1467
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1468
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1469 rxsc_sgien_exflg = pofdm_buf->rxsc_sgien_exflg;
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1470 prxsc = (struct phy_ofdm_rx_status_rxsc_sgien_exintfflag *)
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1471 &rxsc_sgien_exflg;
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1472 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1473
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1474 if (is_cck_rate) {
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1475 pstats->SignalStrength = precord_stats->SignalStrength =
20400df1e48eeb drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Solomon Tan 2022-04-23 1476 _rtl92e_signal_scale_mapping(priv,
20400df1e48eeb drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Solomon Tan 2022-04-23 1477 (long)pwdb_all);
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1478
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1479 } else {
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1480 if (rf_rx_num != 0)
526294770c72e9 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-25 1481 pstats->SignalStrength = precord_stats->SignalStrength =
20400df1e48eeb drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Solomon Tan 2022-04-23 1482 _rtl92e_signal_scale_mapping(priv,
20400df1e48eeb drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c Solomon Tan 2022-04-23 1483 (long)(total_rssi /= rf_rx_num));
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1484 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1485 }
94a799425eee82 drivers/staging/rtl8192e/r8192E_dev.c Larry Finger 2011-08-23 1486
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index 31b4823e6324..154d15b68b8e 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -1469,10 +1469,6 @@ static void _rtl92e_query_rxphystatus( rxsc_sgien_exflg = pofdm_buf->rxsc_sgien_exflg; prxsc = (struct phy_ofdm_rx_status_rxsc_sgien_exintfflag *) &rxsc_sgien_exflg; - if (pdrvinfo->BW) - priv->stats.received_bwtype[1+prxsc->rxsc]++; - else - priv->stats.received_bwtype[0]++; } if (is_cck_rate) { @@ -1535,7 +1531,6 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer, if (!bcheck) return; - priv->stats.num_process_phyinfo++; if (!prev_st->bIsCCK && prev_st->bPacketToSelf) { for (rfpath = RF90_PATH_A; rfpath < RF90_PATH_C; rfpath++) { if (!rtl92e_is_legal_rf_path(priv->rtllib->dev, rfpath)) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index e0d0f4faeca7..c5fe8e0aa83f 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -2183,10 +2183,8 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev) tasklet_schedule(&priv->irq_rx_tasklet); } - if (inta & IMR_RXFOVW) { - priv->stats.rxoverflow++; + if (inta & IMR_RXFOVW) tasklet_schedule(&priv->irq_rx_tasklet); - } if (inta & IMR_TXFOVW) priv->stats.txoverflow++; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h index e38de4d8a467..bb942283bc7a 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h @@ -184,9 +184,6 @@ enum reset_type { struct rt_stats { unsigned long received_rate_histogram[4][32]; - unsigned long num_process_phyinfo; - unsigned long received_bwtype[5]; - unsigned long rxoverflow; unsigned long rxint; unsigned long ints; unsigned long shints;