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 09/11] staging: rtl8192e: Remove constant variable promiscuous_on
Date: Tue, 3 Oct 2023 21:34:01 +0200 [thread overview]
Message-ID: <07936bcc6a426d6f6d74bece2970ab6028abef44.1696360404.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1696360403.git.philipp.g.hortmann@gmail.com>
Remove variable promiscuous_on as it is set to 0 and unchanged. The
equation results accordingly. Remove dead code.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
.../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
next prev parent reply other threads:[~2023-10-03 19:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-03 19:32 [PATCH 00/11] staging: rtl8192e: Remove functions rawtx and promisc Philipp Hortmann
2023-10-03 19:33 ` [PATCH 01/11] staging: rtl8192e: Remove function _rtl92e_wx_set_rawtx() Philipp Hortmann
2023-10-03 19:33 ` [PATCH 02/11] staging: rtl8192e: Remove equation in function rtllib_xmit_inter() Philipp Hortmann
2023-10-03 19:33 ` [PATCH 03/11] staging: rtl8192e: Remove function rtllib_start_monitor_mode() Philipp Hortmann
2023-10-03 19:33 ` [PATCH 04/11] staging: rtl8192e: Remove unused variable raw_tx Philipp Hortmann
2023-10-03 19:33 ` [PATCH 05/11] staging: rtl8192e: Remove unused parameter mesh_flag Philipp Hortmann
2023-10-03 19:33 ` [PATCH 06/11] staging: rtl8192e: Remove function _rtl92e_wx_set_promisc_mode() Philipp Hortmann
2023-10-03 19:33 ` [PATCH 07/11] staging: rtl8192e: Remove function _rtl92e_wx_get_promisc_mode() Philipp Hortmann
2023-10-03 19:33 ` [PATCH 08/11] staging: rtl8192e: Remove constant variable fltr_src_sta_frame Philipp Hortmann
2023-10-03 19:34 ` Philipp Hortmann [this message]
2023-10-03 19:34 ` [PATCH 10/11] staging: rtl8192e: Remove constant variable net_promiscuous_md Philipp Hortmann
2023-10-03 19:34 ` [PATCH 11/11] staging: rtl8192e: Remove constant variable bToOtherSTA Philipp Hortmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=07936bcc6a426d6f6d74bece2970ab6028abef44.1696360404.git.philipp.g.hortmann@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®