Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2175278rdb; Tue, 3 Oct 2023 12:34:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHrk3BBWUezMR0dD5Pw7rHUUSJpMYmizdAbUsyUtRPDKzlah7hrkxEGTkqxHcK+OnUAgzuZ X-Received: by 2002:a05:6a00:3995:b0:68c:57c7:1eb0 with SMTP id fi21-20020a056a00399500b0068c57c71eb0mr540709pfb.11.1696361691489; Tue, 03 Oct 2023 12:34:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696361691; cv=none; d=google.com; s=arc-20160816; b=pUTz19Sjnkp6mAEODVbSWO2q9bkX6l3++cCIcP6eWCdC+g3Fijzrtq9I8BR5x/3C6Y DweDYqbfQ0Y2hj+NOTmndg3Lhbmnn3Tx0nFCa7v/tpbVcpcHDKI/FDY+2ghBitc1He3X OTSOHRfpdZdCyMTpBhG7YjE//pmFxyW/AOfCykaqea7h+Dg+Z3digYa69Her/j6m4lHv lCSpMRQTs5+EI8C5qj9HA30I8YFFyUz8N7btohZ/5WojSGulIY4+0EViMps+my/g+xaN ZtfXbFh2Y3DCwnl7z2+hOPgcZl53Bg9M5zyBTAl5XoQmz0aLjmrDE/W80yq3aQDqz/0G dY5Q== 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=UjGjxI6eGVPYNgs9C+/srpj1zkswroX+k2Y9drOlyqk=; fh=Sw1rtAM+hKyOoOQVYiiLzcdjc4spg79Z/tN6UmWUAKs=; b=UjRHGW/vQfFjRnRSFTEUdAkLt1jB8yKOTwQkXyoNkawysdR5pcSahkDe0xSs6Epw90 29KD1/n90ejok9u2ZEgz3n4JSFFlUJDGwP8+8bfe2mq8iaUtVsQQdwnPKWVAunW0cmap jkDSlqL0vlqTbYVkux4Cv+ntoeRa04wPXLRpLQPqqnQ9jxgzNqvERDLgfkWN9VYU3eFz rrx2GznyLUg8s9/x9BvCTuvuWlCmidiF3Jp5t+hJr8EwQ6RZJKzUh44s0UcGYWlItISK a15VAzg1lqsn0219eDOeK5mJSL5QqNCNkHgXkuvlHm9IvjrqtQkHPM0t8eJmUIf/AUB/ Fcww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dKVYiu+L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id s20-20020a056a00195400b0069023afd0d1si2173497pfk.329.2023.10.03.12.34.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 12:34:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dKVYiu+L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (Postfix) with ESMTP id 37D13811F267; Tue, 3 Oct 2023 12:34:48 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240978AbjJCTea (ORCPT + 99 others); Tue, 3 Oct 2023 15:34:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240986AbjJCTe0 (ORCPT ); Tue, 3 Oct 2023 15:34:26 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D8B810E for ; Tue, 3 Oct 2023 12:34:20 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-9b2d64c9307so53346166b.1 for ; Tue, 03 Oct 2023 12:34:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696361659; x=1696966459; 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=UjGjxI6eGVPYNgs9C+/srpj1zkswroX+k2Y9drOlyqk=; b=dKVYiu+L+bRmMxF2a+H+rCpLlxxzL5CjiQNQ4+LmTeRBaOOgmGmZihUynJDyf6fjqu 3808sYCdFuCz+GPutRJ66d/hTOal0uDqRPHPaKNREhTDiDgf9LbDdgSHN2qsVDRRPrSo 2nMp/kb1a9plWkdGxaG1GAEK6hdfBtW+WkcEHCAtgMnZRZwXqa1WyzYRPhFz54EzwMxa WmjjHVdmzsANY1E8oMYYtiWW1fASAN45hnc6y6RmsHjgBlIf8hO4rrhpyP3G4sd+SEsK QrNicZUO22eAls083J8CBgQRiWngSThY//p1kPFoPdAiRumvzKJNJ7GGexK5/NQWE7In Bu3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696361659; x=1696966459; 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=UjGjxI6eGVPYNgs9C+/srpj1zkswroX+k2Y9drOlyqk=; b=SDBuVQvvcpSrQ4I8iFG/L1ngCHk/Qii8Cb8yM/jUUJ3saMJ1PgmvoU57zzexl1+0O0 hP90qCH5Cd5EmbGscY9OfTrTlnpR2MPlJ6QGLoySzLYsK/r1KVlGFuja0hne715Iiquy DxZWNnSCsqJetNJlpgWoB98crc5WT9k3c6hiab5kjoUBbOU9+dX1P1c/7pwIFawLDSOd wF+nMMvrX/oFOUO5hJ31e2mHzbZgOiwlKNcF7ek3e9gGWyc9G13QOiHcvxFNlqXP7OXG FXN7iFynFUeJzGmCq1xvMuUjfF2HItGN1kp+L/Cl8XpRRVTvrPBDuvbbCT69NOUO7brC S9Vw== X-Gm-Message-State: AOJu0YxpY4/SSXFoHh5fKFX8S+/1DUTtg8VIGOeJFKXhOi7hTrkLQqEH GWPsznYpfgpq82Q5TJcPrm0= X-Received: by 2002:a17:906:7389:b0:9b2:71f2:bd11 with SMTP id f9-20020a170906738900b009b271f2bd11mr98352ejl.4.1696361659029; Tue, 03 Oct 2023 12:34:19 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p579356c7.dip0.t-ipconnect.de. [87.147.86.199]) by smtp.gmail.com with ESMTPSA id v10-20020a1709060b4a00b009ae5e46210asm1528773ejg.99.2023.10.03.12.34.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 12:34:18 -0700 (PDT) Date: Tue, 3 Oct 2023 21:34:17 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 11/11] staging: rtl8192e: Remove constant variable bToOtherSTA Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Tue, 03 Oct 2023 12:34:48 -0700 (PDT) Remove variable bToOtherSTA as it is set to 0 and unchanged. The equations result accordingly. Remove dead code. Signed-off-by: Philipp Hortmann --- drivers/staging/rtl8192e/rtllib_rx.c | 32 +++++++++++----------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 9a5fdf16f6a1..124c1651856b 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -1244,7 +1244,6 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb, u8 bssid[ETH_ALEN] = {0}; size_t hdrlen = 0; - bool bToOtherSTA = false; int ret = 0, i = 0; fc = le16_to_cpu(hdr->frame_control); @@ -1278,8 +1277,6 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb, /* Filter MGNT Frame */ if (type == RTLLIB_FTYPE_MGMT) { - if (bToOtherSTA) - goto rx_dropped; if (rtllib_rx_frame_mgmt(ieee, skb, rx_stats, type, stype)) goto rx_dropped; else @@ -1289,10 +1286,8 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb, /* Filter WAPI DATA Frame */ /* Update statstics for AP roaming */ - if (!bToOtherSTA) { - ieee->link_detect_info.NumRecvDataInPeriod++; - ieee->link_detect_info.NumRxOkInPeriod++; - } + ieee->link_detect_info.NumRecvDataInPeriod++; + ieee->link_detect_info.NumRxOkInPeriod++; /* Data frame - extract src/dst addresses */ rtllib_rx_extract_addr(ieee, hdr, dst, src, bssid); @@ -1308,7 +1303,7 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb, /* Send pspoll based on moredata */ if ((ieee->iw_mode == IW_MODE_INFRA) && (ieee->sta_sleep == LPS_IS_SLEEP) && - (ieee->polling) && (!bToOtherSTA)) { + (ieee->polling)) { if (WLAN_FC_MORE_DATA(fc)) { /* more data bit is set, let's request a new frame * from the AP @@ -1334,8 +1329,7 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb, /* Get TS for Rx Reorder */ hdr = (struct ieee80211_hdr *)skb->data; if (ieee->current_network.qos_data.active && IsQoSDataFrame(skb->data) - && !is_multicast_ether_addr(hdr->addr1) - && (!bToOtherSTA)) { + && !is_multicast_ether_addr(hdr->addr1)) { TID = Frame_QoSTID(skb->data); SeqNum = WLAN_GET_SEQ_SEQ(sc); rtllib_get_ts(ieee, (struct ts_common_info **)&ts, hdr->addr2, TID, @@ -1366,18 +1360,16 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb, /* Update WAPI PN */ /* Check if leave LPS */ - if (!bToOtherSTA) { - if (ieee->bIsAggregateFrame) - nr_subframes = rxb->nr_subframes; - else - nr_subframes = 1; - if (unicast) - ieee->link_detect_info.NumRxUnicastOkInPeriod += nr_subframes; - rtllib_rx_check_leave_lps(ieee, unicast, nr_subframes); - } + if (ieee->bIsAggregateFrame) + nr_subframes = rxb->nr_subframes; + else + nr_subframes = 1; + if (unicast) + ieee->link_detect_info.NumRxUnicastOkInPeriod += nr_subframes; + rtllib_rx_check_leave_lps(ieee, unicast, nr_subframes); /* Indicate packets to upper layer or Rx Reorder */ - if (!ieee->ht_info->cur_rx_reorder_enable || ts == NULL || bToOtherSTA) + if (!ieee->ht_info->cur_rx_reorder_enable || ts == NULL) rtllib_rx_indicate_pkt_legacy(ieee, rx_stats, rxb, dst, src); else RxReorderIndicatePacket(ieee, rxb, ts, SeqNum); -- 2.42.0