Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2175130rdb; Tue, 3 Oct 2023 12:34:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG7GxMfspBMiOymKu73gnD80pihrEmBGkOyjARo3q8r/iYxtVtlx8ldUByfYE2lG5Bc82Vp X-Received: by 2002:a05:6a21:9981:b0:137:3c67:85d7 with SMTP id ve1-20020a056a21998100b001373c6785d7mr477808pzb.16.1696361671274; Tue, 03 Oct 2023 12:34:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696361671; cv=none; d=google.com; s=arc-20160816; b=qjai5s4Q4bglzT/W1siqNd2+6yoHzgmRjognaaTUV7n5PblxKOty98s+O6rYUh7p+3 ZwN8ElA2atM7WmtoMItXuJ4g7VA0k6CbIeN9X7t2gSeeO7+V9JXJPTZHtpyfOpD7SJJ7 NF+0qFc5DSi4HNGjwGZ4r5Q2WjGsB9ijkoLQNXFUi/uYj84tG+nvxuVDvzrjhiI07Rv4 peKLT1UN7p+iz2VV74A3raShE5fXa8WouAazOUg7ylB7BFK2M6rcmcY905Uty0q42x5Y TwpY2gdbOIjPmlsBlO9Fal8RiEzXg05fTkfenjTVK3wZ8cADlI2OynzYdsKhjhXW80Sd JRlA== 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=KcpwhoTF72QmuvfU2aA3vEoxhzziqn/FfyNb0Sy2saM=; fh=Sw1rtAM+hKyOoOQVYiiLzcdjc4spg79Z/tN6UmWUAKs=; b=aZ2oi2O4tyLFVrMVf9BcPrMjF6FxtVdds1oV8Je5EwW+1VMSqD0q2SPufUjt5uqcWX Q+IwCy/n8b+I69lySVpiWqXlogTJd8GwQ+tKOHenKbun1iyTrh+SQv6NI9X60m8u0Nwq uHAbiHrM6yaXhwQ6ZhCSkY1omCp3/s+jhbFMyhxxvr2pxE//UzsrpH4/4W97pKgbAfx8 67ltz9ID+PDbZtRgUlaq9YVsGdUx4sXwloqvzihtZfaDpHKgkq3uvZVqO2g4SrioeY/w +R4V7GSA8mcd5DWJT5TSBj2eKbev/aH0l6LWOYTpIVqiX0oWiG3ncPuKS2w4UwC6GzNB IgZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gm2gzl1e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id k129-20020a636f87000000b0056c2892bfb9si2024669pgc.644.2023.10.03.12.34.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 12:34:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gm2gzl1e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 2CFFA81A2361; Tue, 3 Oct 2023 12:34:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240878AbjJCTeN (ORCPT + 99 others); Tue, 3 Oct 2023 15:34:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240964AbjJCTeJ (ORCPT ); Tue, 3 Oct 2023 15:34:09 -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 C1FBFCC for ; Tue, 3 Oct 2023 12:34:04 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-98273ae42d0so50543666b.0 for ; Tue, 03 Oct 2023 12:34:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696361643; x=1696966443; 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=KcpwhoTF72QmuvfU2aA3vEoxhzziqn/FfyNb0Sy2saM=; b=gm2gzl1eB9fJIQCWhSXHRPZGqadtvUJ+ugGPxpLwWhIYCjZWQeTXv+BcgSrYUTFV8f tej0iZeasdtoMFvMZO8HpIRjOrVEodhbmwLKpxq4zeIudIgoSWwG84mzFC9P5S+uTUK9 jvCmeLmW4oFMNgvAFn7iXHMc7kU1yH6nncN/XpgX6C+O5gts3oh32CGZpZqFcjZ1b2Oz EAdkchIcY3T8Maq6TlocUXmDeaPsWhvnT+PSFT0br0xX9CU7pTrPQjnMgiNW56UPcgBC bHLRuhLpVcB9JgHpSbnSDExNW2i5FoO0/VbQw780wTWnO1DX2NY+UPuuGkOxgsc4NaeN xIsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696361643; x=1696966443; 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=KcpwhoTF72QmuvfU2aA3vEoxhzziqn/FfyNb0Sy2saM=; b=xIqkoUFz694Rp6EpSHWJfc8SeERoMvR+HN03wbnlUeFxbJusfhVl3dCOFtxHWCqGR2 M7qZ5WntY8qMpWakghYLXl2NtKaOWA7cGsJRYdLmRUbU1/6qmje72W8BK+bN7mSujfkD +KEYraiIek7BXKxy4Fkdk78wamCaBqoQ3pX3UIp1fmmS1KI3KJr7uE/QkktWBjHUVtdt U+nyNRfl6UMcTPz6fBFFBaQ4YKoQ1M4O1JnokOShfjH3wVnGEVryOqzVJdMGPspJaunl 1L+/o/K/OjaV3dRLD3gCPPn3bn1J01QeXh5dFJGkg1vWKmuX9Bjt2XZ10/FgPfia9bFa 5njA== X-Gm-Message-State: AOJu0YyL1wwz4KOXE4mkyMEke9nyeOlBVlkyOEnFiX5ECNHORuDP0vdc 3XKlDWXjKGx8YKelnAUPvqtb5adABDQ= X-Received: by 2002:a17:906:7496:b0:9a5:ce62:6e1a with SMTP id e22-20020a170906749600b009a5ce626e1amr125955ejl.1.1696361642874; Tue, 03 Oct 2023 12:34:02 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p579356c7.dip0.t-ipconnect.de. [87.147.86.199]) by smtp.gmail.com with ESMTPSA id g5-20020a170906594500b009ae6a6451fdsm1530253ejr.35.2023.10.03.12.34.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 12:34:02 -0700 (PDT) Date: Tue, 3 Oct 2023 21:34:01 +0200 From: Philipp Hortmann To: Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 09/11] staging: rtl8192e: Remove constant variable promiscuous_on Message-ID: <07936bcc6a426d6f6d74bece2970ab6028abef44.1696360404.git.philipp.g.hortmann@gmail.com> 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 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]); Tue, 03 Oct 2023 12:34:27 -0700 (PDT) Remove variable promiscuous_on as it is set to 0 and unchanged. The equation results accordingly. Remove dead code. Signed-off-by: Philipp Hortmann --- .../staging/rtl8192e/rtl8192e/r8192E_dev.c | 5 +---- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtllib.h | 5 ----- drivers/staging/rtl8192e/rtllib_rx.c | 22 +++++++++---------- 4 files changed, 11 insertions(+), 22 deletions(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index 6cfc2254487b..e343e10e011a 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -706,10 +706,7 @@ void rtl92e_link_change(struct net_device *dev) reg = rtl92e_readl(dev, RCR); if (priv->rtllib->link_state == MAC80211_LINKED) { - if (ieee->intel_promiscuous_md_info.promiscuous_on) - ; - else - priv->receive_config = reg |= RCR_CBSSID; + priv->receive_config = reg |= RCR_CBSSID; } else { priv->receive_config = reg &= ~RCR_CBSSID; } diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index f15f73be41a2..ef17472bea05 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -740,7 +740,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev) priv->rtllib->mode = WIRELESS_MODE_AUTO; priv->rtllib->iw_mode = IW_MODE_INFRA; priv->rtllib->net_promiscuous_md = false; - priv->rtllib->intel_promiscuous_md_info.promiscuous_on = false; priv->rtllib->ieee_up = 0; priv->retry_rts = DEFAULT_RETRY_RTS; priv->retry_data = DEFAULT_RETRY_DATA; diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 748ae8d35c1a..97bb00bdbf4d 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1175,10 +1175,6 @@ struct rt_pmkid_list { u8 bUsed; }; -struct rt_intel_promisc_mode { - bool promiscuous_on; -}; - /*************** DRIVER STATUS *****/ #define STATUS_SCANNING 0 /*************** DRIVER STATUS *****/ @@ -1258,7 +1254,6 @@ struct rtllib_device { int iw_mode; /* operating mode (IW_MODE_*) */ bool net_promiscuous_md; - struct rt_intel_promisc_mode intel_promiscuous_md_info; spinlock_t lock; spinlock_t wpax_suitlist_lock; diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 1086dd0809be..f03ec5f53b34 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -959,18 +959,16 @@ static int rtllib_rx_data_filter(struct rtllib_device *ieee, struct ieee80211_hd /* Nullfunc frames may have PS-bit set, so they must be passed to * hostap_handle_sta_rx() before being dropped here. */ - if (!ieee->intel_promiscuous_md_info.promiscuous_on) { - if (stype != IEEE80211_STYPE_DATA && - stype != IEEE80211_STYPE_DATA_CFACK && - stype != IEEE80211_STYPE_DATA_CFPOLL && - stype != IEEE80211_STYPE_DATA_CFACKPOLL && - stype != IEEE80211_STYPE_QOS_DATA) { - if (stype != IEEE80211_STYPE_NULLFUNC) - netdev_dbg(ieee->dev, - "RX: dropped data frame with no data (type=0x%02x, subtype=0x%02x)\n", - type, stype); - return -1; - } + if (stype != IEEE80211_STYPE_DATA && + stype != IEEE80211_STYPE_DATA_CFACK && + stype != IEEE80211_STYPE_DATA_CFPOLL && + stype != IEEE80211_STYPE_DATA_CFACKPOLL && + stype != IEEE80211_STYPE_QOS_DATA) { + if (stype != IEEE80211_STYPE_NULLFUNC) + netdev_dbg(ieee->dev, + "RX: dropped data frame with no data (type=0x%02x, subtype=0x%02x)\n", + type, stype); + return -1; } /* packets from our adapter are dropped (echo) */ -- 2.42.0