From patchwork Wed Dec 13 16:52:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Hortmann X-Patchwork-Id: 178180 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp7913583dys; Wed, 13 Dec 2023 08:52:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IGDu0cIjWH0P2ajmWSiDvs13Dt6kMH0Vzo90UefeveeOsxVxnyvPj///WPbVd8+21hNg0/E X-Received: by 2002:a17:90b:4ac7:b0:286:6cc1:2cba with SMTP id mh7-20020a17090b4ac700b002866cc12cbamr3696053pjb.68.1702486341029; Wed, 13 Dec 2023 08:52:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702486341; cv=none; d=google.com; s=arc-20160816; b=RkOGv4CPXSBEVH/7hqB9XML1jbd5uiBKYmQ69lDKQpPEg5H7Zo88MaqQvGp56Xjgeq Uoj0y6baCmO2+U1ZAdkERe/lAksPhuRe7wmhgIgi1Unn4mrVaZcCqCGGLqv6Td0l4e4z gvfPyRQ8R5sQoaDQPQ1l2/48xEFhoGfarxLIwn8+AG+4SSUe8D6WgnAWyYLZHr8Q0iCn Vdi4en2YTGdqQv4xbgmzFlTnX0O4xX67FAX8ivy8ZigvOum9wdSZSExrCd3DdW+AqBfY p2W0+PxSuih5h134wXlQ5/R4CCZXsNOD83FgLypd6cglwIEAcOMp3EFlpk1ENIgCB/HH L6lg== 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=V24N0myd3yrAHQ5oXdaUpmt08W779GgLxB9a3K2nYC4=; fh=Sw1rtAM+hKyOoOQVYiiLzcdjc4spg79Z/tN6UmWUAKs=; b=jKXuODlMp0wWv35nEmUhUnCSmmWqp8v7PG19xpJK0d+cKxCET9LPzVi+fkGZXtJWHM X6YuW7YBpiU/LDzFl4kGyDU/d5Wp0fypuoYqCek6OipVaO6fhVoGy5vN6gGfU9y/WHx6 /S0pGoIrtUn8pColrsYEgZ4ktL1KFAoUsPpom7t4OBuxnEvuxjiU4+C3XpDuFjCRTR0/ rtZNFJ8a8+6ABobm77szPxU1ATNmPE1/VNVv9cNbX3l1a1AZC7/f6YJG9UVpruftrOHg zPN+GQUbjtVjPN2SGLv+2cx3nZTs1LQePb4vl5Ek7OSOI0ELT3nbNPa/xG2nixY3+WEL DfLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d2nKf6dS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id sj14-20020a17090b2d8e00b00286880259d9si10108681pjb.12.2023.12.13.08.52.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 08:52:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=d2nKf6dS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id B9D528031129; Wed, 13 Dec 2023 08:52:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379351AbjLMQwG (ORCPT + 99 others); Wed, 13 Dec 2023 11:52:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379150AbjLMQwD (ORCPT ); Wed, 13 Dec 2023 11:52:03 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F31F411F for ; Wed, 13 Dec 2023 08:52:07 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a1b6524f24fso224797366b.0 for ; Wed, 13 Dec 2023 08:52:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702486326; x=1703091126; darn=vger.kernel.org; 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=V24N0myd3yrAHQ5oXdaUpmt08W779GgLxB9a3K2nYC4=; b=d2nKf6dS5cUG0Y036FOb4keqBk+nOAgSgRWxLQp9w9zZ2k8S+KZGjOFotfbc6Dyowi OcEbRLqtXDdIqBrtQH4uLFezolRulKsFH2CiWV0HdEvTrziDiSFZgs8LeGWMm0wQZ4h6 AyBx56cKhtl9l2KzpF5p7EPvhlYaD2y0jv3jfnwG464LNXgo3gfS1zowgYMrzQUnLdSv IXw2WbEA16enI1CY1uv8LozqS7Agj8shLkaeCA3QUv2VnIugDMTIk8P33dTIfMrgy3Dd iWdCm014Hhr2L0NaSQfjPSqZvqst8nuhM+hZFsJEzn6m7MYttk23SSQMViaGtHZifq6l UZHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702486326; x=1703091126; 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=V24N0myd3yrAHQ5oXdaUpmt08W779GgLxB9a3K2nYC4=; b=NaTGfa8G6YsftBh9lVkQevvyRKlXbltcTcfPXOHD0hhdsm+iEVJJNVHHJmCuKE+Wfj d23lltncdIEWFVyUgIcHDpGzvzQvLnLw0WqGfQjy9+R/twpPFB9SRw/5tdTZttx3vb3a HSLdXx+cmiQQv9/a6yxCQRD5FcFeioG4l6Ouup6r8tluWa+IzZRqMuEUR2wdyAzt8Tbu UZ6q+aX7mMtKbTCNVrbj5WnIn/rfOTjR1U5IMB4v/xBvMtJJe6bdHxDk21dUCoq1WpB+ 0N2esg3yknuGOqAU5ty69WucEPTEbwRdnKkOvJw1nIc0BY8a3GsRvwYkHoJyF0WWf11A 1eGg== X-Gm-Message-State: AOJu0Yzt7Ym5Ocw/v6eycOWG5WSAEgPbHrm2fon9v0JroCeClMJB37k3 52LGx4a5j/xsUFOIn48nPYE= X-Received: by 2002:a17:907:c705:b0:9cf:7c60:47b9 with SMTP id ty5-20020a170907c70500b009cf7c6047b9mr8673247ejc.1.1702486326023; Wed, 13 Dec 2023 08:52:06 -0800 (PST) Received: from matrix-ESPRIMO-P710 (p54a07fa0.dip0.t-ipconnect.de. [84.160.127.160]) by smtp.gmail.com with ESMTPSA id tb19-20020a1709078b9300b00a1cd30d06d1sm8245382ejc.14.2023.12.13.08.52.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 08:52:05 -0800 (PST) Date: Wed, 13 Dec 2023 17:52:04 +0100 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 04/10] staging: rtl8192e: Remove constant variable peer_mimo_ps Message-ID: <7b2ccccde769133db9365c693fdd0c42e9dc75f9.1702406712.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 13 Dec 2023 08:52:18 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785186317123402865 X-GMAIL-MSGID: 1785186317123402865 MimoPwrSave is set to 3 and not changed. peer_mimo_ps is set to MimoPwrSave and not changed. All evaluations of peer_mimo_ps with 0 will have a constant result and can be removed. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 5 +---- drivers/staging/rtl8192e/rtl819x_HT.h | 1 - drivers/staging/rtl8192e/rtl819x_HTProc.c | 6 +----- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index e6d51abd0d01..763ecaad6652 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -1753,10 +1753,7 @@ void rtl92e_update_ratr_table(struct net_device *dev) ratr_value &= 0x00000FF7; break; case WIRELESS_MODE_N_24G: - if (ieee->ht_info->peer_mimo_ps == 0) - ratr_value &= 0x0007F007; - else - ratr_value &= 0x000FF007; + ratr_value &= 0x000FF007; break; default: break; diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h index eb2cfeab97d6..43472b2250c2 100644 --- a/drivers/staging/rtl8192e/rtl819x_HT.h +++ b/drivers/staging/rtl8192e/rtl819x_HT.h @@ -112,7 +112,6 @@ struct rt_hi_throughput { u8 forced_mpdu_density; u8 forced_short_gi; u8 current_op_mode; - u8 peer_mimo_ps; enum ht_extchnl_offset CurSTAExtChnlOffset; u8 cur_tx_bw40mhz; u8 sw_bw_in_progress; diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c index 71d5b6f32869..d424b7729a01 100644 --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c @@ -507,11 +507,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee) HTFilterMCSRate(ieee, pPeerHTCap->MCS, ieee->dot11ht_oper_rate_set); - ht_info->peer_mimo_ps = pPeerHTCap->MimoPwrSave; - if (ht_info->peer_mimo_ps == MIMO_PS_STATIC) - pMcsFilter = MCS_FILTER_1SS; - else - pMcsFilter = MCS_FILTER_ALL; + pMcsFilter = MCS_FILTER_ALL; ieee->HTHighestOperaRate = HTGetHighestMCSRate(ieee, ieee->dot11ht_oper_rate_set, pMcsFilter);